Creates a return request for an order your store already shipped. By default the return is
created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming
back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome,
set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call:
the order moves to returning, the return moves to REQUESTED, the return instructions (RMA
document) are generated and emailed to the customer, and optionally a prepaid return shipping
label is booked with the carrier.
The order must belong to store_id, be in status shipped, must not be a pick-and-ship
order, and must not already have an active (non-cancelled) return.
Omit products (or send []) for a full return: every ordered item at its full ordered
quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed.
Kits cannot be returned or exchanged; list the individual products instead.
generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send
false to resolve without booking a return shipping label (the RMA is still generated).
For EXCHANGE, exchange_products lists the replacement items (resolved against your
store catalog, not the order) and their stock is reserved right away, to ship once the
return arrives.
Return-level blockers (order not shipped, return already exists) are reported before
item-level errors.
If the return is created but the immediate resolution fails (for example the carrier
rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is
returned; fetch it with GET /returns/{return_id} before retrying, since a second call
would answer RETURN_ALREADY_EXISTS.
Your API credentials need the permission to create returns;
ask Cubbo support if the call answers 401 with a valid token.
Token returned by POST /auth/token, sent as Authorization: Bearer <token>.
Body
application/json
store_id
integer
required
Id of the store that owns the order.
Example:
1234
order_number
string
required
Order number of the shipped order to return.
Example:
"ORD-0001"
notes
string
required
Reason for the return or any comment to keep with it. Shown on the return instructions sent to the customer when the return is resolved.
Example:
"Customer changed their mind"
products
object[]
Items coming back, by SKU. Omit or send an empty array for a full return of every ordered item at its full quantity. Repeated SKUs are summed. Each SKU must be on the order, map to a single product and not be a kit; the quantity cannot exceed the ordered quantity.
Show child attributes
return_type
enum<string>
default:TO_BE_DETERMINED
Outcome of the return. TO_BE_DETERMINED (default) creates a pending request to be reviewed later. SIMPLE_RETURN and EXCHANGE resolve the return immediately (order moves to returning, return instructions are emailed to the customer).
Available options:
TO_BE_DETERMINED,
SIMPLE_RETURN,
EXCHANGE
Example:
"TO_BE_DETERMINED"
generate_guide
boolean
Required when return_type is SIMPLE_RETURN or EXCHANGE; ignored otherwise. true books a prepaid return shipping label with the carrier and attaches it to the return instructions; false resolves the return without a label.
Example:
true
exchange_products
object[]
Required when return_type is EXCHANGE; ignored otherwise. Replacement items to ship once the return arrives, by SKU of your store catalog (kits not allowed). Their stock is reserved immediately.
Show child attributes
Response
Return created. Only the listed fields are returned; exchange_products is present only for EXCHANGE returns.
Response of POST /returns.
id
integer
required
Unique id of the return. Use it with the other returns endpoints.
Example:
98765
status
enum<string>
required
Lifecycle status of a return.
PENDING: created and waiting for a decision (review of a customer request, or decision on an order returned by the carrier).
REQUESTED: resolved; the customer has the return instructions and the goods are expected back.
ORDERED: resolved by creating a new (replacement or resend) order.
CANCELLED: cancelled before the goods came back; reserved stock was released.
ARRIVED_AT_WAREHOUSE: the package arrived at the warehouse and is waiting to be processed.
AWAITING_INSPECTION: the package was opened and is waiting for inspection of its contents.
RECEIVED: the goods were checked in and are being re-entered into inventory.
REENTERED: the goods were fully re-entered into inventory; the return is complete.
UNSUCCESSFUL: closed without receiving anything; every expected product was missing on reception.
Available options:
PENDING,
REQUESTED,
ORDERED,
CANCELLED,
ARRIVED_AT_WAREHOUSE,
AWAITING_INSPECTION,
RECEIVED,
REENTERED,
UNSUCCESSFUL
Example:
"PENDING"
return_type
enum<string>
required
What kind of return this is.
TO_BE_DETERMINED: requested by the customer or by you, not yet reviewed; the outcome (simple return, exchange, rejection) is decided later.
SIMPLE_RETURN: the customer sends the goods back; no replacement is shipped.
EXCHANGE: the customer sends the goods back and replacement items (exchange_products) are reserved to ship once the return arrives.
IMMEDIATE_EXCHANGE: replacement items ship right away, before the return arrives (created from the Cubbo app, not through this API).
RETURNED_BY_CARRIER: the carrier could not deliver the order and brought it back; decide it with POST /returns/{return_id}/decision.
UNIDENTIFIED: a package arrived at the warehouse that could not be matched to an order (created by warehouse staff).
Available options:
TO_BE_DETERMINED,
SIMPLE_RETURN,
EXCHANGE,
IMMEDIATE_EXCHANGE,
RETURNED_BY_CARRIER,
UNIDENTIFIED
Example:
"TO_BE_DETERMINED"
notes
string
required
The notes you sent.
Example:
"Customer changed their mind"
externally_requested
boolean
required
Always true for returns created through the API.
Example:
true
expected_products
object[]
required
Resolved products and quantities coming back, with their SKUs.
Show child attributes
created_at
string<date-time>
required
When the return was created.
Example:
"2026-10-12T15:04:05.123Z"
order_number
string
required
The order number you sent.
Example:
"ORD-0001"
exchange_products
object[]
Replacement products with their SKUs. Only present for EXCHANGE returns.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cubbo Developers","description":"Developer documentation for the Cubbo Clients API: orders, inventory, replenishments, returns, shipping and webhooks.","colors":{"primary":"#327cfb","light":"#60a5fa","dark":"#327cfb"},"logo":{"light":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/light.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=208df5125f7962b06468c3c835605bd0","dark":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/dark.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=11cf015d96268e02f70a44f6d9f5918a"},"favicon":"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/favicon.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=3e2e823c87894cb7d9090336380478b6","appearance":{"default":"light"},"background":{"color":{"light":"#f3f4f6","dark":"#0b1229"}},"navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Get credentials","href":"https://app.cubbo.com/stores"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/cubbo"}},"styling":{"codeblocks":"dark","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"languages":[{"language":"en","default":true,"href":""},{"language":"es","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obtener credenciales","href":"https://app.cubbo.com/stores"}},"href":"es"},{"language":"pt-BR","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obter credenciais","href":"https://app.cubbo.com/stores"}},"href":"pt-BR"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cubbo","hasAudioNarration":false,"actualSubdomain":"cubbo","customDomains":["developers.cubbo.com"],"gitSource":{"type":"github","owner":"cubboengineering","repo":"developer-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6af32fc22491df72044f2dc3","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API reference","count":54},{"language":"default","tag":"Orders","count":14},{"language":"es","tag":"Guías","count":8},{"language":"en","tag":"Guides","count":8},{"language":"pt-BR","tag":"Guias","count":8},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Replenishments","count":6},{"language":"default","tag":"Returns","count":6},{"language":"es","tag":"Primeros pasos","count":4},{"language":"en","tag":"Getting started","count":4},{"language":"pt-BR","tag":"Primeiros passos","count":4},{"language":"default","tag":"Lots","count":4},{"language":"default","tag":"Stores","count":4},{"language":"es","tag":"Uso de la API","count":3},{"language":"en","tag":"Working with the API","count":3},{"language":"pt-BR","tag":"Uso da API","count":3},{"language":"default","tag":"Click and collect","count":3},{"language":"default","tag":"Inventory","count":3},{"language":"default","tag":"Shipping methods","count":3},{"language":"es","tag":"Eventos","count":1},{"language":"en","tag":"Events","count":1},{"language":"pt-BR","tag":"Eventos","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--cubbo-navy: #0f2955;--cubbo-navy-hover: #3562b7;--cubbo-on-navy: #ffffff;--cubbo-on-navy-2: #bae6fd;--cubbo-radius: 8px;--cubbo-radius-sm: 6px}:root.dark{--cubbo-navy: #0c2148;--cubbo-navy-hover: #2c5299}body,#navbar,#sidebar,#content-area{font-family:-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell,\n \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", sans-serif}#navbar>div:first-child,#navbar{background-color:var(--cubbo-navy)!important;border-bottom-color:transparent!important}#navbar a,#navbar button,#navbar span,#navbar svg{color:var(--cubbo-on-navy)}#navbar a:hover{color:var(--cubbo-on-navy-2)}#navbar #search-bar-entry,#navbar button[id*=\"search\"]{background-color:rgba(255, 255, 255, 0.12)!important;border-color:rgba(255, 255, 255, 0.2)!important;color:var(--cubbo-on-navy-2)!important}.card,[class*=\"rounded-xl\"],[class*=\"rounded-2xl\"]{border-radius:var(--cubbo-radius)!important}pre,.code-block,[class*=\"code-group\"]{border-radius:var(--cubbo-radius-sm)!important}html:not(.dark) :not(pre)>code{background-color:#e8f0fe!important;color:#1e3a8a!important;border:1px solid #c7dafc!important;border-radius:4px!important;padding:0.1em 0.4em!important}html:not(.dark) a>code,html:not(.dark) a :not(pre)>code{color:#327cfb!important}"}],"page":{"pagePath":"api-reference/returns/request-a-return-for-a-shipped-order","slug":"/api-reference/returns/request-a-return-for-a-shipped-order","pageMetadata":{"title":"Request a return for a shipped order","description":"Creates a return request for an order your store already shipped. By default the return is\ncreated as `TO_BE_DETERMINED` in status `PENDING`: it records what the customer says is coming\nback and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome,\nset `return_type` to `SIMPLE_RETURN` or `EXCHANGE` and the return is resolved in the same call:\nthe order moves to `returning`, the return moves to `REQUESTED`, the return instructions (RMA\ndocument) are generated and emailed to the customer, and optionally a prepaid return shipping\nlabel is booked with the carrier.\n\n- The order must belong to `store_id`, be in status `shipped`, must not be a pick-and-ship\n order, and must not already have an active (non-cancelled) return.\n- Omit `products` (or send `[]`) for a full return: every ordered item at its full ordered\n quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed.\n- Kits cannot be returned or exchanged; list the individual products instead.\n- `generate_guide` is required whenever `return_type` is not `TO_BE_DETERMINED`. Send\n `false` to resolve without booking a return shipping label (the RMA is still generated).\n- For `EXCHANGE`, `exchange_products` lists the replacement items (resolved against your\n store catalog, not the order) and their stock is reserved right away, to ship once the\n return arrives.\n- Return-level blockers (order not shipped, return already exists) are reported before\n item-level errors.\n- If the return is created but the immediate resolution fails (for example the carrier\n rejects the label), the return stays `PENDING` / `TO_BE_DETERMINED` and the error is\n returned; fetch it with `GET /returns/{return_id}` before retrying, since a second call\n would answer `RETURN_ALREADY_EXISTS`.\n- Your API credentials need the permission to create returns;\n ask Cubbo support if the call answers 401 with a valid token.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Creates a return request for an order your store already shipped. By default the return is\\ncreated as \", _jsx(_components.code, {\n children: \"TO_BE_DETERMINED\"\n }), \" in status \", _jsx(_components.code, {\n children: \"PENDING\"\n }), \": it records what the customer says is coming\\nback and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome,\\nset \", _jsx(_components.code, {\n children: \"return_type\"\n }), \" to \", _jsx(_components.code, {\n children: \"SIMPLE_RETURN\"\n }), \" or \", _jsx(_components.code, {\n children: \"EXCHANGE\"\n }), \" and the return is resolved in the same call:\\nthe order moves to \", _jsx(_components.code, {\n children: \"returning\"\n }), \", the return moves to \", _jsx(_components.code, {\n children: \"REQUESTED\"\n }), \", the return instructions (RMA\\ndocument) are generated and emailed to the customer, and optionally a prepaid return shipping\\nlabel is booked with the carrier.\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"The order must belong to \", _jsx(_components.code, {\n children: \"store_id\"\n }), \", be in status \", _jsx(_components.code, {\n children: \"shipped\"\n }), \", must not be a pick-and-ship\\norder, and must not already have an active (non-cancelled) return.\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Omit \", _jsx(_components.code, {\n children: \"products\"\n }), \" (or send \", _jsx(_components.code, {\n children: \"[]\"\n }), \") for a full return: every ordered item at its full ordered\\nquantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Kits cannot be returned or exchanged; list the individual products instead.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [_jsx(_components.code, {\n children: \"generate_guide\"\n }), \" is required whenever \", _jsx(_components.code, {\n children: \"return_type\"\n }), \" is not \", _jsx(_components.code, {\n children: \"TO_BE_DETERMINED\"\n }), \". Send\\n\", _jsx(_components.code, {\n children: \"false\"\n }), \" to resolve without booking a return shipping label (the RMA is still generated).\"]\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"For \", _jsx(_components.code, {\n children: \"EXCHANGE\"\n }), \", \", _jsx(_components.code, {\n children: \"exchange_products\"\n }), \" lists the replacement items (resolved against your\\nstore catalog, not the order) and their stock is reserved right away, to ship once the\\nreturn arrives.\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Return-level blockers (order not shipped, return already exists) are reported before\\nitem-level errors.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"If the return is created but the immediate resolution fails (for example the carrier\\nrejects the label), the return stays \", _jsx(_components.code, {\n children: \"PENDING\"\n }), \" / \", _jsx(_components.code, {\n children: \"TO_BE_DETERMINED\"\n }), \" and the error is\\nreturned; fetch it with \", _jsx(_components.code, {\n children: \"GET /returns/{return_id}\"\n }), \" before retrying, since a second call\\nwould answer \", _jsx(_components.code, {\n children: \"RETURN_ALREADY_EXISTS\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Your API credentials need the permission to create returns;\\nask Cubbo support if the call answers 401 with a valid token.\"\n }), \"\\n\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Request a return for a shipped order","description":"Creates a return request for an order your store already shipped. By default the return is\ncreated as `TO_BE_DETERMINED` in status `PENDING`: it records what the customer says is coming\nback and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome,\nset `return_type` to `SIMPLE_RETURN` or `EXCHANGE` and the return is resolved in the same call:\nthe order moves to `returning`, the return moves to `REQUESTED`, the return instructions (RMA\ndocument) are generated and emailed to the customer, and optionally a prepaid return shipping\nlabel is booked with the carrier.\n\n- The order must belong to `store_id`, be in status `shipped`, must not be a pick-and-ship\n order, and must not already have an active (non-cancelled) return.\n- Omit `products` (or send `[]`) for a full return: every ordered item at its full ordered\n quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed.\n- Kits cannot be returned or exchanged; list the individual products instead.\n- `generate_guide` is required whenever `return_type` is not `TO_BE_DETERMINED`. Send\n `false` to resolve without booking a return shipping label (the RMA is still generated).\n- For `EXCHANGE`, `exchange_products` lists the replacement items (resolved against your\n store catalog, not the order) and their stock is reserved right away, to ship once the\n return arrives.\n- Return-level blockers (order not shipped, return already exists) are reported before\n item-level errors.\n- If the return is created but the immediate resolution fails (for example the carrier\n rejects the label), the return stays `PENDING` / `TO_BE_DETERMINED` and the error is\n returned; fetch it with `GET /returns/{return_id}` before retrying, since a second call\n would answer `RETURN_ALREADY_EXISTS`.\n- Your API credentials need the permission to create returns;\n ask Cubbo support if the call answers 401 with a valid token.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Returns"],"operationId":"createReturn","summary":"Request a return for a shipped order","description":"Creates a return request for an order your store already shipped. By default the return is\ncreated as `TO_BE_DETERMINED` in status `PENDING`: it records what the customer says is coming\nback and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome,\nset `return_type` to `SIMPLE_RETURN` or `EXCHANGE` and the return is resolved in the same call:\nthe order moves to `returning`, the return moves to `REQUESTED`, the return instructions (RMA\ndocument) are generated and emailed to the customer, and optionally a prepaid return shipping\nlabel is booked with the carrier.\n\n- The order must belong to `store_id`, be in status `shipped`, must not be a pick-and-ship\n order, and must not already have an active (non-cancelled) return.\n- Omit `products` (or send `[]`) for a full return: every ordered item at its full ordered\n quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed.\n- Kits cannot be returned or exchanged; list the individual products instead.\n- `generate_guide` is required whenever `return_type` is not `TO_BE_DETERMINED`. Send\n `false` to resolve without booking a return shipping label (the RMA is still generated).\n- For `EXCHANGE`, `exchange_products` lists the replacement items (resolved against your\n store catalog, not the order) and their stock is reserved right away, to ship once the\n return arrives.\n- Return-level blockers (order not shipped, return already exists) are reported before\n item-level errors.\n- If the return is created but the immediate resolution fails (for example the carrier\n rejects the label), the return stays `PENDING` / `TO_BE_DETERMINED` and the error is\n returned; fetch it with `GET /returns/{return_id}` before retrying, since a second call\n would answer `RETURN_ALREADY_EXISTS`.\n- Your API credentials need the permission to create returns;\n ask Cubbo support if the call answers 401 with a valid token.\n","security":["4d90ecd3-20d3-4eaf-8378-cbd4696a676d"],"requestBody":"510ae6de-4da1-4c8a-9137-5e67df1fb891","responses":{"201":"b5b0c674-13a4-4964-b2c7-3eed53f3a69e","401":"c4b7ef76-febe-4e1a-b9f3-b2bf2e3afc13","409":"19fd9922-c118-4736-9eb4-b9ff323bc325","422":"5bc23e2b-04aa-4747-b47d-204f557194cb","500":"88d1a771-63b1-47ab-8540-b8cec1966c56"},"method":"post","type":"path","servers":["30628f1a-73a6-48fb-b75f-22c715a140c8"],"path":"/returns","baseUrlOptions":["https://api.cubbo.com/v1"],"title":"Request a return for a shipped order","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["store_id","order_number","notes"],"properties":{"store_id":{"type":"integer","description":"Id of the store that owns the order.","example":1234,"isRequired":true,"uniqueKey":"store_id","typeLabel":"integer"},"order_number":{"type":"string","description":"Order number of the shipped order to return.","example":"ORD-0001","isRequired":true,"uniqueKey":"order_number","typeLabel":"string"},"notes":{"type":"string","description":"Reason for the return or any comment to keep with it. Shown on the return instructions sent to the customer when the return is resolved.","example":"Customer changed their mind","isRequired":true,"uniqueKey":"notes","typeLabel":"string"},"products":{"type":"array","description":"Items coming back, by SKU. Omit or send an empty array for a full return of every ordered item at its full quantity. Repeated SKUs are summed. Each SKU must be on the order, map to a single product and not be a kit; the quantity cannot exceed the ordered quantity.","items":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","description":"SKU of the product.","example":"SKU-RED-M","isRequired":true,"uniqueKey":"products.items.[INDEX].sku","typeLabel":"string"},"quantity":{"type":"integer","minimum":1,"description":"Number of units.","example":1,"isRequired":true,"uniqueKey":"products.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"uniqueKey":"products","typeLabel":"object[]"},"return_type":{"type":"string","description":"Outcome of the return. `TO_BE_DETERMINED` (default) creates a pending request to be reviewed later. `SIMPLE_RETURN` and `EXCHANGE` resolve the return immediately (order moves to `returning`, return instructions are emailed to the customer).","enum":["TO_BE_DETERMINED","SIMPLE_RETURN","EXCHANGE"],"default":"TO_BE_DETERMINED","example":"TO_BE_DETERMINED","uniqueKey":"return_type","typeLabel":"enum\u003cstring>"},"generate_guide":{"type":"boolean","description":"Required when `return_type` is `SIMPLE_RETURN` or `EXCHANGE`; ignored otherwise. `true` books a prepaid return shipping label with the carrier and attaches it to the return instructions; `false` resolves the return without a label.","example":true,"uniqueKey":"generate_guide","typeLabel":"boolean"},"exchange_products":{"type":"array","description":"Required when `return_type` is `EXCHANGE`; ignored otherwise. Replacement items to ship once the return arrives, by SKU of your store catalog (kits not allowed). Their stock is reserved immediately.","items":{"type":"object","required":["sku","quantity"],"properties":{"sku":{"type":"string","description":"SKU of the product.","example":"SKU-RED-M","isRequired":true,"uniqueKey":"exchange_products.items.[INDEX].sku","typeLabel":"string"},"quantity":{"type":"integer","minimum":1,"description":"Number of units.","example":1,"isRequired":true,"uniqueKey":"exchange_products.items.[INDEX].quantity","typeLabel":"integer"}},"uniqueKey":"exchange_products.items.[INDEX]","typeLabel":"object"},"uniqueKey":"exchange_products","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"toBeDetermined":{"title":"toBeDetermined","summary":"Request a return to be reviewed later","value":{"store_id":1234,"order_number":"ORD-0001","notes":"Customer changed their mind","products":[{"sku":"SKU-RED-M","quantity":1}]}},"simpleReturnWithLabel":{"title":"simpleReturnWithLabel","summary":"Resolve immediately as a simple return with a prepaid label","value":{"store_id":1234,"order_number":"ORD-0001","notes":"Wrong size","return_type":"SIMPLE_RETURN","generate_guide":true,"products":[{"sku":"SKU-RED-M","quantity":1}]}},"exchange":{"title":"exchange","summary":"Resolve immediately as an exchange","value":{"store_id":1234,"order_number":"ORD-0001","notes":"Wants size L instead of M","return_type":"EXCHANGE","generate_guide":true,"products":[{"sku":"SKU-RED-M","quantity":1}],"exchange_products":[{"sku":"SKU-RED-L","quantity":1}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"b5b0c674-13a4-4964-b2c7-3eed53f3a69e":{"description":"Return created. Only the listed fields are returned; `exchange_products` is present only for `EXCHANGE` returns.","content":{"application/json":{"schema":{"type":"object","description":"Response of `POST /returns`.","required":["id","status","return_type","notes","externally_requested","expected_products","created_at","order_number"],"properties":{"id":{"type":"integer","description":"Unique id of the return. Use it with the other returns endpoints.","example":98765,"isRequired":true,"uniqueKey":"id","typeLabel":"integer"},"status":{"type":"string","description":"Lifecycle status of a return.\n- `PENDING`: created and waiting for a decision (review of a customer request, or decision on an order returned by the carrier).\n- `REQUESTED`: resolved; the customer has the return instructions and the goods are expected back.\n- `ORDERED`: resolved by creating a new (replacement or resend) order.\n- `CANCELLED`: cancelled before the goods came back; reserved stock was released.\n- `ARRIVED_AT_WAREHOUSE`: the package arrived at the warehouse and is waiting to be processed.\n- `AWAITING_INSPECTION`: the package was opened and is waiting for inspection of its contents.\n- `RECEIVED`: the goods were checked in and are being re-entered into inventory.\n- `REENTERED`: the goods were fully re-entered into inventory; the return is complete.\n- `UNSUCCESSFUL`: closed without receiving anything; every expected product was missing on reception.\n","enum":["PENDING","REQUESTED","ORDERED","CANCELLED","ARRIVED_AT_WAREHOUSE","AWAITING_INSPECTION","RECEIVED","REENTERED","UNSUCCESSFUL"],"example":"PENDING","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"return_type":{"type":"string","description":"What kind of return this is.\n- `TO_BE_DETERMINED`: requested by the customer or by you, not yet reviewed; the outcome (simple return, exchange, rejection) is decided later.\n- `SIMPLE_RETURN`: the customer sends the goods back; no replacement is shipped.\n- `EXCHANGE`: the customer sends the goods back and replacement items (`exchange_products`) are reserved to ship once the return arrives.\n- `IMMEDIATE_EXCHANGE`: replacement items ship right away, before the return arrives (created from the Cubbo app, not through this API).\n- `RETURNED_BY_CARRIER`: the carrier could not deliver the order and brought it back; decide it with `POST /returns/{return_id}/decision`.\n- `UNIDENTIFIED`: a package arrived at the warehouse that could not be matched to an order (created by warehouse staff).\n","enum":["TO_BE_DETERMINED","SIMPLE_RETURN","EXCHANGE","IMMEDIATE_EXCHANGE","RETURNED_BY_CARRIER","UNIDENTIFIED"],"example":"TO_BE_DETERMINED","isRequired":true,"uniqueKey":"return_type","typeLabel":"enum\u003cstring>"},"notes":{"type":"string","description":"The notes you sent.","example":"Customer changed their mind","isRequired":true,"uniqueKey":"notes","typeLabel":"string"},"externally_requested":{"type":"boolean","description":"Always true for returns created through the API.","example":true,"isRequired":true,"uniqueKey":"externally_requested","typeLabel":"boolean"},"expected_products":{"type":"array","description":"Resolved products and quantities coming back, with their SKUs.","items":{"type":"object","description":"A product and quantity declared on a return (expected back, or to be shipped as a replacement).","required":["product_id","quantity"],"properties":{"product_id":{"type":"integer","description":"Cubbo id of the product.","example":5551,"isRequired":true,"uniqueKey":"expected_products.items.[INDEX].product_id","typeLabel":"integer"},"quantity":{"type":"integer","description":"Number of units.","example":1,"isRequired":true,"uniqueKey":"expected_products.items.[INDEX].quantity","typeLabel":"integer"},"skus":{"type":"array","description":"SKUs of the product in your store. Present on the returns endpoints; absent when the return is embedded in an order.","items":{"type":"string","uniqueKey":"expected_products.items.[INDEX].skus.items.[INDEX]","typeLabel":"string"},"example":["SKU-RED-M"],"uniqueKey":"expected_products.items.[INDEX].skus","typeLabel":"string[]"}},"uniqueKey":"expected_products.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"expected_products","typeLabel":"object[]"},"created_at":{"type":"string","format":"date-time","description":"When the return was created.","example":"2026-10-12T15:04:05.123Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"order_number":{"type":"string","description":"The order number you sent.","example":"ORD-0001","isRequired":true,"uniqueKey":"order_number","typeLabel":"string"},"exchange_products":{"type":"array","description":"Replacement products with their SKUs. Only present for `EXCHANGE` returns.","items":{"type":"object","description":"A product and quantity declared on a return (expected back, or to be shipped as a replacement).","required":["product_id","quantity"],"properties":{"product_id":{"type":"integer","description":"Cubbo id of the product.","example":5551,"isRequired":true,"uniqueKey":"exchange_products.items.[INDEX].product_id","typeLabel":"integer"},"quantity":{"type":"integer","description":"Number of units.","example":1,"isRequired":true,"uniqueKey":"exchange_products.items.[INDEX].quantity","typeLabel":"integer"},"skus":{"type":"array","description":"SKUs of the product in your store. Present on the returns endpoints; absent when the return is embedded in an order.","items":{"type":"string","uniqueKey":"exchange_products.items.[INDEX].skus.items.[INDEX]","typeLabel":"string"},"example":["SKU-RED-M"],"uniqueKey":"exchange_products.items.[INDEX].skus","typeLabel":"string[]"}},"uniqueKey":"exchange_products.items.[INDEX]","typeLabel":"object"},"uniqueKey":"exchange_products","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"toBeDetermined":{"title":"toBeDetermined","value":{"id":98765,"status":"PENDING","return_type":"TO_BE_DETERMINED","notes":"Customer changed their mind","externally_requested":true,"expected_products":[{"product_id":5551,"quantity":1,"skus":["SKU-RED-M"]}],"created_at":"2026-10-12T15:04:05.123Z","order_number":"ORD-0001"}},"exchange":{"title":"exchange","value":{"id":98766,"status":"REQUESTED","return_type":"EXCHANGE","notes":"Wants size L instead of M","externally_requested":true,"expected_products":[{"product_id":5551,"quantity":1,"skus":["SKU-RED-M"]}],"exchange_products":[{"product_id":5552,"quantity":1,"skus":["SKU-RED-L"]}],"created_at":"2026-10-12T15:04:05.123Z","order_number":"ORD-0001"}}},"exampleType":"examples"}},"exampleType":"examples"},"c4b7ef76-febe-4e1a-b9f3-b2bf2e3afc13":{"description":"Missing or invalid token, wrong credentials, or no access to the requested store.","content":{"application/json":{"schema":{"type":"object","description":"Error body returned by every failed request.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of the failure. For `401` responses it is always `Unauthorized`.","example":"Parameter store_id is required","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","description":"Present on `401` responses only; the reason the request was rejected.","example":"invalid token","uniqueKey":"message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalidToken":{"title":"invalidToken","value":{"error":"Unauthorized","message":"invalid token"}},"noHeader":{"title":"noHeader","value":{"error":"Unauthorized","message":"no authorization header found"}},"storeNotAllowed":{"title":"storeNotAllowed","value":{"error":"Unauthorized","message":"not allowed to show? this Store"}}},"exampleType":"examples"}},"exampleType":"examples"},"19fd9922-c118-4736-9eb4-b9ff323bc325":{"description":"Another return request for the same order is still being processed. Retry after a moment.","content":{"application/json":{"schema":{"type":"object","description":"Error body of the create, cancel and decision endpoints, with a machine-readable `code`.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable message.","example":"order already has an active return","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable error code; null for parameter validation errors.","example":"RETURN_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable error code; null for parameter validation errors.","example":"RETURN_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra details, when available (for example the offending `sku`). Only sent by `POST /returns`.","example":{"sku":"SKU-RED-M"},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra details, when available (for example the offending `sku`). Only sent by `POST /returns`.","example":{"sku":"SKU-RED-M"},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"a return request for this order is already in progress","code":"RETURN_REQUEST_IN_FLIGHT"},"examples":{"Example":{"title":"Example","value":{"error":"a return request for this order is already in progress","code":"RETURN_REQUEST_IN_FLIGHT"}}},"exampleType":"examples"}},"exampleType":"examples"},"5bc23e2b-04aa-4747-b47d-204f557194cb":{"description":"Validation or business error. `code` is a stable machine-readable identifier (`null` for\nparameter validation errors); `context` carries the offending `sku` when relevant.\n","content":{"application/json":{"schema":{"type":"object","description":"Error body of the create, cancel and decision endpoints, with a machine-readable `code`.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable message.","example":"order already has an active return","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable error code; null for parameter validation errors.","example":"RETURN_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable error code; null for parameter validation errors.","example":"RETURN_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra details, when available (for example the offending `sku`). Only sent by `POST /returns`.","example":{"sku":"SKU-RED-M"},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra details, when available (for example the offending `sku`). Only sent by `POST /returns`.","example":{"sku":"SKU-RED-M"},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missingParam":{"title":"missingParam","value":{"error":"Parameter store_id is required","code":null,"context":null}},"missingGenerateGuide":{"title":"missingGenerateGuide","summary":"return_type given without generate_guide","value":{"error":"Parameter generate_guide is required","code":null,"context":null}},"invalidReturnType":{"title":"invalidReturnType","summary":"return_type outside the accepted values (e.g. IMMEDIATE_EXCHANGE)","value":{"error":"Parameter return_type must be within [\"TO_BE_DETERMINED\", \"SIMPLE_RETURN\", \"EXCHANGE\"]","code":null,"context":null}},"storeNotFound":{"title":"storeNotFound","value":{"error":"store 1234 not found","code":"STORE_NOT_FOUND","context":null}},"orderNotFound":{"title":"orderNotFound","value":{"error":"order ORD-0001 not found","code":"ORDER_NOT_FOUND","context":null}},"returnAlreadyExists":{"title":"returnAlreadyExists","value":{"error":"order already has an active return","code":"RETURN_ALREADY_EXISTS"}},"orderNotShipped":{"title":"orderNotShipped","value":{"error":"only shipped orders can be returned","code":"ORDER_NOT_SHIPPED"}},"pickAndShipNotSupported":{"title":"pickAndShipNotSupported","value":{"error":"pick and ship orders cannot be returned this way","code":"PICK_AND_SHIP_NOT_SUPPORTED"}},"invalidSku":{"title":"invalidSku","value":{"error":"sku SKU-BLUE-S is not part of order ORD-0001","code":"INVALID_SKU","context":{"sku":"SKU-BLUE-S"}}},"invalidExchangeSku":{"title":"invalidExchangeSku","value":{"error":"sku SKU-BLUE-S is not a product in the store","code":"INVALID_SKU","context":{"sku":"SKU-BLUE-S"}}},"ambiguousSku":{"title":"ambiguousSku","value":{"error":"sku SKU-RED-M maps to more than one product on order ORD-0001","code":"AMBIGUOUS_SKU","context":{"sku":"SKU-RED-M"}}},"kitNotSupported":{"title":"kitNotSupported","value":{"error":"sku KIT-001 is a kit and cannot be returned","code":"KIT_NOT_SUPPORTED","context":{"sku":"KIT-001"}}},"invalidQuantity":{"title":"invalidQuantity","value":{"error":"quantity 3 for sku SKU-RED-M exceeds the ordered quantity 1","code":"INVALID_QUANTITY","context":{"sku":"SKU-RED-M","ordered_quantity":1}}}},"exampleType":"examples"}},"exampleType":"examples"},"88d1a771-63b1-47ab-8540-b8cec1966c56":{"description":"Unexpected error. Retry with backoff; if it persists, send the timestamp to Cubbo support.","content":{"application/json":{"schema":{"type":"object","description":"Error body returned by every failed request.","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of the failure. For `401` responses it is always `Unauthorized`.","example":"Parameter store_id is required","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","description":"Present on `401` responses only; the reason the request was rejected.","example":"invalid token","uniqueKey":"message","typeLabel":"string"},"code":{"oneOf":[{"type":"string","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"null","description":"Stable machine-readable code, present on some order, return and replenishment errors.","example":"ORDER_ALREADY_EXISTS","uniqueKey":"code.oneOf.1","typeLabel":"null"}],"uniqueKey":"code","typeLabel":"string | null"},"context":{"oneOf":[{"type":"object","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.0","typeLabel":"object"},{"type":"null","description":"Extra data about the failure when available, for example the id of the conflicting order.","additionalProperties":true,"example":{"order_id":987654},"uniqueKey":"context.oneOf.1","typeLabel":"null"}],"uniqueKey":"context","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"error":"unexpected error, timestamp: 1760000000"},"examples":{"Example":{"title":"Example","value":{"error":"unexpected error, timestamp: 1760000000"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"4d90ecd3-20d3-4eaf-8378-cbd4696a676d":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"30628f1a-73a6-48fb-b75f-22c715a140c8":{"url":"https://api.cubbo.com/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Token returned by `POST /auth/token`, sent as `Authorization: Bearer \u003ctoken>`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"cubbo","siteName":"Cubbo Developers","title":"Request a return for a shipped order - Cubbo Developers","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/api-reference/returns/request-a-return-for-a-shipped-order","matchLevel":0},"es":{"href":"/api-reference/returns/request-a-return-for-a-shipped-order","matchLevel":0},"pt-BR":{"href":"/api-reference/returns/request-a-return-for-a-shipped-order","matchLevel":0}}},"lastModified":"2026-11-10T14:52:57.609Z","originalFileLocation":"api-reference/returns/request-a-return-for-a-shipped-order.mdx","locale":"en"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Creates a return request for an order your store already shipped. By default the return is created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome, set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call: the order moves to returning, the return moves to REQUESTED, the return instructions (RMA document) are generated and emailed to the customer, and optionally a prepaid return shipping label is booked with the carrier. - The order must belong to store_id, be in status shipped, must not be a pick-and-ship order, and must not already have an active (non-cancelled) return. - Omit products (or send []) for a full return: every ordered item at its full ordered quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed. - Kits cannot be returned or exchanged; list the individual products instead. - generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send false to resolve without booking a return shipping label (the RMA is still generated). - For EXCHANGE, exchange_products lists the replacement items (resolved against your store catalog, not the order) and their stock is reserved right away, to ship once the return arrives. - Return-level blockers (order not shipped, return already exists) are reported before item-level errors. - If the return is created but the immediate resolution fails (for example the carrier rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is returned; fetch it with GET /returns/{return_id} before retrying, since a second call would answer RETURN_ALREADY_EXISTS. - Your API credentials need the permission to create returns; ask Cubbo support if the call answers 401 with a valid token.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cubbo Developers\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Request a return for a shipped order - Cubbo Developers\">\u003cmeta data-mint-head property=\"og:description\" content=\"Creates a return request for an order your store already shipped. By default the return is created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome, set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call: the order moves to returning, the return moves to REQUESTED, the return instructions (RMA document) are generated and emailed to the customer, and optionally a prepaid return shipping label is booked with the carrier. - The order must belong to store_id, be in status shipped, must not be a pick-and-ship order, and must not already have an active (non-cancelled) return. - Omit products (or send []) for a full return: every ordered item at its full ordered quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed. - Kits cannot be returned or exchanged; list the individual products instead. - generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send false to resolve without booking a return shipping label (the RMA is still generated). - For EXCHANGE, exchange_products lists the replacement items (resolved against your store catalog, not the order) and their stock is reserved right away, to ship once the return arrives. - Return-level blockers (order not shipped, return already exists) are reported before item-level errors. - If the return is created but the immediate resolution fails (for example the carrier rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is returned; fetch it with GET /returns/{return_id} before retrying, since a second call would answer RETURN_ALREADY_EXISTS. - Your API credentials need the permission to create returns; ask Cubbo support if the call answers 401 with a valid token.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cubbo Developers\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cubbo.mintlify.site/_mintlify/api/og/v2?division=Returns\u0026amp;title=Request+a+return+for+a+shipped+order\u0026amp;description=Creates+a+return+request+for+an+order+your+store+already+shipped.+By+default+the+return+is%0Acreated+as+%60TO_BE_DETERMINED%60+in+status+%60PENDING%60%3A+it+records+what+th\u0026amp;theme=43761a2dfbeb2a4d767b8dde\u0026amp;signature=9b756af8ca59c931be878e25db59e3c216e20ea3d0c190a6886abcefa30f0a3f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Request a return for a shipped order - Cubbo Developers\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Creates a return request for an order your store already shipped. By default the return is created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome, set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call: the order moves to returning, the return moves to REQUESTED, the return instructions (RMA document) are generated and emailed to the customer, and optionally a prepaid return shipping label is booked with the carrier. - The order must belong to store_id, be in status shipped, must not be a pick-and-ship order, and must not already have an active (non-cancelled) return. - Omit products (or send []) for a full return: every ordered item at its full ordered quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed. - Kits cannot be returned or exchanged; list the individual products instead. - generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send false to resolve without booking a return shipping label (the RMA is still generated). - For EXCHANGE, exchange_products lists the replacement items (resolved against your store catalog, not the order) and their stock is reserved right away, to ship once the return arrives. - Return-level blockers (order not shipped, return already exists) are reported before item-level errors. - If the return is created but the immediate resolution fails (for example the carrier rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is returned; fetch it with GET /returns/{return_id} before retrying, since a second call would answer RETURN_ALREADY_EXISTS. - Your API credentials need the permission to create returns; ask Cubbo support if the call answers 401 with a valid token.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cubbo.mintlify.site/_mintlify/api/og/v2?division=Returns\u0026amp;title=Request+a+return+for+a+shipped+order\u0026amp;description=Creates+a+return+request+for+an+order+your+store+already+shipped.+By+default+the+return+is%0Acreated+as+%60TO_BE_DETERMINED%60+in+status+%60PENDING%60%3A+it+records+what+th\u0026amp;theme=43761a2dfbeb2a4d767b8dde\u0026amp;signature=9b756af8ca59c931be878e25db59e3c216e20ea3d0c190a6886abcefa30f0a3f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cubbo/zT7rg4q7ps_kLhph/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cubbo Developers\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#327cfb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/returns/request-a-return-for-a-shipped-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.cubbo.com/#organization\",\"name\":\"Cubbo Developers\",\"url\":\"https://developers.cubbo.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cubbo/RGfmvgvbM1HVXepF/logo/light.svg?fit=max\u0026auto=format\u0026n=RGfmvgvbM1HVXepF\u0026q=85\u0026s=208df5125f7962b06468c3c835605bd0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.cubbo.com#website\",\"name\":\"Cubbo Developers\",\"url\":\"https://developers.cubbo.com\",\"publisher\":{\"@id\":\"https://developers.cubbo.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order#webpage\",\"url\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order\",\"name\":\"Request a return for a shipped order\",\"description\":\"Creates a return request for an order your store already shipped. By default the return is created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome, set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call: the order moves to returning, the return moves to REQUESTED, the return instructions (RMA document) are generated and emailed to the customer, and optionally a prepaid return shipping label is booked with the carrier. - The order must belong to store_id, be in status shipped, must not be a pick-and-ship order, and must not already have an active (non-cancelled) return. - Omit products (or send []) for a full return: every ordered item at its full ordered quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed. - Kits cannot be returned or exchanged; list the individual products instead. - generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send false to resolve without booking a return shipping label (the RMA is still generated). - For EXCHANGE, exchange_products lists the replacement items (resolved against your store catalog, not the order) and their stock is reserved right away, to ship once the return arrives. - Return-level blockers (order not shipped, return already exists) are reported before item-level errors. - If the return is created but the immediate resolution fails (for example the carrier rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is returned; fetch it with GET /returns/{return_id} before retrying, since a second call would answer RETURN_ALREADY_EXISTS. - Your API credentials need the permission to create returns; ask Cubbo support if the call answers 401 with a valid token.\",\"dateModified\":\"2026-11-10T14:52:57.609Z\",\"isPartOf\":{\"@id\":\"https://developers.cubbo.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Cubbo Developers\",\"item\":\"https://developers.cubbo.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Request a return for a shipped order\",\"item\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order#apireference\",\"headline\":\"Request a return for a shipped order\",\"name\":\"Request a return for a shipped order\",\"description\":\"Creates a return request for an order your store already shipped. By default the return is created as TO_BE_DETERMINED in status PENDING: it records what the customer says is coming back and waits to be reviewed (resolved) by Cubbo or by you. If you already know the outcome, set return_type to SIMPLE_RETURN or EXCHANGE and the return is resolved in the same call: the order moves to returning, the return moves to REQUESTED, the return instructions (RMA document) are generated and emailed to the customer, and optionally a prepaid return shipping label is booked with the carrier. - The order must belong to store_id, be in status shipped, must not be a pick-and-ship order, and must not already have an active (non-cancelled) return. - Omit products (or send []) for a full return: every ordered item at its full ordered quantity. Otherwise list the SKUs and quantities coming back; repeated SKUs are summed. - Kits cannot be returned or exchanged; list the individual products instead. - generate_guide is required whenever return_type is not TO_BE_DETERMINED. Send false to resolve without booking a return shipping label (the RMA is still generated). - For EXCHANGE, exchange_products lists the replacement items (resolved against your store catalog, not the order) and their stock is reserved right away, to ship once the return arrives. - Return-level blockers (order not shipped, return already exists) are reported before item-level errors. - If the return is created but the immediate resolution fails (for example the carrier rejects the label), the return stays PENDING / TO_BE_DETERMINED and the error is returned; fetch it with GET /returns/{return_id} before retrying, since a second call would answer RETURN_ALREADY_EXISTS. - Your API credentials need the permission to create returns; ask Cubbo support if the call answers 401 with a valid token.\",\"url\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order\",\"mainEntityOfPage\":{\"@id\":\"https://developers.cubbo.com/api-reference/returns/request-a-return-for-a-shipped-order#webpage\"},\"dateModified\":\"2026-11-10T14:52:57.609Z\",\"publisher\":{\"@id\":\"https://developers.cubbo.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.cubbo.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cubbo Developers\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cubbo Developers\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/returns/request-a-return-for-a-shipped-order.md","siteName":"Cubbo Developers","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","description":"Returns every inventory movement of a store in a date range as data rows: the same rows the\ninventory transactional CSV report carries, with numbers as numbers and timestamps in ISO 8601.\nEach row is one movement (inbound, sale, return, damaged, lost, transfer) with its signed\nvolume, the product's balance after the movement, the warehouse, and the Brazilian invoice\n(NF-e) linked to it when there is one.\n- **This report must be enabled for your store by Cubbo.** Until it is, every call returns 422 with code `REPORT_NOT_ENABLED`.\n- `from` and `to` accept a date (`YYYY-MM-DD`) or a timestamp. A bare date covers the whole day in the report's time zone (America/Sao_Paulo); a timestamp is used as sent. Both must be complete dates (year, month and day).\n- The range may not exceed 92 days, and `from` must be on or before `to`.\n- At most 10000 rows are returned per call. Larger results are refused with `RESULT_TOO_LARGE` rather than truncated, because `balance_after` is absolute and a narrower range is still correct: split the range and call again.\n- `skus[]` restricts the rows to the given SKUs of the store.\n- Rows are in chronological order. The data comes from a replica, so very recent movements can lag.\n- A store that does not exist or that your token cannot access returns 404 with code `STORE_NOT_FOUND`; the two cases are deliberately indistinguishable.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","description":"Returns the current state of one return of your store: its status and type, what the customer\ndeclared is coming back (`expected_products`), and the products of the original order that can\nbe received (`return_products`). Use it to follow a return after creating it, or to check a\nreturn reported on an order (`returned_order_id` / `returned_order_number`).\n\n- For products tracked by unit code (IMEI or serial number), each `return_products` entry\n also lists the `unit_codes` that shipped on the original order. Products that do not track\n unit codes never carry that key.\n- A return that does not exist or does not belong to one of your stores answers 404.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]},{"language":"es","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obtener credenciales","href":"https://app.cubbo.com/stores"}},"tabs":[{"tab":"Guías","pages":[{"title":"Guías","href":"/es"}]},{"tab":"Referencia de la API","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","description":"Returns every inventory movement of a store in a date range as data rows: the same rows the\ninventory transactional CSV report carries, with numbers as numbers and timestamps in ISO 8601.\nEach row is one movement (inbound, sale, return, damaged, lost, transfer) with its signed\nvolume, the product's balance after the movement, the warehouse, and the Brazilian invoice\n(NF-e) linked to it when there is one.\n- **This report must be enabled for your store by Cubbo.** Until it is, every call returns 422 with code `REPORT_NOT_ENABLED`.\n- `from` and `to` accept a date (`YYYY-MM-DD`) or a timestamp. A bare date covers the whole day in the report's time zone (America/Sao_Paulo); a timestamp is used as sent. Both must be complete dates (year, month and day).\n- The range may not exceed 92 days, and `from` must be on or before `to`.\n- At most 10000 rows are returned per call. Larger results are refused with `RESULT_TOO_LARGE` rather than truncated, because `balance_after` is absolute and a narrower range is still correct: split the range and call again.\n- `skus[]` restricts the rows to the given SKUs of the store.\n- Rows are in chronological order. The data comes from a replica, so very recent movements can lag.\n- A store that does not exist or that your token cannot access returns 404 with code `STORE_NOT_FOUND`; the two cases are deliberately indistinguishable.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","description":"Returns the current state of one return of your store: its status and type, what the customer\ndeclared is coming back (`expected_products`), and the products of the original order that can\nbe received (`return_products`). Use it to follow a return after creating it, or to check a\nreturn reported on an order (`returned_order_id` / `returned_order_number`).\n\n- For products tracked by unit code (IMEI or serial number), each `return_products` entry\n also lists the `unit_codes` that shipped on the original order. Products that do not track\n unit codes never carry that key.\n- A return that does not exist or does not belong to one of your stores answers 404.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]},{"language":"pt-BR","navbar":{"links":[{"href":"https://cubbo.com","label":"Cubbo"}],"primary":{"type":"button","label":"Obter credenciais","href":"https://app.cubbo.com/stores"}},"tabs":[{"tab":"Guias","pages":[{"title":"Guias","href":"/pt-BR"}]},{"tab":"Referência da API","groups":[{"group":"Authentication","pages":[{"title":"Obtain an access token","deprecated":null,"version":null,"openapi":"/openapi.yaml post /auth/token","href":"/api-reference/authentication/obtain-an-access-token"}]},{"group":"Orders","pages":[{"title":"Create an order for a Brazil store","deprecated":null,"version":null,"openapi":"/openapi.yaml post /brazil/orders","href":"/api-reference/orders/create-an-order-for-a-brazil-store"},{"title":"List orders","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders","href":"/api-reference/orders/list-orders"},{"title":"Create an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders","href":"/api-reference/orders/create-an-order"},{"title":"Update an order","deprecated":null,"version":null,"openapi":"/openapi.yaml put /orders/{id}","href":"/api-reference/orders/update-an-order"},{"title":"Update shipping contact and address fields","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}","href":"/api-reference/orders/update-shipping-contact-and-address-fields"},{"title":"Put an order on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/hold","href":"/api-reference/orders/put-an-order-on-hold"},{"title":"Release an order from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/unhold","href":"/api-reference/orders/release-an-order-from-hold"},{"title":"Upload shipping documents to an order","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{id}/upload-shipping-documents","href":"/api-reference/orders/upload-shipping-documents-to-an-order"},{"title":"Attach NF-e invoices issued through Cubbo's fiscal integration","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/{order_id}/attach-invoice","href":"/api-reference/orders/attach-nf-e-invoices-issued-through-cubbos-fiscal-integration"},{"title":"List orders waiting for an NF-e","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/awaiting-invoice","href":"/api-reference/orders/list-orders-waiting-for-an-nf-e"},{"title":"Cancel an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/cancel","href":"/api-reference/orders/cancel-an-order"},{"title":"Create a pick-and-ship order and buy its labels","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/create-and-ship","href":"/api-reference/orders/create-a-pick-and-ship-order-and-buy-its-labels"},{"title":"Delete an order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /orders/delete","href":"/api-reference/orders/delete-an-order"},{"title":"List orders with selected fields","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/with-fields","href":"/api-reference/orders/list-orders-with-selected-fields"}]},{"group":"Click and collect","pages":[{"title":"List pickup locations near a postal code (public)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /carrier-services/pickup-locations","href":"/api-reference/click-and-collect/list-pickup-locations-near-a-postal-code-public"},{"title":"Convert an order to click and collect","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /orders/{order_id}/convert-to-click-and-collect","href":"/api-reference/click-and-collect/convert-an-order-to-click-and-collect"},{"title":"List click-and-collect pickup points eligible for an order","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/pickup-points","href":"/api-reference/click-and-collect/list-click-and-collect-pickup-points-eligible-for-an-order"}]},{"group":"Inventory","pages":[{"title":"List products with stock","deprecated":null,"version":null,"openapi":"/openapi.yaml get /inventory","href":"/api-reference/inventory/list-products-with-stock"},{"title":"Create a product","deprecated":null,"version":null,"openapi":"/openapi.yaml post /products","href":"/api-reference/inventory/create-a-product"},{"title":"Update a product","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /products/{id}","href":"/api-reference/inventory/update-a-product"}]},{"group":"Lots","pages":[{"title":"List the lots of a product","deprecated":null,"version":null,"openapi":"/openapi.yaml get /lots","href":"/api-reference/lots/list-the-lots-of-a-product"},{"title":"Put a lot on hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/hold/store/{store_id}","href":"/api-reference/lots/put-a-lot-on-hold"},{"title":"Release a lot from hold","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/unhold/store/{store_id}","href":"/api-reference/lots/release-a-lot-from-hold"},{"title":"Create a lot or update its expiration date","deprecated":null,"version":null,"openapi":"/openapi.yaml post /lots/upsert","href":"/api-reference/lots/create-a-lot-or-update-its-expiration-date"}]},{"group":"Shipping labels","pages":[{"title":"List an order's shipping labels","deprecated":null,"version":null,"openapi":"/openapi.yaml get /orders/{order_id}/shipping-labels","href":"/api-reference/shipping-labels/list-an-orders-shipping-labels"},{"title":"Get a shipping label","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-labels/{shipping_label_id}","href":"/api-reference/shipping-labels/get-a-shipping-label"}]},{"group":"Replenishments","pages":[{"title":"Create a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments","href":"/api-reference/replenishments/create-a-replenishment"},{"title":"Get a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}","href":"/api-reference/replenishments/get-a-replenishment"},{"title":"Update a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}","href":"/api-reference/replenishments/update-a-replenishment"},{"title":"Attach an NF-e issued through Cubbo's Brazilian invoicing provider","deprecated":null,"version":null,"openapi":"/openapi.yaml post /replenishments/{replenishment_id}/attach-invoice","href":"/api-reference/replenishments/attach-an-nf-e-issued-through-cubbos-brazilian-invoicing-provider"},{"title":"Record or clear an invoice issuing error","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /replenishments/{replenishment_id}/invoice-issuing-error","href":"/api-reference/replenishments/record-or-clear-an-invoice-issuing-error"},{"title":"Get the variance report of a replenishment","deprecated":null,"version":null,"openapi":"/openapi.yaml get /replenishments/{replenishment_id}/variance-report","href":"/api-reference/replenishments/get-the-variance-report-of-a-replenishment"}]},{"group":"Reports","pages":[{"title":"Inventory transactions report","description":"Returns every inventory movement of a store in a date range as data rows: the same rows the\ninventory transactional CSV report carries, with numbers as numbers and timestamps in ISO 8601.\nEach row is one movement (inbound, sale, return, damaged, lost, transfer) with its signed\nvolume, the product's balance after the movement, the warehouse, and the Brazilian invoice\n(NF-e) linked to it when there is one.\n- **This report must be enabled for your store by Cubbo.** Until it is, every call returns 422 with code `REPORT_NOT_ENABLED`.\n- `from` and `to` accept a date (`YYYY-MM-DD`) or a timestamp. A bare date covers the whole day in the report's time zone (America/Sao_Paulo); a timestamp is used as sent. Both must be complete dates (year, month and day).\n- The range may not exceed 92 days, and `from` must be on or before `to`.\n- At most 10000 rows are returned per call. Larger results are refused with `RESULT_TOO_LARGE` rather than truncated, because `balance_after` is absolute and a narrower range is still correct: split the range and call again.\n- `skus[]` restricts the rows to the given SKUs of the store.\n- Rows are in chronological order. The data comes from a replica, so very recent movements can lag.\n- A store that does not exist or that your token cannot access returns 404 with code `STORE_NOT_FOUND`; the two cases are deliberately indistinguishable.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /reports/inventory-transactions","href":"/api-reference/reports/inventory-transactions-report"}]},{"group":"Returns","pages":[{"title":"Request a return for a shipped order","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns","href":"/api-reference/returns/request-a-return-for-a-shipped-order"},{"title":"Get a return","description":"Returns the current state of one return of your store: its status and type, what the customer\ndeclared is coming back (`expected_products`), and the products of the original order that can\nbe received (`return_products`). Use it to follow a return after creating it, or to check a\nreturn reported on an order (`returned_order_id` / `returned_order_number`).\n\n- For products tracked by unit code (IMEI or serial number), each `return_products` entry\n also lists the `unit_codes` that shipped on the original order. Products that do not track\n unit codes never carry that key.\n- A return that does not exist or does not belong to one of your stores answers 404.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/{return_id}","href":"/api-reference/returns/get-a-return"},{"title":"Register the inbound NF-e issued for a return (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/attach-invoice","href":"/api-reference/returns/register-the-inbound-nf-e-issued-for-a-return-brazil"},{"title":"Cancel a pending return","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /returns/{return_id}/cancel","href":"/api-reference/returns/cancel-a-pending-return"},{"title":"Decide what to do with an order returned by the carrier","deprecated":null,"version":null,"openapi":"/openapi.yaml post /returns/{return_id}/decision","href":"/api-reference/returns/decide-what-to-do-with-an-order-returned-by-the-carrier"},{"title":"List returns that still need an inbound NF-e (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml get /returns/awaiting-invoice","href":"/api-reference/returns/list-returns-that-still-need-an-inbound-nf-e-brazil"}]},{"group":"Shipping methods","pages":[{"title":"List active shipping methods available to a store","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods","href":"/api-reference/shipping-methods/list-active-shipping-methods-available-to-a-store"},{"title":"Check which shipping method a shipping configuration would select for a postcode","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/configuration-coverage","href":"/api-reference/shipping-methods/check-which-shipping-method-a-shipping-configuration-would-select-for-a-postcode"},{"title":"Quote shipping options for a destination and package","deprecated":null,"version":null,"openapi":"/openapi.yaml get /shipping-methods/quote","href":"/api-reference/shipping-methods/quote-shipping-options-for-a-destination-and-package"}]},{"group":"Stores","pages":[{"title":"Update your own store","deprecated":null,"version":null,"openapi":"/openapi.yaml patch /store","href":"/api-reference/stores/update-your-own-store"},{"title":"Upload the store's digital certificate and set NF-e numbering (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/digital-certificate","href":"/api-reference/stores/upload-the-stores-digital-certificate-and-set-nf-e-numbering-brazil"},{"title":"Provision the store's fiscal account (Brazil)","deprecated":null,"version":null,"openapi":"/openapi.yaml post /store/fiscal-account","href":"/api-reference/stores/provision-the-stores-fiscal-account-brazil"},{"title":"Create a store from an existing one","deprecated":null,"version":null,"openapi":"/openapi.yaml post /stores","href":"/api-reference/stores/create-a-store-from-an-existing-one"}]},{"group":"Webhooks","pages":[{"title":"Order status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderUpdated","href":"/api-reference/webhooks/order-status-changed"},{"title":"Order shipped fulfilled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook orderFulfilled","href":"/api-reference/webhooks/order-shipped-fulfilled"},{"title":"Carrier tracking status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook shippingUpdated","href":"/api-reference/webhooks/carrier-tracking-status-changed"},{"title":"Inventory snapshot after a stock movement","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook inventoryMovement","href":"/api-reference/webhooks/inventory-snapshot-after-a-stock-movement"},{"title":"Replenishment announced","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentCreated","href":"/api-reference/webhooks/replenishment-announced"},{"title":"Replenishment appointment booked or canceled","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentScheduled","href":"/api-reference/webhooks/replenishment-appointment-booked-or-canceled"},{"title":"Replenishment status changed","version":null,"deprecated":null,"openapi":"/openapi.yaml webhook replenishmentStatus","href":"/api-reference/webhooks/replenishment-status-changed"}]}]}]}]},"basePath":"","title":"Request a return for a shipped order - Cubbo Developers","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","Page-BIYvYBgk.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}