Store products overview
How a store product, with its variants and stock, is synced to Localoy and sold.
A store product is something you sell through your Localoy store, with optional variants (such as
size and colour) and stock per combination. Set the store up once in the Partner Portal; until then a
write answers 409 store_not_set_up.
| Operation | Endpoint | Scope |
|---|---|---|
| Create or replace | PUT /store/products/:externalId | REGISTRATION |
| List and retrieve | GET /store/products | REGISTRATION |
| Publish, unpublish, delete | POST …/publish | UPDATE |
The flow#
- Your server → Localoy: POST /media { url }
- Localoy → Your server: 201 { url: Localoy's copy }
- Your server → Localoy: PUT /store/products/pj-set
- Localoy → Your server: 201 draft, every variant combination
- Your server → Localoy: POST …/pj-set/publish
- Localoy → Customer: The product appears in your store
- Customer → Localoy: Order Size M, White
- Localoy → Your server: Inventory check, if enabled
- Localoy → Customer: Order placed
- — When stock changes —
- Your server → Localoy: PUT with the new stock
- Localoy → Your server: 200 counts updated
- Import images, then
PUTthe whole product. The firstPUTcreates a draft (201); later ones replace it (200). - Variants expand to combinations. Two sections of two options give four combinations, each
returned with its own
stock,priceandsku. stockis the one field you may leave out. Leave it out and the counts stay as they are. A combination with no stock row is not counted and never sells out; once any row is counted, a combination without one counts as zero.- Publish it to show it. A
PUTnever changes whether a product is published. - Customers order it. With inventory checks on, Localoy asks your system
(
module=store_order) before accepting. A paid-online order holds its stock for your hold time.
Rules to remember#
- Variant rules are checked on every
PUT:variants_too_few_options,variants_option_repeated,variants_name_repeated, and stock rows that name a combination the product does not have (stock_combination_invalid) or name one twice (stock_combination_duplicate). - Two simultaneous writes of a new
externalIdgive one201and one409 resource_busy. - A sandbox key validates everything and changes nothing (
"dryRun": true). - A Technology Provider needs the Store module.
Guide: Sync your listings.