Skip to content
ShopAssist Docs
APIAPI referenceCatalog Push API

Push Locations

Upsert locations (opening_hours → hours_source = platform).

POST/v1/stores/{store_id}/catalog/locations:batchScope catalog:write

Upsert locations (`opening_hours` → `hours_source = platform`).

Parameters

Parameters of Push Locations
NameInTypeDescription
store_idrequiredpathstring
Idempotency-KeyrequiredheaderstringReplays return the original

Request body (LocationsBatch)

Request body of Push Locations
FieldTypeDescription
locationsrequiredCatalogLocationInput[]CatalogLocationInput items (validated individually; invalid items are reported in rejected[])≥ 1 items · ≤ 500 items
locations[].addressrequiredCatalogAddressInput`Address` (03 §2.4) as pushed by the merchant.
locations[].address.cityrequiredstring | null
locations[].address.country_coderequiredstring | nullpattern `^[A-Z]{2}$`
locations[].address.formattedrequiredstring
locations[].address.line1requiredstring | null
locations[].address.line2requiredstring | null
locations[].address.postal_coderequiredstring | null
locations[].address.regionrequiredstring | null
locations[].emailstring≤ 254 characters
locations[].external_idrequiredstring1–128 characters
locations[].has_pickupboolean
locations[].kindrequired"warehouse" | "retail_store" | "pickup_point" | "virtual"
locations[].latitudenumber≥ -90 · ≤ 90
locations[].longitudenumber≥ -180 · ≤ 180
locations[].namerequiredstring1–255 characters
locations[].opening_hoursOpeningHoursInput`locations.opening_hours` (02 §16.10): `{ weekly; exceptions }`.
locations[].opening_hours.exceptionsOpeningHoursException[]
locations[].opening_hours.exceptions[].daterequiredstringpattern `^\d{4}-\d{2}-\d{2}$`
locations[].opening_hours.exceptions[].intervalsunknown[][]
locations[].opening_hours.exceptions[].is_closedboolean
locations[].opening_hours.exceptions[].notestring≤ 500 characters
locations[].opening_hours.weeklyrequiredOpeningHoursWeekday[]
locations[].opening_hours.weekly[].dayrequiredstring (enum)one of 1, 2, 3, 4, 5, 6, 7
locations[].opening_hours.weekly[].intervalsrequiredunknown[][]
locations[].phonestring≤ 64 characters
locations[].timezonestring≤ 64 characters

Example request

curl -X POST "https://api.shopassist.coec.dk/v1/stores/sto_01j8000000e008000000000000/catalog/locations:batch" \
  -H "Authorization: Bearer $SHOPASSIST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"locations":[{"address":{"city":"string","country_code":"string","formatted":"string","line1":"string","line2":"string","postal_code":"string","region":"string"},"email":"string","external_id":"string","has_pickup":true,"kind":"warehouse","latitude":-90,"longitude":-180,"name":"string","opening_hours":{"exceptions":[{"date":"string","intervals":[null],"is_closed":true,"note":"string"}],"weekly":[{"day":1,"intervals":[null]}]},"phone":"string","timezone":"string"}]}'

Response 202 (BatchAccepted)

Response of Push Locations
FieldTypeDescription
acceptedrequiredinteger≥ 0
rejectedrequiredItemRejection[]
rejected[].errorrequiredItemError`{ code; message }` of a rejected item.
rejected[].error.coderequired"validation_error" | "currency_mismatch" | "duplicate_external_id" | "too_many_variants" | "url_not_allowed"
rejected[].error.messagerequiredstring
rejected[].indexrequiredinteger≥ 0
sync_run_idrequiredstringpattern `^sync_[0-9a-hjkmnp-tv-z]{26}$`
{
  "accepted": 0,
  "rejected": [
    {
      "error": {
        "code": "validation_error",
        "message": "string"
      },
      "index": 0
    }
  ],
  "sync_run_id": "sync_01j8000000e008000000000000"
}

Errors

Every error uses the error envelope; the code field is stable.

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict
  • 413 Content Too Large
  • 422 Unprocessable Content
  • 429 Too Many Requests

Last updated on