Skip to main content

Quality Control API (Returns V2)

The Quality Control (QC) API lets 3PLs and warehouse systems push item inspection results back to Swap. This article covers authentication and key rotation — see the API docs for endpoint and payload details.

G
Written by Guido Kaspers

For up-to-date API endpoints, request and response examples, and more, visit our API docs.


API Description

The Quality Control (QC) API enables integration with Swap's QC system to record and update the condition of returned items.

This version introduces support for identifying items using the Shopify line item ID in addition to SKU. This ensures accurate QC updates when multiple variants share the same SKU.

The API complements existing CSV and Mintsoft integrations, allowing compatibility with a wider range of warehouse management systems (WMS).


API Logic

When called, the API updates QC information for one or more returned items.

If both sku and shopify_line_item_id are provided, the shopify_line_item_id will take priority.

If only sku is provided, behaviour remains the same as before.

If a SKU or line item ID does not match an existing order, the item is recorded in the Unexpected tab in the RMA list for administrative review.

Order lookup behaviour

The API can resolve the return using either the Shopify internal order ID (shopify_order_id) or the Shopify order name (shopify_order_name).

If both are provided, the API will use the available identifier to locate the return.

If neither identifier matches an existing order, the item will be handled according to the Unexpected item logic.


Authentication

All requests require an API token in the x-api-key header.

How to generate an API key

  1. Go to Returns → Quality Control Settings in the Swap dashboard.

  2. Enable Quality Control.

  3. Click Generate API Key.

  4. Copy the token from the popup (it will not be shown again).

Note: Once generated, the Generate API Key button is disabled to prevent duplicates.

How to rotate your API key

  1. Go to Returns → Quality Control Settings in the Swap dashboard.

  2. In the API key panel, click the refresh icon.

Rotating deactivates the old key immediately and issues a new one, so update your integration with the new key before rotating to avoid dropped requests.

Did this answer your question?