Skip to main content

Custom Integrations and API

With an API key, your own system reads and acts on returns and claims through the Returnflows API.

Written by August Lykke Amstrup

API keys are created under Settings → Integrations → Custom Integrations. A key applies to one shop.

With an API key, your own system reads and acts on returns and claims through the Returnflows API. It is used by helpdesk tools, finance systems and integrations you build yourself.

Add an API key

  1. Select Custom Integrations at the top of the Integrations page.

  2. Select Add API Key.

  3. Enter a Name that describes what the key is for, and select Create.

  4. Copy the key. It is shown once.

Select Delete to remove a key.

Use the API

The API is at https://api.returnflows.com. Send the key as a Bearer token in the Authorization header of every request.

Select Go to API docs on the Custom Integrations page to open the documentation, with every endpoint and its format. It is at api.returnflows.com/docs.

Area

What you can do

Path

Returns

List and search returns, and read one return with its lines and its history. Edit, close or cancel a return, and release the exchange on a return

/return-order

Return options

Extend the return window, give a free return label or block returns on one order

/return-order/{id}/order-options and /shopify/orders/{orderId}/return-window-extension

Claims

List and read claims, and review, close or cancel a claim

/claims

Read, create, change and delete your return reasons

/return-reasons

Claim settings

Read your claim questions, and read and change your Statistical Reasons and your Resolutions

/claims/settings

Read, create and change your markets and their settings

/markets

Addresses

Read, create and change your return, claims and company addresses

/addresses

Every answer has the fields success, message, responseObject and statusCode. The data is in responseObject.

A return is read with its own id or with the Shopify order id. The list of returns takes filters for the status, a date range and a search text.

The return window extension takes the numeric Shopify order ID and a number of days for the refund, the exchange and the gift card window. Each is between 0 and 36,500. It is the same extension as Return Options on the order. Learn more in Return Options.

To be notified when something happens, add a webhook and fetch the details from the API afterwards. Learn more in Webhooks.

Limits

  • The API allows 10 requests per second from one IP address. Above that it answers 429.

  • After 5 failed authentications in 15 minutes, further attempts are limited.

  • Every answer carries the headers RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.

  • A request without a key or with a wrong key answers 401.

  • Send your own User-Agent header. A request with the default one from a script library is refused with 403 and the error code 1010.

What the API doesn't cover

  • A return or a claim can't be created through the API.

  • A webhook can't be added or changed through the API. It is set up in Returnflows.

  • Shipping options, carriers, integrations, analytics, product rules and translations aren't in the API.

Good to know

  • If you have more than one shop, then create a key in each.

  • For an AI assistant such as Claude, use an MCP key. Learn more in MCP Integrations.

  • Gorgias reads your returns and claims with an API key. Learn more in Gorgias.

Did this answer your question?