Updates one or more labels in bulk. An organization can update up to 10 labels per request. Supplying expiryConfig replaces the label's existing expiry configuration entirely.
Bash
curl -X PUT "https://{host}/api_gateway/v2/labels" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"labels": [
{
"id": 101,
"name": "Winter Sale",
"status": "ACTIVE",
"expiryConfig": {
"type": "RELATIVE",
"duration": 30,
"durationType": "DAYS"
}
}
]
}'
Requires authentication with a valid bearer token.
The token must have write access to the Labels resource.
Note: The Updatable column indicates whether a field can be changed after creation. Fields marked No are identifiers used to locate the label.
Field Type Required Description Updatable labelsarray Required List of label update objects. Maximum 10 per request. — .idinteger Required System-assigned identifier of the label to update. No .namestring Optional New display name. Max 255 characters. Must be unique within the entity type. Yes .externalIdstring Optional New caller-defined identifier. Max 255 characters. Must be unique within the entity type if provided. Yes .descriptionstring Optional New description. Max 1024 characters. Yes .statusenum Optional New label status. One of: ACTIVE, ARCHIVED. Yes .expiryConfigobject Optional New expiry configuration. Replaces the existing configuration entirely when supplied. Yes ..typeenum Required Expiry type. One of: NONE, FIXED_DATE, RELATIVE. Yes ..datestring Conditional Required when type is FIXED_DATE. ISO-8601 UTC date-time (YYYY-MM-DDThh:mm:ssZ). Must be a future date. Yes ..durationinteger Conditional Required when type is RELATIVE. Positive integer representing the number of duration units. Yes ..durationTypeenum Conditional Required when type is RELATIVE. One of: DAYS, MONTHS, YEARS. Yes
JSON
{
"data": [
{
"id": 101,
"externalId": "SUMMER_SALE",
"name": "Winter Sale",
"description": "Products eligible for winter promotions",
"entityType": "PRODUCT",
"expiryConfig": {
"type": "RELATIVE",
"duration": 30,
"durationType": "DAYS"
},
"status": "ACTIVE",
"createdOn": "2026-01-15T10:00:00Z",
"createdBy": 5001,
"lastUpdatedOn": "2026-05-29T08:30:00Z",
"lastUpdatedBy": 5001
}
]
}
Field Type Description dataarray Updated label objects. .idinteger System-assigned unique identifier. .externalIdstring Caller-defined identifier, or null if not set. .namestring Current display name. .descriptionstring Current description, or null if not set. .entityTypestring Entity type: CUSTOMER, PRODUCT, or STORE. .expiryConfigobject Current expiry configuration. ..typestring Expiry type: NONE, FIXED_DATE, or RELATIVE. ..datestring Expiry date in UTC. Present only when type is FIXED_DATE. ..durationinteger Number of duration units. Present only when type is RELATIVE. ..durationTypestring Duration unit: DAYS, MONTHS, or YEARS. Present only when type is RELATIVE. .statusstring Current status: ACTIVE or ARCHIVED. .createdOnstring ISO-8601 timestamp when the label was created. .createdByinteger User ID of the creator. .lastUpdatedOnstring ISO-8601 timestamp of the most recent update. .lastUpdatedByinteger User ID of the most recent editor.
Code Error number Type Description LABEL_NAME_REQUIRED23001 Error Label name is missing. HTTP 400. LABEL_INVALID_ENTITY_TYPE23006 Error entityType is not one of CUSTOMER, PRODUCT, STORE. HTTP 400.LABEL_NAME_TOO_LONG23007 Error name exceeds 255 characters. HTTP 400.LABEL_EXTERNAL_ID_TOO_LONG23008 Error externalId exceeds 255 characters. HTTP 400.LABEL_DESCRIPTION_TOO_LONG23009 Error description exceeds 1024 characters. HTTP 400.LABEL_DUPLICATE_NAME23019 Error A label with this name already exists for the entity type in this org. HTTP 409. LABEL_DUPLICATE_EXTERNAL_ID23020 Error A label with this external ID already exists for the entity type in this org. HTTP 409. LABEL_BATCH_SIZE_EXCEEDED23021 Error More than 10 labels in a single request. HTTP 400.