Revert a goods in receipt
curl --request POST \
--url https://clarus-api.com/api/goods_in_receipts/{id}/revert \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/goods_in_receipts/{id}/revert"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/goods_in_receipts/{id}/revert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 1,
"type": "goods_in_receipts",
"attributes": {
"account_id": 1,
"warehouse_id": 1,
"reference": "PO-2024-001",
"status": "pending"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Goods In: Receipts
Revert a goods in receipt
Revert a received goods in receipt back to its previous state. The receipt must not have any completed tasks associated with it.
POST
/
api
/
goods_in_receipts
/
{id}
/
revert
Revert a goods in receipt
curl --request POST \
--url https://clarus-api.com/api/goods_in_receipts/{id}/revert \
--header 'Authorization: Bearer <token>' \
--header 'X-Clarus-Subdomain: <api-key>'import requests
url = "https://clarus-api.com/api/goods_in_receipts/{id}/revert"
headers = {
"Authorization": "Bearer <token>",
"X-Clarus-Subdomain": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'X-Clarus-Subdomain': '<api-key>'}
};
fetch('https://clarus-api.com/api/goods_in_receipts/{id}/revert', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"id": 1,
"type": "goods_in_receipts",
"attributes": {
"account_id": 1,
"warehouse_id": 1,
"reference": "PO-2024-001",
"status": "pending"
}
}
}{
"error": "<string>"
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}{
"errors": [
{
"code": 123,
"symbol": "<string>",
"details": "<string>",
"source": "<string>",
"context": {}
}
]
}Behavior
- Reverts a received receipt back to pending status
- Cannot revert if any tasks on the receipt are completed
- Returns the updated receipt
No Request Body Required
The receipt ID is provided in the URL path. No request body is needed.Authorizations
OAuth 2.0 authentication. Use the client credentials or authorization code flow to obtain an access token.
FlowAuthorization Code
- Authorization URL
- https://clarus-api.com/oauth/authorize
- Token URL
- https://clarus-api.com/oauth/token
FlowClient Credentials
- Token URL
- https://clarus-api.com/oauth/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 revert
Response
Receipt reverted successfully
Show child attributes
Show child attributes

