Customer - REST Binding
This document specifies the HTTP/REST binding for the Customer Capability .
Protocol Fundamentals
Discovery
Participants advertise Customer REST availability through the protocol discovery document,
including capability name, transport (rest), and endpoint base URL.
Authentication
All endpoints require bearerAuth (HTTP Bearer JWT).
Content Type
Request content type: application/json
Response content type: application/json
Base URL
Example base URL from committee draft:
https://api.opendelivery.io/v2
Operations
Operation
Method
Path
Entity
Description
List Customers
GET
/customers
Customer
Retrieve all customers
Upsert Customers
POST
/customers
Customer
Create or update customers in batch
Get Customer By ID
GET
/customers/{id}
Customer
Retrieve a specific customer by identifier
List Leads
GET
/customers/leads
Lead
Retrieve all leads
Upsert Leads
POST
/customers/leads
Lead
Create or update leads in batch
List Orders
GET
/customers/orders
Order
Retrieve all orders
Upsert Orders
POST
/customers/orders
Order
Create or update orders in batch
Get Order By ID
GET
/customers/orders/{id}
Order
Retrieve a specific order by identifier
Create Review
POST
/customers/reviews
Review
Create a new review
List Reviews
GET
/customers/reviews
Review
Retrieve all reviews
List Customer Reviews
GET
/customers/{customerId}/reviews
Review
Retrieve reviews for a specific customer
List Customers
Method and path: GET /customers
Field
Type
Required
Description
query params
object
No
Optional implementation-specific filters
Output Schema
Field
Type
Required
Description
body
array[Customer]
Yes
Customer list
Example
Upsert Customers
Method and path: POST /customers
Field
Type
Required
Description
body
array[Customer]
Yes
Customers to create/update
Output Schema
Field
Type
Required
Description
status
integer
Yes
200 on success
Example
Get Customer By ID
Method and path: GET /customers/{id}
Field
Type
Required
Description
id
string
Yes
Customer identifier
Output Schema
Field
Type
Required
Description
body
Customer
Yes
Customer payload
Example
List Leads
Method and path: GET /customers/leads
Field
Type
Required
Description
query params
object
No
Optional implementation-specific filters
Output Schema
Field
Type
Required
Description
body
array[Lead]
Yes
Lead list
Example
Upsert Leads
Method and path: POST /customers/leads
Field
Type
Required
Description
body
array[Lead]
Yes
Leads to create/update
Output Schema
Field
Type
Required
Description
status
integer
Yes
200 on success
Example
List Orders
Method and path: GET /customers/orders
Field
Type
Required
Description
query params
object
No
Optional implementation-specific filters
Output Schema
Field
Type
Required
Description
body
array[Order]
Yes
Order list
Example
Upsert Orders
Method and path: POST /customers/orders
Field
Type
Required
Description
body
array[Order]
Yes
Orders to ingest
Output Schema
Field
Type
Required
Description
status
integer
Yes
201 on success
Example
Get Order By ID
Method and path: GET /customers/orders/{id}
Field
Type
Required
Description
id
string
Yes
Order identifier
Output Schema
Field
Type
Required
Description
body
Order
Yes
Order payload
Example
Create Review
Method and path: POST /customers/reviews
Field
Type
Required
Description
body
Review
Yes
Review payload
Output Schema
Field
Type
Required
Description
status
integer
Yes
201 on success
Example
List Reviews
Method and path: GET /customers/reviews
Field
Type
Required
Description
query params
object
No
Optional implementation-specific filters
Output Schema
Field
Type
Required
Description
body
array[Review]
Yes
Review list
Example
List Customer Reviews
Method and path: GET /customers/{customerId}/reviews
Field
Type
Required
Description
customerId
string
Yes
Customer identifier
Output Schema
Field
Type
Required
Description
body
array[Review]
Yes
Reviews for the customer
Example
Error Handling
UCP-style two-layer interpretation applies: transport-level failures use HTTP status,
while business semantics are expressed by endpoint responses and payloads.
Transport Errors
HTTP
Description
400
Bad request (defined in committee OpenAPI)
401
Unauthorized (auth policy)
403
Forbidden (authz policy)
404
Not found (resource path/ID resolution)
500
Internal server error
Business Outcomes
Business outcomes are represented by endpoint-specific success responses (200, 201)
and response payloads (Customer, Lead, Order, Review).
Entities
Customer Collection Response
Field
Type
Required
Description
body
array[Customer]
Yes
Customer list response
Lead Collection Response
Field
Type
Required
Description
body
array[Lead]
Yes
Lead list response
Order Collection Response
Field
Type
Required
Description
body
array[Order]
Yes
Order list response
Review Collection Response
Field
Type
Required
Description
body
array[Review]
Yes
Review list response
Error Response (BadRequest)
Field
Type
Required
Description
code
string
No
Machine-readable error code
message
string
No
Human-readable error message
A conforming Customer REST implementation MUST:
Implement all advertised Customer operations in discovery metadata.
Enforce Bearer authentication on all operations.
Accept and return JSON payloads as defined by Customer and related schemas.
Support batch payloads where defined (POST /customers, POST /leads, POST /orders).
Return status codes consistent with this binding and committee OpenAPI.
For loyalty transport under Customer scope, see Loyalty - REST Binding .