# Customers

Customers

## GET /v1/customers/

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Customers","description":"Customers"}],"paths":{"/v1/customers/":{"get":{"tags":["Customers"],"operationId":"8b8a3aec251ada40146eb0bb54d392b8","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}}}}}}}},"components":{"schemas":{"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```

## POST /v1/customers/

>

```json
{"openapi":"3.0.0","info":{"title":"Supply'd API","version":"1.0"},"tags":[{"name":"Customers","description":"Customers"}],"paths":{"/v1/customers/":{"post":{"tags":["Customers"],"operationId":"621512186484cbff1b9587cd2ebcba43","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomer"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}}}}}}}}},"components":{"schemas":{"CreateCustomer":{"required":["name"],"properties":{"name":{"type":"string"},"abn":{"type":"string","default":null,"nullable":true},"account_number":{"type":"string","default":null,"nullable":true},"website":{"type":"string","default":null,"nullable":true},"logo_url":{"type":"string","default":null,"nullable":true},"payment_terms":{"type":"integer","default":0},"payment_terms_period":{"type":"string","default":"days"},"notes":{"type":"string","default":null,"nullable":true},"location":{"oneOf":[{"$ref":"#/components/schemas/CreateCustomerLocation"}],"nullable":true,"default":null},"contact":{"oneOf":[{"$ref":"#/components/schemas/CreateCustomerContact"}],"nullable":true,"default":null},"groups":{"type":"array","items":{"type":"integer"},"default":[]}},"type":"object"},"CreateCustomerLocation":{"required":["address","suburb","state","postcode","country"],"properties":{"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string","default":"AU"}},"type":"object"},"CreateCustomerContact":{"required":["first_name"],"properties":{"first_name":{"type":"string"},"last_name":{"type":"string","default":""},"email":{"type":"string","default":""},"phone":{"type":"string","default":""},"role":{"type":"string","default":"Primary"}},"type":"object"},"Customer":{"properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomerType"},"name":{"type":"string"},"abn":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"website":{"type":"string","nullable":true},"logo_url":{"type":"string","nullable":true},"payment_terms":{"type":"integer"},"payment_terms_period":{"type":"string"},"credit_hold":{"type":"boolean"},"notes":{"type":"string","nullable":true},"last_modified_at":{"type":"string","nullable":true},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"locations":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"groups":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}}},"type":"object"},"CustomerType":{"type":"string","enum":["Internal","External","Custom"]},"Contact":{"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"mobile_area":{"type":"string","nullable":true},"mobile_number":{"type":"string","nullable":true},"role":{"type":"string","nullable":true}},"type":"object"},"Location":{"properties":{"id":{"type":"string","nullable":true},"name":{"type":"string"},"is_billing":{"type":"boolean"},"is_shipping":{"type":"boolean"},"manage_stock":{"type":"boolean"},"address":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string"},"postcode":{"type":"string"},"country":{"type":"string"},"location":{"type":"object","nullable":true},"opening_hours":{"type":"object","nullable":true}},"type":"object"},"CustomerGroup":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}}}}
```
