API reference / Purchase returns
Purchase returns API
5 endpoints. Scopes: Scalar360.purchase-returns.READ, .CREATE, .UPDATE, .DELETE or .ALL. All calls need Authorization: Scalar360-oauthtoken <access_token> — see Authentication.
GET
List
/api/v1/purchase-returns
Scope: Scalar360.purchase-returns.READ
curl -X GET "https://api.scalar360.com/api/v1/purchase-returns" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"POST
Create
/api/v1/purchase-returns
Scope: Scalar360.purchase-returns.CREATE
| Body field | Type | Required | Notes |
|---|---|---|---|
billId | string (uuid) | Yes | |
purchaseReceiptId | string (uuid) | ||
warehouseId | string (uuid) | ||
returnDate | string (date) | ||
reason | string | ||
notes | string | ||
restock | boolean | ||
createDebitNote | boolean | ||
items | array of object | Yes | required, not empty |
items[].itemId | string (uuid) | ||
items[].itemName | string | ||
items[].quantity | number | Yes | required, > 0 |
items[].rate | number | ||
items[].gstRate | number |
curl -X POST "https://api.scalar360.com/api/v1/purchase-returns" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"billId":"3f1c2b9e-7a1d-4c3e-9b2a-1e5f6a7b8c9d","items":[{"itemId":"3f1c2b9e-7a1d-4c3e-9b2a-1e5f6a7b8c9d","itemName":"string","quantity":100,"rate":100,"gstRate":100}]}'GET
Get
/api/v1/purchase-returns/{id}
Scope: Scalar360.purchase-returns.READ
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
curl -X GET "https://api.scalar360.com/api/v1/purchase-returns/{id}" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"POST
Cancel
/api/v1/purchase-returns/{id}/cancel
Scope: Scalar360.purchase-returns.CREATE
| Parameter | In | Type | Required |
|---|---|---|---|
id | path | string (uuid) | Yes |
curl -X POST "https://api.scalar360.com/api/v1/purchase-returns/{id}/cancel" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"GET
Returnable
/api/v1/purchase-returns/returnable
Scope: Scalar360.purchase-returns.READ
| Parameter | In | Type | Required |
|---|---|---|---|
billId | query | string (uuid) | Yes |
curl -X GET "https://api.scalar360.com/api/v1/purchase-returns/returnable" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"