Add Concepts in Bulk

Create up to 100 concepts in a single request.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create up to 100 concepts in a single request. Each concept is validated and persisted independently; a failure in one item doesn't block the others. The response reflects the outcome of each item individually, and the HTTP status reflects the overall result: 201 If all items succeeded, 207 If some failed, or 400 If all failed.

Example request

curl -X POST "https://{host}/v2/locations/concepts?inheritLocale=false" \
  -H "Authorization: Basic {base64-encoded-credentials}" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "code": "concept-retail",
      "name": "Retail Concept",
      "groupParentCode": "concept-root",
      "language": "en-IN",
      "currency": "INR",
      "timezone": "Asia/Kolkata",
      "description": "Retail channel concept",
      "isActive": true,
      "externalIds": {"erpId": "ERP-C-001"},
      "customFields": {"conceptcf1": "value1"}
    }
  ]'
curl --location 'https://eu.api.capillarytech.com/v2/locations/concepts?inheritLocale=false' \
--header 'Content-Type: application/json' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJraWQCJleHAiOTEZdW7eAj_5ITFRQaHlvzLNoMfNCZP70deZeUGOy6tssRXIh043D_6pOrt1APKgQdxdxqUt8MrWmICfHEHHkzX6inaPdW6vbjn89rZVGfIjfMKkFUAVaNeLbPJJtOIfMTWoKbKrB6HDm6i5NgkYLVusL_C9Qmq3mMtivzwLjo0ufIL46mMot9JQ' \
--data '[
    {
      "code": "concept-retail1",
      "name": "Retail Concept1",
      
      "language": "en-IN",
      "currency": "INR",
      "timezone": "Asia/Kolkata",
      "description": "Retail channel concept",
      "isActive": true,
      "externalIds": {"erpId": "ERP-C-001"},
      "customFields": {"conceptcf1": "value1"}
    }
  ]'
curl --location 'https://eu.api.capillarytech.com/v2/locations/concepts?inheritLocale=false' \
--header 'Content-Type: application/json' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJraWap4g4OWCn56arcY7pGTyjw' \
--data '[
    {
        "code": "concept-retail5",
        "name": "concept retail5",
        "groupParentCode": "root",
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "description": "Retail channel concept",
        "isActive": true,
        "customFields": {
            "conceptcf1": "value1"
        }
    }
]'
curl --location 'https://eu.api.capillarytech.com/v2/locations/concepts?inheritLocale=false' \
--header 'Content-Type: application/json' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJraWQiatw6pIDUBihK
--data '[
    {
        "code": "concept-retail6",
        "name": "conceptretail6",
        "groupParentCode": "root",
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "description": "Retail channel concept",
        "isActive": true,
        "externalIds": {
            "erpId": "ERP-C-005"
        },
        "customFields": {
            "conceptcf1": "value1"
        }
    }
]'
curl --location 'https://eu.api.capillarytech.com/v2/locations/concepts?inheritLocale=true' \
--header 'Content-Type: application/json' \
--header 'X-CAP-API-OAUTH-TOKEN: eyJraWiatw6pIDUBihKKbkzY4tLIdWw' \
--data '[
    {
        "code": "concept-retail7",
        "name": "conceptretail7",
        "groupParentCode": "root",
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "description": "Retail channel concept",
        "isActive": true,
        "externalIds": {
            "erpId": "ERP-C-006"
        },
        "customFields": {
            "conceptcf1": "value1"
        }
    }
]'

Prerequisites

  • When inheritLocale is false (the default), the org must have the specified language, currency, and timezone values configured.
  • When inheritLocale is true, a valid groupParentCode must be provided so that locale settings can be inherited from the parent concept.

Query parameters

FieldTypeRequiredDescription
inheritLocalebooleanOptionalWhen true, a concept inherits language, currency, and timezone from its parent concept. A valid groupParentCode must be provided for inheritance to work. If the parent concept also lacks locale settings, the request fails. Defaults to false.

Body parameters

Pass a JSON array of concept objects. Maximum 100 items per request.

