Skip to content

Update a customer by ID

Request

Updates an active regular customer. Walk-In customers are immutable and cannot be edited.

Security
oauth2ClientCredentials(Required scopes: customers:write)
Path
idstringrequired

Customer MongoDB ObjectId

Example:64f4205154a6357a7f85f656
Headers
business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
namestring

Customer name.

Example:"Acme Corp Updated"
emailstring

Customer email address.

Example:"billing@acme.com"
phonestring

Customer phone number.

Example:"+254700000000"
addressstring

Customer physical address.

Example:"123 Main Street, Nairobi"
personArray of strings

Array of person identifiers associated with this customer.

Example:
[ "person-001" ]
taxPinstring

KRA Tax PIN.

Example:"A123456789Z"
curl -i -X PUT \
  https://developer.boyahq.com/_mock/v2/openapi/customers/64f4205154a6357a7f85f656 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -d '{
    "name": "Acme Corp Updated",
    "email": "billing@acme.com",
    "phone": "+254700000000",
    "address": "123 Main Street, Nairobi",
    "person": [
      "person-001"
    ],
    "taxPin": "A123456789Z"
  }'

Responses

Customer updated successfully