Update a goods in receipt
curl --request PATCH \
--url https://clarus-api.com/api/goods_in_receipts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"account_id": 123,
"warehouse_id": 123,
"reference": "<string>",
"supplier_id": 123,
"expected_date_of_arrival": "2023-11-07T05:31:56Z",
"actual_date_of_arrival": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"notes": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"lines_changes": [
{
"id": 123,
"attributes": {
"product_id": 123,
"expected_quantity": 1,
"expected_configurations_quantity": 1,
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true
}
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"address_2": "Unit 4B",
"address_3": "London",
"address_4": "Greater London",
"postcode": "SW1A 1AA",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}
'{
"data": {
"id": 123,
"type": "goods_in_receipts",
"attributes": {
"account_id": 123,
"warehouse_id": 123,
"reference": "<string>",
"supplier_id": 123,
"expected_date_of_arrival": "2023-11-07T05:31:56Z",
"actual_date_of_arrival": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"notes": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"lines_changes": [
{
"id": 123,
"attributes": {
"product_id": 123,
"expected_quantity": 1,
"expected_configurations_quantity": 1,
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true
}
}
]
}
}
}Goods In: Receipts
Update a goods in receipt
Update an existing goods in receipt. Use lines_changes to add, update, or remove line items. Receipts that have started receiving may have restrictions on what can be changed.
PATCH
/
api
/
goods_in_receipts
/
{id}
Update a goods in receipt
curl --request PATCH \
--url https://clarus-api.com/api/goods_in_receipts/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Clarus-Subdomain: <api-key>' \
--data '
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"account_id": 123,
"warehouse_id": 123,
"reference": "<string>",
"supplier_id": 123,
"expected_date_of_arrival": "2023-11-07T05:31:56Z",
"actual_date_of_arrival": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"notes": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"lines_changes": [
{
"id": 123,
"attributes": {
"product_id": 123,
"expected_quantity": 1,
"expected_configurations_quantity": 1,
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true
}
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "John Smith",
"address_1": "123 Main Street",
"address_2": "Unit 4B",
"address_3": "London",
"address_4": "Greater London",
"postcode": "SW1A 1AA",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}
'{
"data": {
"id": 123,
"type": "goods_in_receipts",
"attributes": {
"account_id": 123,
"warehouse_id": 123,
"reference": "<string>",
"supplier_id": 123,
"expected_date_of_arrival": "2023-11-07T05:31:56Z",
"actual_date_of_arrival": "2023-11-07T05:31:56Z",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"notes": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true,
"lines_changes": [
{
"id": 123,
"attributes": {
"product_id": 123,
"expected_quantity": 1,
"expected_configurations_quantity": 1,
"alt_line_note": "<string>",
"alt_line_number": "<string>",
"alt_line_reference": "<string>",
"alt_product_code": "<string>",
"external_system_reference1": "<string>",
"external_system_reference2": "<string>",
"external_system_reference3": "<string>",
"string1": "<string>",
"string2": "<string>",
"string3": "<string>",
"string4": "<string>",
"string5": "<string>",
"integer1": 123,
"integer2": 123,
"integer3": 123,
"integer4": 123,
"integer5": 123,
"datetime1": "2023-11-07T05:31:56Z",
"datetime2": "2023-11-07T05:31:56Z",
"datetime3": "2023-11-07T05:31:56Z",
"datetime4": "2023-11-07T05:31:56Z",
"datetime5": "2023-11-07T05:31:56Z",
"boolean1": true,
"boolean2": true,
"boolean3": true,
"boolean4": true,
"boolean5": true
}
}
]
}
}
}Request Structure
{
"data": {
"type": "goods_in_receipts",
"attributes": {
"reference": "PO-2024-001-REV",
"expected_date_of_arrival": "2024-01-20T10:00:00Z",
"lines_changes": [
{
"type": "UPDATE",
"id": 456,
"attributes": {
"expected_quantity": 150
}
},
{
"type": "REMOVE",
"id": 789
}
]
},
"relationships": {
"address": {
"data": {
"type": "addresses",
"attributes": {
"name": "Updated Supplier",
"address_1": "75 New Road",
"address_3": "Leeds",
"postcode": "LS1 1AA",
"country_code": "GB",
"email_address": "[email protected]",
"phone_number": "+44 20 7946 0958"
}
}
}
}
}
}
Line Item Operations
| Operation | Fields Required | Description |
|---|---|---|
ADD | attributes | Add new line item |
UPDATE | id, attributes | Modify existing line |
REMOVE | id | Delete line from receipt |
Address
To set or update the address, provide it indata.relationships.address (not in data.attributes).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.
Path Parameters
The unique identifier of the goods in receipt to update
Body
application/json
Show child attributes
Show child attributes
Response
Goods in receipt updated successfully
Show child attributes
Show child attributes
⌘I

