Update a customer
Any signed in user. Patches a customer’s name, phone, national id, notes, or credit fields. An empty patch is refused with 400 and an unknown customer with 404; money stays strings.
PUT
/api/v1/customers/{customerId}Authorization
AuthorizationBearer token (JWT) · headerrequiredJWT from POST /api/v1/auth/login sent as Authorization Bearer.
Path parameters
customerIdstringrequiredThe customer id.
Request body
requiredapplication/jsonnamestring | nullphonestring | nullnational_idstring | nullnotesstring | nullcredit_limitnumber | nullShow propertiesHide properties
Any of:
number
numbernull
nullis_credit_allowedboolean | nullResponses
200
Customer updated
idstringrequirednamestringrequiredphonestringrequirednational_idstringrequirednotesstringrequiredimage_urlstringrequiredcredit_limitstringrequiredcurrent_balancestringrequiredis_credit_allowedbooleanrequiredcreated_atstringrequiredupdated_atstringrequiredis_deletedbooleanrequired400
No fields to update, or a field fails validation
detailstringrequired401
Not authenticated
detailstringrequired404
Customer not found
detailstringrequired