Skip to main content

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​

ParameterTypeDescription
idStringRequired. The ID of the product zone to update.

Request Body​

Send a JSON object with the fields to change.

FieldTypeRequiredDescription
nameStringNoName of the product zone. Must be unique.
typeStringNoWhat the zone matches on: country, state or zipcode.
countryObjectNoThe zone's country, with name and countryCode.
statesArrayNoStates in the zone, each with name and stateCode. Replaces the current list.
zipcodesArrayNoZIP codes in the zone, each with zipcode. Replaces the current list.
productGroupsObjectNotype (include or exclude) and productGroups (product group IDs). See Create Product Zone.
activeBooleanNoWhether 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​

FieldTypeDescription
successBooleantrue when the product zone was updated.
messageStringConfirmation message.
dataObjectThe updated product zone. For all fields, see Get All Product Zones.

Notes​

  • states, zipcodes and productGroups replace the current values. Include every entry you want to keep.
  • If no product zone matches the ID, data is an empty object.