Docs
Management API
Attributes

Attributes

Get All Customer Attributes

GET /customers/attributes

Request

Returns a list of Customer Attributes. You can pass in optional filter parameters.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • page in query - integer

    Page number. page=1

  • limit in query - number

    Items count per page. limit=50

  • name in query - string

    Filter items by customer attribute name. name=Date+Joined

  • name:like in query - string

    Filter items by substring in customer attribute name. name:like=join

  • type in query - string

    The type of the customer attribute.

  • date_created in query - string

    Filter items by date_created, for example, 2024-05-14T09:34:00, 2024-05-14T09:34:00 or 2024-05-14.

  • date_created:max in query - string

    Filter items by maximum date_created, for example, 2024-05-14T09:34:00, 2024-05-14T09:34:00 or 2024-05-14. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields created before this date.

  • date_created:min in query - string

    Filter items by minimum date_created, for example, 2024-05-14T09:34:00, 2024-05-14T09:34:00 or 2024-05-14. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields created after this date.

  • date_modified in query - string

    Filter items by date_modified, for example, 2024-05-14T09:34:00 or 2024-05-14.

  • date_modified:max in query - string

    Filter items by maximum date_modified, for example, 2024-05-14T09:34:00 or 2024-05-14. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields modified before this date.

  • date_modified:min in query - string

    Filter items by minimum date_modified, for example, 2024-05-14T09:34:00 or 2024-05-14. ISO 8601 full-date is required, ISO 8601 full-time is not required. UNIX timestamp also accepted. Returns metafields modified after this date.

  • Accept in header with default of application/json - string
  • Content-Type in header with default of application/json - string

example

Response

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • meta
    object

    Response metadata.

response

Create a Customer Attribute

POST /customers/attributes

Request

Creates a Customer Attribute. Multiple customer attributes can be created in one call.

Required Fields

  • name
  • type

Limits

  • Limit of 3 concurrent requests.

Notes

Once the data type is set, it cannot be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer.

Customer attributes are created separately from the customer. After the name and type are created, then the attributes can be added to the customer.

A store cannot have more than 50 customer attributes.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
  • Content-Type in header with default of application/json - string

Body

array | application/json
  • name
    string
    required

    Attribute name.

    >= 1 characters<= 255 characters
  • type
    string
    required

    Attribute type should match one of: string, number, date.

    Allowed: string | number | date

    Example: string

example

Response

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • meta
    object

    Response metadata.

response

Update a Customer Attribute

PUT /customers/attributes

Request

Updates a Customer Attribute. Multiple customer attributes can be updated in one call.

Required Fields

  • id -- ID of the Customer Attribute

Once the data type is set, it can not be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer.

Limits

  • Limit of 3 concurrent requests.

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • Accept in header with default of application/json - string
  • Content-Type in header with default of application/json - string

Body

array | application/json
  • name
    string
    required

    Attribute name.

    >= 1 characters<= 255 characters
  • id
    integer
    required

    Attribute ID.

example

Response

Body

object | application/json

Response payload for the BigCommerce API.

  • data
    array[object]

  • meta
    object

    Response metadata.

response

Delete Customer Attributes

DELETE /customers/attributes

Request

Deletes Customer Attributes from the store.

Required Query

  • id:in -- ID of the Customer Attribute

Authentication

  • X-Auth-Token in header
    required

Parameters

  • store_hash in path - string
  • id:in in query - array
    required

    Filter items by ID.

    Type: array[integer]

  • Accept in header with default of application/json - string
  • Content-Type in header with default of application/json - string

example

Response

Did you find what you were looking for?