Console API
Business
6 endpoints.
/api/v1/admin/businessesCreate business
Create a business. company_name required; id optional (server generates if omitted).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
authorization | header | string | null |
Request bodyrequired
application/jsonBusinessCreateBody| Field | Type | Description | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
company_namerequired | string | |||||||||||||||||||||||||||||||||||||
year_founded | integer | null | |||||||||||||||||||||||||||||||||||||
website_url | string | null | |||||||||||||||||||||||||||||||||||||
tagline | string | null | |||||||||||||||||||||||||||||||||||||
address | Address | null | Address fields
| ||||||||||||||||||||||||||||||||||||
descriptions | Descriptions | null | Descriptions fields
| ||||||||||||||||||||||||||||||||||||
contact_info | ContactInfo | null | ContactInfo fields
| ||||||||||||||||||||||||||||||||||||
social_profiles | SocialProfiles | null | SocialProfiles fields
| ||||||||||||||||||||||||||||||||||||
industries | BusinessIndustries | null | BusinessIndustries fields
| ||||||||||||||||||||||||||||||||||||
terms_of_service_markdown | string | null | |||||||||||||||||||||||||||||||||||||
privacy_policy_markdown | string | null | |||||||||||||||||||||||||||||||||||||
is_active | boolean | default true |
Responses
201Successful Responseapplication/jsonSuccessResponse_BusinessProfileData_| Field | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
datarequired | BusinessProfileData | BusinessProfileData 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}Get business details
Get business by id. 404 if not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_BusinessProfileData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | BusinessProfileData | BusinessProfileData fieldsBusinessProfileData, 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}Update specific fields of business profile
Partial update (PATCH). 404 if not found.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Request bodyrequired
application/jsonBusinessUpdateBody| Field | Type | Description |
|---|---|---|
company_name | string | null | |
year_founded | integer | null | |
website_url | string | null | |
tagline | string | null | |
address | Address | null | Address fieldsAddress, expanded above. |
descriptions | Descriptions | null | Descriptions fieldsDescriptions, expanded above. |
contact_info | ContactInfo | null | ContactInfo fieldsContactInfo, expanded above. |
social_profiles | SocialProfiles | null | SocialProfiles fieldsSocialProfiles, expanded above. |
industries | BusinessIndustries | null | BusinessIndustries fieldsBusinessIndustries, expanded above. |
terms_of_service_markdown | string | null | |
privacy_policy_markdown | string | null | |
is_active | boolean | null | |
timezone | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_BusinessProfileData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | BusinessProfileData | BusinessProfileData fieldsBusinessProfileData, 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}/api-keyGet business public API credentials (URL + key)
Return the public API URL and active key for a business. 404 if the business doesn't exist.
The full key is returned so the console can offer copy-to-clipboard; it is never rendered in full. ``key_prefix``/``api_key`` are null when the business has no active key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_BusinessApiKeyData_| Field | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | |||||||||||||
success | true | default true | ||||||||||||
datarequired | BusinessApiKeyData | BusinessApiKeyData fields
| ||||||||||||
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}/dashboardGet dashboard info for a specific business
Counts (services, locations, team, faq, jobs, photos) for a specific business.
Access control is handled by ``auth_admin("viewer")``: the caller must have a ``business_users`` row for ``business_id``, OR carry ``global_business_access`` (super-admins). Otherwise 403. Returns 404 NOT_FOUND when the business id doesn't exist.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
business_idrequired | path | string (uuid) | |
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_BusinessDashboardData_| Field | Type | Description | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request_idrequired | string | ||||||||||||||||||||||||||||||||||
success | true | default true | |||||||||||||||||||||||||||||||||
datarequired | BusinessDashboardData | BusinessDashboardData fields
| |||||||||||||||||||||||||||||||||
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/dashboardDeprecated[Deprecated] Dashboard info for authenticated user's business — use /businesses/{business_id}/dashboard
Get business name and counts (services, locations, team, faq, jobs, photos) for the user's *own* business.
Returns 404 NOT_FOUND when the caller has no ``business_users`` row — including for admins who aren't directly attached to any business. Use ``GET /businesses/{business_id}/dashboard`` to fetch counts for a specific business (with the standard business-access auth check).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
authorization | header | string | null |
Responses
200Successful Responseapplication/jsonSuccessResponse_BusinessDashboardData_| Field | Type | Description |
|---|---|---|
request_idrequired | string | |
success | true | default true |
datarequired | BusinessDashboardData | BusinessDashboardData fieldsBusinessDashboardData, 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.