Skip to main content

Create SKU Product From Magento

POST 

/api/magento2/integration-instances/:magento2IntegrationInstance/products/:product/create-sku-product

Create a brand-new SKU.io product seeded from this Magento 2 product (with optional user overrides + a field-mapping override list), then map the Magento row to the newly created SKU product. The whole operation runs inside a single DB transaction.

Idempotency: if a SKU.io product with the supplied sku already exists, the manager links to that existing product instead of creating a new one. The response then sets linked_existing: true and the message becomes "Linked to existing SKU product.".

Pre-condition: the Magento product MUST be unmapped. Mapped products return 422 and must be unmapped first.

Body (all fields optional; modal pre-fills from Magento):

  • sku (string, max 255)
  • name (string, max 255)
  • description (string)
  • image_url (string, max 1024)
  • barcode (string, max 255)
  • cost (number ≥ 0)
  • price (number ≥ 0)
  • weight (number ≥ 0)
  • field_mappings[] — array of { magento_field, sku_field } pairs the manager applies to the Magento payload before persisting. Same shape GET .../products/field-mappings returns.

Error responses:

  • 404 — product does not exist OR belongs to a different instance.
  • 422 — product is already mapped, or validation failed.

Request

Responses

Created

Response Headers
    Content-Type