PhoenixKitEcommerce.Shopify.AdminClient (PhoenixKitEcommerce v0.4.2)

Copy Markdown View Source

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 every product from the Shopify store connected via integration_uuid, following Link: rel="next" pagination.

Functions

fetch_products(integration_uuid, opts \\ [])

@spec fetch_products(String.t(), keyword()) :: {:ok, [map()]} | {:error, term()}

Fetches every product from the Shopify store connected via integration_uuid, following Link: rel="next" pagination.

Options

  • :req_options — keyword list merged into Req.new/1 (e.g. plug: to stub the transport in tests).