Skip to main content
POST
/
api
/
order_types
Create an order type
curl --request POST \
  --url https://clarus-api.com/api/order_types \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Clarus-Subdomain: <api-key>' \
  --data '
{
  "data": {
    "type": "order_types",
    "attributes": {
      "code": "HO-1",
      "name": "Home Order",
      "duty_payable": false
    }
  }
}
'
{
  "id": 1,
  "code": "HO-1",
  "name": "Home Order",
  "duty_payable": false
}

Request Structure

{
  "data": {
    "type": "order_types",
    "attributes": {
      "code": "HO-1",
      "name": "Home Order",
      "duty_payable": false
    }
  }
}
FieldRequiredDescription
codeYesUnique code (max 30)
nameYesName (max 50)
duty_payableYesDuty-payable flag
Update returns 204 No Content. Deletion is blocked if referenced by an automation condition.

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

The response is of type object.