Return inspections
A return inspection states what an operator observed about received merchandise. It records a physical fact and grants no refund or resolution authority.
Create an inspection with POST /v1/returns/{return_id}/inspections. Read inspections with GET /v1/return-inspections?return_id= and GET /v1/return-inspections/{return_inspection_id}, or expand return_inspections on GET /v1/returns/{return_id}. Inspections are written under their Return and read from their own top-level list.
These routes use the commerce.returns.operations.write scope, shared with receipts and dispositions. POST /v1/returns/{return_id}/process combines this work with decisions and resolutions, so it requires all three scopes: commerce.returns.write, commerce.returns.operations.write, and commerce.returns.resolutions.write. The Receiving and inspecting guide walks one parcel through receipt, inspection, and disposition.
An inspection names the return_receipt_id it is checking and the inspection_location_id it happened at. Filter GET /v1/return-inspections by inspection_location_id.
Corrections#
An inspection is an immutable observation. To correct one, create a replacement carrying supersedes_return_inspection_id and a correction_reason. The original stays readable with an observation status of superseded. Correct an inspection before a disposition consumes it. The /decide route only settles review_required, so a superseding inspection is also how you correct an accepted or rejected call.
Inspection lines#
Each line answers three separate questions. condition and acceptance_status are required, and finding_codes is optional:
conditiongrades the item:new,unopened,opened,used,damaged,defective,incomplete,undetermined. Chooseundeterminedwhen the item's condition could not be assessed.finding_codesrecords what was discovered:matches_expected_item,wrong_item,damaged,defective,used,missing_parts,empty_package,counterfeit_suspected,other.acceptance_statusis the call:accepted,rejected, orreview_required.
Several words appear in both condition and finding_codes and mean different things there, so read the field name alongside the value.
Acceptance#
Accepted quantity satisfies after_inspection release timing. Under manual receipt disposition, it becomes dispositionable. Under automatic receipt disposition, acceptance creates a successful sellable disposition and returns it in generated_dispositions.
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 Return inspection object#
An assessment of the condition of returned items.
Returned by GET /v1/return-inspections/{return_inspection_id} and carried by the endpoints below.
Attributes
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
canceled_atstringRFC3339 timestamp.
canceled_byobjectWho canceled the disposition. Merchant reads only.
cancellation_reasonenumWhy the disposition was canceled.
created_in_errorchanged_dispositionduplicateother
cancellation_reason_messagestringDetail sent with the cancellation. Merchant reads only.
created_atstringRequiredRFC3339 timestamp.
created_byobjectRequiredWho created the disposition.
disposition_typeenumRequiredWhat happens to the received units.
sellablequality_controldamagedquarantinedrepairrefurbishliquidatedonatediscardreturn_to_buyerlost
external_reference_idstringCaller-owned identifier for this resource in an external system.
failure_codeenumReason code for a failed merchandise disposition, when available.
inventory_effect_failedinventory_item_unmapped
failure_messagestringExplanation of a failed merchandise disposition, when available.
inventory_location_idstringID of the Location whose stock the disposition changes. Required for `sellable`, `quality_control`, `damaged`, `quarantined`, and `lost`; rejected for the other types.
inventory_movement_idsarray of stringRequiredIDs of the inventory movements the disposition wrote. Empty when it moved no stock.
inventory_receipt_idstringID of the inventory receipt the disposition recorded. Absent when it recorded none.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
occurred_atstringRequiredRFC3339 timestamp.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
reasonenumRequiredWhy the disposition was made.
inspection_resultreturn_policywarehouse_overridesafety_requirementother
reason_messagestringOptional detail about `reason`, kept with the record.
replaced_by_return_disposition_idstringID of the disposition that took over this one. Present when a replacement canceled it.
replaces_return_disposition_idstringID of the `failed` or `canceled` disposition this one replaces. It takes over that disposition's unused capacity.
return_disposition_idstringRequiredUnique identifier for this return disposition, prefixed `retdsp_`.
return_idstringRequiredreturn_inspection_line_item_idstringID of the inspection line the disposition covers. Absent when it covers a receipt line.
return_line_item_idstringID of the Return line the units belong to.
return_receipt_line_item_idstringID of the receipt line the disposition covers. Absent when it covers an inspection line.
statusenumRequiredWhether inventory has applied the disposition.
pendingsucceededfailedcanceled
supported_actionsarray of enumRequiredActions that can succeed now. Empty unless the parent Return is open. cancel is listed only before the inventory effect starts.
cancelretry
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
inspected_atstringRequiredRFC3339 timestamp.
inspection_location_idstringRequiredLocation where the returned merchandise was inspected. Must match the receipt receiving_location_id.
line_itemsarray of objectRequiredThe lines recorded.
acceptance_decided_atstringRFC3339 timestamp.
acceptance_decided_byobjectWho made the acceptance decision.
acceptance_decision_reasonenumWhy the units were accepted or rejected after review.
inspection_resultreturn_policymanual_reviewother
acceptance_decision_reason_messagestringDetail about `acceptance_decision_reason`.
acceptance_statusenumRequiredWhether the inspected units were accepted, rejected, or need a merchant's decision.
acceptedrejectedreview_required
available_disposition_quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
conditionenumRequired`undetermined`: The item's condition could not be assessed.
newunopenedopeneduseddamageddefectiveincompleteundetermined
finding_codesarray of enumRequiredWhat the inspection found. Up to 50 values, none repeated.
matches_expected_itemwrong_itemdamageddefectiveusedmissing_partsempty_packagecounterfeit_suspectedother
internal_notestringNote for your own team about this line.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
return_inspection_idstringRequiredID of the inspection the line belongs to.
return_inspection_line_item_idstringRequiredUnique identifier for this return inspection line item, prefixed `retinli_`.
return_line_item_idstringID of the Return line inspected.
return_receipt_line_item_idstringRequiredID of the receipt line inspected.
supported_actionsarray of enumRequireddecide
return_idstringRequiredID of the Return the goods belong to.
return_inspection_idstringRequiredUnique identifier for this return inspection, prefixed `retins_`.
return_receipt_idstringRequiredID of the receipt being inspected.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
external_source_idstringYour source system's identifier. Required when source_system_type is pos, wms, erp, or other; not allowed when source_system_type is manual. Don't put secrets in this field.
source_system_typeenumRequiredSource of the event: manual for a manual entry, pos for a point of sale, wms for a warehouse management system, erp for an enterprise resource planning system, or other for another external system. Flint-authored events use flint in responses.
manualposwmserpotherflint
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_inspection_idstringID of the inspection that corrected this one. Absent while it is current.
supersedes_return_inspection_idstringID of the inspection this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
{
"created_at": "2026-09-08T14:15:00Z",
"generated_dispositions": [],
"inspected_at": "2026-09-08T14:15:00Z",
"inspection_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"line_items": [
{
"acceptance_status": "accepted",
"available_disposition_quantity": 1,
"condition": "unopened",
"finding_codes": [
"matches_expected_item"
],
"quantity": 1,
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_inspection_line_item_id": "retinli_01KEZF7C0039VC3XNJ3ZTX8PV4",
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": []
}
],
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:15:00Z",
"version": 1
}List return inspections#
/v1/return-inspectionsRequires scope commerce.returns.operations.write or commerce.returns.policies.write or commerce.returns.read or commerce.returns.reasons.write or commerce.returns.resolutions.write or commerce.returns.write
Rate limit: read
List inspection observations. Omitting return_id lists inspections across every Return for the merchant. Default order: created_at descending, then return_inspection_id descending.
Query parameters
acceptance_statusarray of enumFilter by acceptance status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
acceptedrejectedreview_required
created_afterstringInclusive lower bound on created_at.
created_beforestringExclusive upper bound on created_at.
external_reference_idstringExact-match filter on the caller-owned external reference ID.
idempotency_keystringFilter by the original Idempotency-Key, after trimming surrounding whitespace. Matching is exact and case-sensitive. Returns current authorized resources, not the recorded response. A pending resource does not prove that the operation succeeded, and an empty list does not prove that it had no effect.
inspected_afterstringInclusive lower bound on inspected_at.
inspected_beforestringExclusive upper bound on inspected_at.
inspection_location_idstringFilter by inspection location id.
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque next_page_token from the previous response. Omit on the first request. You may change `page_size` between pages. Reuse it with the same endpoint, filters, sort, and request context. Do not parse or construct tokens. An invalid, expired, or mismatched token returns a validation error.
querystringSearch by return inspection ID or external reference ID.
return_idstringFilter by return id.
return_line_item_idstringFilter by return line item id.
return_receipt_idstringFilter by return receipt id.
source_system_typearray of enumFilter by source system type. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
manualposwmserpotherflint
statusarray of enumFilter by status. Values are trimmed and deduplicated in first-seen order; empty or unknown entries are rejected. Values within this filter are ORed; separate filters are ANDed.
currentsuperseded
updated_afterstringInclusive lower bound on updated_at.
updated_beforestringExclusive upper bound on updated_at.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
inspected_atstringRequiredRFC3339 timestamp.
inspection_location_idstringRequiredLocation where the returned merchandise was inspected. Must match the receipt receiving_location_id.
line_itemsarray of objectRequiredThe lines recorded.
return_idstringRequiredID of the Return the goods belong to.
return_inspection_idstringRequiredUnique identifier for this return inspection, prefixed `retins_`.
return_receipt_idstringRequiredID of the receipt being inspected.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_inspection_idstringID of the inspection that corrected this one. Absent while it is current.
supersedes_return_inspection_idstringID of the inspection this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
next_page_tokenstringOpaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/return-inspections \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-09-08T14:15:00Z",
"generated_dispositions": [],
"inspected_at": "2026-09-08T14:15:00Z",
"inspection_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"line_items": [
{
"acceptance_status": "accepted",
"available_disposition_quantity": 1,
"condition": "unopened",
"finding_codes": [
"matches_expected_item"
],
"quantity": 1,
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_inspection_line_item_id": "retinli_01KEZF7C0039VC3XNJ3ZTX8PV4",
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": []
}
],
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:15:00Z",
"version": 1
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Get return inspection#
/v1/return-inspections/{return_inspection_id}Requires scope commerce.returns.operations.write or commerce.returns.policies.write or commerce.returns.read or commerce.returns.reasons.write or commerce.returns.resolutions.write or commerce.returns.write
Rate limit: read
Retrieve one inspection with its line items, findings, and current or superseded observation status.
Path parameters
return_inspection_idstringRequiredFlint return inspection id.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
created_atstringRequiredRFC3339 timestamp.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
generated_dispositionsarray of objectRequiredDispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.
inspected_atstringRequiredRFC3339 timestamp.
inspection_location_idstringRequiredLocation where the returned merchandise was inspected. Must match the receipt receiving_location_id.
line_itemsarray of objectRequiredThe lines recorded.
return_idstringRequiredID of the Return the goods belong to.
return_inspection_idstringRequiredUnique identifier for this return inspection, prefixed `retins_`.
return_receipt_idstringRequiredID of the receipt being inspected.
source_systemobject or nullRequiredSystem that recorded the observation. `null` when no source system was recorded.
statusenumRequiredWhether this is the current observation of these units or a correction replaced it.
currentsuperseded
superseded_atstringRFC3339 timestamp.
superseded_by_return_inspection_idstringID of the inspection that corrected this one. Absent while it is current.
supersedes_return_inspection_idstringID of the inspection this one corrects.
updated_atstringRequiredRFC3339 timestamp.
versionintegerRequiredCurrent version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.
metaobjectAdditional information about this response.
api_versionstringAPI version used to produce this response.
idempotency_replayedbooleanWhether this response replays a stored result for the supplied Idempotency-Key.
trace_idstringTrace identifier to include when contacting Flint about this request.
warningsarray of objectConditions that need attention even though the request succeeded.
request_idstringRequiredIdentifier of this API request, used to correlate logs and support requests.
curl https://api.withflintpay.com/v1/return-inspections/retins_01KEZF7C00WPB0BR4WTT7CMSB8 \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-09-08T14:15:00Z",
"generated_dispositions": [],
"inspected_at": "2026-09-08T14:15:00Z",
"inspection_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"line_items": [
{
"acceptance_status": "accepted",
"available_disposition_quantity": 1,
"condition": "unopened",
"finding_codes": [
"matches_expected_item"
],
"quantity": 1,
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_inspection_line_item_id": "retinli_01KEZF7C0039VC3XNJ3ZTX8PV4",
"return_line_item_id": "retli_01KEZF7C001NHF6JPD83VD0MRK",
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE",
"supported_actions": []
}
],
"return_id": "ret_01KEZF7C00VDTZH2NK73DBK2HZ",
"return_inspection_id": "retins_01KEZF7C005J6VZVYK9Q0Q14VG",
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
},
"status": "current",
"updated_at": "2026-09-08T14:15:00Z",
"version": 1
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Decide return inspection line item#
/v1/return-inspections/{return_inspection_id}/line-items/{return_inspection_line_item_id}/decideIdempotentRequires scope commerce.returns.operations.write
Rate limit: write
Record the accept or reject outcome for inspected quantity. expected_version compares against the inspection version. Accepted quantity becomes dispositionable and satisfies after_inspection release timing.
Path parameters
return_inspection_idstringRequiredFlint return inspection id.
return_inspection_line_item_idstringRequiredFlint return inspection line item id.
Request body
acceptance_decision_reasonenumRequiredWhy the units were accepted or rejected after review.
inspection_resultreturn_policymanual_reviewother
acceptance_decision_reason_messagestringDetail about `acceptance_decision_reason`.
acceptance_statusenumRequiredWhether the inspected units were accepted, rejected, or need a merchant's decision.
acceptedrejected
expected_versionintegerOptional version of the return inspection. A stale value returns VERSION_CONFLICT with the inspection ID and its current version.
curl -X POST https://api.withflintpay.com/v1/return-inspections/retins_01KEZF7C00WPB0BR4WTT7CMSB8/line-items/retinli_01KEZF7C0039VC3XNJ3ZTX8PV4/decide \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"acceptance_decision_reason": "manual_review",
"acceptance_status": "accepted",
"expected_version": 1
}'Create return inspection#
/v1/returns/{return_id}/inspectionsKey requiredRequires scope commerce.returns.operations.write
Rate limit: write
Record an immutable inspection observation. Corrections supersede an earlier inspection instead of editing physical history. Read inspections with `GET /v1/return-inspections?return_id=` or expand `return_inspections` on `GET /v1/returns/{return_id}`.
Path parameters
return_idstringRequiredFlint return id.
Request body
correction_reasonenumWhy this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.
entry_errorduplicate_observationsource_correctionreconciliation_correctionother
correction_reason_messagestringDetail about `correction_reason`.
external_actor_idstringYour identifier for the actor who recorded the event. Don't put secrets in this field.
external_reference_idstringCaller-owned identifier for this resource in an external system.
inspected_atstringRequiredWhen the event occurred, at most 5 minutes in the future.
inspection_location_idstringRequiredLocation where the returned merchandise was inspected. Must match the receipt receiving_location_id.
line_itemsarray of objectRequiredThe lines recorded.
acceptance_statusenumRequiredWhether the inspected units were accepted, rejected, or need a merchant's decision.
acceptedrejectedreview_required
conditionenumRequired`undetermined`: The item's condition could not be assessed.
newunopenedopeneduseddamageddefectiveincompleteundetermined
finding_codesarray of enumWhat the inspection found. Up to 50 values, none repeated.
matches_expected_itemwrong_itemdamageddefectiveusedmissing_partsempty_packagecounterfeit_suspectedother
internal_notestringNote for your own team about this line.
quantityintegerRequiredWhole-number quantity; fractional quantities are not supported.
return_line_item_idstringID of the Return line inspected.
return_receipt_line_item_idstringRequiredID of the receipt line inspected.
verification_reasonenumWhy the receipt line was verified against the Return line.
order_match_confirmedsku_match_confirmedinspection_confirmedmerchant_reviewother
verification_reason_messagestringDetail about `verification_reason`.
return_receipt_idstringRequiredID of the receipt being inspected.
source_systemobjectSystem that recorded the observation. `null` when no source system was recorded.
external_source_idstringYour source system's identifier. Required when source_system_type is pos, wms, erp, or other; not allowed when source_system_type is manual. Don't put secrets in this field.
source_system_typeenumRequiredSource of the event: manual for a manual entry, pos for a point of sale, wms for a warehouse management system, erp for an enterprise resource planning system, or other for another external system. Flint-authored events use flint in responses.
manualposwmserpother
supersedes_return_inspection_idstringID of the inspection this one corrects.
curl -X POST https://api.withflintpay.com/v1/returns/ret_01KEZF7C00PG93650ZKVQNGF7X/inspections \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"inspected_at": "2026-09-08T14:15:00Z",
"inspection_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"line_items": [
{
"acceptance_status": "accepted",
"condition": "unopened",
"finding_codes": [
"matches_expected_item"
],
"quantity": 1,
"return_receipt_line_item_id": "retrcli_01KEZF7C00BCEA2ZKN4H8WYWXE"
}
],
"return_receipt_id": "retrc_01KEZF7C008V637A0ZWN32RQ7A",
"source_system": {
"source_system_type": "manual"
}
}'Was this helpful?
