This endpoint cancels an order regardless of its current status and handles all necessary cleanup including customer notifications, refunds, inventory adjustments, and delivery platform communications.
Canceling orders frequently can negatively impact your store’s rating on delivery platforms. Use this endpoint judiciously and consider alternative solutions when possible.
{ "store_id": "449235c1-3d04-4519-998b-40d2a621e5e0", "order_id": "35d18f08-6d54-421d-9476-8cef629111bc", "reason": "OUT_OF_STOCK", "description": "Main ingredient not available due to supply chain issue", "initiated_by": "870a05c1-bbbf-48ab-a757-e28ae0a2b2a8"}
Analytics Update: Cancellation metrics are updated for reporting
Audit Trail: Complete cancellation record is created for compliance
Refund Timing: Refunds typically process within 3-5 business days, but the exact timing depends on the customer’s payment method and the delivery platform’s policies.
Best Practice: When possible, contact the customer directly before canceling to explore alternatives or explain the situation. This can help maintain customer satisfaction even in difficult situations.
{ "success": true, "message": "Order canceled but platform notification failed", "order_id": "35d18f08-6d54-421d-9476-8cef629111bc", "platform_notified": false, "warning": "Manual platform notification may be required"}
Manual Follow-up: If platform_notified is false, you may need to manually notify the delivery platform to avoid fulfillment conflicts.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Documentation Starter Kit","colors":{"primary":"#2C023B","light":"#D09CE8","dark":"#DE4990"},"favicon":"lula-commerce-favicon.png","logo":{"light":"https://mintcdn.com/lulaconvenience/j9ZBLBNfvCnzqqXy/logo/lula-commerce-logo-primary.png?fit=max\u0026auto=format\u0026n=j9ZBLBNfvCnzqqXy\u0026q=85\u0026s=284bd11c4f3d4f0c15a37b9801dadcc6","dark":"https://mintcdn.com/lulaconvenience/j9ZBLBNfvCnzqqXy/logo/lula-commerce-logo-white.png?fit=max\u0026auto=format\u0026n=j9ZBLBNfvCnzqqXy\u0026q=85\u0026s=16d580a4ae3b30dfd55a7f72ed85a1dd"},"footer":{"socials":{"github":"https://github.com/Lula-Inc","linkedin":"https://www.linkedin.com/company/lula-commerce/"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"lulaconvenience","hasAudioNarration":false,"actualSubdomain":"lulaconvenience","customDomains":["developer.lulacommerce.com"],"gitSource":{"type":"github","owner":"lula-inc","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae91638e2896f37251f2584:success","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API Reference","count":82},{"language":"default","tag":"API Documentation - Latest","count":80},{"language":"default","tag":"Catalog","count":17},{"language":"default","tag":"Orders","count":16},{"language":"default","tag":"Menus","count":14},{"language":"default","tag":"Campaigns","count":13},{"language":"default","tag":"Documentation","count":12},{"language":"default","tag":"Stores","count":11},{"language":"default","tag":"Modifiers","count":10},{"language":"default","tag":"Promotions","count":5}]},"assistantConfig":{},"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":"llms-txt-v2","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/orders/cancel-order","slug":"/api-reference/orders/cancel-order","pageMetadata":{"title":"Cancel Order","api":"POST {{orders_api_base_url}}/orders/cancel/","description":"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.","playground":"simple","href":"/api-reference/orders/cancel-order"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,CodeBlock,Heading,Note,ParamField,ResponseField,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This endpoint cancels an order regardless of its current status and handles all necessary cleanup including customer notifications, refunds, inventory adjustments, and delivery platform communications.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Canceling orders frequently can negatively impact your store’s rating on delivery platforms. Use this endpoint judiciously and consider alternative solutions when possible.`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsx(ParamField,{body:`store_id`,type:`string`,required:true,id:`param-store-id`,children:_jsx(_components.p,{children:`The unique identifier of the store canceling the order`})}),`\n`,_jsx(ParamField,{body:`order_id`,type:`string`,required:true,id:`param-order-id`,children:_jsx(_components.p,{children:`The unique identifier of the order to cancel`})}),`\n`,_jsx(ParamField,{body:`reason`,type:`string`,required:true,id:`param-reason`,children:_jsx(_components.p,{children:`Reason for cancellation. Must be one of the predefined reason codes.`})}),`\n`,_jsx(ParamField,{body:`description`,type:`string`,optional:true,id:`param-description`,children:_jsx(_components.p,{children:`Additional details about the cancellation reason`})}),`\n`,_jsx(ParamField,{body:`initiated_by`,type:`string`,required:true,id:`param-initiated-by`,children:_jsx(_components.p,{children:`Employee ID who initiated the cancellation`})}),`\n`,_jsx(Heading,{level:`3`,id:`cancellation-reason-codes`,children:`Cancellation Reason Codes`}),`\n`,_jsxs(Accordion,{title:`Available Reason Codes`,id:`available-reason-codes`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Store-Related Reasons:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OUT_OF_STOCK`}),` - Required items are not available`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`KITCHEN_CLOSED`}),` - Kitchen is closed or unable to prepare`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`EQUIPMENT_FAILURE`}),` - Equipment malfunction preventing preparation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`STAFF_SHORTAGE`}),` - Insufficient staff to fulfill order`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`STORE_EMERGENCY`}),` - Emergency situation at store`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Customer-Related Reasons:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`CUSTOMER_REQUEST`}),` - Customer requested cancellation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PAYMENT_ISSUE`}),` - Payment could not be processed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DELIVERY_ADDRESS_ISSUE`}),` - Delivery address problems`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Platform-Related Reasons:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`PLATFORM_ERROR`}),` - Technical issue with delivery platform`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`DUPLICATE_ORDER`}),` - Order was duplicated in system`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`FRAUD_SUSPECTED`}),` - Suspected fraudulent order`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Other Reasons:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`WEATHER_RELATED`}),` - Severe weather preventing fulfillment`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`OTHER`}),` - Other reason (requires description)`]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsx(_components.p,{children:`Indicates whether the order was successfully canceled`})}),`\n`,_jsx(ResponseField,{name:`message`,type:`string`,id:`param-message`,children:_jsx(_components.p,{children:`Confirmation message or error details`})}),`\n`,_jsx(ResponseField,{name:`order_id`,type:`string`,id:`param-order-id-1`,children:_jsx(_components.p,{children:`The canceled order’s unique identifier`})}),`\n`,_jsx(ResponseField,{name:`cancellation_id`,type:`string`,id:`param-cancellation-id`,children:_jsx(_components.p,{children:`Unique identifier for the cancellation record`})}),`\n`,_jsx(ResponseField,{name:`refund_amount`,type:`string`,id:`param-refund-amount`,children:_jsx(_components.p,{children:`Amount that will be refunded to customer`})}),`\n`,_jsx(ResponseField,{name:`refund_status`,type:`string`,id:`param-refund-status`,children:_jsx(_components.p,{children:`Status of the refund process`})}),`\n`,_jsx(ResponseField,{name:`platform_notified`,type:`boolean`,id:`param-platform-notified`,children:_jsx(_components.p,{children:`Whether the delivery platform was successfully notified`})}),`\n`,_jsx(ResponseField,{name:`customer_notified`,type:`boolean`,id:`param-customer-notified`,children:_jsx(_components.p,{children:`Whether the customer was successfully notified`})}),`\n`,_jsx(Heading,{level:`3`,id:`request-example`,children:`Request Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"store_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"449235c1-3d04-4519-998b-40d2a621e5e0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35d18f08-6d54-421d-9476-8cef629111bc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OUT_OF_STOCK\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Main ingredient not available due to supply chain issue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"initiated_by\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"870a05c1-bbbf-48ab-a757-e28ae0a2b2a8\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`response-example`,children:`Response Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order successfully canceled and all parties notified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35d18f08-6d54-421d-9476-8cef629111bc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cancellation_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c4f2d9e8-1a3b-4c5d-8e9f-2a3b4c5d6e7f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refund_amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"41.02\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"refund_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"processing\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform_notified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_notified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(Accordion,{title:`Cancellation Process Workflow`,id:`cancellation-process-workflow`,children:[_jsx(_components.p,{children:`When an order is canceled, the following automated processes occur:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Order Status Update`}),`: Status changed to “canceled”`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Inventory Release`}),`: Any reserved inventory is released back to available stock`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Refund Initiation`}),`: Automatic refund processing begins`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Platform Notification`}),`: Delivery platform is notified with reason`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Customer Notification`}),`: Customer receives cancellation notification`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Analytics Update`}),`: Cancellation metrics are updated for reporting`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Audit Trail`}),`: Complete cancellation record is created for compliance`]}),`\n`]})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Refund Timing`}),`: Refunds typically process within 3-5 business days, but the exact timing depends on the customer’s payment method and the delivery platform’s policies.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best Practice`}),`: When possible, contact the customer directly before canceling to explore alternatives or explain the situation. This can help maintain customer satisfaction even in difficult situations.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Accordion,{title:`Common Error Scenarios`,id:`common-error-scenarios`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Order Cannot Be Canceled`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order is already completed and cannot be canceled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ORDER_NOT_CANCELABLE\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Invalid Reason Code`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid cancellation reason provided\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"INVALID_REASON\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Platform Communication Failed`})}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order canceled but platform notification failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"order_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35d18f08-6d54-421d-9476-8cef629111bc\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform_notified\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"warning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Manual platform notification may be required\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Manual Follow-up`}),`: If platform_notified is false, you may need to manually notify the delivery platform to avoid fulfillment conflicts.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cancel Order","api":"POST {{orders_api_base_url}}/orders/cancel/","description":"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.","playground":"simple","href":"/api-reference/orders/cancel-order"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Request Body","slug":"request-body","depth":3,"children":[]},{"title":"Cancellation Reason Codes","slug":"cancellation-reason-codes","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Request Example","slug":"request-example","depth":3,"children":[]},{"title":"Response Example","slug":"response-example","depth":3,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":3,"children":[]}],"codeExamples":{},"endpoint":{"title":"Cancel Order","path":"{{orders_api_base_url}}/orders/cancel/","method":"post","request":{"security":[],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"store_id":[{"type":"string","description":"The unique identifier of the store canceling the order","required":true}],"order_id":[{"type":"string","description":"The unique identifier of the order to cancel","required":true}],"reason":[{"type":"string","description":"Reason for cancellation. Must be one of the predefined reason codes.","required":true}],"description":[{"type":"string","description":"Additional details about the cancellation reason"}],"initiated_by":[{"type":"string","description":"Employee ID who initiated the cancellation","required":true}]}}],"examples":{"example":{"value":{"store_id":"\u003cstring>","order_id":"\u003cstring>","reason":"\u003cstring>","description":"\u003cstring>","initiated_by":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"Indicates whether the order was successfully canceled"}],"message":[{"type":"string","description":"Confirmation message or error details"}],"order_id":[{"type":"string","description":"The canceled order’s unique identifier"}],"cancellation_id":[{"type":"string","description":"Unique identifier for the cancellation record"}],"refund_amount":[{"type":"string","description":"Amount that will be refunded to customer"}],"refund_status":[{"type":"string","description":"Status of the refund process"}],"platform_notified":[{"type":"boolean","description":"Whether the delivery platform was successfully notified"}],"customer_notified":[{"type":"boolean","description":"Whether the customer was successfully notified"}]}}],"examples":{"example":{"value":{"success":true,"message":"\u003cstring>","order_id":"\u003cstring>","cancellation_id":"\u003cstring>","refund_amount":"\u003cstring>","refund_status":"\u003cstring>","platform_notified":true,"customer_notified":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"lulaconvenience","siteName":"Documentation Starter Kit","title":"Cancel Order - Documentation Starter Kit","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:52:36.777Z","originalFileLocation":"api-reference/orders/cancel-order.mdx"},"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=\"system\"}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=\"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation Starter Kit\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_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/lulaconvenience/T9P5PJWTg2EYuDhN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel Order - Documentation Starter Kit\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Documentation Starter Kit\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developer.lulacommerce.com/api-reference/orders/cancel-order\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://lulaconvenience.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Cancel+Order\u0026amp;description=Cancel+an+order+and+handle+refunds%2C+inventory+adjustments%2C+and+platform+notifications+automatically.\u0026amp;theme=20c5c8d451f1169efff39fdd\u0026amp;signature=3e3f4d397c574832bc059e4231f68c1b755ac9b11f83cdc41471862b0e6081c5\">\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=\"Cancel Order - Documentation Starter Kit\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://lulaconvenience.mintlify.site/_mintlify/api/og/v2?division=Orders\u0026amp;title=Cancel+Order\u0026amp;description=Cancel+an+order+and+handle+refunds%2C+inventory+adjustments%2C+and+platform+notifications+automatically.\u0026amp;theme=20c5c8d451f1169efff39fdd\u0026amp;signature=3e3f4d397c574832bc059e4231f68c1b755ac9b11f83cdc41471862b0e6081c5\">\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/lulaconvenience/T9P5PJWTg2EYuDhN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation Starter Kit\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2C023B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developer.lulacommerce.com/api-reference/orders/cancel-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/orders/cancel-order.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developer.lulacommerce.com/#organization\",\"name\":\"Documentation Starter Kit\",\"url\":\"https://developer.lulacommerce.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/lulaconvenience/j9ZBLBNfvCnzqqXy/logo/lula-commerce-logo-primary.png?fit=max\u0026auto=format\u0026n=j9ZBLBNfvCnzqqXy\u0026q=85\u0026s=284bd11c4f3d4f0c15a37b9801dadcc6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developer.lulacommerce.com#website\",\"name\":\"Documentation Starter Kit\",\"url\":\"https://developer.lulacommerce.com\",\"publisher\":{\"@id\":\"https://developer.lulacommerce.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order#webpage\",\"url\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order\",\"name\":\"Cancel Order\",\"description\":\"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\",\"dateModified\":\"2026-01-06T22:52:36.777Z\",\"isPartOf\":{\"@id\":\"https://developer.lulacommerce.com#website\"},\"breadcrumb\":{\"@id\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Documentation - Latest\",\"item\":\"https://developer.lulacommerce.com/api-reference/companies/create-company\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Orders\",\"item\":\"https://developer.lulacommerce.com/api-reference/orders/orders-overview\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cancel Order\",\"item\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order#apireference\",\"headline\":\"Cancel Order\",\"name\":\"Cancel Order\",\"description\":\"Cancel an order and handle refunds, inventory adjustments, and platform notifications automatically.\",\"url\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order\",\"mainEntityOfPage\":{\"@id\":\"https://developer.lulacommerce.com/api-reference/orders/cancel-order#webpage\"},\"dateModified\":\"2026-01-06T22:52:36.777Z\",\"publisher\":{\"@id\":\"https://developer.lulacommerce.com/#organization\"},\"isPartOf\":{\"@id\":\"https://developer.lulacommerce.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation Starter Kit\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Documentation Starter Kit\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/orders/cancel-order.md","siteName":"Documentation Starter Kit","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/documentation/welcome-intro"}]},{"anchor":"API Reference","icon":"rectangle-terminal","groups":[{"group":"API Documentation - Legacy","pages":[{"title":"CSV Item Ingestion","href":"/api-reference/csvItemsIngestion"},{"title":"JSON Item Ingestion","href":"/api-reference/jsonItemsIngestion"}]},{"group":"API Documentation - Latest","pages":[{"group":"Companies","pages":[{"title":"Create Company","api":"POST https://api-staging.luladelivery.store/stores/company","playground":"simple","href":"/api-reference/companies/create-company"},{"title":"Get Company Details","api":"GET https://api-staging.luladelivery.store/stores/company","playground":"simple","href":"/api-reference/companies/get-company-details"},{"title":"Update Company","api":"PUT https://api-staging.luladelivery.store/stores/company/{company_id}","playground":"simple","href":"/api-reference/companies/update-company"},{"title":"Delete Company","api":"DELETE https://api-staging.luladelivery.store/stores/company/{company_id}","playground":"simple","href":"/api-reference/companies/delete-company"},{"title":"Offboard Company","api":"PUT https://api-staging.luladelivery.store/stores/company/{company_id}/offboard","playground":"simple","href":"/api-reference/companies/offboard-company"}]},{"group":"Stores","pages":[{"title":"Create Store","api":"POST https://api-staging.luladelivery.store/stores/store/","playground":"simple","href":"/api-reference/stores/create-store"},{"title":"Update Store","api":"PUT https://api-staging.luladelivery.store/stores/{store_id}?company_id={company_id}","playground":"simple","href":"/api-reference/stores/update-store"},{"title":"Get Store Status","api":"GET https://api-staging.luladelivery.store/stores/{store_id}/status?current_local_date={date}","playground":"simple","href":"/api-reference/stores/get-store-status"},{"title":"Change Store Status","api":"PUT https://api-staging.luladelivery.store/stores/{store_id}/status","playground":"simple","href":"/api-reference/stores/change-store-status"},{"title":"Get Store Tax Rate","api":"GET https://api-staging.luladelivery.store/stores/{store_id}/tax-rate","playground":"simple","href":"/api-reference/stores/get-store-tax-rate"},{"group":"Onboarding","pages":[{"title":"Start Onboarding","api":"PUT https://api-staging.luladelivery.store/stores/{store_id}/status","playground":"simple","href":"/api-reference/stores/onboarding/start-onboarding"},{"title":"Get Onboarding by ID","api":"GET https://api-staging.luladelivery.store/stores/onboarding/{onboarding_id}","playground":"simple","href":"/api-reference/stores/onboarding/get-onboarding-by-id"},{"title":"Get Onboarding by Store ID","api":"GET https://api-staging.luladelivery.store/stores/{store_id}/status?current_local_date={date}","playground":"simple","href":"/api-reference/stores/onboarding/get-onboarding-by-store-id"},{"title":"Get Onboarding by Company ID","api":"GET https://api-staging.luladelivery.store/stores/company/{company_id}/onboarding","playground":"simple","href":"/api-reference/stores/onboarding/get-onboarding-by-company-id"}]},{"group":"Store Employees","pages":[{"title":"Link User to Store","api":"PUT https://api-staging.luladelivery.store/stores/store-employees/{store_id}","playground":"simple","href":"/api-reference/stores/store-employees/link-user-to-store"},{"title":"Link Store to Employee","api":"POST https://api-staging.luladelivery.store/stores/store-employees/","playground":"simple","href":"/api-reference/stores/store-employees/link-store-to-employee"}]}]},{"group":"Catalog","pages":[{"title":"Catalog Updates","playground":"simple","href":"/api-reference/catalog/updates"},{"title":"Upsert Products using CSV","api":"POST {{micro_service_base_url}}/inventory-service-v2/companies/1000019/products/bulk/csv","playground":"simple","href":"/api-reference/catalog/upsert-products-csv"},{"title":"Upsert Products using JSON","api":"POST {{micro_service_base_url}}/inventory-service-v2/companies/1000019/products/bulk","playground":"simple","href":"/api-reference/catalog/upsert-products-json"},{"title":"Upsert Inventory","api":"POST {{micro_service_base_url}}/inventory-service-v2/companies/1000019/store/449235c1-3d04-4519-998b-40d2a621e5e0/inventory","playground":"simple","href":"/api-reference/catalog/upsert-inventory"},{"title":"Get Store Inventory","api":"GET {{micro_service_base_url}}/inventory/v2/{{store_id}}/inventory","playground":"simple","href":"/api-reference/catalog/get-store-inventory"},{"title":"Get Job Status Of Ingestion","api":"GET {{micro_service_base_url}}/inventory-service-v2/jobs/14109","playground":"simple","href":"/api-reference/catalog/get-job-status"},{"title":"Get Recommended Products","api":"GET {{micro_service_base_url}}/inventory/store/{{store_id}}/item/{{store_item_id}}/recommended-products","playground":"simple","href":"/api-reference/catalog/recommended-products"},{"group":"Modifiers","pages":[{"title":"Modifiers Overview","href":"/api-reference/catalog/modifiers"},{"title":"Create Modifier Group","api":"POST {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/","playground":"simple","href":"/api-reference/catalog/modifiers/create-modifier-group"},{"title":"Create Modifier Group Options","api":"POST {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}/options","playground":"simple","href":"/api-reference/catalog/modifiers/create-modifier-group-options"},{"title":"Create Modifier Group Linked Items","api":"POST {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}/mappings","playground":"simple","href":"/api-reference/catalog/modifiers/create-modifier-group-linked-items"},{"title":"Delete Modifier Group Option From Modifier Group","api":"DELETE {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}/options","playground":"simple","href":"/api-reference/catalog/modifiers/delete-modifier-group-option"},{"title":"Delete Linked Items From Modifier Group","api":"DELETE {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}/mappings","playground":"simple","href":"/api-reference/catalog/modifiers/delete-linked-items-from-modifier-group"},{"title":"Delete Modifier Group","api":"DELETE {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}","playground":"simple","href":"/api-reference/catalog/modifiers/delete-modifier-group"},{"title":"Update Modifier Group","api":"PUT {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/","playground":"simple","href":"/api-reference/catalog/modifiers/update-modifier-group"},{"title":"Get List Of Modifier Groups","api":"GET {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/","playground":"simple","href":"/api-reference/catalog/modifiers/get-list-of-modifier-groups"},{"title":"Get Modifier Group Details","api":"GET {{micro_service_base_url}}/inventory/stores/{{store_id}}/modifier-groups/{{modifier_group_id}}","playground":"simple","href":"/api-reference/catalog/modifiers/get-modifier-group-details"}]}]},{"group":"Menus","pages":[{"title":"Menus Service Overview","href":"/api-reference/menus/menus-overview"},{"title":"Create Store Menu","api":"POST /stores/{{store_id}}/menu/","playground":"simple","href":"/api-reference/menus/create-store-menu"},{"title":"Upsert Store Menu","api":"PUT /stores/{{store_id}}/menu?menu_id={{menu_id}}","playground":"simple","href":"/api-reference/menus/upsert-store-menu"},{"title":"Delete Store Menu","api":"DELETE /stores/{{store_id}}/menu/{{menu_id}}","playground":"simple","href":"/api-reference/menus/delete-store-menu"},{"title":"Get Menu List","api":"GET /stores/{{store_id}}/menu/list?status=active\u0026sortBy=categories\u0026sortDirection=desc\u0026name=all","playground":"simple","href":"/api-reference/menus/get-menu-list"},{"title":"Sync Menu For All Stores","api":"POST /stores/menu/sync","playground":"simple","href":"/api-reference/menus/sync-menu-for-all-stores"},{"title":"Get All Active Menu of Store","api":"GET /stores/{{store_id}}/menu/","playground":"simple","href":"/api-reference/menus/get-all-active-menu-of-store"},{"title":"Get Store Menu Timings","api":"GET /stores/{{store_id}}/menu/timing?menu_ids={{menu_ids}}","playground":"simple","href":"/api-reference/menus/get-store-menu-timings"},{"group":"Menu Items","pages":[{"title":"Create Menu Item","api":"POST /stores/{{store_id}}/menu/items?active=true","playground":"simple","href":"/api-reference/menus/menu-items/create-menu-item"},{"title":"Delete Menu Item","api":"DELETE /stores/{{store_id}}/menus/{{menu_id}}/items/{{item_id}}","playground":"simple","href":"/api-reference/menus/menu-items/delete-menu"},{"title":"Update Menu Item","api":"PUT /stores/{{store_id}}/menus/{{menu_id}}/items/{{item_id}}","playground":"simple","href":"/api-reference/menus/menu-items/update-menu-item"}]},{"group":"Menu Rules","pages":[{"title":"Get Menu Rules","api":"GET /stores/{{store_id}}/menu-rules","playground":"simple","href":"/api-reference/menus/menu-rules/get-menu-rules"},{"title":"Upsert Menu Rules","api":"PUT /stores/{{store_id}}/menu-rules","playground":"simple","href":"/api-reference/menus/menu-rules/upsert-menu-rules"},{"title":"Get Menu Rules by ID","api":"GET /stores/{{store_id}}/menu-rules/{{rule_id}}","playground":"simple","href":"/api-reference/menus/menu-rules/get-menu-rules-by-id"}]}]},{"group":"Campaigns","pages":[{"title":"Campaigns Overview","playground":"simple","href":"/api-reference/campaigns/campaigns-overview"},{"title":"Create Campaign","api":"POST {{micro_service_base_url}}/stores/company/{{company_id}}/campaigns","playground":"simple","href":"/api-reference/campaigns/create-campaign"},{"title":"Get Campaigns","api":"GET {{micro_service_base_url}}/stores/company/{{company_id}}/campaigns","playground":"simple","href":"/api-reference/campaigns/get-campaigns"},{"title":"Get Campaign Details","api":"GET {{micro_service_base_url}}/stores/company/{{company_id}}/campaigns/{{campaign_id}}","playground":"simple","href":"/api-reference/campaigns/get-campaign-details"},{"title":"Update Campaign","api":"PUT {{stores_service_api_base_url}}/stores/company/{{company_id}}/campaigns/{{campaign_id}}/stores","playground":"simple","href":"/api-reference/campaigns/update-campaign"},{"title":"Delete Campaign","api":"DELETE {{stores_service_api_base_url}}/stores/{{store_id}}/status","playground":"simple","href":"/api-reference/campaigns/delete-campaign"},{"title":"Bulk Update Campaign","api":"POST {{micro_service_base_url}}/stores/company/{{company_id}}/campaigns/bulk","playground":"simple","href":"/api-reference/campaigns/bulk-update-campaign"},{"title":"Link Campaign to Stores","api":"GET {{stores_service_api_base_url}}/stores/company/{{company_id}}/campaigns/{{campaign_id}}/stores","playground":"simple","href":"/api-reference/campaigns/link-campaign-to-stores"},{"group":"Promotions","pages":[{"title":"Create Promotion","api":"POST {{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions","playground":"simple","href":"/api-reference/campaigns/promotions/create-promotion"},{"title":"Get Promotion Details","api":"GET {{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}","playground":"simple","href":"/api-reference/campaigns/promotions/get-promotion"},{"title":"Update Promotion","api":"PUT {{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}","playground":"simple","href":"/api-reference/campaigns/promotions/update-promotion"},{"title":"Delete Promotion","api":"DELETE {{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions/{{promotion_id}}","playground":"simple","href":"/api-reference/campaigns/promotions/delete-promotion"},{"title":"Get All Promotions","api":"GET {{promotions_service_api_base_url}}/promotions/company/{{company_id}}/campaigns/{{campaign_id}}/promotions","playground":"simple","href":"/api-reference/campaigns/promotions/get-all-promotions"}]}]},{"group":"Orders","pages":[{"title":"Orders Management","playground":"simple","href":"/api-reference/orders/orders-overview"},{"title":"Get Incoming Orders","api":"GET {{orders_api_base_url}}/orders/","playground":"simple","href":"/api-reference/orders/get-incoming-orders"},{"title":"List All Orders","api":"GET {{micro_service_base_url}}/orders/","playground":"simple","href":"/api-reference/orders/list-all-orders"},{"title":"Get Orders Count","api":"GET {{orders_api_base_url}}/orders/counts/","playground":"simple","href":"/api-reference/orders/get-orders-count"},{"title":"Get Order Details","api":"GET {{orders_api_base_url}}/orders/details/","playground":"simple","href":"/api-reference/orders/get-order-details"},{"title":"Accept Incoming Order","api":"PUT {{orders_api_base_url}}/orders/accept/","description":"Accept an incoming order from a delivery service platform and initiate the fulfillment process.","playground":"simple","href":"/api-reference/orders/accept-incoming-order"},{"title":"Cancel Order","api":"POST {{orders_api_base_url}}/orders/cancel/","playground":"simple","href":"/api-reference/orders/cancel-order"},{"title":"Get Store Orders","api":"GET {{micro_service_base_url}}/orders/","description":"Retrieve all orders for a specific store with flexible filtering options including date ranges, status, and pagination.","playground":"simple","href":"/api-reference/orders/get-store-orders"},{"title":"Get Orders History","api":"GET {{orders_api_base_url}}/orders/history/","playground":"simple","href":"/api-reference/orders/get-orders-history"},{"title":"Create New Order","api":"POST {{orders_api_base_url}}/orders/create/","playground":"simple","href":"/api-reference/orders/create-new-order"},{"title":"Patch Order Cart","api":"PATCH {{micro_service_base_url}}/orders/{{order_id}}/patch-order","playground":"simple","href":"/api-reference/orders/patch-order-cart"},{"group":"Order Items","pages":[{"title":"Get Order Items","api":"GET {{micro_service_base_url}}/orders/{{order_id}}/order-items/{{order_item_id}}","playground":"simple","href":"/api-reference/orders/order-items/get-order-items"},{"title":"Get All Order Items","api":"GET {{micro_service_base_url}}/orders/{{order_id}}/order-items","playground":"simple","href":"/api-reference/orders/order-items/get-all-order-items"},{"title":"Update Order Items","api":"PATCH {{micro_service_base_url}}/orders/{{order_id}}/order-items/{{order_item_id}}","playground":"simple","href":"/api-reference/orders/order-items/update-order-items"}]},{"group":"Order Issues","pages":[{"title":"Create Order Issue","api":"POST {{micro_service_base_url}}/orders/{{order_id}}/issues","playground":"simple","href":"/api-reference/orders/order-issues/create-order-issue"},{"title":"Update Order Issue","api":"PATCH {{micro_service_base_url}}/orders/{{order_id}}/issues/{{issue_id}}","playground":"simple","href":"/api-reference/orders/order-issues/update-order-issue"}]}]},{"group":"Legacy Endpoints","pages":[{"title":"Upload JSON file for item ingestion","api":"POST https://api-staging.luladelivery.store/inventory/ingestion/","href":"/api-reference/endpoint/upload-json"},{"title":"Post items for ingestion","api":"POST https://api-staging.luladelivery.store/inventory/ingestion/","href":"/api-reference/endpoint/post-items-for-ingestion"},{"title":"Upload CSV file for item ingestion","api":"POST https://api-staging.luladelivery.store/inventory/ingestion/csv","href":"/api-reference/endpoint/upload-csv"},{"title":"Get Job","api":"GET https://api-staging.luladelivery.store/inventory/ingestion/{id}","href":"/api-reference/endpoint/get-job"}]}]}]}]},"basePath":"","title":"Cancel Order - Documentation Starter Kit","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js"]}