Customer API (1.0.0)

Download OpenAPI specification:Download

An API that enables CRUD operations on Customer objects

/customer

Returns all customers

query Parameters
limit
integer <int32>

maximum number of results to return

Responses

200

customer response

default

unexpected error

get /customer
https://ontestautomation.com/api/customer

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

/customer

Creates a new customer

Request Body schema: application/json

Customer to add

firstName
required
string
lastName
required
string
addresses
required
Array of objects (Address)

Responses

200

customer response

default

unexpected error

post /customer
https://ontestautomation.com/api/customer

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "firstName": "string",
  • "lastName": "string",
  • "addresses":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "firstName": "string",
  • "lastName": "string",
  • "addresses":
    [
    ]
}

/customer/{id}

Returns a customer based on their ID

path Parameters
id
required
integer <int64>

ID of customer to fetch

Responses

200

customer response

default

unexpected error

get /customer/{id}
https://ontestautomation.com/api/customer/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "id": 0,
  • "firstName": "string",
  • "lastName": "string",
  • "addresses":
    [
    ]
}

/customer/{id}

Deletes the customer with the given ID

path Parameters
id
required
integer <int64>

ID of customer to delete

Responses

204

customer deleted

default

unexpected error

delete /customer/{id}
https://ontestautomation.com/api/customer/{id}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": 0,
  • "errorMessage": "string"
}