API reference / Purchase receipts
Purchase receipts API
6 endpoints. Scopes: Scalar360.purchase-receipts.READ, .CREATE, .UPDATE, .DELETE or .ALL. All calls need Authorization: Scalar360-oauthtoken <access_token> — see Authentication.
GET
Queue
/api/v1/purchase-receipts
Scope: Scalar360.purchase-receipts.READ
| Parameter | In | Type | Required |
|---|---|---|---|
q | query | string | No |
status | query | string | No |
vendorId | query | string (uuid) | No |
warehouseId | query | string (uuid) | No |
purchaseOrderId | query | string (uuid) | No |
startDate | query | string (date) | No |
endDate | query | string (date) | No |
page | query | integer | No |
pageSize | query | integer | No |
sortBy | query | string | No |
sortDir | query | string | No |
curl -X GET "https://api.scalar360.com/api/v1/purchase-receipts" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"POST
Receive
/api/v1/purchase-receipts
Scope: Scalar360.purchase-receipts.CREATE
| Body field | Type | Required | Notes |
|---|---|---|---|
purchaseOrderId | string (uuid) | Yes | |
warehouseId | string (uuid) | Yes | |
receivedDate | string (date) | ||
notes | string | max length 1000 | |
items | array of object | Yes | required, not empty |
items[].purchaseOrderItemId | string (uuid) | ||
items[].quantity | number | Yes | required, > 0 |
items[].overReceiptReason | string | max length 500 |
curl -X POST "https://api.scalar360.com/api/v1/purchase-receipts" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"purchaseOrderId":"3f1c2b9e-7a1d-4c3e-9b2a-1e5f6a7b8c9d","warehouseId":"3f1c2b9e-7a1d-4c3e-9b2a-1e5f6a7b8c9d","items":[{"purchaseOrderItemId":"3f1c2b9e-7a1d-4c3e-9b2a-1e5f6a7b8c9d","quantity":100,"overReceiptReason":"string"}]}'POST
Cancel
/api/v1/purchase-receipts/{receiptId}/cancel
Scope: Scalar360.purchase-receipts.CREATE
| Parameter | In | Type | Required |
|---|---|---|---|
receiptId | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
reason | string | Yes | required, length 3-1000 |
curl -X POST "https://api.scalar360.com/api/v1/purchase-receipts/{receiptId}/cancel" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"reason":"string"}'GET
History
/api/v1/purchase-receipts/history
Scope: Scalar360.purchase-receipts.READ
| Parameter | In | Type | Required |
|---|---|---|---|
page | query | integer | No |
pageSize | query | integer | No |
curl -X GET "https://api.scalar360.com/api/v1/purchase-receipts/history" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"GET
Export history
/api/v1/purchase-receipts/history/export
Scope: Scalar360.purchase-receipts.READ
| Parameter | In | Type | Required |
|---|---|---|---|
format | query | string (default pdf) | No |
curl -X GET "https://api.scalar360.com/api/v1/purchase-receipts/history/export" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"GET
Warehouses
/api/v1/purchase-receipts/warehouses
Scope: Scalar360.purchase-receipts.READ
curl -X GET "https://api.scalar360.com/api/v1/purchase-receipts/warehouses" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"