The units available for tracking quantity: weight, length, volume and count.
Sortly API
The Sortly API lets you work with your inventory from your own systems: add and update items, keep stock levels in sync, and track what goes out on a job.
Available on the Sortly Enterprise Plan. All requests go to https://api.sortly.co over HTTPS and return JSON. Email dev-support@sortly.com with questions or issues.
New here? Start with Getting Started, then read Items and Folders so the vocabulary in the endpoint reference makes sense. Once you know what you're building, jump to the matching Use Case Guide.
Goal: keep Sortly jobs in step with the work orders in your external system, from the moment one is raised to the moment it closes, so field staff work against accurate inventory and nobody keys the same movement in twice.
A job is a work order. Creating one also creates a folder to hold the items assigned to it. Jobs move through three statuses: not_started, in_progress, completed.
Each subsection below maps to one event in your system. Your system owns the job lifecycle and drives each of these calls; where you need to see the state on the Sortly side, read it with GET /api/v1/jobs on whatever schedule suits you.
Goal: keep Sortly purchase orders in step with the accounting or ordering system you buy through, so both sides agree on what was ordered, what it costs and where it has got to.
A purchase order records what you ordered from a vendor and on what terms, with a list of line items drawn from your inventory. You don't need to send amount, sub_total, total or line_number: Sortly works them out from the lines.
How an order moves:
draft,ready_for_reviewandapprovedcan each move to one another, or on toordered- From
orderedyou can requestvoidedorclosed - From
ordered, receiving stock also moves the order topartially_receivedand thenreceived, through the receive flow rather than a status call - From
partially_receivedorreceived, the only status you can request isclosed voidedandclosedare final
For the transitions themselves, see Manage PO Statuses.
Goal: move a Sortly purchase order to match where it has got to in your own process, whether that decision was made in another system or over email.
Every transition uses the same endpoint and the same two fields: the target status and the version you got from your last read.
- A stale
versionis rejected with409. Read immediately before writing, and retry with the new one. - Sending a status the order already has changes nothing, so a retried delivery is safe.
| From | Can move to |
|---|---|
draft, ready_for_review, approved | each other, or ordered |
ordered | voided or closed |
partially_received, received | closed |
voided, closed | final |
Anything outside that returns 400. received and partially_received cannot be requested here at all: Sortly sets them when a delivery is recorded against the order, either in the app or through the receive endpoint.
Items are the things you track: stock, tools, assets, supplies. Each one has a quantity and can carry a price, photos, tags and custom fields.
Items and folders share these endpoints; type is what tells them apart. Pass "type": "item" here. For the folder side of the same endpoints, see Folders.
Folders are how you organize inventory by location, category, job, or whatever fits how you work. They can be nested, and items live inside them.
Folders use the same endpoints as items, with "type": "folder" and no quantity or price. Nest one inside another by setting parent_id; leave it out for the top level. To list a folder's contents, pass its id as folder_id when listing items.
- https://api.sortly.co/api/v1/alerts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl 'https://api.sortly.co/api/v1/alerts' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'Accept: application/json'{ "data": [ { … } ], "meta": { "page": 1, "next_page_url": null, "total_pages": 1, "total_count": 1 } }
Request
Creates a new alert on an item or custom field value. item_id is required.
For Quantity alerts: set item_id to the item's numeric ID, then choose a threshold_method such as quantity_less_than and a threshold_value.
For DateReminder alerts, set:
item_idandcustom_attribute_id, the datetime custom field to watchthreshold_methodtobefore,afterorsame_daythreshold_intervaltodays,weeks,monthsoryears, withthreshold_valueas the count
So 30 with days and before fires 30 days ahead of the date. same_day ignores the interval and the value.
triggerable_type and triggerable_id are response fields only. Sortly derives them from item_id and custom_attribute_id, and sending them is rejected with 422 Item can't be blank. Create and update take the same identifying fields.
The item the alert watches. Required on create and on every update, whatever the alert's type. Leave it out and the request is rejected with 422.
For a DateReminder, the datetime custom field to watch. Pairs with item_id: together they identify whose field value the alert is about.
Quantity fires when an item's stock crosses a threshold. DateReminder fires relative to a date held in a datetime custom field.
What triggers the alert. Use a quantity_* method (or less_than_or_equal_to_min_quantity) with type: Quantity, and before, after or same_day with type: DateReminder.
How far before or after the date to fire. Required for DateReminder alerts, null for Quantity.
Who gets notified when the alert fires. Defaults to owners if omitted.
- https://api.sortly.co/api/v1/alerts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -X POST 'https://api.sortly.co/api/v1/alerts' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{"type": "Quantity", "item_id": 12345, "threshold_method": "quantity_less_than", "threshold_value": 5, "recipient_groups": ["owners"]}'{ "data": { "item_id": 55, "custom_attribute_id": null, "threshold_method": "quantity_less_than", "threshold_value": 5, "threshold_interval": null, "is_fired": null, "type": "Quantity", "is_deleted": false, "recipient_groups": [ … ] } }
Request
Updates an existing alert's threshold, method, or recipient groups. All updatable fields follow the same schema as POST /alerts.
Quantity fires when an item's stock crosses a threshold. DateReminder fires relative to a date held in a datetime custom field. Change this to convert an alert from one to the other.
The item the alert watches. Required on every update, whatever the alert's type and even when you are only moving a threshold. Leave it out and the request is rejected with 422. On a DateReminder it pairs with custom_attribute_id: together they identify whose field value to watch, so it is not redundant there. Change it to point the alert at a different item.
What triggers the alert. Use a quantity_* method (or less_than_or_equal_to_min_quantity) with type: Quantity, and before, after or same_day with type: DateReminder.
How far before or after the date to fire. Required for DateReminder alerts, null for Quantity.
- https://api.sortly.co/api/v1/alerts/{alert_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -X PUT 'https://api.sortly.co/api/v1/alerts/42' \
-H 'Authorization: Bearer YOUR_SECRET_KEY' \
-H 'Content-Type: application/json' \
-d '{"threshold_method": "quantity_less_than", "threshold_value": 10}'{ "data": { "id": 1234, "threshold_method": "before", "threshold_value": 5, "threshold_interval": "days", "is_fired": null, "triggerable_type": "CustomAttributeValue", "triggerable_id": 374, "type": "DateReminder", "is_deleted": false, "recipient_groups": [ … ] } }
Purchase orders record what you have ordered from a vendor and on what terms. Each one carries vendor and ship-to details plus a list of line items drawn from your inventory.
How an order moves:
draft,ready_for_reviewandapprovedcan each move to one another, or on toordered- From
orderedyou can requestvoidedorclosed - Receiving stock moves an
orderedorder topartially_receivedand thenreceived, through the receive flow rather than a status call - From
partially_receivedorreceived, the only status you can request isclosed voidedandclosedare final
Use the status endpoint for these transitions rather than the update endpoint.
Aug 5, 2026. Added Purchase Orders: list, create, fetch, update and change status.
Jul 31, 2026. Added Jobs: list, create, fetch, update, change status and delete, plus adding items to a job and returning them.
Jun 17, 2021. Added yard and gallon units of measure.
Jun 5, 2021. Added support for item variants (Item Groups).
Jan 4, 2021. Renamed attribute_value to value on custom field values (attribute_value still works). Added tags to item reads and search.
Sep 1, 2020. Added the search endpoint.
Jun 15, 2020. Added alerts.
Mar 2, 2019. First release.