Shopify integration guide

Shopify custom app OAuth, shop domain, and fulfillment mapping in Ongapi.

OAuth

Authorize with platform: "shopify" and shop_domain set to your *.myshopify.com hostname. return_url must be HTTPS.

Fulfillment mapping

When Shopify reports an order as fulfilled, Ongapi stores shipped (not completed) so the canonical state machine stays consistent.

Field notes

shipping_address.country uses the Shopify shipping address country. totals.discount maps from total_discounts.

fulfillment.tracking_number, shipping_provider, and waybill_url come from the first non-cancelled fulfillment. Ongapi reads Shopify tracking_info (number, company, url) and falls back to tracking_number, tracking_company, and tracking_url. waybill_url is a tracking link, not a marketplace AWB or PDF. Shopify does not offer a platform shipping-label download for this API. All three stay null until Shopify reports a fulfillment.

Calls use Admin API 2026-10. Name, phone, and address fields stay null when the app lacks Shopify protected customer data access.

Write APIs

POST /v1/orders/{id}/ship accepts seller_tracking only (platform_logistics returns capability_unsupported) and creates a Shopify fulfillment. GET /v1/orders/{id}/shipping-label always returns waybill_unavailable. Warehouses are Shopify locations. Inventory sets available quantity at a location. Mock connections succeed. Live shops need fulfillment, location, and inventory scopes beyond read_orders, then a fresh OAuth.

See Orders and events and Platforms.