Return reasons

Return reasons are stable, merchant-visible explanations for why a buyer requested a Return. Flint provides a default reason set, and merchants can add or archive their own reasons. Return lines freeze the selected reason identity and display name so archived reasons remain understandable in historical records.

Four vocabularies, one word#

Buyer reasons are distinct from inspection findings, decline reasons, override reasons, and Refund reasons. Keep those facts separate even when their human wording is similar: a buyer saying "damaged" and a warehouse finding damaged are different claims about the same parcel, and the difference is the point when one of them is wrong.

VocabularySupplied byField
Return reasonThe buyerreturn_reason_id on the Return line
Inspection findingThe warehousefinding_codes on an inspection line
Decline reasonThe merchantdecline_reason on a decision
Override reasonThe merchantoverride_reason, required when deviating from an active policy
Refund reasonFlintreason on the Refund, mapped from the buyer's return reason

A Refund raised by a Return resolution derives its own reason from the buyer's: defective becomes defective_product, wrong_item becomes wrong_item_shipped, too_small, too_large, and damaged_on_arrival become not_as_described, arrived_late becomes arrived_too_late, changed_mind becomes customer_changed_mind, and no_longer_needed becomes requested_by_customer. Reasons you define yourself have no equivalent and map to other, as does a Refund covering lines that gave different reasons.

Writes#

handle is the stable identifier you match on; name is what a buyer reads. is_note_required forces a free-text note when the reason is chosen, which is worth setting on anything you would otherwise have to email the buyer about.

When updating a merchant reason, omit categories to keep the current list and send categories: [] to clear it. Send description: null to clear the description.

Archiving stops buyers selecting a reason. Returns that already recorded it keep the frozen name, so tidying the list never changes what an old Return means.

List return reasons#

GET/v1/return-reasonsRequires scope: commerce.return_policies.write or commerce.return_reasons.write or commerce.returns.decisions.write or commerce.returns.operations.write or commerce.returns.process.write or commerce.returns.read or commerce.returns.resolutions.write or commerce.returns.write

List Return reasons, including Flint-provided defaults and merchant-defined reasons.

Query parameters
page_sizeinteger

Page size. Defaults to 20 and is capped at 100.

page_tokenstring

Opaque cursor returned by the previous page.

sourceenum

Filter by source.

flintmerchant
statusarray of enum

Filter by status.

activearchived
Response · 200
dataarray of objectrequired
metaobject
next_page_tokenstring
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDED
Bash
curl https://api.withflintpay.com/v1/return-reasons \
  -H "Authorization: Bearer YOUR_API_KEY"

Create return reason#

POST/v1/return-reasonsIdempotentRequires scope: commerce.return_reasons.write

Create a merchant Return reason buyers can select. Buyer reasons are distinct from inspection findings, decline reasons, and Refund reasons.

Request body
categoriesarray of string
descriptionstring
handlestringrequired
is_note_requiredbooleanrequired
namestringrequired
Response · 201
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl -X POST https://api.withflintpay.com/v1/return-reasons \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "handle": "",
    "is_note_required": false,
    "name": ""
  }'

Get return reason#

GET/v1/return-reasons/{return_reason_id}Requires scope: commerce.return_policies.write or commerce.return_reasons.write or commerce.returns.decisions.write or commerce.returns.operations.write or commerce.returns.process.write or commerce.returns.read or commerce.returns.resolutions.write or commerce.returns.write

Retrieve one Return reason with its handle, categories, and status.

Path parameters
return_reason_idstringrequired

Flint return reason id.

Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl https://api.withflintpay.com/v1/return-reasons/{return_reason_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Update return reason#

PATCH/v1/return-reasons/{return_reason_id}IdempotentRequires scope: commerce.return_reasons.write

Update a Return reason. Send null to clear description. A present categories array replaces the existing set.

Path parameters
return_reason_idstringrequired

Flint return reason id.

Request body
categoriesarray of string
descriptionstring
expected_return_reason_revisionintegerrequired
is_note_requiredboolean
namestring
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl -X PATCH https://api.withflintpay.com/v1/return-reasons/{return_reason_id} \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_return_reason_revision": 0
  }'

Archive return reason#

POST/v1/return-reasons/{return_reason_id}/archiveIdempotentRequires scope: commerce.return_reasons.write

Archive a Return reason so buyers can no longer select it. Returns that already recorded it keep the frozen reason name.

Path parameters
return_reason_idstringrequired

Flint return reason id.

Request body
expected_return_reason_revisionintegerrequired
Response · 200
dataobjectrequired
metaobject
request_idstring

Error codes

AUTH_REQUIREDINSUFFICIENT_SCOPEINVALID_REQUESTRATE_LIMIT_EXCEEDEDRESOURCE_NOT_FOUND
Bash
curl -X POST https://api.withflintpay.com/v1/return-reasons/{return_reason_id}/archive \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_return_reason_revision": 0
  }'
Rate this doc