Add Till

This API enables you to create a new Till for your store. You can also create or attach existing custom fields to a till. The till-level custom fields enable brands to add additional information about the till especially when the brand has multiple tills mapped to a store. For example, till code, till name, description about till etc. The custom fields that you create for a till will be available for all the tills under the org.

👍

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

URIv2/orgEntity/till
HTTP methodPOST
Rate limitDefault
Batch supportNA

Request body parameters

Note: Parameters marked with * are mandatory.

ParameterTypeDescription
name*stringName for the till. The name must start with a lowercase letter (az). The rest can include lowercase letters, digits, dot (.), underscore (_), or hyphen (-). Uppercase letters and other special characters are not allowed. The name must be at least 3 characters long. The Till name specified will also be copied to Till code in the backend.
password*stringPassword for the till.
storeId*longStore ID of the parent Store in which the Till has to be created.
descriptionstringDescription for the till.
billablebooleanSpecify if the till is used for billing. By default, the value is set as true.
storeServerIdlongStore server ID of the parent Store if available.
customFieldsarray-objSpecify the custom fields to be added to the org and attached to the till. You can create new fields or add existing ones.
└─ name*stringName for the custom field. Required if you are creating custom fields.
└─ value*stringValue assigned to the custom field. Required if you are creating custom fields.
└─ typestringType of the custom field (e.g., text, number, date).
└─ dataTypestringData type of the value stored in the field (e.g., string, integer, boolean).
└─ rulestringClient-side validation rule for the field (Infix expression).
└─ serverRulestringServer-side validation rule for the field (Infix expression).
└─ regexstringRegular expression for validating the field value.
└─ errorstringError message to be displayed.
└─ optionsintComma-separated options for selection fields. Example: valueA, valueB, valueC.
└─ disableAtServerintFlag for disabling the field on the server-side (0: enabled, 1: disabled).
└─ enableAuditTrailintFlag for audit tracking (0: not tracked, 1: tracked). Up to 5 fields can be tracked.
└─ isPiiDataintFlag for PII data (0: no, 1: yes).
└─ isPsiDataintFlag for PSI data (0: no, 1: yes). Learn more
└─ helptextstringHelp text displayed to the user.
└─ attrsstringAdditional attributes associated with the custom field.
curl --location 'https://eu.api.capillarytech.com/v2/orgEntity/till' \
--header 'Authorization: Basic cmFuZG9tE6MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRiNzA=' \
--header 'Content-Type: application/json' \
--data '{
  "description": "Testing description",
  "storeId": 50154731,
  "password": "123",
  "billable": true,
  "name": "new_till2239"
}'
curl --location 'https://eu.api.capillarytech.com/v2/orgEntity/till' \
--header 'Authorization: Basic cmFuZG9tE6MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRiNzA=' \
--header 'Content-Type: application/json' \
--data '{
"description": "Testing description",
"storeId": 50154731,
"password": "123",
"billable": true,
"name": "new_till2239",
"customFields": [
{
  "name": "cf_1",
  "type": "text",
  "dataType": "string",
  "label": "Custom Field Label",
  "defaultValue": "14",
  "phase": "",
  "position": 1,
  "rule": "",
  "serverRule": "",
  "regex": "",
  "error": "",
  "options": "",
  "isDisabled": 0,
  "isCompulsory": 0,
  "disableAtServer": 0,
  "isUpdatable": 1,
  "enableAuditTrail": 0,
  "isPiiData": 0,
  "isPsiData": 0,
  "helptext": "This is a custom field",
  "attrs": "",
  "value": "15"
}
]
}'
curl --location 'https://eu.api.capillarytech.com/v2/orgEntity/till' \
--header 'Authorization: Basic cmFuZG9tE6MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRiNzA=' \
--header 'Content-Type: application/json' \
--data '{
"description": "Testing description",
"storeId": 50154731,
"password": "123",
"billable": true,
"name": "new_till_2",
"customFields": [
{
  "name": "cf_1",
  "value": "16"
}
]
}'

Response parameters

ParameterDescription
createdIdThe till ID created.
warningsWarnings if any.
{
    "createdId": 50157065,
    "warnings": []
}

API-specific error codes

Error codeDescription
1207TIll name already exists. Use a unique name.
1214The parent store is not valid. Use a valid parent store ID
1023The 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.
1024The custom field parameter is null or empty. Enter a value for the parameter.
1025There are multiple custom fields with the same name. Use a unique custom field name.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!