Update a Customer

PATCH/api/v1/customers/{customerId}

Update a customer record in your Ushuru organisation database. To upsert a branch customer in Kenya Revenue Authority eTIMS, use POST /api/v1/customers.

Requires x-api-key

http://localhost:8100/api/v1/customers/{customerId}

Path Parameters

FieldTypeRequiredDescription
customerIdstringRequiredThe customer Kenya Revenue Authority PIN (custTin).

How to Update

Use POST {{API_PATH}}/customers with the updated fields. Kenya Revenue Authority re-saves the customer record using the custTin as the unique key.

Request

{
  "custTin": "A000000000Z",
  "custNm": "BUYER COMPANY LTD - UPDATED",
  "adrs": "P.O. Box 99999, Nairobi",
  "telNo": "+254711111111",
  "email": "newaccounts@buyerco.ke",
  "useYn": "Y",
  "regrId": "USR01",
  "regrNm": "Admin",
  "modrId": "USR01",
  "modrNm": "Admin"
}

Response

{
  "success": true,
  "message": "Customer updated in Kenya Revenue Authority eTIMS.",
  "data": {
    "custTin": "A000000000Z",
    "custNm": "BUYER COMPANY LTD - UPDATED"
  }
}
# Use POST /customers to update (Kenya Revenue Authority upserts by custTin)
curl -X POST http://localhost:8100/api/v1/customers \\
  -H "x-api-key: YOUR_API_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{
    "custTin": "A000000000Z",
    "custNm": "BUYER COMPANY LTD - UPDATED",
    "adrs": "New Address",
    "useYn": "Y",
    "regrId": "USR01",
    "regrNm": "Admin"
  }'