{ "opencollection": "1.0.0", "info": { "name": "Admin Account / Address Refunds API", "version": "v3" }, "items": [ { "info": { "name": "Refunds", "type": "folder" }, "items": [ { "info": { "name": "List refunds", "type": "http" }, "http": { "method": "GET", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/refunds", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" }, { "name": "expand", "value": "", "type": "query", "description": "Comma-separated associations to expand (e.g., payment, refund_reason). Use dot notation for nested expand (max 4 levels)." }, { "name": "fields", "value": "", "type": "query", "description": "Comma-separated list of fields to include (e.g., amount,reason,transaction_id). id is always included." } ], "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Returns all refunds for an order.\n\n**Required scope:** `read_refunds` (for API-key authentication)." }, { "info": { "name": "Create a refund", "type": "http" }, "http": { "method": "POST", "url": "http://{defaultHost}/api/v3/admin/orders/:order_id/refunds", "headers": [ { "name": "x-spree-api-key", "value": "" }, { "name": "Authorization", "value": "" } ], "params": [ { "name": "order_id", "value": "", "type": "path", "description": "Order ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "apikey", "key": "x-spree-api-key", "value": "{{x-spree-api-key}}", "placement": "header" } }, "docs": "Creates a refund for a payment on the order. The refund is automatically processed via the payment gateway.\n\n**Required scope:** `write_refunds` (for API-key authentication)." } ] } ], "bundled": true }