Return operations

Return operations record physical facts. Receipts state what reached a Flint Location, inspections state what an operator observed, and dispositions authorize the final merchandise outcome. Corrections create superseding observations instead of editing history.

These routes use the commerce.returns.operations.write scope and do not grant refund or resolution authority. That separation lets a warehouse or WMS integration record custody and condition without permission to move buyer funds. The Receiving and inspecting guide walks one parcel through all three.

Receipts and inspections are immutable observations. To correct one, create a replacement carrying supersedes_return_receipt_id (or the inspection equivalent) and a correction_reason. The original stays readable with an observation status of superseded.

Receipt line shapes#

A receipt line takes one of three shapes, and the shape decides what its quantity is allowed to do next.

ShapeSendEffect
Matchedreturn_line_item_idCounts toward received_quantity and releases after_receipt refund timing
Unverifiedunverified_item with a name and SKUCounts toward no line and releases no gate. Raises a merchandise_exception blocker until verified
Excessquantity beyond what was approvedCounts as excess

Verify an unidentified line with POST /v1/return-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verify once an operator establishes the identity. Unverified and excess quantity can only take a non-inventory outcome such as discard, donate, or return_to_buyer, because Flint does not know which inventory item to increase.

Inspections#

An inspection names the return_receipt_id it is checking and the location_id it happened at. Each line answers three separate questions, and all three are required:

  • condition grades the item: new, unopened, opened, used, damaged, defective, incomplete, unknown.
  • finding_codes records what was discovered: matches_expected_item, wrong_item, damaged, defective, used, missing_parts, empty_package, counterfeit_suspected, other.
  • acceptance_status is the call: accepted, rejected, or review_required.

Several words appear in both condition and finding_codes and mean different things there, so read the field name alongside the value.

Accepted quantity satisfies after_inspection refund timing and becomes dispositionable. review_required defers the call instead: it raises an inspection_review_required blocker that holds the Return open until POST /v1/return-inspections/{return_inspection_id}/line-items/{return_inspection_line_item_id}/decide settles it with an acceptance_status and an acceptance_decision_reason of inspection_result, return_policy, manual_review, or other. The same route corrects an acceptance call that turned out to be wrong.

Dispositions#

A disposition targets either a receipt line or an inspection line, never both. Four of the twelve types change stock levels at the inventory_location_id you name.

Disposition typeStock effectinventory_location_id
sellableAdds to sellable stockRequired
quality_controlOn hand, not sellableRequired
damagedOn hand, not sellableRequired
quarantinedOn hand, not sellableRequired
lostNone. Records that the unit never arrivedRequired
repair, refurbish, liquidate, donate, discard, return_to_buyerNoneRejected

lost takes a location but moves no stock; it records where the loss was booked. The last row rejects inventory_location_id rather than ignoring it, so sending one fails the request.

A failed disposition exposes retry, which preserves the disposition and effect identities so stock cannot move twice. When the type, destination, quantity, or source has changed, create a new disposition naming replaces_return_disposition_id instead. Replacement transfers only unused capacity, and both retry and replacement are refused once an inventory effect starts processing.

List return dispositions#

GET/v1/return-dispositionsRequires 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 merchandise dispositions. Omitting return_id lists dispositions across every Return for the merchant.

Query parameters
created_afterstring

RFC3339 created after filter.

created_beforestring

RFC3339 created before filter.

disposition_typeenum

Filter by disposition type.

sellablequality_controldamagedquarantinedrepairrefurbishliquidatedonatediscardreturn_to_buyerlost
external_reference_idstring

Filter by external reference id.

inventory_location_idstring

Filter by inventory location id.

occurred_afterstring

RFC3339 occurred after filter.

occurred_beforestring

RFC3339 occurred before filter.

page_sizeinteger

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

page_tokenstring

Opaque cursor returned by the previous page.

replaces_return_disposition_idstring

Filter by replaces return disposition id.

return_idstring

Filter by return id.

return_inspection_line_item_idstring

Filter by return inspection line item id.

return_line_item_idstring

Filter by return line item id.

return_receipt_line_item_idstring

Filter by return receipt line item id.

statusenum

Filter by status.

