Introduction
Customers API
Overview
Organisation-scoped customer records. Other services store this id only — vehicles, jobs, bookings, and invoices stay in their own APIs.
Integration guide: Customers service docs
OpenAPI v0.1.0 · source openapi/customers.json
OpenAPI 3.0.0 · v0.1.0 · 8 operations
Operations
System
Liveness and generated documentation.
get/healthHealth check
/healthExample request
curl -sS \
-X GET \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/health"Operation ID: getHealth
Responses
- 200
Service is running
application/json
get/v1/healthHealth check (versioned)
/v1/healthExample request
curl -sS \
-X GET \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/v1/health"Operation ID: getHealthV1
Responses
- 200
Service is running
application/json
Customers
Customer records for any site.
get/v1/customersList customers
/v1/customersExample request
curl -sS \
-X GET \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/v1/customers"Summary rows without `details`; use GET `/v1/customers/{id}` for full metadata.
Operation ID: listCustomers
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| page | query | integer | — |
| page_size | query | integer | — |
| q | query | string | — |
Responses
- 200
Customers
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json
post/v1/customersCreate customer
/v1/customersExample request
curl -sS \
-X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
"https://api.mayawealth.co.uk/customers/v1/customers"Required: `first_name`, `last_name`, `primary_phone`, and `email`. Optional company, address, notes, and `details.subject_refs` (`service` gateway slug + `subject_id` UUID) go in `details`.
Operation ID: createCustomer
Request body(required)
application/jsonCustomerCreate
Responses
- 201
Customer created
application/json
- 400
Malformed request.
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 404
The requested resource was not found.
application/json
- 409
Conflict — version mismatch, idempotency conflict, or invalid state transition.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json
get/v1/customers/{id}Get customer
/v1/customers/{id}Example request
curl -sS \
-X GET \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/v1/customers/example-id"Operation ID: getCustomer
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
Responses
- 200
Customer
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 404
The requested resource was not found.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json
patch/v1/customers/{id}Update customer
/v1/customers/{id}Example request
curl -sS \
-X PATCH \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
"https://api.mayawealth.co.uk/customers/v1/customers/example-id"Operation ID: updateCustomer
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
Request body(required)
application/jsonCustomerPatch
Responses
- 200
Customer updated
application/json
- 400
Malformed request.
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 404
The requested resource was not found.
application/json
- 409
Conflict — version mismatch, idempotency conflict, or invalid state transition.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json
post/v1/customers/searchSearch customers
/v1/customers/searchExample request
curl -sS \
-X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/v1/customers/search"Operation ID: searchCustomers
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| page | query | integer | — |
| page_size | query | integer | — |
| q | query | string | — |
Responses
- 200
Customers
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json
Audit
Immutable change log for this service.
get/v1/auditAudit trail
/v1/auditExample request
curl -sS \
-X GET \
-H "Accept: application/json" \
-H "Authorization: Bearer <jwt>" \
"https://api.mayawealth.co.uk/customers/v1/audit"Events for the current JWT organisation only.
Operation ID: listAudit
Responses
- 200
Audit events
application/json
- 401
Missing or invalid JWT.
application/json
- 403
Authenticated but not permitted.
application/json
- 422
Validation failed.
application/json
- 429
Rate limit exceeded.
application/json
- 500
Unexpected server error.
application/json