post https://{host}/v2/orgEntity/till
This API enables you to create a new till for your store and attach existing custom fields to store information specific to the till. The till level custom fields enables brands to add additional information about the till specially when the brand has multiple tills mapped to a store. For example, till code, till name, description about till etc.
Note
For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .
API endpoint example
https://eu.api.capillarytech.com/v2/orgEntity/till
Prerequisites
- Authentication - Basic or OAuth authentication details
- Access group resource - Access to Organisation resource
- Configuration - If you want to create more than five custom fields, create a ticket to the sustenance team and increase the limit in the configuration
PRODUCT_CONF_ORG_AUDITABLE_CUSTOM_FIELDS_LIMIT
. By default, the maximum value is set as five.
Resource information
URI | v2/orgEntity/till |
HTTP method | POST |
Rate limit | Default |
Batch support | NA |
Request body parameters
Parameter (Parameters marked with * are mandatory) | Type | Description |
---|---|---|
description | string | Description for the till. |
storeId* | long | Store ID of the parent Store to which the till has to be created and attached. |
password* | string | Password for the till |
billable | boolean | Specify if the till is used for billing. By default, the value is set as true. |
name* | string | Name for the till. The till name specified will be copied to till code as well in the backend. |
customFields | array-obj | Specify the Custom fields to be attached to the till that already exists in the org. |
{
"description": "Testing description",
"storeId": 50154731,
"password": "123",
"billable": true,
"name": "new_till_2",
"customFields": [
{
"name": "cf_1",
"value": "16"
}
]
}
Response parameters
Parameter | Data type | Description |
---|---|---|
createdId | Int | The till ID created. |
warnings | String | Warnings if any. |
{
"createdId": 50156997, //createdId specifies the created TillId
"warnings": []
}
API-specific error codes
Error code | Description |
---|---|
1207 | Till name already exists. Use a unique name. |
1214 | The parent store is not valid. Use a valid parent store ID |
1023 | The number of custom fields that can be created is reached. In the org settings, increase the limit of PRODUCT_CONF_ORG_AUDITABLE_CUSTOM_FIELDS_LIMIT . Default value: 5. |
1024 | The custom field parameter is null or empty. Enter a value for the parameter. |
1025 | There are multiple custom fields with the same name. Use a unique custom field name. |