Common API recipes
Copy-paste curl examples for everyday REST API tasks like listing items and creating orders.
Updated June 21, 20261 min read
These ready-to-run curl examples cover the most common REST API tasks. Replace
YOUR_API_KEY with your own key and adjust the values for your data.
List and filter items
curl "https://fiddle.io/rest/api/v2/items?limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
Fetch a single record
curl https://fiddle.io/rest/api/v2/items/ITEM_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Create a sales order
curl -X POST https://fiddle.io/rest/api/v2/sales-orders \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customerId": "CUSTOMER_ID",
"lineItems": [
{ "itemId": "ITEM_ID", "quantity": 2 }
]
}'
Adjust stock
curl -X POST https://fiddle.io/rest/api/v2/stock-adjustments \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"itemId": "ITEM_ID",
"locationId": "LOCATION_ID",
"quantity": -5,
"reason": "Damaged"
}'
List endpoints support pagination. Request pages in a loop and stop when a page returns fewer records than your
limit— and keep an eye on the rate limit on large jobs.
Field names and the full set of endpoints are documented in Swagger UI at
/rest/api/v2/docs/swagger, where you can try each call live.
Next steps
Use these calls alongside webhooks to keep external systems in sync without polling.
Was this article helpful?
Related articles
REST API overviewWhat the Fiddle REST API does, where to find the docs, and how requests are structured.Get an API keyCreate, name, and safely store an API key to authenticate REST API requests.Authentication and rate limitsHow to authenticate REST API requests and how many calls you can make per minute.
Still need help?
Ask Filo, our built-in AI assistant, for an instant answer — or get in touch with our team and we'll take it from there.