Console API
Locations
6 endpoints.
/api/v1/admin/businesses/{business_id}/locationsGet all locations
Get all locations for a business. By default only active; set listInactive=true to include inactive.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
list_inactive | query | boolean | default false |
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_list_LocationData__| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | LocationData[] | LocationData[] fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
metadata | ResponseMetadata | null | ResponseMetadata fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
meta | ResponseMeta | null | ResponseMeta fields
|
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/locationsCreate location
Create a new location.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Request bodyrequired
application/jsonLocationCreateBody| Field | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
location_namerequired | string | |||||||||||||||||||||||||||||||||||||
is_primary_location | boolean | default false | ||||||||||||||||||||||||||||||||||||
is_active_location | boolean | default true | ||||||||||||||||||||||||||||||||||||
address | Address | null | Address fields
| ||||||||||||||||||||||||||||||||||||
phone | string | null | |||||||||||||||||||||||||||||||||||||
email | string | null | |||||||||||||||||||||||||||||||||||||
description | string | null | |||||||||||||||||||||||||||||||||||||
timezone | string | null | |||||||||||||||||||||||||||||||||||||
business_hours | BusinessHours | null | BusinessHours fields
| ||||||||||||||||||||||||||||||||||||
slug | string | null | |||||||||||||||||||||||||||||||||||||
photo_ids | string[] | max items 5string[] fields |
Responses
201Successful Responseapplication/jsonSuccessResponse_LocationData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | LocationData | LocationData fieldsLocationData, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/locations/{location_id}Get location details
Get location by id. 404 if not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
location_idrequired | path | string (uuid) | |
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_LocationData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | LocationData | LocationData fieldsLocationData, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/locations/{location_id}Update location
Update location details. 404 if not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
location_idrequired | path | string (uuid) | |
authorization | header | string | null |
Request bodyrequired
application/jsonLocationUpdateBody| Field | Type | Description |
|---|---|---|
location_name | string | null | |
is_primary_location | boolean | null | |
is_active_location | boolean | null | |
address | Address | null | Address fieldsAddress, expanded above. |
phone | string | null | |
email | string | null | |
description | string | null | |
timezone | string | null | |
business_hours | BusinessHours | null | BusinessHours fieldsBusinessHours, expanded above. |
slug | string | null | |
photo_ids | string[] | null | string[] | null fields |
Responses
200Successful Responseapplication/jsonSuccessResponse_LocationData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | LocationData | LocationData fieldsLocationData, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/locations/{location_id}Delete location
Delete a location. 404 if not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
location_idrequired | path | string (uuid) | |
authorization | header | string | null |
Responses
204Successful Response400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.
/api/v1/admin/businesses/{business_id}/locations/reorderReorder locations
Reorder locations by ordered list of location ids.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Request bodyrequired
application/jsonLocationReorderBody| Field | Type | Description |
|---|---|---|
ordered_location_idsrequired | string[] | string[] fields |
Responses
200Successful Responseapplication/jsonSuccessResponse_list_LocationData__| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | LocationData[] | LocationData[] fieldsLocationData, expanded above. |
metadata | ResponseMetadata | null | ResponseMetadata fieldsResponseMetadata, expanded above. |
meta | ResponseMeta | null | ResponseMeta fieldsResponseMeta, expanded above. |
400Bad request401Unauthorized403Forbidden404Not found422Validation error500Internal server error503Service unavailable
Error bodies: ErrorResponse. See Errors.