pendingsucceededfailedcanceled
updated_afterstring

RFC3339 updated after filter.

updated_beforestring

RFC3339 updated before filter.

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-dispositions \
  -H "Authorization: Bearer YOUR_API_KEY"

Get return disposition#

GET/v1/return-dispositions/{return_disposition_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 disposition with its type, destination, quantity, status, and any linked inventory effect.

Path parameters
return_disposition_idstringrequired

Flint return disposition 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-dispositions/retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM \
  -H "Authorization: Bearer YOUR_API_KEY"

Cancel return disposition#

POST/v1/return-dispositions/{return_disposition_id}/cancelIdempotentRequires scope: commerce.returns.operations.write

Cancel a disposition that has not started its inventory effect. Cancellation is refused once the effect is processing.

Path parameters
return_disposition_idstringrequired

Flint return disposition id.

Request body
expected_return_disposition_revisionintegerrequired
reasonenumrequired
created_in_errorchanged_dispositionduplicateother
reason_messagestring
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-dispositions/retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM/cancel \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_return_disposition_revision": 0,
    "reason": "created_in_error"
  }'

Retry return disposition#

POST/v1/return-dispositions/{return_disposition_id}/retryIdempotentRequires scope: commerce.returns.operations.write

Retry a failed disposition with the same immutable intent. Disposition and effect identities are preserved, so a retry does not move stock twice.

Path parameters
return_disposition_idstringrequired

Flint return disposition id.

Request body
expected_return_disposition_revisionintegerrequired
reasonenumrequired
dependency_recoveredmapping_correctedoperator_retryother
reason_messagestring
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-dispositions/retdsp_01K0P7W6A4N9F3J2T8Q5R1C6XM/retry \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_return_disposition_revision": 0,
    "reason": "dependency_recovered"
  }'

List return inspections#

GET/v1/return-inspectionsRequires 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 inspection observations. Omitting return_id lists inspections across every Return for the merchant.

Query parameters
acceptance_statusenum

Filter by acceptance status.

acceptedrejectedreview_required
created_afterstring

RFC3339 created after filter.

created_beforestring

RFC3339 created before filter.

external_reference_idstring

Filter by external reference id.

inspected_afterstring

RFC3339 inspected after filter.

inspected_beforestring

RFC3339 inspected before filter.

location_idstring

Filter by location id.

page_sizeinteger

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

page_tokenstring

Opaque cursor returned by the previous page.

return_idstring

Filter by return id.

return_line_item_idstring

Filter by return line item id.

return_receipt_idstring

Filter by return receipt id.

source_system_typeenum

Filter by source system type.

manualposwmserpotherflint
statusenum

Filter by status.

currentsuperseded
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-inspections \
  -H "Authorization: Bearer YOUR_API_KEY"

Get return inspection#

