Requireswrite_orderaccess scope. More access scope
The Full Order Refund API processes a complete refund for an order, including all items, shipping, and applicable taxes. It also provides detailed information about the refunded order.
This API is especially useful for:
- Automating full refunds for customer orders.
- Tracking refund details, including shipping and taxes.
- Managing customer refunds and ensuring accurate records for financial reporting.
Request Parameters
Public Request Parameters
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
id | string | Yes | The unique ID of the order. | 1232123 |
Response Description
Public Response Fields
Success Response
| Field | Type | Description | Example |
|---|---|---|---|
| Id | string | Unique identifier of the refund order. | "31e27a7a- 6899-4709-93e2-b3d6177c7458" |
| Status | string | Current status of the refund (finished, pending, etc.). | "finished" |
| Number | string | Refund order number. | "SPZ00000 020-S1" |
| CreatedAt | string (ISO8601) | Timestamp of when the refund order was created. | "2024-06-24T08:17:59Z" |
| Note | string | Notes about the refund order (optional). | "" |
| RefundFailReason | string | Reason for refund failure (if applicable). | "" |
| AllRefunded | bool | Indicates whether the order has been fully refunded (true/false). | true |
| RefundStatus | string | Status of the refund process (pending, failed, finished, etc.). | "finished" |
| Order | Order | Associated order details (see Order struct). | {...} |
| Refund | refundRecord | Refund record details (see RefundRecord struct). | {...} |
Order Structure
Field | Type | Description | Example |
|---|---|---|---|
Id |
| Unique identifier of the order. | |
Note |
| Notes for the order (optional). | |
Number |
| Order number. |
|
FinancialStatus |
| Financial status of the order. |
|
Status |
| Current status of the order ( |
|
CancelReason |
| Reason for cancellation (if applicable). |
|
PaymentMethod |
| Payment method used for the order. |
|
FulfillmentStatus |
| Fulfillment status of the order ( |
|
DiscountCode |
| Discount code applied to the order. |
|
DiscountApplications |
| Details of discounts applied. |
|
CustomerNote |
| Notes from the customer about the order. | |
SalesPlatform |
| The platform where the order was placed. |
|
LandingSite |
| URL of the landing page where the order originated. | |
BuyerAcceptsMarketing |
| Indicates if the customer has opted into marketing. |
|
Currency |
| Currency of the order. |
|
TotalPrice |
| Total price of the order, including taxes and shipping. |
|
TotalDiscount |
| Total discount applied to the order. |
|
TotalTax |
| Total tax applied to the order. |
|
TotalShipping |
| Total shipping cost for the order. |
|
SubTotal |
| Subtotal of the order (price before tax and shipping). |
|
CodeDiscountTotal |
| Total discount from discount codes. |
|
LineItemDiscountTotal |
| Total discount applied to line items. |
|
Tags |
| Custom tags for the order. |
|
CreatedAt |
| Timestamp of when the order was created. | |
UpdatedAt |
| Timestamp of the last update to the order. | |
CanceledAt |
| Timestamp of when the order was cancelled (if applicable). | |
CustomerDeletedAt |
| Timestamp of when the customer deleted the order (if applicable). |
|
TotalRefundPrice |
| Total refund amount processed for the order. |
|
RefundStatus |
| Status of the refund process for the order. |
|
BrowserIP |
| IP address of the customer when the order was placed. |
|
Source |
| Referrer or source of the order. | |
EmailStatus |
| Email delivery status ( |
|
ShippingLine | Details of the shipping method used. |
| |
Customer | Information about the customer who placed the order. |
| |
ShippingAddress | Shipping address of the customer. |
| |
BillingAddress | Billing address of the customer. |
| |
PaymentLine | Details of the payment method used. |
| |
LineItems | List of items included in the order. |
| |
GiftCardTotal |
| Total value of gift cards applied to the order. |
|
ProductTaxIncluded |
| Indicates whether the product prices include tax. |
|
AdditionalTotal |
| Total value of additional charges applied to the order. |
|
AdditionalPrices |
| List of additional charges applied to the order. |
|
LogisticsCode |
| Logistics or shipping code associated with the order. |
|
Config | Configuration details for the order, including currency, language, and tax settings. |
| |
CheckoutUrl |
| URL for the checkout page of the order. | |
ShippingLine
| Field | Type | Description | Example |
|---|---|---|---|
| Id | string | Unique identifier for the shipping line. | "123456" |
| Name | string | Name of the shipping method (required). | "Express Delivery" |
| Desc | string | Description of the shipping method. | "Delivery within 2 days" |
| SupportCod | int | Indicates if Cash on Delivery (COD) is supported (1 for yes, 0 for no). | 1 |
| ShippingPrice | string | Price of the shipping service (required). | "15.00" |
Customer
| Field | Type | Description | Example |
|---|---|---|---|
| UserId | string | Unique identifier for the customer. | "user_001" |
| FirstName | string | First name of the customer. | "John" |
| LastName | string | Last name of the customer. | "Doe" |
string | Email address of the customer. | "[email protected]" | |
| Phone | string | Phone number of the customer. | "+1234567890" |
| CustomerRole | string | Role of the customer (e.g., "buyer", "admin"). | "buyer" |
| Ext | array | Additional custom fields for the customer in a key-value format. |
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
| Field | Type | Example | Description |
|---|---|---|---|
errors | Array | [ "file number error"] | A list of errors encountered during the request processing. |
| Field | Type | Example | Description |
|---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
| Status Code | Message | Possible Reason | Example Response |
|---|---|---|---|
| 400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
| Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
| 422 | Unprocessable Entity | ID is invalid or empty | "Invalid ID" |
| 404 | Not Found | The Id provided is not found | "Order not found" |
| 406 | Not Acceptable | Current order can not finish after-sale. | "After-sales is not included in current order." |
