02API guides
Keep Rollmark stock in sync from your inventory system
Rollmark supports FastBound for the store's guns. A store's other stock (ammunition, optics, parts, gear, and guns the store does not keep in FastBound) is kept by hand in Rollmark, and an inventory management system can keep it up to date through the API instead. You use your own id for every item, so the same id is always the same item.
What is yours to change, and what is not
| Hand-managed items | FastBound items | |
|---|---|---|
| Where they come from | Made by hand in Rollmark or through this API | Synced from FastBound |
| Read | yes (inventory:read) | yes, read only; the serial is shown as its last four characters |
| Write | yes (inventory:write) | never: 409 fastbound_managed. FastBound is the record for guns; change it there. |
Your cost is never in the API, in either direction: a field named cost is refused. Pricing rules and MAP are not in the API.
You need a key with inventory:read and inventory:write (the "Inventory system" preset). Nothing else.
Choose your external_id
A stable id from your system, 1 to 100 characters: your SKU, or your item record id. It is the handle: PUT /inventory/items/{external_id} creates the item the first time and changes it after. Never reuse one for a different item. (An id that equals a FastBound item's Rollmark id is refused, so the two cannot be mixed up.)
One item at a time
An item is either a product of its own (title, category, and optionally manufacturer, model, upc, mpn) or stock added to a catalog product (link_to: the product key, for example upc:012345678905, which must be a product the store has). The same checks as the Add item form apply: a valid UPC check digit, quantity 0 to 9999, lengths. A category is one of handguns, rifles, shotguns, nfa, ammunition, magazines, optics, parts, gear, reloading. An item cannot be moved to another product after it is made: remove it and make a new one.
Hide, zero or delete?
| You want | Do | The store shows |
|---|---|---|
| The item gone from the store but kept in your inventory | hidden: true | Nothing from this item. A product it only added stock to loses that stock; a product of its own leaves the store. |
| Sold out but still yours | POST …/zero | None on hand |
| The item is no more | DELETE | Nothing; the id is free to reuse |
Many at once, and a nightly resync
POST /inventory/batch takes up to 500 operations (upsert, patch, zero, delete), each with its external_id and the fields of the single call. Each is applied on its own, so one bad item does not lose the rest. The answer is always 200 with a result per item:
An Idempotency-Key is required on a batch, so a request that timed out can be sent again and answers the same. Use one that names the run (inventory-2026-10-16-0200-part-3).
The batch is rate limited to 60 a minute (one call, however many items); single changes to 300 a minute. See Rate limits.
It shows on the store after the next rebuild
Every change queues a rebuild of the store's listings, the same way the Add item form does. The store's product pages, search and stock update after that rebuild, normally within minutes, not instantly; the answer says "effective": "after_rebuild". A batch asks for one rebuild, not 500. Do not poll the catalog expecting the change in the same second.
Reconcile
Read back what Rollmark has, and compare:
Follow next_cursor. Use updated_since=<time> to read only what changed (including changes staff made by hand in Rollmark), and external_id= to check one item. A good integration does events in the day and a full resync at night.
When something is refused
| Answer | Meaning | Do |
|---|---|---|
409 fastbound_managed | You named a FastBound item | Do not write it. Change it in FastBound. |
400 bad_request with fields | A value failed the checks | Fix it in your system; the field name says which |
404 not_found on PATCH, zero, DELETE | No item with that external_id | PUT it first |
403 missing_permission | The key lacks inventory:write | Make a key with it |
429 | Over the limit | Wait Retry-After; use the batch |
503 setting_up | The store's database update is pending | Try later |