API Reference
Comprehensive guide to the Omnium Returns API. Learn how to create returns, process exchanges, create replacement orders, and manage return workflows programmatically.
The Returns API enables programmatic management of the entire return lifecycle in Omnium. This includes creating returns from orders, processing exchanges, generating replacement orders, and managing return workflows.
Overview
Authentication
All Return API endpoints require authentication via API key. Include the API key in the request header:
Endpoints are divided by permission level:
- Read operations: Require
OrderReadGroupsaccess - Write operations: Require
OrderAdminGroupsaccess
Base URL
For test environments:
Create Return
Creates a return for line items from an existing order. Optionally creates an exchange order in the same transaction.
When to Use
- Customer wants to return purchased items for refund
- Customer wants to exchange items for different products
- Processing in-store returns
- Automated return processing from external systems
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| orderId | string | Yes | Order ID or order number to create return from |
Request Body
Request Properties
| Property | Type | Description |
|---|---|---|
| returns | array | Items being returned (required) |
| returns[].lineItemId | string | ID of the order line item to return |
| returns[].returnQuantity | decimal | Quantity being returned |
| returns[].returnReason | string | Free-text reason for return |
| returns[].returnType | string | Return type ID from configuration |
| returns[].isStockUpdated | boolean | Whether to add items back to inventory |
| returns[].creditAmount | decimal | Per-item credit amount (null = full refund) |
| storeId | string | Warehouse receiving the return |
| comment | string | Return description/notes |
| creditPayment | boolean | Whether to credit the payment |
| creditShipment | boolean | Whether to refund shipping costs |
| creditShipmentAmount | decimal | Custom shipping refund amount |
| chargeShipmentCost | boolean | Charge customer for return shipping |
| chargeShipmentCostAmount | decimal | Return shipping cost (0 = use market default) |
| rmaNumber | string | Return Merchandise Authorization number |
| handlingTotal | decimal | Handling fees to deduct from refund |
| status | string | Initial return status |
| returnType | string | Overall return type classification |
| properties | array | Custom key-value properties |
Response
Creating an Exchange Order
To create an exchange in the same request, include the omniumExchangeOrderOptions property:
Exchange Order Properties
| Property | Type | Description |
|---|---|---|
| exchangeOrderId | string | Custom ID for exchange order (auto-generated if omitted) |
| exchangeOrderLines | array | Items customer is receiving in exchange |
| additionalPayments | array | Payments if exchange costs more than return |
| orderType | string | Order type for exchange order |
| orderStatus | string | Initial status for exchange order |
| shippingMethodName | string | Shipping method (e.g., "PickUpInStore") |
Price Difference Handling
When exchange items cost more than returned items:
Update Return Status
Updates the status of a return and executes the associated workflow steps.
When to Use
- Moving return through processing stages
- Triggering workflow actions (refund, inventory update, notifications)
- Completing or cancelling returns
Request Body
Request Properties
| Property | Type | Description |
|---|---|---|
| status | string | New status (required). Values: New, InProgress, InTransit, ReadyForPickup, Completed, OrderCanceled, PartiallyShipped |
| returnId | string | Return ID to update (required) |
| userId | string | User performing the update |
| skipRunWorkflow | boolean | If true, updates status without running workflow steps |
| shipmentInfo | object | Shipment tracking information to update |
Shipment Info Properties
Response
Returns workflow execution results:
Workflow Status Meanings
| Status | Typical Workflow Actions |
|---|---|
| New | EnsureRma, Notification, UpdateOrderStatus |
| InProgress | - |
| InTransit | CreateReturnShipmentBooking |
| ReadyForPickup | - |
| Completed | UpdateInventory, CreditReturn, ExportOrder |
| OrderCanceled | CancelReturn |
Search Returns
Search and filter return orders with pagination.
Request Body
Search Properties
| Property | Type | Description |
|---|---|---|
| id | string | Return ID (exact match) |
| orderNumber | string | Original order number |
| rmaNumber | string | RMA number |
| customerId | string | Customer ID |
| projectId | string | Associated project/claim ID |
| string | Customer email | |
| phone | string | Customer phone |
| customerName | string | Customer name |
| searchText | string | Free-text search across multiple fields |
| selectedStores | array | Filter by return store IDs |
| createdFrom | datetime | Returns created after this date |
| createdTo | datetime | Returns created before this date |
| modifiedFrom | datetime | Returns modified after this date |
| modifiedTo | datetime | Returns modified before this date |
| take | integer | Results per page (default: 20) |
| page | integer | Page number (default: 1) |
Response
Patch Return
Partially update a return. Only properties included in the request are modified.
When to Use
- Updating return metadata (RMA, comment, type)
- Modifying line items on an existing return
- Adding external IDs for integrations
- Adjusting credit amounts
Request Body
Patch Properties
| Property | Type | Description |
|---|---|---|
| rmaNumber | string | Update RMA number |
| returnComment | string | Update return comment |
| returnType | string | Update return type |
| status | string | Update status |
| storeId | string | Update receiving store |
| creditAmount | decimal | Update credit amount |
| creditPayment | boolean | Update credit flag |
| externalIds | array | Add/update external system IDs |
| lineItems | array | Update line items |
| shipments | array | Update shipment information |
| shouldAddMissingLineItems | boolean | Add items not in existing return |
| replaceLineItemsArray | boolean | Replace all line items (not merge) |
Response
Create Replacement Order
Creates a replacement order for items from an existing order. The customer receives new items without additional payment.
When to Use
- Item arrived damaged
- Wrong item was shipped
- Item defective/faulty
- Lost shipment replacement
Request Body
Request Properties
| Property | Type | Description |
|---|---|---|
| orderId | string | Original order ID (required) |
| orderLineReplacements | array | Items to replace (required) |
| orderLineReplacements[].lineItemId | string | Order line to replace |
| orderLineReplacements[].quantity | integer | Quantity to replace |
| orderLineReplacements[].replacementType | string | Type of replacement |
| orderLineReplacements[].replacementReason | string | Reason for replacement |
| orderLineReplacements[].skuId | string | Different SKU to send (optional) |
| comment | string | Comment added to replacement order |
| amountToCredit | decimal | Partial credit amount on original order |
Replace with Different Product
To ship a different product:
Response
Returns a list of return order forms created:
Get Claim Types
Retrieves available claim/project types for returns.
When to Use
- Populating claim type dropdown in UI
- Validating claim types before creating return with claim
Response
Common Scenarios
Scenario 1: Simple Refund Return
Customer returns items for full refund:
Then complete the return:
Scenario 2: Exchange - Same Price
Customer exchanges medium for large (same price):
Scenario 3: Exchange with Price Difference
Customer exchanges for more expensive item:
Scenario 4: Partial Credit
Customer returns item but only receives partial credit (restocking fee):
Scenario 5: Defective Item Replacement
Item defective, send replacement without affecting inventory:
Error Handling
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid input data |
| 404 | Not Found - Order or return not found |
| 500 | Server Error - Processing failed |
Error Response Format
Common Errors
| Error | Cause | Solution |
|---|---|---|
| "Order not found" | Invalid orderId | Verify order exists and ID is correct |
| "Return quantity exceeds available" | Trying to return more than ordered | Check remaining returnable quantity |
| "Return type not configured" | Invalid returnType | Use configured return type from settings |
| "Cannot credit - no captured payment" | No payment to refund | Verify order has captured payments |
| "DefaultReturnOrderType not configured" | Missing tenant setting | Configure DefaultReturnOrderType in settings |
Integration Best Practices
1. Always Check Returnable Quantities
Before creating a return, verify the line item has sufficient quantity available for return:
- Original quantity minus already returned quantity equals returnable quantity
2. Use Appropriate Return Types
Configure return types that match your business processes:
- StandardReturn: Normal customer returns with restocking fee
- DefectiveItem: Product defects (no fee, don't restock)
- WrongItem: Warehouse error (no fee, restock)
- Exchange: Customer wants different item
3. Handle Workflow Results
Always check the workflow execution results when updating status:
If isAborted is true, some workflow step failed. Check individual step results for details.
4. Use External IDs for Tracking
Add external IDs to link returns with your systems:
5. Configure Webhooks for Real-Time Updates
Set up webhooks to receive notifications when returns change status, rather than polling the search API.
