iSeller — list_remote_outlets¶
Part of the iSeller adapter guide — see it for authentication, endpoints, pagination, rate limits and shared quirks.
Contract: [{ id, name, address? }]
🔴
id=outlet_code, never the GUIDid.GetOutletsreturns both; the list'sidmust beoutlet_codebecause it becomes the outletexternal_idandorder_dispatchsends it verbatim asCreateOrder.outlet_code. Using the GUID lists fine but breaks dispatch on the first order. See the Quirks table.
Use the dedicated POST {baseUrl}/api/v3/GetOutlets (ERP API) — it returns each
outlet's outlet_code (what order_dispatch needs), so map outlet_code → id.
Body { "page": 1, "page_size": 200, "includes": "OutletGroups" }; paginate by
incrementing page while has_next_item is true.
iSeller (Outlets[]) |
Cata | Notes |
|---|---|---|
outlet_code |
id |
becomes the outlet external_id → reused directly by order_dispatch |
name |
name |
|
address |
address |
flat string |
(GetStoreInfo → active_outlets[] also lists outlets but without outlet_code,
so GetOutlets is preferred here.)
Verified (Flash Coffee, curl): the response wraps the list in
Outlets(PascalCase — the docs show lowercaseoutlets; the live API differs). Each item:id(GUID),outlet_code,name,phone,address,is_active,outlet_groups. Read the array case-tolerantly:body.Outlets || body.outlets.
Implementation: scripts/adapters/iseller/list_remote_outlets.js. Mints a
token, paginates POST /api/v3/GetOutlets, and maps outlet_code → id
(case-tolerant Outlets/outlets, guards status:false, skips outlets with no
outlet_code).