Thin REST client for the Shopify Admin API's products.json endpoint.
Resolves the shop domain and access token from the PhoenixKit.Integrations
connection identified by integration_uuid — never from application env
(see PhoenixKitEcommerce.Shopify.Provider for why). Authenticates with
the X-Shopify-Access-Token header, NOT Authorization: Bearer — that is
what the REST Admin API expects for a Custom App's static token.
Summary
Functions
Fetches the product ids of collection_id, in the order Shopify
returns them — Shopify applies the collection's own sort order to this
endpoint, so no client-side sorting happens here; CollectionSync reads
this order directly as item.position within the category. Paginated
like fetch_products/2.
Fetches every collection from the connected store — custom_collections
and smart_collections concatenated, each paginated like
fetch_products/2. Each returned collection carries "kind" ("custom"
or "smart", which endpoint it came from) and "position" — a running
index across BOTH lists, in API order (custom first, then smart) — this
is the order CollectionSync writes as category.position.
Fetches every product from the Shopify store connected via
integration_uuid, following Link: rel="next" pagination.
Functions
@spec fetch_collection_product_ids(String.t() | integer(), keyword()) :: {:ok, [term()]} | {:error, term()}
Fetches the product ids of collection_id, in the order Shopify
returns them — Shopify applies the collection's own sort order to this
endpoint, so no client-side sorting happens here; CollectionSync reads
this order directly as item.position within the category. Paginated
like fetch_products/2.
Options
Same as fetch_collections/1.
Fetches every collection from the connected store — custom_collections
and smart_collections concatenated, each paginated like
fetch_products/2. Each returned collection carries "kind" ("custom"
or "smart", which endpoint it came from) and "position" — a running
index across BOTH lists, in API order (custom first, then smart) — this
is the order CollectionSync writes as category.position.
Options
:integration_uuid— required; resolves the shop domain/access token the same wayfetch_products/2does.:req_options— asfetch_products/2.
Fetches every product from the Shopify store connected via
integration_uuid, following Link: rel="next" pagination.
Options
:req_options— keyword list merged intoReq.new/1(e.g.plug:to stub the transport in tests).