FieldTypeRequiredDescription
codestringRequiredUnique code for the concept in the org. Accepts only lowercase letters, digits, periods (.), underscores (_), and hyphens (-). Must start with a lowercase letter or digit. Max 50 characters.
namestringRequiredUnique name for the concept. Accepts letters, digits, underscores, and spaces. Cannot equal root (any case). Max 100 characters. Case-insensitive.
groupParentCodestringOptionalCode of the parent concept this concept belongs to. When provided, it must be an existing active concept in the org. Omit to create a root-level concept.
languagestringConditionalIETF BCP 47 language code for the concept (for example, en-IN). Required when inheritLocale is false. Must be enabled for the org.
currencystringConditionalISO 4217 currency code for the concept (for example, INR). Required when inheritLocale is false. Must be enabled for the org.
timezonestringConditionalIANA timezone name for the concept (for example, Asia/Kolkata). Required when inheritLocale is false. Must be enabled for the org.
descriptionstringOptionalFree-text description of the concept.
isActivebooleanOptionalWhether the concept is active. Defaults to true when omitted.
isOrgUnitbooleanOptionalWhether this concept acts as an organizational unit. When omitted, the field is not set. If you pass true, make sure IS_OU_ENABLED is enabled for your org, if it isn't, the request fails with error. To get this enabled, raise a ticket to the PST team.
externalIdsobjectOptionalObject containing key-value pairs of external identifiers for the concept (for example, {"erpId": "ERP-001"}). Maximum five entries. Keys and values must be non-blank and no longer than 200 characters each. Values must be unique within the request and not already assigned to another entity in the org.
customFieldsobjectOptionalObject containing custom field key-value pairs for the concept (for example, {"fieldName": "value"}). Keys must match custom fields configured for the org (matched case-insensitively).

API Quick Reference

