Customers

Get customer by ID

Returns a single customer with their full details and a summary of associated transportation orders.

get/customers/{id}

Request

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

Path parameters

idinteger required

Numeric resource identifier

Response

Customer found

idinteger required

Unique customer identifier

first_namestring nullable

Customer first name

last_namestring nullable

Customer last name

emailstring nullable

Customer email address

phonestring nullable

Customer phone number

customer_typestring nullable

Customer classification (e.g. BUSINESS, INDIVIDUAL)

addressstring nullable

Customer address

versioninteger required

Optimistic locking version counter – must be passed in PATCH requests

Example response

{
  "id": 1,
  "first_name": "Maida",
  "last_name": "Dach",
  "email": "forestraynor@bauch.io",
  "phone": "8082482608",
  "customer_type": "BUSINESS",
  "address": "75968 Villageshire, St. Louis, New Hampshire 86673",
  "version": 1,
  "orders": [
    {
      "id": 472,
      "order_number": "#00472",
      "amount": 43.19,
      "status": "DELIVERED"
    }
  ]
}

Changes

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