CartonCloud
CartonCloud API

Endpoints related to Customers.


List customers

GET
https://api.cartoncloud.com
/tenants/{tenantId}/customers
required permission: VIEW_CUSTOMER

Get a list of available customers.

List customers › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

List customers › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
10

List customers › Responses

Success

​Customer[]
Customer entity returned after create.
id
​string · uuid · readOnly · required
name
​string · required

Company name for the customer.

​object · required
status
​string · enum · required
Enum values:
ACTIVE
INACTIVE
​object · readOnly · required

Map of timestamp entries for various lifecycle events

type
​string · const · required
Const value: CUSTOMER
version
​integer · readOnly · required
​CustomerWarehouseReference[] · required

Warehouses for which the customer is used.

​object
​Properties

Custom and other property values keyed by name.

Custom fields may exist or may be requested by the tenant.

  • For Address, Shipment, Container, Consignment Data, Consignment Item, Vehicle, Customer, Driver, Sale Order, Purchase Order, or Transport Product, use the name in Mapped Field from the tenant.
  • For Sale Order Product (SOP) custom fields, use sop_custom_field_1, sop_custom_field_2, and so on.
  • For other entities such as Purchase Order Product and Product, use custom_field_1, custom_field_2, and so on.

Create customer

POST
https://api.cartoncloud.com
/tenants/{tenantId}/customers
required permission: ADD_CUSTOMER

Create a new customer.

Create customer › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

Create customer › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
10

Create customer › Request Body

name
​string · required

Company name for the customer.

​object[] · minItems: 1 · required

Required from API version 9. Earlier versions may omit this field; the first active warehouse is then assigned.

​object
​object
status
​string · enum
Enum values:
ACTIVE
INACTIVE

Create customer › Responses

Created

Customer entity returned after create.
id
​string · uuid · readOnly · required
name
​string · required

Company name for the customer.

​object · required
status
​string · enum · required
Enum values:
ACTIVE
INACTIVE
​object · readOnly · required

Map of timestamp entries for various lifecycle events

type
​string · const · required
Const value: CUSTOMER
version
​integer · readOnly · required
​CustomerWarehouseReference[] · required

Warehouses for which the customer is used.

​object
​Properties

Custom and other property values keyed by name.

Custom fields may exist or may be requested by the tenant.

  • For Address, Shipment, Container, Consignment Data, Consignment Item, Vehicle, Customer, Driver, Sale Order, Purchase Order, or Transport Product, use the name in Mapped Field from the tenant.
  • For Sale Order Product (SOP) custom fields, use sop_custom_field_1, sop_custom_field_2, and so on.
  • For other entities such as Purchase Order Product and Product, use custom_field_1, custom_field_2, and so on.

Search customers

POST
https://api.cartoncloud.com
/tenants/{tenantId}/customers/search
required permission: VIEW_CUSTOMER

Returns a page of customers that match the condition. Field pointers are JSON pointers on Customer, such as /name.

Search customers › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

Search customers › query Parameters

page
​integer

The page number to return results for

size
​integer

The number of elements per page. Default value may vary between endpoints

sort
​string

Field name and sort order separated by a comma. {dot separated field name},{asc/desc}

nullHandling
​string · enum
Enum values:
NULLS_FIRST
NULLS_LAST

Search customers › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
10

Search customers › Request Body

Search request body. The condition tree is the value of `condition`. `condition.type` is `AndCondition` or `OrCondition`.
​WrapperCondition · required

And and Or conditions must be accompanied with internal conditions property that provides all the fields level conditions that the wrapper must be applied to. Note: The FreeTextSearch condition cannot be combined with other fields level conditions.

Search customers › Responses

Success

​Customer[]
Customer entity returned after create.
id
​string · uuid · readOnly · required
name
​string · required

Company name for the customer.

​object · required
status
​string · enum · required
Enum values:
ACTIVE
INACTIVE
​object · readOnly · required

Map of timestamp entries for various lifecycle events

type
​string · const · required
Const value: CUSTOMER
version
​integer · readOnly · required
​CustomerWarehouseReference[] · required

Warehouses for which the customer is used.

​object
​Properties

Custom and other property values keyed by name.

Custom fields may exist or may be requested by the tenant.

  • For Address, Shipment, Container, Consignment Data, Consignment Item, Vehicle, Customer, Driver, Sale Order, Purchase Order, or Transport Product, use the name in Mapped Field from the tenant.
  • For Sale Order Product (SOP) custom fields, use sop_custom_field_1, sop_custom_field_2, and so on.
  • For other entities such as Purchase Order Product and Product, use custom_field_1, custom_field_2, and so on.

Get customer

GET
https://api.cartoncloud.com
/tenants/{tenantId}/customers/{customerId}
required permission: VIEW_CUSTOMER

Retrieves a previously created customer.

Get customer › path Parameters

tenantId
​string · uuid · required

Tenant ID. Can be found in organisation settings

customerId
​UUID · uuid · required

UUID for the customer.

Example: 38756e85-d15c-45d9-84fd-1b3e50b73527

Get customer › Headers

Accept-Version
​string · enum · required

All API end points require Accept-Version in the request header.

Failure to provide the header will return a status code of 400, however, an invalid version can return a 404, 406 or 400.

Enum values:
10

Get customer › Responses

Success

Customer entity returned after create.
id
​string · uuid · readOnly · required
name
​string · required

Company name for the customer.

​object · required
status
​string · enum · required
Enum values:
ACTIVE
INACTIVE
​object · readOnly · required

Map of timestamp entries for various lifecycle events

type
​string · const · required
Const value: CUSTOMER
version
​integer · readOnly · required
​CustomerWarehouseReference[] · required

Warehouses for which the customer is used.

​object
​Properties

Custom and other property values keyed by name.

Custom fields may exist or may be requested by the tenant.

  • For Address, Shipment, Container, Consignment Data, Consignment Item, Vehicle, Customer, Driver, Sale Order, Purchase Order, or Transport Product, use the name in Mapped Field from the tenant.
  • For Sale Order Product (SOP) custom fields, use sop_custom_field_1, sop_custom_field_2, and so on.
  • For other entities such as Purchase Order Product and Product, use custom_field_1, custom_field_2, and so on.