Skip to main content

Import Loop Returns

POST 

/api/loop-returns/import

Starts a background read of Loop returns. Each return is mirrored into SKU.io and, when auto_match is on, linked to an RMA. Returns already mirrored are updated, not duplicated. The dashboard's "Import Loop returns" uses days; the returns list's "Refresh from Loop" uses since_latest or date_range.

Required scope: returns:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body fields:

  • mode (string, optional, default days) — days (the last days days), since_latest (everything Loop changed since the last check, with a 6-hour overlap; the last 3 days when Loop was never checked) or date_range (returns Loop changed between date_from and date_to)
  • days (integer, optional, 1–365, default 90) — how far back the days mode reads
  • date_from (date Y-m-d, required when mode is date_range) — first day, in the account's time zone; up to 365 days back, on or before date_to
  • date_to (date Y-m-d, required when mode is date_range) — last day, in the account's time zone; not in the future

A read that runs up to now (days, since_latest) records the time as Loop's last check (see Get Loop Sync Info). The response carries tracked_job_log_id, the id of the background job that reports progress.

Returns 422 when a field is out of range. Returns 404 with a message when the account has no Loop Returns connection.

Authentication: Requires a Bearer token with the returns scope (read for GET, write for the others). Requires the integrations.sync permission.

Request​

Responses​

OK

Response Headers
    Content-Type