cURL
curl -X POST 'https://clarus-api.com/api/v1/goods_outs' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'X-Clarus-Subdomain: your-subdomain' \
-d '{
"data": {
"type": "goods_outs",
"attributes": {
"goods_out_type": "sales_order",
"account_id": 1,
"reference": "SO-001",
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"warehouse_id": 1,
"priority": 1,
"lines_changes": [
{
"type": "ADD",
"attributes": {
"product_id": 123,
"order_quantity": 10
}
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"postcode": "AB1 2CD",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}'import requests
url = "https://clarus-api.com/api/goods_outs"
payload = { "data": {
"type": "goods_outs",
"attributes": {
"goods_out_type": "sales_order",
"account_id": 1,
"reference": "SO-001",
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"warehouse_id": 1,
"lines_changes": [
{
"type": "ADD",
"attributes": {
"product_id": 123,
"order_quantity": 10
}
}
]
},
"relationships": { "address": { "data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"postcode": "AB1 2CD",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const response = await fetch('https://clarus-api.com/api/v1/goods_outs', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
'X-Clarus-Subdomain': 'your-subdomain'
},
body: JSON.stringify({
data: {
type: 'goods_outs',
attributes: {
goods_out_type: 'sales_order',
account_id: 1,
reference: 'SO-001',
expected_date_of_dispatch: '2024-01-20T10:00:00Z',
warehouse_id: 1,
priority: 1,
lines_changes: [
{
type: 'ADD',
attributes: {
product_id: 123,
order_quantity: 10
}
}
]
},
relationships: {
address: {
data: {
type: 'addresses',
attributes: {
name: 'John Smith',
address_1: '123 Main Street',
postcode: 'AB1 2CD',
country_code: 'GB',
email_address: '[email protected]',
phone_number: '+44 20 7946 0958'
}
}
}
}
}
})
});
const goodsOut = await response.json();{
"data": {
"id": 123,
"type": "goods_outs",
"attributes": {
"account_id": 1,
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"goods_out_type": "sales_order",
"reference": "ORD-001",
"actual_date_of_dispatch": "2024-01-20T14:30:00Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"carrier_id": 5,
"carrier_service_id": 12,
"customer_id": 42,
"datetime1": "2024-01-20T10:00:00Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"delivery_notes": "Leave at reception if no answer",
"dispatch_strategy": "auto",
"drop_sequence": 3,
"external_system_reference1": "EXT-001",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"goods_out_status_id": 2,
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"integration_id": 7,
"lines_changes": [
{
"attributes": {
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"carrier_id": 5,
"carrier_service_id": 12,
"datetime1": "2023-11-07T05:31:56Z",
"datetime1_from": "2023-11-07T05:31:56Z",
"datetime1_to": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime2_from": "2023-11-07T05:31:56Z",
"datetime2_to": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime3_from": "2023-11-07T05:31:56Z",
"datetime3_to": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime4_from": "2023-11-07T05:31:56Z",
"datetime4_to": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"datetime5_from": "2023-11-07T05:31:56Z",
"datetime5_to": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"goods_in_receipt_line_id": 123,
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"order_quantity": 1,
"ordered_configurations_quantity": 1,
"product_id": 123,
"stock_description": "<string>",
"stock_to_pick_id": 123,
"storage_unit_reference": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
},
"id": 123
}
],
"load_reference": "LOAD-2024-001",
"location_id": 100,
"order_notes": "Priority customer - handle with care",
"order_type_id": 1,
"original_delivery_address_id": 123,
"pack_strategy": "pack_by_line",
"packing_notes": "Use fragile stickers",
"pick_notes": "Check expiry dates",
"pick_reference": "PICK-BATCH-001",
"pick_type": "standard",
"priority": 1,
"short_order_lines_description": "<string>",
"short_order_lines_reason_code_id": 123,
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"warehouse_id": 1
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Goods Out: Orders
Create a goods out order
Create a new goods out order (sales order) for dispatching inventory from the warehouse.
POST
/
api
/
goods_outs
cURL
curl -X POST 'https://clarus-api.com/api/v1/goods_outs' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-H 'X-Clarus-Subdomain: your-subdomain' \
-d '{
"data": {
"type": "goods_outs",
"attributes": {
"goods_out_type": "sales_order",
"account_id": 1,
"reference": "SO-001",
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"warehouse_id": 1,
"priority": 1,
"lines_changes": [
{
"type": "ADD",
"attributes": {
"product_id": 123,
"order_quantity": 10
}
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"postcode": "AB1 2CD",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}'import requests
url = "https://clarus-api.com/api/goods_outs"
payload = { "data": {
"type": "goods_outs",
"attributes": {
"goods_out_type": "sales_order",
"account_id": 1,
"reference": "SO-001",
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"warehouse_id": 1,
"lines_changes": [
{
"type": "ADD",
"attributes": {
"product_id": 123,
"order_quantity": 10
}
}
]
},
"relationships": { "address": { "data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"postcode": "AB1 2CD",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
} } }
} }
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const response = await fetch('https://clarus-api.com/api/v1/goods_outs', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
'X-Clarus-Subdomain': 'your-subdomain'
},
body: JSON.stringify({
data: {
type: 'goods_outs',
attributes: {
goods_out_type: 'sales_order',
account_id: 1,
reference: 'SO-001',
expected_date_of_dispatch: '2024-01-20T10:00:00Z',
warehouse_id: 1,
priority: 1,
lines_changes: [
{
type: 'ADD',
attributes: {
product_id: 123,
order_quantity: 10
}
}
]
},
relationships: {
address: {
data: {
type: 'addresses',
attributes: {
name: 'John Smith',
address_1: '123 Main Street',
postcode: 'AB1 2CD',
country_code: 'GB',
email_address: '[email protected]',
phone_number: '+44 20 7946 0958'
}
}
}
}
}
})
});
const goodsOut = await response.json();{
"data": {
"id": 123,
"type": "goods_outs",
"attributes": {
"account_id": 1,
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"goods_out_type": "sales_order",
"reference": "ORD-001",
"actual_date_of_dispatch": "2024-01-20T14:30:00Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"carrier_id": 5,
"carrier_service_id": 12,
"customer_id": 42,
"datetime1": "2024-01-20T10:00:00Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"delivery_notes": "Leave at reception if no answer",
"dispatch_strategy": "auto",
"drop_sequence": 3,
"external_system_reference1": "EXT-001",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"goods_out_status_id": 2,
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"integration_id": 7,
"lines_changes": [
{
"attributes": {
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"carrier_id": 5,
"carrier_service_id": 12,
"datetime1": "2023-11-07T05:31:56Z",
"datetime1_from": "2023-11-07T05:31:56Z",
"datetime1_to": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime2_from": "2023-11-07T05:31:56Z",
"datetime2_to": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime3_from": "2023-11-07T05:31:56Z",
"datetime3_to": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime4_from": "2023-11-07T05:31:56Z",
"datetime4_to": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"datetime5_from": "2023-11-07T05:31:56Z",
"datetime5_to": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"goods_in_receipt_line_id": 123,
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"order_quantity": 1,
"ordered_configurations_quantity": 1,
"product_id": 123,
"stock_description": "<string>",
"stock_to_pick_id": 123,
"storage_unit_reference": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>"
},
"id": 123
}
],
"load_reference": "LOAD-2024-001",
"location_id": 100,
"order_notes": "Priority customer - handle with care",
"order_type_id": 1,
"original_delivery_address_id": 123,
"pack_strategy": "pack_by_line",
"packing_notes": "Use fragile stickers",
"pick_notes": "Check expiry dates",
"pick_reference": "PICK-BATCH-001",
"pick_type": "standard",
"priority": 1,
"short_order_lines_description": "<string>",
"short_order_lines_reason_code_id": 123,
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"warehouse_id": 1
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Request Structure
{
"data": {
"type": "goods_outs",
"attributes": {
"goods_out_type": "sales_order",
"account_id": 1,
"reference": "SO-001",
"expected_date_of_dispatch": "2024-01-20T10:00:00Z",
"warehouse_id": 1,
"priority": 1,
"lines_changes": [
{
"type": "ADD",
"attributes": {
"product_id": 123,
"order_quantity": 10
}
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"postcode": "AB1 2CD",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}
Key Fields
| Field | Required | Description |
|---|---|---|
goods_out_type | Yes | Type of order: sales_order, work_order, or crossdock |
account_id | Yes | Stock account ID - owner of the stock |
reference | Yes | Your order reference number |
expected_date_of_dispatch | Yes | Target dispatch date |
warehouse_id | No | Warehouse to dispatch from |
lines_changes | No | Array of line items to add |
Address
The delivery address must be provided indata.relationships.address, not in data.attributes. See the example above for the correct JSON:API relationships structure.Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
The subdomain/tenant name identifying which tenant's data to access. Required for all API requests.
Body
application/json
Show child attributes
Show child attributes
Response
Goods out created successfully
Show child attributes
Show child attributes
⌘I

