API reference / Batches
Batches API
4 endpoints. Scopes: Scalar360.batches.READ, .CREATE, .UPDATE, .DELETE or .ALL. All calls need Authorization: Scalar360-oauthtoken <access_token> — see Authentication.
GET
Expiring
/api/v1/batches/expiring
Scope: Scalar360.batches.READ
| Parameter | In | Type | Required |
|---|---|---|---|
days | query | integer (default 30) | No |
curl -X GET "https://api.scalar360.com/api/v1/batches/expiring" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"GET
List
/api/v1/batches/items/{itemId}
Scope: Scalar360.batches.READ
| Parameter | In | Type | Required |
|---|---|---|---|
itemId | path | string (uuid) | Yes |
curl -X GET "https://api.scalar360.com/api/v1/batches/items/{itemId}" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN"POST
Stock in
/api/v1/batches/items/{itemId}/stock-in
Scope: Scalar360.batches.CREATE
| Parameter | In | Type | Required |
|---|---|---|---|
itemId | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
warehouseId | string (uuid) | ||
batchNumber | string | ||
expiryDate | string (date) | ||
quantity | number | Yes | required |
unitCost | number |
curl -X POST "https://api.scalar360.com/api/v1/batches/items/{itemId}/stock-in" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"quantity":100}'PUT
Set tracking
/api/v1/batches/items/{itemId}/tracking
Scope: Scalar360.batches.UPDATE
| Parameter | In | Type | Required |
|---|---|---|---|
itemId | path | string (uuid) | Yes |
| Body field | Type | Required | Notes |
|---|---|---|---|
enabled | boolean |
curl -X PUT "https://api.scalar360.com/api/v1/batches/items/{itemId}/tracking" \
-H "Authorization: Scalar360-oauthtoken $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'