Skip to main content
POST
/
api
/
mappings
Create a mapping
curl --request POST \
  --url https://clarus-api.com/api/mappings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "mappings",
    "attributes": {
      "mapping_group_id": 88,
      "mapping_fields": {
        "reason_code": "DAMAGED"
      },
      "operation_type_fields": {
        "reason_code_to": "QC_HOLD"
      }
    }
  }
}
'
{
  "id": 1204,
  "mapping_group_id": 88
}

Request Structure

{
  "data": {
    "type": "mappings",
    "attributes": {
      "mapping_group_id": 88,
      "mapping_fields": { "reason_code": "DAMAGED" },
      "operation_type_fields": { "reason_code_to": "QC_HOLD" }
    }
  }
}

Key Fields

FieldRequiredDescription
mapping_group_idYesParent mapping group
mapping_fieldsNoMap of group field code → value
operation_type_fieldsNoMap of operation-type field code → value

Important

This generic endpoint is for non-integration operation types (e.g. stock_hold, stock_release). Mapping groups whose operation type is integration_carrier, integration_shipping_rate, integration_warehouse, or integration_product are rejected here — use the dedicated nested endpoints for those.

Authorizations

Authorization
string
header
required

OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.

X-Clarus-Subdomain
string
header
required

The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.

Body

application/json
data
object
required

Response

Created successfully

Created record