Browse all articles

The returns API

Last updated

With the returns add-on on, the ChannelDock REST API v2 gives you more about every return and a new endpoint for actions. Your existing integration keeps working: all existing fields stay the same, and the new data is added in extra keys. This article is for developers. For authentication and API keys, see ChannelDock REST API Documentation.

Steps

  1. Create an API key under Settings → API & Webhooks. Allow the methods you need on the Returns endpoint: GET to read, POST to send actions. The actions endpoint follows the permissions of the Returns endpoint.
  2. Send every request with HTTP Basic auth (API key as user, API secret as password), or with the headers Api-Key and Api-Secret.
  3. Send POST requests with a JSON body and Content-Type: application/json.
  4. Read returns with GET /portal/api/v2/seller/returns. Each return and each return line now has a platform object.
  5. Send actions to POST /portal/api/v2/seller/returns/actions with an action field.

The platform fields

GET /portal/api/v2/seller/returns adds a platform object to each return:

"platform": {
  "return_number": "RE-2026-0418",
  "public_code": "K7M2Q9XA",
  "state": "return-processing",
  "source": "portal",
  "form_id": 10,
  "return_status_id": 3,
  "tags": ["Frequent returner"],
  "shipping_fee": 4.95,
  "free_return": false,
  "resolved_at": null,
  "resolutions": [
    {"id": 12, "type": "refund", "status": "done", "channel": "shopify", "currency": "EUR", "amount_incl": 74.95, "amount_excl": 61.94, "reference": "gid://shopify/Refund/1", "created_at": "2026-11-28 15:10:00", "completed_at": "2026-11-28 15:10:04"}
  ],
  "customer": {"name": "Sanne de Vries", "email": "[email protected]", "phone": "", "language": "nl"}
}
  • state: request-pending, withdrawal-request-pending, return-announced, return-shipped, return-processing, return-resolved, return-cancelled, return-expired or imported (returns from before the platform or from marketplaces).
  • resolutions: every refund, credit and other settlement. type is refund, manual_refund, external_refund, credit, coupon, gift_card, exchange, repair, replace or goodwill. status is pending, processing, done, failed or cancelled.

Each return line gets its own platform object:

"platform": {"quantity_received": 1, "grade": "A", "disposition": "restock", "resolution_type": "refund", "unit_price_paid": 74.95, "vat_rate": 21, "reason_code": "size_too_small"}
  • grade: A, B, C or defect.
  • disposition: restock, b_stock, supplier, refurbish or scrap.

Actions

GET /portal/api/v2/seller/returns/actions lists the requests waiting for a decision, with counts and requests. Add tab = all, held or withdrawal to filter.

POST /portal/api/v2/seller/returns/actions takes one of these actions:

action Fields What it does
note return_id, text, optional public Adds a note. public: true shows it to the customer on the status page.
tag / untag return_id, tag Adds or removes a tag by name. tag creates the tag when it does not exist.
decide request_id, decision approve, keep (the customer keeps the item), reject, cancel_order or too_late. The last two are for withdrawals; a withdrawal cannot be rejected. cancel_order accepts cancel_at_channel (default false).
status return_id, status Sets one of your own return statuses, by id or by name.
receive return_product_id, received, optional grade, disposition Records how many units came in and how they were graded.
resolve return_id, key, items, optional adjustment, refund_shipping, notify Settles the return. See below.
lookup form_id, order_number, optional language Shows what a customer could return for an order through a return form.
create_return form_id, order_number, items, customer, optional shipping_method_id, answers, files, language Creates a return through a return form, as the customer would.
return_link order_number Gives a signed link that opens the return form at the items step for that order.

Example: add an internal note.

POST /portal/api/v2/seller/returns/actions
{"action": "note", "return_id": 12345, "text": "Box was damaged on arrival."}

Settle a return

resolve follows the same rules as the resolve page in ChannelDock: you can never refund more than is still refundable, and refunds only go to the sales channel when live refunds are on. key is required: 8 to 48 letters, digits, - or _, unique per settlement. If you send the same key again, the return is settled only once. items is a list of {return_product_id, type, quantity} with type refund, coupon or exchange, as the return offers. refund_shipping and notify default to true. The answer holds entries, resolved and a money summary.

Returns from your own shop (headless)

Use lookup and create_return to build the return flow in your own shop or app instead of the return portal.

  1. Call lookup with the form and order number. The answer has a status (found, not_found, marketplace, unshipped or all_returned) and, when found, the returnable lines, the reasons, the resolutions the form offers and the questions.
  2. Call create_return with items ([{order_product_id, quantity, reason_id, resolution, exchange_for?}]) and customer ({name, email, phone?, street?, postcode?, city?, country?}). Send answers as answers ({question_id: value}) and photos as files ([{question_id, filename, content_base64}], at most 10; JPG, PNG, HEIC, WebP, MP4, MOV or PDF).
POST /portal/api/v2/seller/returns/actions
{"action": "create_return", "form_id": 10, "order_number": "1001", "items": [{"order_product_id": 5512, "quantity": 1, "reason_id": 3, "resolution": "refund"}], "customer": {"name": "Sam Jansen", "email": "[email protected]"}}

The form’s rules run exactly as in the portal: requests, keep the item, fees, tags, test mode and customer e-mails. The answer has request_id, status (approved, pending, rejected or test), return_id (0 when no return was created yet) and status_url for the customer. A missing required answer or photo is refused with a message that names the question.

Good to know

  • The actions endpoint only works when the returns add-on is on. Otherwise it answers with HTTP 403.
  • A refused action answers with HTTP 400 and a message that says why.
  • customer is left out of the platform object when personal data is switched off for your API. Contact support to change that setting.
  • Fulfilment centres get the platform objects on GET /portal/api/v2/center/returns for connected sellers with the add-on, without customer details. They use GET and POST /portal/api/v2/center/returns/actions with the actions note, receive and decide (approve, keep or reject, only where the seller lets the fulfilment centre decide). The list of requests shows fc_can_decide for each request.
  • To hear about changes instead of polling, use Return webhooks.

Related articles


Was this helpful?

Related articles