List and search products
const url = 'https://api.ebitex.io/commerce/delivery/v1/products';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.ebitex.io/commerce/delivery/v1/products \ --header 'Authorization: Bearer <token>'Lists the products a key may see, one page at a time, as { items, nextCursor }. Each item is shaped as in GET /products/{key}.
search matches the start of a product’s name without regard to case (at most 100 characters). category is a category path as returned in categories[].path (range/running) and matches a product that has it as its primary or a secondary category. sort is name (the default) or createdUtc, oldest first. limit is 1 to 100 and defaults to 25. nextCursor is null on the last page; send it back as cursor with exactly the same other parameters for the next. A cursor is bound to its query and stays valid while products change: none repeats or is skipped because another was added.
keys=a,b,c reads up to 50 products by key in one round trip, in the order asked, as { items, missing } with the keys that are not available listed under missing. It cannot be combined with the other query parameters.
A price is amountMinor, a whole number of the currency’s minor units, beside currency and amount, the same amount as a decimal string in the currency’s own exponent ("89.50", or "5000" for JPY). Show amount and do arithmetic on amountMinor; never use a floating-point number for money. taxIncluded says whether the stored price already includes tax, which is the store’s setting. A variant that has no price in this store has price: null: it is unpriced, which is not the same as free. A store may sell in several currencies: add currency=EUR to price a read in another currency the store sells in (the store’s own by default; one it does not sell in is 400 invalid_currency). A price the merchant set for that currency is returned as set; otherwise the store’s own price is converted at the store’s rate and rounded to the smallest unit of the currency, and a variant that cannot be converted (no rate) is unpriced.
availability is a status, never a count: inStock, backorder or outOfStock. A variant that is not counted (a digital good) is always inStock. The catalogue routes are cached for up to five minutes, so the status is for display: before you take an order, ask GET /stock, which is never cached.
A key reads one store. It sees only the products that store lists and that are active, and for each product only its active variants. A draft, an archived or an unlisted product answers exactly as a product that does not exist, so a key cannot learn that one is there.
Key: a Commerce delivery key (commerce.delivery.read), minted for one store in Commerce. A key with an origin or IP restriction is browser-safe: it reads the same catalogue, but is told exact stock counts only if the store allows it.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”OK
invalid_limit, invalid_sort, invalid_search, invalid_keys, invalid_category (no category has that path), or invalid_cursor: the cursor belongs to a different query.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or its store binding was removed.
payment_required: the organization’s subscription needs attention.
scope_denied: the key lacks commerce.delivery.read. app_not_available: Commerce is not enabled for the organization. origin_denied or ip_denied: the key was used from an origin or address outside its restrictions.
rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.