Skip to content

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:

  • condition grades the item: new, unopened, opened, used, damaged, defective, incomplete, undetermined. Choose undetermined when the item's condition could not be assessed.
  • 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.

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_reasonenum

Why this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.

  • entry_error
  • duplicate_observation
  • source_correction
  • reconciliation_correction
  • other
correction_reason_messagestring

Detail about `correction_reason`.

created_atstringRequired

RFC3339 timestamp.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

generated_dispositionsarray of objectRequired

Dispositions Flint created when it recorded this observation. Empty unless the policy's `receipt_disposition_mode` is `automatic`.

inspected_atstringRequired

RFC3339 timestamp.

inspection_location_idstringRequired

Location where the returned merchandise was inspected. Must match the receipt receiving_location_id.

line_itemsarray of objectRequired

The lines recorded.

return_idstringRequired

ID of the Return the goods belong to.

return_inspection_idstringRequired

Unique identifier for this return inspection, prefixed `retins_`.

return_receipt_idstringRequired

ID of the receipt being inspected.

source_systemobject or nullRequired

System that recorded the observation. `null` when no source system was recorded.

statusenumRequired

Whether this is the current observation of these units or a correction replaced it.

  • current
  • superseded
superseded_atstring

RFC3339 timestamp.

superseded_by_return_inspection_idstring

ID of the inspection that corrected this one. Absent while it is current.

supersedes_return_inspection_idstring

ID of the inspection this one corrects.

updated_atstringRequired

RFC3339 timestamp.

versionintegerRequired

Current version of this resource's owned state. Send it as `expected_version` when changing the resource to reject a stale write.

JSON
{
  "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#

GET/v1/return-inspections

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

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 enum

Filter 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.

  • accepted
  • rejected
  • review_required
created_afterstring

Inclusive lower bound on created_at.

created_beforestring

Exclusive upper bound on created_at.

external_reference_idstring

Exact-match filter on the caller-owned external reference ID.

idempotency_keystring

Filter 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_afterstring

Inclusive lower bound on inspected_at.

inspected_beforestring

Exclusive upper bound on inspected_at.

inspection_location_idstring

Filter by inspection location id.

page_sizeinteger

Maximum number of results to return, from 1 to 100. Defaults to 20.

page_tokenstring

Opaque 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.

querystring

Search by return inspection ID or external reference ID.

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_typearray of enum

Filter 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.

  • manual
  • pos
  • wms
  • erp
  • other
  • flint
statusarray of enum

Filter 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.

  • current
  • superseded
updated_afterstring

Inclusive lower bound on updated_at.

updated_beforestring

Exclusive upper bound on updated_at.

Response · 200

Successful response.

dataarray of objectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

next_page_tokenstring

Opaque token to send as `page_token` to retrieve the next page. Omitted when there is no next page.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

GET/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_idstringRequired

Flint return inspection id.

Response · 200

Successful response.

dataobjectRequired

Resource, collection, or operation result returned by this request.

metaobject

Additional information about this response.

request_idstringRequired

Identifier 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.

JSON
{
  "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#

POST/v1/return-inspections/{return_inspection_id}/line-items/{return_inspection_line_item_id}/decideIdempotent

Requires 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_idstringRequired

Flint return inspection id.

return_inspection_line_item_idstringRequired

Flint return inspection line item id.

Request body

acceptance_decision_reasonenumRequired

Why the units were accepted or rejected after review.

  • inspection_result
  • return_policy
  • manual_review
  • other
acceptance_decision_reason_messagestring

Detail about `acceptance_decision_reason`.

acceptance_statusenumRequired

Whether the inspected units were accepted, rejected, or need a merchant's decision.

  • accepted
  • rejected
expected_versioninteger

Optional version of the return inspection. A stale value returns VERSION_CONFLICT with the inspection ID and its current version.

Response · 200

Successful response.

Same response as Get return inspection.

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#

POST/v1/returns/{return_id}/inspectionsKey required

Requires 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_idstringRequired

Flint return id.

Request body

correction_reasonenum

Why this observation replaces an earlier one. Send with `supersedes_return_receipt_id` or `supersedes_return_inspection_id`.

  • entry_error
  • duplicate_observation
  • source_correction
  • reconciliation_correction
  • other
correction_reason_messagestring

Detail about `correction_reason`.

external_actor_idstring

Your identifier for the actor who recorded the event. Don't put secrets in this field.

external_reference_idstring

Caller-owned identifier for this resource in an external system.

inspected_atstringRequired

When the event occurred, at most 5 minutes in the future.

inspection_location_idstringRequired

Location where the returned merchandise was inspected. Must match the receipt receiving_location_id.

line_itemsarray of objectRequired

The lines recorded.

return_receipt_idstringRequired

ID of the receipt being inspected.

source_systemobject

System that recorded the observation. `null` when no source system was recorded.

supersedes_return_inspection_idstring

ID of the inspection this one corrects.

Response · 201

Successful response.

Same response as Get return inspection.

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?