v2

latestOpenAPI 3.1.12026-08-06856719.6 KB
Location

Toggle location active status

Activate or deactivate a location. A location must be deactivated before it can be deleted.

Deactivation is blocked if:

  • the location is the only active location, or
  • the location is set as the main or back-order location
patch/v1/locations/{location}

Path parameters

locationstring uuid required

Location ID

Headers

X-BUSINESS-API-KEYstring required
Example:b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d

Request body

activeboolean required

Set to false to deactivate, true to activate

Response

Location active status updated

idstring uuid required

Location ID

business_idstring uuid required

Business that owns this location

namestring required

Name of the location

streetstring required

Street address

citystring required

City

statestring required

State or region

countrystring required

Country code or name

postal_codestring required

Postal code

activeboolean required

Whether the location is active

pickupsobject[]

Pickup configurations linked to this location (empty when not loaded)

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "9c484458-b2a3-4f49-87ed-ad9ea71b0df3",
  "business_id": "8a1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d",
  "name": "Main Store",
  "street": "123 Main St",
  "city": "Singapore",
  "state": "Singapore",
  "country": "SG",
  "postal_code": "123456",
  "active": true
}