{{https://{host}/v2/locations/concepts}}
└─ {{locations}}
├─ {{addConcepts}}({{CreateConceptRequest}}) -> {{BulkResponse}}
├─ {{CreateConceptRequest}} []
│   ├─ {{code}} (string, required)
│   ├─ {{name}} (string, required)
│   ├─ {{groupParentCode}} (string)
│   ├─ {{language}} (string, conditional)
│   ├─ {{currency}} (string, conditional)
│   ├─ {{timezone}} (string, conditional)
│   ├─ {{description}} (string)
│   ├─ {{isActive}} (boolean)
│   ├─ {{isOrgUnit}} (boolean)
│   ├─ {{externalIds}} (object)
│   │   └─ {{<key>}} (string)
│   └─ {{customFields}} (object)
│       └─ {{<key>}} (string)
└─ {{BulkResponse}}
├─ {{response}} []
│   ├─ {{entityId}} (integer)
│   ├─ {{result}} (object)
│   ├─ {{errors}} []
│   │   ├─ {{code}} (integer)
│   │   ├─ {{message}} (string)
│   │   └─ {{status}} (boolean)
│   └─ {{warnings}} []
│       ├─ {{code}} (integer)
│       ├─ {{message}} (string)
│       └─ {{status}} (boolean)
├─ {{totalCount}} (integer)
└─ {{failureCount}} (integer)

Example response

{
  "response": [
    {
      "entityId": 75251060,
      "result": {
        "code": "concept-retail",
        "name": "Retail Concept",
        "description": "Retail channel concept",
        "isActive": true,
        "externalIds": {"erpId": "ERP-C-001"},
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "groupParentCode": "concept-root",
        "customFields": {"conceptcf1": "value1"}
      },
      "errors": [],
      "warnings": []
    }
  ],
  "totalCount": 1,
  "failureCount": 0
}
{
    "response": [
        {
            "entityId": 75251165,
            "result": {
                "code": "concept-retail1",
                "name": "Retail Concept1",
                "description": "Retail channel concept",
                "isActive": true,
                "externalIds": {
                    "erpId": "ERP-C-001"
                },
                "language": "en-IN",
                "currency": "INR",
                "timezone": "Asia/Kolkata",
                "customFields": {
                    "conceptcf1": "value1"
                }
            },
            "errors": [],
            "warnings": []
        }
    ],
    "totalCount": 1,
    "failureCount": 0
}
{
    "response": [
        {
            "entityId": 75251176,
            "result": {
                "code": "concept-retail5",
                "name": "concept retail5",
                "description": "Retail channel concept",
                "isActive": true,
                "language": "en-IN",
                "currency": "INR",
                "timezone": "Asia/Kolkata",
                "groupParentCode": "root",
                "customFields": {
                    "conceptcf1": "value1"
                }
            },
            "errors": [],
            "warnings": []
        }
    ],
    "totalCount": 1,
    "failureCount": 0
}
{
    "response": [
        {
            "entityId": 75251181,
            "result": {
                "code": "concept-retail6",
                "name": "conceptretail6",
                "description": "Retail channel concept",
                "isActive": true,
                "externalIds": {
                    "erpId": "ERP-C-005"
                },
                "language": "en-IN",
                "currency": "INR",
                "timezone": "Asia/Kolkata",
                "groupParentCode": "root",
                "customFields": {
                    "conceptcf1": "value1"
                }
            },
            "errors": [],
            "warnings": []
        }
    ],
    "totalCount": 1,
    "failureCount": 0
}
{
    "response": [
        {
            "entityId": 75251186,
            "result": {
                "code": "concept-retail7",
                "name": "conceptretail7",
                "description": "Retail channel concept",
                "isActive": true,
                "externalIds": {
                    "erpId": "ERP-C-006"
                },
                "language": "en-IN",
                "currency": "INR",
                "timezone": "Asia/Kolkata",
                "groupParentCode": "root",
                "customFields": {
                    "conceptcf1": "value1"
                }
            },
            "errors": [],
            "warnings": []
        }
    ],
    "totalCount": 1,
    "failureCount": 0
}

Partial failure example (HTTP 207):

{
  "response": [
    {
      "entityId": 75251062,
      "result": {
        "code": "concept-retail",
        "name": "Retail Concept",
        "isActive": true,
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "groupParentCode": "concept-root"
      },
      "errors": [],
      "warnings": []
    },
    {
      "result": {
        "code": "concept-retail",
        "name": "Retail Concept Duplicate",
        "isActive": true,
        "language": "en-IN",
        "currency": "INR",
        "timezone": "Asia/Kolkata",
        "groupParentCode": "concept-root"
      },
      "errors": [
        {
          "status": false,
          "code": 1220,
          "message": "Code already Exists Orgs"
        }
      ],
      "warnings": [
        {
          "status": false,
          "code": 1215,
          "message": "Invalid isActive specified, setting to default"
        }
      ]
    }
  ],
  "totalCount": 2,
  "failureCount": 1
}

Response parameters

FieldTypeDescription
responsearrayOne entry per input item, in the same order as the request.
.entityIdintegerSystem-assigned ID of the created concept. Absent when the item failed.
.resultobjectEcho of the submitted concept object. Always present for all items, whether the item succeeded or failed.
.errorsarrayErrors for this item. Empty when the item succeeded.
..codeintegerNumeric error code.
..messagestringError message.
..statusbooleanStatus flag for the error entry.
.warningsarrayNon-fatal warnings for this item.
..codeintegerNumeric warning code.
..messagestringWarning message.
..statusbooleanStatus flag for the warning entry.
totalCountintegerTotal number of items in the request.
failureCountintegerNumber of items that failed to create.

Error & warning codes

CodeError numberTypeDescription
BULK_REQUEST_LIMIT_EXCEEDED1246ErrorThe request contains more than 100 items. Maximum allowed is 100. HTTP 400.
CODE_NOT_SET1247Errorcode is missing or blank. HTTP 400.
NAME_NOT_SET1200Errorname is missing or blank. HTTP 400.
REGEX_MATCH_FAILED1219Errorcode or name failed format validation. HTTP 400.
NAME_LENGHT_NOT_VALID1218Errorcode exceeds 50 characters. HTTP 400.
NAME_LENGTH_EXCEEDS_LIMIT1264Errorname exceeds 100 characters. HTTP 400.
NAME_ROOT_NOT_ALLOWED1210Errorname cannot equal root (any case). HTTP 400.
CODE_ALREADY_EXISTS_ORG1220ErrorA concept with this code already exists in the org, or a duplicate code appears in the same request. HTTP 400.
NAME_ALREADY_EXISTS_ORG1206ErrorA concept with this name already exists in the org. HTTP 400.
GLOBAL_ERR_MISSING_MANDATORY_FIELD403ErrorA required field is missing. Applies to locale fields (when inheritLocale is false) and blank externalIds keys or values. HTTP 400.
PARAM_TYPE_IS_NOT_VALID1217ErrorA field value is invalid. Applies to a groupParentCode that does not match an active concept, locale values not enabled for the org, more than five externalIds entries, and invalid customFields key names. HTTP 400.
EXTERNAL_ID_ALREADY_EXISTS_ORG1245ErrorOne or more externalIds values are already assigned to another entity in the org. HTTP 400.
EXTERNAL_ID_KEY_TOO_LONG1261ErrorAn externalIds key exceeds 200 characters. HTTP 400.
EXTERNAL_ID_VALUE_TOO_LONG1262ErrorAn externalIds value exceeds 200 characters. HTTP 400.
DUPLICATE_EXTERNAL_ID_IN_REQUEST1248ErrorDuplicate externalIds values in the same request. HTTP 400.
ORG_ENTITY_TYPE_LIMIT_EXCEEDED1225ErrorThe org has reached its configured limit for concepts. HTTP 400.
SERVICE_CALL_FAILED1213ErrorThe concept couldn't be created because the ID generation service or authentication service returned an error. Retry the request. HTTP 400.
PARAM_TYPE_SET_TO_DEFAULT1215WarningisActive was not provided and defaulted to true.
OU_CANNOT_BE_ENABLED1226ErrorOU cannot be enabled for this concept as org level configuration is not set

Query Params
boolean
Defaults to false

When true, inherits missing locale fields from the parent concept. Requires a valid groupParentCode.

Body Params
Headers
string
Responses

400

All items failed, batch contains more than 100 items, or empty request body.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json