GET /v1/customers
Get list of customers

Examples

/customers/?email=joe@smith.me&embed=address

Params

Param name Description
email
optional

Customer's Email Address. Returns array of single customer

Validations:

  • Must be String

embed
optional

Children available: address

Validations:

  • Must be String


POST /v1/customers/sign_in

Params

Param name Description
email
optional

TODO

Validations:

  • Must be String

password
optional

TODO

Validations:

  • Must be String

embed
optional

Children available: address

Validations:

  • Must be String


GET /v1/customers/:id
Get single customer

Examples

/customers/123?embed=address

Params

Param name Description
id
required

Customer ID

Validations:

  • Must be Integer

embed
optional

Children available: address

Validations:

  • Must be String


POST /v1/customers
Create a new customer

A JSON object representing the new customer

Examples

{
      "first_name": "Joe",
      "last_name": "Smith",
      "email": "joe@smith.me",
      "delivery_service_id": 56,
      "address": {
          "address_1": "12 Bucky Lane",
          "address_2": "",
          "suburb": "Boxville",
          "city": "Wellington",
          "postcode": "007",
          "delivery_note": "Just slip it through the catflap",
          "home_phone": "01 234 5678",
          "mobile_phone": "012 345 6789",
          "work_phone": "98 765 4321"
      }
}

Params

Param name Description
customer
required

JSON String

Validations:

  • Must be Object


PATCH /v1/customers/:id
Update an existing customer

A JSON object representing the customer

Examples

{
      "first_name": "Joe",
      "last_name": "Smith",
      "email": "joe@smith.me",
      "delivery_service_id": 56,
      "address": {
          "address_1": "12 Bucky Lane",
          "address_2": "",
          "suburb": "Boxville",
          "city": "Wellington",
          "postcode": "007",
          "delivery_note": "Just slip it through the catflap",
          "home_phone": "01 234 5678",
          "mobile_phone": "012 345 6789",
          "work_phone": "98 765 4321"
      }
}

Params

Param name Description
customer
required

JSON String

Validations:

  • Must be Object