Create Integration
POST//:domain/api/shopify
Create a new Shopify integration instance.
Authentication: Requires Bearer token.
Request body:
- name (string, required, unique across integration_instances.name)
- connection_settings.url (string, required): full store URL, must start with https:// and not end with /. e.g. https://my-store.myshopify.com
- connection_settings.consumer_key (string, OPTIONAL): only for legacy custom-app (API key) and custom-app OAuth (Client ID) modes. OMIT in public OAuth mode — SKU.io's central credentials are used.
- connection_settings.consumer_secret (string, OPTIONAL): only for legacy custom-app (Admin API access token) and custom-app OAuth (Secret) modes. OMIT in public OAuth mode.
- connection_settings.key_id (int, optional), user_id (string, optional), key_permissions (string, optional)
- integration_settings.start_date (string, required, Y-m-d; must be on/after the inventory start date if configured)
- integration_settings.store_id (int, required, must exist in stores)
- integration_settings.auto_link_products (bool), auto_create_products (bool)
- integration_settings.*_nominal_code_id (int|null): sales, cogs, shipping_revenue, shipping_refund, sales_returns_allowances, fees
- integration_settings.download_archived_products (bool), download_draft_products (bool), require_mapped_products_for_sales_order (bool)
- is_automatic_sync_enabled (bool, default false)
Behavior by mode:
- Public OAuth & Custom-app OAuth: response includes a redirect_url; the frontend then calls GET /api/shopify/{id}/authorization-url and redirects the merchant to Shopify. Init jobs run after the OAuth callback.
- Legacy custom app: no OAuth; init jobs run immediately and the instance is marked ACTIVE.
Request
Responses
- 201
- 422
Created
Response Headers
Content-Type
Unprocessable Entity
Response Headers
Content-Type