Add label to Customer

To add label to a Customer, you need to call the /api/{storeCode}/customer/{customerId}/label` endpoint with the ``PUT method.

Definition

PUT  /api/{storeCode}/customer/{customerId}/label
Parameter Parameter type Description
Authorization header Token received during authentication
<storeCode> query Code of the store the updated customer belongs to.
<customerId> query Customer ID
labels[][key] query label key
labels[][value] query label value

Example

curl -X POST \
    http://localhost:8181/DEFAULT/customer/28f79fe5-00af-41f6-9200-e59e86b0c67f/label \
    -H 'accept: application/json' \
    -H 'content-type: application/json' \
    -d '{
        "labels": [
          {"key": "keyA", "value": "valueA"},
          {"key": "keyB", "value": "valueB"}
        ]
    }'

Note

The eyJhbGciOiJSUzI1NiIsInR5cCI6… authorization token is an example value. Your value may be different. Read more about Authorization here.

Example Response

STATUS: 204 OK

Remove label from a customer

To remove label from a customer, you need to call the /api/{storeCode}/customer/{customerId}/label endpoint with the DELETE method.

Definition

DELETE  /api/{storeCode}/customer/{customerId}/label
Parameter Parameter type Description
Authorization header Token received during authentication
<storeCode> query Code of the store the updated customer belongs to.
<customerId> query Customer ID
labels[][key] query label key
labels[][value] query label value

Example

curl -X DELETE \
    http://localhost:8181/DEFAULT/customer/28f79fe5-00af-41f6-9200-e59e86b0c67f/label \
    -H 'accept: application/json' \
    -H 'content-type: application/json' \
    -d '{
        "labels": [
          {"key": "keyA", "value": "valueA"},
          {"key": "keyB", "value": "valueB"}
        ]
    }'

Note

The eyJhbGciOiJSUzI1NiIsInR5cCI6… authorization token is an example value. Your value may be different. Read more about Authorization here.

Example Response

STATUS: 204 No Content