GET/v1/return-inspections/{return_inspection_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 inspection with its line items, findings, and current or superseded observation status.

Path parameters
return_inspection_idstringrequired

Flint return inspection 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-inspections/{return_inspection_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Decide return inspection line item#

POST/v1/return-inspections/{return_inspection_id}/line-items/{return_inspection_line_item_id}/decideIdempotentRequires scope: commerce.returns.operations.write

Record the accept or reject outcome for inspected quantity. Accepted quantity becomes dispositionable and satisfies after_inspection refund timing.

Path parameters
return_inspection_idstringrequired

Flint return inspection id.

return_inspection_line_item_idstringrequired

Flint return inspection line item id.

Request body
acceptance_decision_reasonenumrequired
inspection_resultreturn_policymanual_reviewother
acceptance_decision_reason_messagestring
acceptance_statusenumrequired
acceptedrejectedreview_required
expected_return_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-inspections/{return_inspection_id}/line-items/{return_inspection_line_item_id}/decide \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "acceptance_decision_reason": "inspection_result",
    "acceptance_status": "accepted",
    "expected_return_revision": 0
  }'

List return receipts#

GET/v1/return-receiptsRequires 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 merchandise receipts. Omitting return_id lists receipts across every Return for the merchant.

Query parameters
created_afterstring

RFC3339 created after filter.

created_beforestring

RFC3339 created before filter.

external_reference_idstring

Filter by external reference id.

page_sizeinteger

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

page_tokenstring

Opaque cursor returned by the previous page.

received_afterstring

RFC3339 received after filter.

received_beforestring

RFC3339 received before filter.

receiving_location_idstring

Filter by receiving location id.

return_idstring

Filter by return id.

return_line_item_idstring

Filter by return line item id.

shipment_idstring

Filter by shipment id.

source_system_typeenum

Filter by source system type.

manualposwmserpotherflint
statusenum

Filter by status.

currentsuperseded
verification_statusenum

Filter by verification status.

matchedunverifiedexcess
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-receipts \
  -H "Authorization: Bearer YOUR_API_KEY"

Get return receipt#

GET/v1/return-receipts/{return_receipt_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 merchandise receipt with its line items and its current or superseded observation status.

Path parameters
return_receipt_idstringrequired

Flint return receipt 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-receipts/{return_receipt_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

Verify return receipt line item#

POST/v1/return-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verifyIdempotentRequires scope: commerce.returns.operations.write

Establish the Return line identity for receipt quantity that arrived without one. Unverified quantity counts toward no line and releases no refund timing gate until it is verified.

Path parameters
return_receipt_idstringrequired

Flint return receipt id.

return_receipt_line_item_idstringrequired

Flint return receipt line item id.

Request body
expected_return_revisionintegerrequired
return_line_item_idstringrequired
verification_reasonenumrequired
order_match_confirmedsku_match_confirmedinspection_confirmedmerchant_reviewother
verification_reason_messagestring
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-receipts/{return_receipt_id}/line-items/{return_receipt_line_item_id}/verify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "expected_return_revision": 0,
    "return_line_item_id": "",
    "verification_reason": "order_match_confirmed"
  }'

Create return disposition#

POST/v1/returns/{return_id}/dispositionsIdempotentRequires scope: commerce.returns.operations.write

Record an auditable merchandise disposition from either a receipt line or an inspection line.

Path parameters
return_idstringrequired

Flint return id.

Request body
option 1object
option 2object
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/returns/ret_01K0P7W6A4N9F3J2T8Q5R1C6XM/dispositions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "disposition_type": "sellable",
    "occurred_at": "",
    "quantity": 0,
    "reason": "inspection_result"
  }'

Create return inspection#

POST/v1/returns/{return_id}/inspectionsIdempotentRequires scope: commerce.returns.operations.write

Record an immutable inspection observation. Corrections supersede an earlier inspection instead of editing physical history.

Path parameters
return_idstringrequired

Flint return id.

Request body
correction_reasonenum
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestring
external_actor_idstring
external_reference_idstring
inspected_atstringrequired

RFC3339 timestamp.

line_itemsarray of objectrequired
location_idstringrequired
return_receipt_idstringrequired
source_systemobjectrequired
supersedes_return_inspection_idstring
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/returns/ret_01K0P7W6A4N9F3J2T8Q5R1C6XM/inspections \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "inspected_at": "",
    "line_items": [
      {
        "acceptance_status": "accepted",
        "condition": "new",
        "quantity": 0,
        "return_receipt_line_item_id": ""
      }
    ],
    "location_id": "",
    "return_receipt_id": "",
    "source_system": {
      "source_system_type": "manual"
    }
  }'

Create return receipt#

POST/v1/returns/{return_id}/receiptsIdempotentRequires scope: commerce.returns.operations.write

Record an immutable merchandise receipt observation. Corrections supersede an earlier receipt instead of editing physical history.

Path parameters
return_idstringrequired

Flint return id.

Request body
correction_reasonenum
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestring
external_actor_idstring
external_reference_idstring
line_itemsarray of one ofrequired
received_atstringrequired

RFC3339 timestamp.

receiving_location_idstringrequired
shipment_idstring
source_systemobjectrequired
supersedes_return_receipt_idstring
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/returns/ret_01K0P7W6A4N9F3J2T8Q5R1C6XM/receipts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: a-unique-key" \
  -d '{
    "line_items": [
      {
        "quantity": 0
      }
    ],
    "received_at": "",
    "receiving_location_id": "",
    "source_system": {
      "source_system_type": "manual"
    }
  }'
Rate this doc