Update Product Zone
Updates an existing product zone. Send only the fields you want to change.
HTTP Request
- URL:
/ProductZone/{id} - Method:
PUT - Headers:
accessToken: Required. Your API access token.Content-Type:application/json
- Required scope:
READ_WRITE_PRODUCT
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | Required. The ID of the product zone to update. |
Request Body
Send a JSON object with the fields to change.
| Field | Type | Required | Description |
|---|---|---|---|
name | String | No | Name of the product zone. Must be unique. |
type | String | No | What the zone matches on: country, state or zipcode. |
country | Object | No | The zone's country, with name and countryCode. |
states | Array | No | States in the zone, each with name and stateCode. Replaces the current list. |
zipcodes | Array | No | ZIP codes in the zone, each with zipcode. Replaces the current list. |
productGroups | Object | No | type (include or exclude) and productGroups (product group IDs). See Create Product Zone. |
active | Boolean | No | Whether the zone is active. |
cURL Example
curl --location --request PUT '<BASE_URL>/ProductZone/6705c1a2b3c4d5e6f7a8b9c0' \
--header 'accessToken: <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"states": [
{ "name": "California", "stateCode": "CA" },
{ "name": "Oregon", "stateCode": "OR" },
{ "name": "Washington", "stateCode": "WA" }
]
}'
Response
- 200 OK: The product zone was updated successfully.
- 400 Bad Request: The access token is missing or invalid, the product zone ID is not valid, or another zone already uses the name.
Sample JSON Response
{
"success": true,
"message": "Product Filter updated successfully",
"data": {
"id": "6705c1a2b3c4d5e6f7a8b9c0",
"name": "West Coast",
"active": true,
"type": "state",
"country": { "name": "United States", "countryCode": "US" },
"states": [
{ "_id": "6706d2b3c4d5e6f7a8b9c0d1", "name": "California", "stateCode": "CA" },
{ "_id": "6706d2b3c4d5e6f7a8b9c0d2", "name": "Oregon", "stateCode": "OR" },
{ "_id": "6706d2b3c4d5e6f7a8b9c0d3", "name": "Washington", "stateCode": "WA" }
],
"zipcodes": [],
"productGroups": {
"_id": "6705c1a2b3c4d5e6f7a8b9c3",
"type": "exclude",
"productGroups": ["66f0a9d8c7b6a5f4e3d2c1b0"]
},
"createdAt": "2025-10-09T06:14:58.210Z",
"updatedAt": "2025-10-10T11:03:27.884Z"
}
}
Response Details
| Field | Type | Description |
|---|---|---|
success | Boolean | true when the product zone was updated. |
message | String | Confirmation message. |
data | Object | The updated product zone. For all fields, see Get All Product Zones. |
Notes
states,zipcodesandproductGroupsreplace the current values. Include every entry you want to keep.- If no product zone matches the ID,
datais an empty object.