Apply Shopify Partner Location Mappings
POST/api/shopify/:integrationInstance/partner-locations/apply
Map partner locations to supplier drop-ship warehouses. For each location SKU.io finds or creates the supplier, finds or creates that supplier's drop-ship warehouse, sets the warehouse's purchase-order mode and maps the location to it. A location with no partner kind yet is marked manual.
integrations:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
- locations (required, array of 1-100): the locations to apply.
- locations[].id (required, integer, distinct): the location id from List Shopify Partner Locations (id, not shopify_location_id).
- locations[].supplier_id (optional, integer): an existing supplier to use.
- locations[].create_supplier_name (optional, string, max 255): used when supplier_id is omitted. An existing supplier with this exact name is reused; otherwise a new supplier is created. When both are omitted, SKU.io matches the partner's name against existing suppliers and creates one when none matches.
- locations[].dropship_po_mode (optional): how the warehouse's drop-ship purchase orders are handled. record_only (default) records a purchase order that is never sent, because the partner ships and Shopify reports the shipment; supplier_settings follows the supplier's own drop-ship settings; send always creates and sends it.
Each location is applied on its own; one failing does not stop the others. A failed row has success: false and an error (for example an unknown location id returns "Shopify location not found"), and the request still returns 200. Check meta.failure_count.
Side effects: for a Shopify Collective location, the supplier's product pricing is set to Shopify's wholesale cost so its record-only purchase orders cost at wholesale. Open orders with shipments at the location that SKU.io could not record yet are re-synced in the background. Shipments already recorded against a store warehouse are not moved.
Authentication: Requires Bearer token (integrations:write).
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.