Return policies
Return policies are merchant rules for eligibility, deadlines, allowed resolutions, approval mode, release timing, inspection, destination, completion, shipping, and restocking fees. Flint judges every return request against your active policies. Where a policy allows it, Flint approves and resolves the request itself; everything else waits for you, with the policy's proposal attached.
Use this API to write your return rules once, show them on a settings page, and look up the exact rules a past Return was judged under. Return policies and reasons walks through writing, activating, and changing a policy step by step.
Policies and revisions#
A policy is a stable identity. Its rules live on revisions, and a revision never changes once it's published.
- The policy (
rpol_...) holdsname,status,version,external_reference_id, andmetadata.PATCH /v1/return-policies/{return_policy_id}changes these and nothing else. - A revision (
rpolv_...) holds the rules:scope,priority, eligibility, return window, modes, receiving, and fees. To change any of them, publish a new revision withPOST /v1/return-policies/{return_policy_id}/revisions.
Creating a policy publishes its first revision. current_return_policy_revision_id names the revision Flint judges new requests by, and each publish points it at the new one. A revision carries the complete rules, so send all of them every time: a field you leave out of a publish doesn't carry over from the previous revision. Change the rules shows a publish.
Each Return line records the revision it was judged under in eligibility.return_policy_revision_id and keeps it whatever happens to the policy later. Read those rules with GET /v1/return-policies/{return_policy_id}/revisions/{return_policy_revision_id}, which works for archived policies too. A Return decided in March still shows the rules it was decided under after you've changed them twice.
Read the current revision#
Policy reads return current_return_policy_revision_id and leave the revision itself out. Add expand=current_revision to GET /v1/return-policies/{return_policy_id} or GET /v1/return-policies to include it as current_revision, the same object the revision endpoints return. On a list, that gives a settings page every policy with its rules in one request. Adding or dropping expand between pages keeps page_token valid.
curl -G https://api.withflintpay.com/v1/return-policies \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-urlencode "status=active" \
--data-urlencode "expand=current_revision"
{
"data": [
{
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"name": "Standard returns",
"status": "active",
"version": 2,
"current_return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"current_revision": {
"return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"priority": 100,
"scope": { "match_type": "all" },
"eligibility_result": "eligible",
"return_window": { "duration_seconds": 2592000, "starts_at_event": "delivered" },
"allowed_resolution_types": ["refund", "exchange"],
"approval_mode": "automatic",
"resolution_mode": "manual",
"completion_mode": "automatic",
"release_timing": "after_receipt",
"is_merchandise_return_required": true,
"is_inspection_required": false,
"receiving_location_id": "loc_01KEZF7C00G0VBJJ8VMFCQ5YVG",
"receipt_disposition_mode": "automatic",
"return_shipping": { "payer": "buyer" },
"restocking_fee": { "calculation_type": "percent", "percent": 10 },
"effective_at": "2026-09-08T15:30:00Z",
"created_at": "2026-09-07T00:00:00Z"
},
"metadata": {},
"created_at": "2026-09-07T00:00:00Z",
"updated_at": "2026-09-08T15:30:00Z"
}
],
"request_id": "req_01KWM6MMFKZ7MSJCYFVP9NAEBC"
}
This policy was created with its first revision (version: 1) and then activated (version: 2). It accepts anything for 30 days from delivery and approves requests itself. Because it offers exchanges, which need a person to pick the merchandise, it leaves the outcome to your staff. The buyer pays return shipping, the refund waits until the merchandise arrives, and each line gets a proposed 10 percent restocking fee.
Status#
Only active policies are evaluated. A new policy defaults to inactive, so you can publish and review its rules before any buyer meets them. Send status: "active" on create to use it immediately; the same activation checks apply.
status on return policyinactiveNot evaluated. Publish revisions freely, then setstatus: "active"withPATCHto turn it on.activeEvaluated for every new Return and every eligibility preview fromPOST /v1/return-previews. Setstatus: "inactive"withPATCHto stop.archivedFinalRetired withDELETE. It can't be updated, activated, or given another revision; each of those returns409 ACTION_NOT_ALLOWEDwithreason: archived. Lists leave archived policies out unlessstatusnamesarchived.
Activation checks#
Activating a policy, and publishing a revision to a policy that's already active, check the revision against the rest of your setup. Writing a revision to an inactive policy checks only the revision itself.
- The receiving Location must be usable. It has to exist, be active, and have a postal address, since buyers ship to it. Otherwise the request fails with
409 ACTION_NOT_ALLOWED, and the message says what's wrong with the Location. - Two active policies can't tie. If another active policy has the same
priorityand a scope that could cover the same item, the request fails with409 ACTION_NOT_ALLOWEDandreason: configuration_required. Two scopes count as overlapping unless both areincludeand some list, such ascategory_handles, is filled in both with no value in common. Change one policy'spriority, or narrow the scopes so they can't overlap.
Deactivation#
Setting a policy inactive fails with 409 ACTION_NOT_ALLOWED while a requested or open Return was judged under one of its revisions. Each of those Returns has to reach completed, declined, or canceled first.
Versions#
version starts at 1 and goes up by one with every change to the policy: an identity update, a status change, or a new revision. Send the version you last read as expected_version, and a change made since then fails with 409 VERSION_CONFLICT instead of being overwritten.
| Request | expected_version |
|---|---|
| Publish a revision | Required, in the body |
PATCH a policy | Optional, in the body |
DELETE a policy | Optional, as a query parameter |
Which policy applies#
For each line in a request, Flint takes the active policies whose scope covers the item and applies the one with the highest priority. Layer specific policies over a general one: a catch-all at priority 100 and a final-sale exclusion at priority 200, for example.
Every scope needs a match_type:
allcovers every item. Every list in the scope must be empty or absent.includecovers only what its lists name, and at least one list must have a value. When you fill several lists, an item has to match each of them; within a list, any value matches.
| List | Matches |
|---|---|
product_ids | The order line's product |
variant_ids | The order line's variant |
category_handles | Any of the line's catalog categories, by handle |
location_ids | The Location the item was fulfilled from |
channel_types | The order's origin: checkout, payment_link, shop, virtual_terminal, api, or subscription |
Each list holds up to 100 distinct values of 1 to 255 characters. Every handle in category_handles must name an existing category.
When no active policy covers a line, its eligibility is review_required with reason: no_matching_policy. You and your integrations can still create a Return for it and decide it by hand. Leave out override_reason: there is no policy to override, so the decision rejects one. A buyer can't request the line through a customer session, because only an active policy that covers the item opens it to self-service.
Revision rules#
eligibility_result splits revisions into two shapes, published as the ReturnPolicyRevisionInputIneligible and ReturnPolicyRevisionInputReturnable schemas. review_required is returnable, but every request under it waits for your decision.
- Every revision needs
priority,scope,approval_mode, andis_merchandise_return_required. - An
ineligiblerevision also needsineligibility_reason, and leaves outallowed_resolution_types,resolution_mode,release_timing, andcompletion_mode. - An
eligibleorreview_requiredrevision also needsallowed_resolution_types,resolution_mode, andcompletion_mode, plusrelease_timingwhenrefundorstore_creditis allowed. It can't setineligibility_reason.
An ineligible revision states only that the items can't come back and why. Flint checks it before the return window, so a buyer sees the reason, such as final_sale, even after the window has passed. Final sale shows one.
On a returnable revision, these fields depend on each other:
- Merchandise.
is_merchandise_return_required: trueneedsreceiving_location_id. When it'sfalse, leave out bothreceiving_location_idandis_inspection_required. - Release timing.
after_handoffandafter_receiptneedis_merchandise_return_required: true.after_inspectionalso needsis_inspection_required: true. When onlyexchange,replacement, orno_monetary_actionis allowed and you leaverelease_timingout, Flint usesafter_inspectionwhen inspection is required,after_receiptwhen only the merchandise is, andafter_approvalotherwise. - Automatic resolution.
resolution_mode: "automatic"needsresolution_selection_mode. Withpolicy_default, setautomatic_resolution_typeto a value inallowed_resolution_types. Withbuyer_requested, leaveautomatic_resolution_typeout and allow onlyrefund,store_credit, andno_monetary_action. Underresolution_mode: "manual", set neither field. - Limits.
priorityis 0 or higher.return_window.duration_secondsis above 0 and at most 158,112,000 (1,830 days).allowed_resolution_typescan't repeat a value. A policynameis 1 to 255 characters.
A revision that breaks a rule is rejected with 400 INVALID_REQUEST, on create and on publish alike. Rules Flint checks when you write a revision has the complete list.
What the modes decide#
approval_modedecides who approves.automaticapproves a request without you when every line iseligiblefor its full requested quantity.manualwaits forPOST /v1/returns/{return_id}/decide.resolution_modedecides who creates the buyer's outcome.automaticcreates and confirms arefund,store_credit, orno_monetary_actionoutcome itself.manualleaves the outcome to you, which exchanges and replacements always need, because a person chooses the merchandise.resolution_selection_modedecides who picks an automatic outcome.policy_defaultusesautomatic_resolution_type, andbuyer_requesteduses what the buyer chose fromallowed_resolution_types.release_timingdecides when the outcome's value is released:after_approval,after_handoff,after_receipt,after_inspection, ormanual. It gates exchanges and replacements as well as refunds.completion_modedecides who completes the Return.automaticcompletes it when its last completion blocker clears.manualwaits forPOST /v1/returns/{return_id}/complete.receipt_disposition_modedecides what happens to verified merchandise on arrival.automatic, the default, records it as sellable at the receiving Location, after an accepted inspection when one is required.manualwaits for you to create a disposition.
What automatic decides covers when automatic approval holds back and how the modes combine.
Return windows#
return_window is a duration_seconds and the event it counts from. Leave it out for no deadline. Each fulfillment gets its own deadline, reported as expires_at on the line's eligibility; after it, the line is ineligible with reason: return_window_expired.
starts_at_event | Counts from |
|---|---|
fulfilled | The fulfillment completing |
delivered | The carrier, local, or digital delivery |
picked_up | The buyer collecting in person |
service_completed | The work being finished |
When the starting event never happens for a fulfillment, such as a delivered window on an in-store pickup, Flint can't set a deadline. The line becomes review_required with reason: manual_review_required, and you decide it. See Windows.
Fees#
return_shipping.payer is merchant or buyer. It states your policy and charges nothing, because Flint doesn't buy return labels. To charge the buyer for a label, add a return_shipping_fee adjustment to the resolution.
restocking_fee is proposed for each eligible line in the line's policy_adjustment_proposals, with the amount in calculated_amount_money:
flatwithflat_moneyproposes that amount for the line, whatever the quantity.percentwithpercent, from 1 to 100 with up to four decimal places, proposes that share of the returned units' refundable value before the fee, after discounts and including allocated tax.10means 10 percent: one $18.00 unit discounted to $16.20 has a $1.62 fee.
Both fees are capped at the returned units' refundable value. Percentage fees use the refund's unit allocation. For each return, apply its pinned policy percentage to what the buyer paid for those units, then round down to the smallest currency unit. Fees across several returns under the same percentage never add up to more than that percentage of what was paid. Earlier resolutions do not affect the fee. This applies to refunds, exchanges, and store credit. See Return policy fees.
The fee lands on the resolution as a restocking_fee adjustment and shows in the Return's financial_summary as deduction_money.
Errors#
- StatusHTTP 400CodeINVALID_
REQUEST What to doA revision breaks one of the revision rules, or a publish has noexpected_version. Fix the request and send it again. - StatusHTTP 404What to doThe policy or revision doesn't exist in this environment, or a
category_handlesvalue doesn't name a category. For a handle,parampoints at it, such asrevision.scope.category_handles[0]. - StatusHTTP 409What to doThe policy changed after you read it. Read it again, check what changed, and retry with its current
version. - StatusHTTP 409What to doWith
reason: configuration_required, another active policy has the samepriorityand a scope that could overlap. Withreason: archived, the policy is archived. Otherwise, an activation check found the receiving Location missing, inactive, or without a postal address, or a deactivation found open Returns judged under the policy.
Related#
Return policies and reasonsWrite, activate, and change a policy, and decide requests by hand.Buyer-initiated returnsShow buyers what your policies let them return.Returns API referenceThe Returns your policies judge.The Return policy object#
Rules governing whether and how purchased items can be returned.
Returned by GET /v1/return-policies/{return_policy_id} and carried by the endpoints below.
Attributes
created_atstringRequiredRFC3339 timestamp.
current_return_policy_revision_idstringRequiredID of the revision Flint judges new requests by.
current_revisionobject or nullPresent only when `expand` includes `current_revision`; `null` when expanded and there is no related return policy revision.
Not returned with a customer session
allowed_resolution_typesarray of enumRequiredResolution types a request can use under this policy. A value can't repeat.
refundexchangereplacementno_monetary_actionstore_credit
approval_modeenumRequiredWhether Flint approves eligible lines automatically or waits for merchant review. Automatic approval still waits for the buyer to request a Return.
automaticmanual
automatic_resolution_typeenumOutcome Flint creates and confirms itself when `resolution_selection_mode` is `policy_default`. Must be one of `allowed_resolution_types`.
refundstore_creditno_monetary_action
completion_modeenumWhether Flint completes a Return judged under this policy when its last completion blocker clears (`automatic`) or waits for you (`manual`).
manualautomatic
created_atstringRequiredRFC3339 timestamp.
effective_atstringWhen this revision started judging requests: when it became current on an active policy, or when its policy was first activated. Absent if it was never current while the policy was active.
eligibility_resultenumRequiredWhat the policy decides for items it covers.
eligibleineligiblereview_required
ineligibility_reasonenumWhy the policy refuses returns. Set only when `eligibility_result` is `ineligible`.
final_saleproduct_excludedcategory_excludedmarket_restrictedchannel_restrictedoutside_return_windowother
is_inspection_requiredbooleanWhether returned merchandise must be inspected. Leave out when no merchandise has to come back.
is_merchandise_return_requiredbooleanRequiredWhether the buyer has to send the merchandise back. When `false`, the buyer keeps it and the Return settles the money.
priorityintegerRequiredWhich policy wins when several cover an item: the highest priority applies. Zero or higher.
receipt_disposition_modeenumRequiredControls verified merchandise after receipt. automatic creates a disposition at the receiving location with reason inspection_result: sellable without inspection; after an accepted inspection, new and unopened map to sellable, opened, used, incomplete, and undetermined map to quality_control, and damaged and defective map to damaged. Successful tracked dispositions also create an inventory receipt and movement. Untracked merchandise has no inventory effect. If the inventory item is unmapped, the observation is recorded and the generated disposition is failed with failure_code inventory_item_unmapped. Cancel it or create a replacement; retry is unavailable. manual leaves inventory unchanged until an explicit disposition succeeds. When omitted, the value defaults to automatic.
automaticmanual
receiving_location_idstringID of the Location buyers send the merchandise to. Required when merchandise has to come back.
release_timingenumRelease gate for every resolution type, including exchanges and replacements. Released after the Return is approved. Released after the buyer hands back the required merchandise. Released after the required merchandise is received. Released after the required merchandise passes inspection. Held until a merchant calls POST /v1/return-resolutions/{id}/release.
after_approvalafter_handoffafter_receiptafter_inspectionmanual
resolution_modeenumWhether Flint creates the buyer's outcome itself (`automatic`) or leaves it to you (`manual`).
automaticmanual
resolution_selection_modeenumWho picks an automatic outcome.
policy_defaultbuyer_requested
restocking_feeobjectFee proposed for each eligible line. Omitted when no fee was supplied. On an ineligible revision, the fee is stored but ignored; its percent must still be from 1 through 100 with at most four decimal places.
return_policy_idstringRequiredID of the policy this revision belongs to.
return_policy_revision_idstringRequiredUnique identifier for this return policy revision, prefixed `rpolv_`.
return_shippingobjectWho pays for shipping the goods back.
return_windowobjectHow long after its starting event a line can be returned. Leave out for no deadline.
scopeone ofRequiredWhich items the policy covers.
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName of the policy.
return_policy_idstringRequiredUnique identifier for this return policy, prefixed `rpol_`.
statusenumRequiredactive policies apply to new Returns; inactive policies do not. Toggle active and inactive with PATCH status. Retire either with DELETE /v1/return-policies/{return_policy_id}.
activeinactivearchived
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-07T00:00:00Z",
"current_return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"metadata": {},
"name": "Standard returns",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"status": "active",
"updated_at": "2026-09-07T00:00:00Z",
"version": 1
}List return policies#
/v1/return-policiesRequires 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 Return policies with their status. Include the current revision with expand=current_revision. Default order: created_at descending, then return_policy_id descending.
Query parameters
external_reference_idstringExact-match filter on the caller-owned external reference ID.
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. 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 altered, invalid, expired, or mismatched token returns a validation error.
querystringSearch by return_policy_id, name, or external_reference_id. Limited to 255 bytes after trimming surrounding whitespace. A blank query is ignored.
statusarray of enumFilter by status. Omitted, the list leaves out archived rows; name archived to include them. 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.
activeinactivearchived
expandarray of enumInclude related objects in the response. Supported expansions: current_revision. Include the requested related resources using scoped batch reads for this page. Each relationship requires its existing target read scopes. Expansion changes the representation without changing pagination tokens. Limits: at most 10 unique expand paths per request.
current_revision
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
current_return_policy_revision_idstringRequiredID of the revision Flint judges new requests by.
current_revisionobject or nullPresent only when `expand` includes `current_revision`; `null` when expanded and there is no related return policy revision.
Not returned with a customer session
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName of the policy.
return_policy_idstringRequiredUnique identifier for this return policy, prefixed `rpol_`.
statusenumRequiredactive policies apply to new Returns; inactive policies do not. Toggle active and inactive with PATCH status. Retire either with DELETE /v1/return-policies/{return_policy_id}.
activeinactivearchived
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-policies \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"created_at": "2026-09-07T00:00:00Z",
"current_return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"metadata": {},
"name": "Standard returns",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"status": "active",
"updated_at": "2026-09-07T00:00:00Z",
"version": 1
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6DF5BCRZ5V0HFTSB11ERG"
}Create return policy#
/v1/return-policiesIdempotentRequires scope commerce.returns.policies.write
Rate limit: write
Create a Return policy with its first revision. The policy ID is stable across revisions, and each published revision is immutable.
Request body
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringCaller-owned metadata. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringRequiredName of the policy, limited to 1 through 255 bytes after trimming surrounding whitespace. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
revisionone ofRequiredThe revision with the complete rules. A field you leave out doesn't carry over from the previous revision.
Send exactly one of these
The `ineligible` variant of `ReturnPolicyRevisionInput`.
approval_modeenumRequiredWhether Flint approves eligible lines automatically or waits for merchant review. Automatic approval still waits for the buyer to request a Return.
automaticmanual
automatic_resolution_typeenumOutcome Flint creates and confirms itself when `resolution_selection_mode` is `policy_default`. Must be one of `allowed_resolution_types`.
refundstore_creditno_monetary_action
eligibility_resultenumRequiredWhether merchandise matching this scope may be returned. An ineligible revision commits no resolution behavior: allowed_resolution_types, resolution_mode, release_timing, and completion_mode must all be omitted. Eligible and review_required revisions require allowed_resolution_types, resolution_mode, and completion_mode.
ineligible
ineligibility_reasonenumRequiredWhy the policy refuses returns. Set only when `eligibility_result` is `ineligible`.
final_saleproduct_excludedcategory_excludedmarket_restrictedchannel_restrictedoutside_return_windowother
is_inspection_requiredbooleanWhether returned merchandise must be inspected. Leave out when no merchandise has to come back.
is_merchandise_return_requiredbooleanRequiredWhether the buyer has to send the merchandise back. When `false`, the buyer keeps it and the Return settles the money.
priorityintegerRequiredWhich policy wins when several cover an item: the highest priority applies. Zero or higher.
receipt_disposition_modeenumControls verified merchandise after receipt. automatic creates a disposition at the receiving location with reason inspection_result: sellable without inspection; after an accepted inspection, new and unopened map to sellable, opened, used, incomplete, and undetermined map to quality_control, and damaged and defective map to damaged. Successful tracked dispositions also create an inventory receipt and movement. Untracked merchandise has no inventory effect. If the inventory item is unmapped, the observation is recorded and the generated disposition is failed with failure_code inventory_item_unmapped. Cancel it or create a replacement; retry is unavailable. manual leaves inventory unchanged until an explicit disposition succeeds. When omitted, the value defaults to automatic.
automaticmanual
receiving_location_idstringWhere returned merchandise is sent. Required when is_merchandise_return_required is true. Presence is checked when the revision is written; whether the Location exists, is active, and carries a postal address is checked when the policy is activated.
resolution_selection_modeenumWho picks an automatic outcome.
policy_defaultbuyer_requested
restocking_feeobjectFee proposed for each eligible line. Omitted when no fee was supplied. On an ineligible revision, the fee is stored but ignored; its percent must still be from 1 through 100 with at most four decimal places.
return_shippingobjectWho pays for shipping the goods back.
return_windowobjectHow long after its starting event a line can be returned. Leave out for no deadline.
scopeone ofRequiredWhich items the policy covers.
statusenumWhether the policy applies to new Returns. Defaults to inactive. Creating an active policy checks for overlapping active policies and a usable receiving location, just like activation through PATCH.
activeinactive
Response · 201
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
created_atstringRequiredRFC3339 timestamp.
current_return_policy_revision_idstringRequiredID of the revision Flint judges new requests by.
current_revisionobject or nullPresent only when `expand` includes `current_revision`; `null` when expanded and there is no related return policy revision.
Not returned with a customer session
external_reference_idstringCaller-owned identifier for this resource in an external system.
metadatamap of stringRequiredStored caller-owned key-value data. See `MetadataInput` for key, value, and size rules.
namestringRequiredName of the policy.
return_policy_idstringRequiredUnique identifier for this return policy, prefixed `rpol_`.
statusenumRequiredactive policies apply to new Returns; inactive policies do not. Toggle active and inactive with PATCH status. Retire either with DELETE /v1/return-policies/{return_policy_id}.
activeinactivearchived
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 -X POST https://api.withflintpay.com/v1/return-policies \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"name": "Standard returns",
"revision": {
"allowed_resolution_types": [
"refund"
],
"approval_mode": "manual",
"completion_mode": "manual",
"eligibility_result": "eligible",
"is_inspection_required": false,
"is_merchandise_return_required": true,
"priority": 10,
"receipt_disposition_mode": "manual",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"release_timing": "after_receipt",
"resolution_mode": "manual",
"scope": {
"match_type": "all"
}
}
}'Get return policy#
/v1/return-policies/{return_policy_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 Return policy. Supports expand for current_revision.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expandarray of enumInclude related objects in the response. Supported expansions: current_revision. Expanded relationships are returned only when explicitly requested and authorized. Limits: at most 10 unique expand paths per request.
current_revision
curl https://api.withflintpay.com/v1/return-policies/rpol_01KEZF7C00H8C042BEK6HBRANX \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"created_at": "2026-09-07T00:00:00Z",
"current_return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"metadata": {},
"name": "Standard returns",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"status": "active",
"updated_at": "2026-09-07T00:00:00Z",
"version": 1
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6DF5BCRZ5V0HFTSB11ERG"
}Update return policy#
/v1/return-policies/{return_policy_id}IdempotentRequires scope commerce.returns.policies.write
Rate limit: write
Update policy identity fields or set status to active or inactive. Rules live on revisions, so changing a window, fee, or scope means publishing a new revision.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_versionintegerVersion last read from the resource returned in `data` (the primary resource for a result object). The write fails with `VERSION_CONFLICT` if it has changed. Requiredness depends on the operation and fields being changed.
external_reference_idstring or nullCaller-owned identifier for this resource in an external system. Send null to clear it.
metadatamap of string or nullCaller-owned metadata. Omit this field to leave metadata unchanged. Send an object to merge by key, set a key to null to remove it, or set metadata to null to clear all caller-owned metadata. An empty object makes no change. Values can't be empty strings. Keys starting with flint_ are reserved for Flint, are not returned, and cannot be written through the public API.
namestringName of the policy, limited to 1 through 255 bytes after trimming surrounding whitespace. Surrounding whitespace is trimmed before length validation. A supplied value cannot be blank; use null where clearing is supported.
statusenumSet `active` to evaluate the policy or `inactive` to stop.
activeinactive
curl -X PATCH https://api.withflintpay.com/v1/return-policies/rpol_01KEZF7C00H8C042BEK6HBRANX \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_version": 1,
"name": "Standard returns for online orders"
}'Archive return policy#
/v1/return-policies/{return_policy_id}IdempotentRequires scope commerce.returns.policies.write
Rate limit: write
Archive a Return policy so it is no longer evaluated or offered. Archiving is permanent.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
expected_versionintegerOptional. The policy's current version. If it changed, the archive fails with 409 VERSION_CONFLICT and nothing changes.
curl -X DELETE https://api.withflintpay.com/v1/return-policies/rpol_01KEZF7C00H8C042BEK6HBRANX \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"List return policy revisions#
/v1/return-policies/{return_policy_id}/revisionsRequires 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 every published revision of a Return policy. Default order: created_at descending, then return_policy_revision_id descending.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Query parameters
page_sizeintegerMaximum number of results to return, from 1 to 100. Defaults to 20.
page_tokenstringOpaque, signed next_page_token from the previous response, bound to the list and caller. 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 altered, invalid, expired, or mismatched token returns a validation error.
Response · 200
Successful response.
dataarray of objectRequiredResource, collection, or operation result returned by this request.
allowed_resolution_typesarray of enumRequiredResolution types a request can use under this policy. A value can't repeat.
refundexchangereplacementno_monetary_actionstore_credit
approval_modeenumRequiredWhether Flint approves eligible lines automatically or waits for merchant review. Automatic approval still waits for the buyer to request a Return.
automaticmanual
automatic_resolution_typeenumOutcome Flint creates and confirms itself when `resolution_selection_mode` is `policy_default`. Must be one of `allowed_resolution_types`.
refundstore_creditno_monetary_action
completion_modeenumWhether Flint completes a Return judged under this policy when its last completion blocker clears (`automatic`) or waits for you (`manual`).
manualautomatic
created_atstringRequiredRFC3339 timestamp.
effective_atstringWhen this revision started judging requests: when it became current on an active policy, or when its policy was first activated. Absent if it was never current while the policy was active.
eligibility_resultenumRequiredWhat the policy decides for items it covers.
eligibleineligiblereview_required
ineligibility_reasonenumWhy the policy refuses returns. Set only when `eligibility_result` is `ineligible`.
final_saleproduct_excludedcategory_excludedmarket_restrictedchannel_restrictedoutside_return_windowother
is_inspection_requiredbooleanWhether returned merchandise must be inspected. Leave out when no merchandise has to come back.
is_merchandise_return_requiredbooleanRequiredWhether the buyer has to send the merchandise back. When `false`, the buyer keeps it and the Return settles the money.
priorityintegerRequiredWhich policy wins when several cover an item: the highest priority applies. Zero or higher.
receipt_disposition_modeenumRequiredControls verified merchandise after receipt. automatic creates a disposition at the receiving location with reason inspection_result: sellable without inspection; after an accepted inspection, new and unopened map to sellable, opened, used, incomplete, and undetermined map to quality_control, and damaged and defective map to damaged. Successful tracked dispositions also create an inventory receipt and movement. Untracked merchandise has no inventory effect. If the inventory item is unmapped, the observation is recorded and the generated disposition is failed with failure_code inventory_item_unmapped. Cancel it or create a replacement; retry is unavailable. manual leaves inventory unchanged until an explicit disposition succeeds. When omitted, the value defaults to automatic.
automaticmanual
receiving_location_idstringID of the Location buyers send the merchandise to. Required when merchandise has to come back.
release_timingenumRelease gate for every resolution type, including exchanges and replacements. Released after the Return is approved. Released after the buyer hands back the required merchandise. Released after the required merchandise is received. Released after the required merchandise passes inspection. Held until a merchant calls POST /v1/return-resolutions/{id}/release.
after_approvalafter_handoffafter_receiptafter_inspectionmanual
resolution_modeenumWhether Flint creates the buyer's outcome itself (`automatic`) or leaves it to you (`manual`).
automaticmanual
resolution_selection_modeenumWho picks an automatic outcome.
policy_defaultbuyer_requested
restocking_feeobjectFee proposed for each eligible line. Omitted when no fee was supplied. On an ineligible revision, the fee is stored but ignored; its percent must still be from 1 through 100 with at most four decimal places.
return_policy_idstringRequiredID of the policy this revision belongs to.
return_policy_revision_idstringRequiredUnique identifier for this return policy revision, prefixed `rpolv_`.
return_shippingobjectWho pays for shipping the goods back.
return_windowobjectHow long after its starting event a line can be returned. Leave out for no deadline.
scopeone ofRequiredWhich items the policy covers.
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-policies/rpol_01KEZF7C00H8C042BEK6HBRANX/revisions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": [
{
"allowed_resolution_types": [
"refund"
],
"approval_mode": "manual",
"completion_mode": "manual",
"created_at": "2026-09-07T00:00:00Z",
"eligibility_result": "eligible",
"is_inspection_required": false,
"is_merchandise_return_required": true,
"priority": 10,
"receipt_disposition_mode": "manual",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"release_timing": "after_receipt",
"resolution_mode": "manual",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"scope": {
"category_handles": [],
"channel_types": [],
"location_ids": [],
"match_type": "all",
"product_ids": [],
"variant_ids": []
}
}
],
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Publish return policy revision#
/v1/return-policies/{return_policy_id}/revisionsIdempotentRequires scope commerce.returns.policies.write
Rate limit: write
Publish a new immutable Return policy revision while preserving the stable policy identity. Send the policy's current version as expected_version to reject a concurrent policy edit or publish.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Request body
expected_return_policy_versionintegerRequiredRequired current version of the Return policy. A stale value returns VERSION_CONFLICT. Publishing increments the policy version.
revisionone ofRequiredThe revision with the complete rules. A field you leave out doesn't carry over from the previous revision.
Send exactly one of these
The `ineligible` variant of `ReturnPolicyRevisionInput`.
approval_modeenumRequiredWhether Flint approves eligible lines automatically or waits for merchant review. Automatic approval still waits for the buyer to request a Return.
automaticmanual
automatic_resolution_typeenumOutcome Flint creates and confirms itself when `resolution_selection_mode` is `policy_default`. Must be one of `allowed_resolution_types`.
refundstore_creditno_monetary_action
eligibility_resultenumRequiredWhether merchandise matching this scope may be returned. An ineligible revision commits no resolution behavior: allowed_resolution_types, resolution_mode, release_timing, and completion_mode must all be omitted. Eligible and review_required revisions require allowed_resolution_types, resolution_mode, and completion_mode.
ineligible
ineligibility_reasonenumRequiredWhy the policy refuses returns. Set only when `eligibility_result` is `ineligible`.
final_saleproduct_excludedcategory_excludedmarket_restrictedchannel_restrictedoutside_return_windowother
is_inspection_requiredbooleanWhether returned merchandise must be inspected. Leave out when no merchandise has to come back.
is_merchandise_return_requiredbooleanRequiredWhether the buyer has to send the merchandise back. When `false`, the buyer keeps it and the Return settles the money.
priorityintegerRequiredWhich policy wins when several cover an item: the highest priority applies. Zero or higher.
receipt_disposition_modeenumControls verified merchandise after receipt. automatic creates a disposition at the receiving location with reason inspection_result: sellable without inspection; after an accepted inspection, new and unopened map to sellable, opened, used, incomplete, and undetermined map to quality_control, and damaged and defective map to damaged. Successful tracked dispositions also create an inventory receipt and movement. Untracked merchandise has no inventory effect. If the inventory item is unmapped, the observation is recorded and the generated disposition is failed with failure_code inventory_item_unmapped. Cancel it or create a replacement; retry is unavailable. manual leaves inventory unchanged until an explicit disposition succeeds. When omitted, the value defaults to automatic.
automaticmanual
receiving_location_idstringWhere returned merchandise is sent. Required when is_merchandise_return_required is true. Presence is checked when the revision is written; whether the Location exists, is active, and carries a postal address is checked when the policy is activated.
resolution_selection_modeenumWho picks an automatic outcome.
policy_defaultbuyer_requested
restocking_feeobjectFee proposed for each eligible line. Omitted when no fee was supplied. On an ineligible revision, the fee is stored but ignored; its percent must still be from 1 through 100 with at most four decimal places.
return_shippingobjectWho pays for shipping the goods back.
return_windowobjectHow long after its starting event a line can be returned. Leave out for no deadline.
scopeone ofRequiredWhich items the policy covers.
curl -X POST https://api.withflintpay.com/v1/return-policies/rpol_01KEZF7C00H8C042BEK6HBRANX/revisions \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: a-unique-key" \
-d '{
"expected_return_policy_version": 2,
"revision": {
"allowed_resolution_types": [
"refund"
],
"approval_mode": "manual",
"completion_mode": "manual",
"eligibility_result": "eligible",
"is_inspection_required": false,
"is_merchandise_return_required": true,
"priority": 10,
"receipt_disposition_mode": "manual",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"release_timing": "after_receipt",
"resolution_mode": "manual",
"scope": {
"match_type": "all"
}
}
}'Get return policy revision#
/v1/return-policies/{return_policy_id}/revisions/{return_policy_revision_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 immutable policy revision, including the exact rules a Return was evaluated against.
Path parameters
return_policy_idstringRequiredFlint return policy id. Must be a valid ID with prefix rpol_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
return_policy_revision_idstringRequiredFlint return policy revision id. Must be a valid ID with prefix rpolv_. Malformed IDs return 400 INVALID_REQUEST with detail INVALID_VALUE; well-formed IDs that do not exist return 404 RESOURCE_NOT_FOUND.
Response · 200
Successful response.
dataobjectRequiredResource, collection, or operation result returned by this request.
allowed_resolution_typesarray of enumRequiredResolution types a request can use under this policy. A value can't repeat.
refundexchangereplacementno_monetary_actionstore_credit
approval_modeenumRequiredWhether Flint approves eligible lines automatically or waits for merchant review. Automatic approval still waits for the buyer to request a Return.
automaticmanual
automatic_resolution_typeenumOutcome Flint creates and confirms itself when `resolution_selection_mode` is `policy_default`. Must be one of `allowed_resolution_types`.
refundstore_creditno_monetary_action
completion_modeenumWhether Flint completes a Return judged under this policy when its last completion blocker clears (`automatic`) or waits for you (`manual`).
manualautomatic
created_atstringRequiredRFC3339 timestamp.
effective_atstringWhen this revision started judging requests: when it became current on an active policy, or when its policy was first activated. Absent if it was never current while the policy was active.
eligibility_resultenumRequiredWhat the policy decides for items it covers.
eligibleineligiblereview_required
ineligibility_reasonenumWhy the policy refuses returns. Set only when `eligibility_result` is `ineligible`.
final_saleproduct_excludedcategory_excludedmarket_restrictedchannel_restrictedoutside_return_windowother
is_inspection_requiredbooleanWhether returned merchandise must be inspected. Leave out when no merchandise has to come back.
is_merchandise_return_requiredbooleanRequiredWhether the buyer has to send the merchandise back. When `false`, the buyer keeps it and the Return settles the money.
priorityintegerRequiredWhich policy wins when several cover an item: the highest priority applies. Zero or higher.
receipt_disposition_modeenumRequiredControls verified merchandise after receipt. automatic creates a disposition at the receiving location with reason inspection_result: sellable without inspection; after an accepted inspection, new and unopened map to sellable, opened, used, incomplete, and undetermined map to quality_control, and damaged and defective map to damaged. Successful tracked dispositions also create an inventory receipt and movement. Untracked merchandise has no inventory effect. If the inventory item is unmapped, the observation is recorded and the generated disposition is failed with failure_code inventory_item_unmapped. Cancel it or create a replacement; retry is unavailable. manual leaves inventory unchanged until an explicit disposition succeeds. When omitted, the value defaults to automatic.
automaticmanual
receiving_location_idstringID of the Location buyers send the merchandise to. Required when merchandise has to come back.
release_timingenumRelease gate for every resolution type, including exchanges and replacements. Released after the Return is approved. Released after the buyer hands back the required merchandise. Released after the required merchandise is received. Released after the required merchandise passes inspection. Held until a merchant calls POST /v1/return-resolutions/{id}/release.
after_approvalafter_handoffafter_receiptafter_inspectionmanual
resolution_modeenumWhether Flint creates the buyer's outcome itself (`automatic`) or leaves it to you (`manual`).
automaticmanual
resolution_selection_modeenumWho picks an automatic outcome.
policy_defaultbuyer_requested
restocking_feeobjectFee proposed for each eligible line. Omitted when no fee was supplied. On an ineligible revision, the fee is stored but ignored; its percent must still be from 1 through 100 with at most four decimal places.
return_policy_idstringRequiredID of the policy this revision belongs to.
return_policy_revision_idstringRequiredUnique identifier for this return policy revision, prefixed `rpolv_`.
return_shippingobjectWho pays for shipping the goods back.
return_windowobjectHow long after its starting event a line can be returned. Leave out for no deadline.
scopeone ofRequiredWhich items the policy covers.
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-policies/rpol_01KEZF7C00H8C042BEK6HBRANX/revisions/rpolv_01KEZF7C007AWH6P4QC14Q25TC \
-H "Flint-Version: 2026-09-07" \
-H "Authorization: Bearer YOUR_API_KEY"Successful response.
{
"data": {
"allowed_resolution_types": [
"refund"
],
"approval_mode": "manual",
"completion_mode": "manual",
"created_at": "2026-09-07T00:00:00Z",
"eligibility_result": "eligible",
"is_inspection_required": false,
"is_merchandise_return_required": true,
"priority": 10,
"receipt_disposition_mode": "manual",
"receiving_location_id": "loc_01K1P6G4M7H2N8Q9R3S5T6V7WX",
"release_timing": "after_receipt",
"resolution_mode": "manual",
"return_policy_id": "rpol_01KEZF7C00B0HF98CQ6VHC90WZ",
"return_policy_revision_id": "rpolv_01KEZF7C00Q7RB5VDPZRGYEQTX",
"scope": {
"category_handles": [],
"channel_types": [],
"location_ids": [],
"match_type": "all",
"product_ids": [],
"variant_ids": []
}
},
"meta": {
"api_version": "2026-09-07"
},
"request_id": "req_01KWM6WAHG3N9Q8T2V5XRZ7C4D"
}Was this helpful?