Customers

Update customer name

Partially updates a customer's first and/or last name. Uses optimistic locking – the request must include the current version value. If the resource was modified by another request since it was last read, a 409 conflict is returned.

patch/customers/{id}

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/customers/{id}
  • Auth: none declared

Path parameters

idinteger required

Numeric resource identifier

Request body

versioninteger required

Current version of the customer record (used for optimistic locking)

first_namestring

New first name (optional – provide to update)

last_namestring

New last name (optional – provide to update)

Example request

{
  "version": 1,
  "first_name": "Maida",
  "last_name": "Dach"
}

Response

Customer updated successfully

idinteger required

Unique customer identifier

first_namestring nullable

Updated first name

last_namestring nullable

Updated last name

versioninteger required

Incremented version number after the update

Example response

{
  "id": 1,
  "first_name": "Maida Updated",
  "last_name": "Dach",
  "version": 2
}

Changes

No recorded changes to this operation across all 4 revisions of this API.