Example Agency API (2.0.0)
Download OpenAPI specification:Download
A sample API specification demonstrating OpenAPI capabilities - this is for example purposes only
Retrieve a specific customer record
Returns details for a customer given a unique customer ID
Authorizations:
AuthorizationCode
path Parameters
customerId required | string Unique ID of customer |
Responses
Response samples
- 200
- default
Content type
application/json
{- "customerId": "string",
- "names": {
- "firstName": "Swithin",
- "middleName": "Henry",
- "lastName": "Foote",
- "salutation": "Mr Swithin Henry Foote",
- "title": "Mr"
}, - "addresses": [
- {
- "addressType": "Home",
- "address1": "2 Queens Drive",
- "address2": "Khandallah",
- "address3": "Wellington",
- "address4": "string",
- "country": "New Zealand"
}
], - "_links": [
- {
- "rel": "string",
- "href": "string"
}
]
}
Updates a customer’s details
Updates a customer’s details
Authorizations:
AuthorizationCode
path Parameters
customerId required | string Unique ID of customer |
Request Body schema: application/jsonrequired
object | |
Array of objects An array of addresses. Unpopulated properties or items will be returned as null JSON objects. |
Responses
Request samples
- Payload
Content type
application/json
{- "names": {
- "firstName": "Swithin",
- "middleName": "Henry",
- "lastName": "Foote",
- "salutation": "Mr Swithin Henry Foote",
- "title": "Mr"
}, - "addresses": [
- {
- "addressType": "Home",
- "address1": "2 Queens Drive",
- "address2": "Khandallah",
- "address3": "Wellington",
- "address4": "string",
- "country": "New Zealand"
}
]
}
Response samples
- default
Content type
application/json
{- "errors": [
- {
- "code": 0,
- "description": "string"
}
], - "_links": [
- {
- "rel": "string",
- "href": "string"
}
]
}
Deletes an existing customer resource
Deletes an existing customer resource
Authorizations:
AuthorizationCode
path Parameters
customerId required | string Unique ID of customer |
Responses
Response samples
- default
Content type
application/json
{- "errors": [
- {
- "code": 0,
- "description": "string"
}
], - "_links": [
- {
- "rel": "string",
- "href": "string"
}
]
}
Creates a new customer. API will create a customer
Creates a new customer. API will create a customer resource and, if successful, return a hyperlink to the created resource
Authorizations:
AuthorizationCode
Request Body schema: application/jsonrequired
object | |
Array of objects An array of addresses. Unpopulated properties or items will be returned as null JSON objects. |
Responses
Request samples
- Payload
Content type
application/json
{- "names": {
- "firstName": "Swithin",
- "middleName": "Henry",
- "lastName": "Foote",
- "salutation": "Mr Swithin Henry Foote",
- "title": "Mr"
}, - "addresses": [
- {
- "addressType": "Home",
- "address1": "2 Queens Drive",
- "address2": "Khandallah",
- "address3": "Wellington",
- "address4": "string",
- "country": "New Zealand"
}
]
}
Response samples
- 201
- default
Content type
application/json
[- {
- "rel": "string",
- "href": "string"
}
]