Download OpenAPI specification:Download
API for managing customer and agent order returns.
Creates a new OrderReturn for the merchant in preinfo_received status. The supplied skeleton may be empty; line items, original-order references, and merchant remarks may be provided.
| x-logitrail-merchant-id required | string non-empty Logitrail's Merchant ID. |
required | object | ||||||||||||||||
| |||||||||||||||||
{- "order_return": {
- "name": null,
- "type": "customer_return",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "items": [
- {
- "product": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "quantity": 2,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "services": [ ]
}
], - "services": [ ]
}
}{- "order_return": {
- "id": "64b8f0c2e1b2c3d4e5f67890",
- "name": null,
- "type": "customer_return",
- "status": "pending",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": null,
- "items": [
- {
- "product": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "quantity": 2,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "services": [ ]
}
], - "inbound_shipment": null,
- "merchant_decision": null,
- "services": [ ]
}
}Returns a paginated list of the merchant order returns, newest first. Filters AND-merge; status accepts multiple values, and q searches the name, merchant reference and (for a 24-hex phrase) the return id. List items use a lean projection that omits the items and services collections carried by the detail endpoint.
| status | Array of strings non-empty Items Enum: "pending" "accepted" "resend_pending" "restocking_pending" "processing" "processed" "deleted" "preinfo_received" "pending_merchant_decision" Example: status=pending,processing Filter by status. Accepts a single value or a comma-separated / repeated list; results match any of the supplied statuses. |
| type | string Enum: "agent_return" "customer_return" Example: type=customer_return Filter by return type. |
| q | string >= 2 characters Free-form search phrase (minimum 2 characters). Matches a case-insensitive substring of the name or merchant reference; a 24-hex phrase additionally matches the return id. |
| original_order_id | string^[a-f0-9]{24}$ Example: original_order_id=64b8f0c2e1b2c3d4e5f67890 Restrict results to returns linked to this original order id (Logitrail ObjectId, 24 hex chars). |
| offset | integer [ 0 .. 9007199254740991 ] Default: 0 Pagination offset. Defaults to 0. |
| limit | integer [ 1 .. 500 ] Default: 100 Maximum number of returns to return. Defaults to 100, capped at 500. |
| x-logitrail-merchant-id required | string non-empty Logitrail's Merchant ID. |
{- "order_returns": [
- {
- "id": "64b8f0c2e1b2c3d4e5f67890",
- "name": null,
- "type": "customer_return",
- "status": "pending",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": null,
- "inbound_shipment": null,
- "merchant_decision": null
}
], - "total": 9007199254740991
}Returns the full DTO of a single OrderReturn.
| x-logitrail-merchant-id required | string non-empty Logitrail's Merchant ID. |
{- "order_return": {
- "id": "64b8f0c2e1b2c3d4e5f67890",
- "name": null,
- "type": "customer_return",
- "status": "pending",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": null,
- "items": [
- {
- "product": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "quantity": 2,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "services": [ ]
}
], - "inbound_shipment": null,
- "merchant_decision": null,
- "services": [ ]
}
}Cancels (soft-deletes) an OrderReturn early in its lifecycle, transitioning it to deleted. When the return has an inbound shipment linked, the inbound is cancelled in the same call; if the inbound is already being processed at the warehouse, the cancel is rejected with 409 and the return is left untouched. Only returns in pending / preinfo_received may be cancelled.
| x-logitrail-merchant-id required | string non-empty Logitrail's Merchant ID. |
{- "order_return": {
- "id": "64b8f0c2e1b2c3d4e5f67890",
- "name": null,
- "type": "customer_return",
- "status": "pending",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": null,
- "items": [
- {
- "product": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "quantity": 2,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "services": [ ]
}
], - "inbound_shipment": null,
- "merchant_decision": null,
- "services": [ ]
}
}Sets the merchant's decision on how an order return should be handled when it arrives at the warehouse. When the decision is to_shelf and the return has no inbound shipment linked yet, a matching inbound shipment is auto-created from the return's items and back-linked atomically.
| x-logitrail-merchant-id required | string non-empty Logitrail's Merchant ID. |
required | object The merchant's decision on how to handle the return. | ||
| |||
{- "merchant_decision": {
- "code": "to_shelf"
}
}{- "order_return": {
- "id": "64b8f0c2e1b2c3d4e5f67890",
- "name": null,
- "type": "customer_return",
- "status": "pending",
- "remarks": null,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "merchant_reference": null,
- "handling_instructions": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": null,
- "items": [
- {
- "product": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "quantity": 2,
- "original_order": {
- "id": "64b8f0c2e1b2c3d4e5f67890"
}, - "services": [ ]
}
], - "inbound_shipment": null,
- "merchant_decision": null,
- "services": [ ]
}
}