Returns
Active reason codes for this client. Every line on a new RMA requires one of these ids, either on the line or as the RMA-level default.
Authorization
oauth2 returns:readOAuth2 client-credentials grant.
In: header
Scope: returns:read
Path Parameters
Client id
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/clients/string/return-codes"{ "success": true, "data": [ { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE", "clientId": "string", "isActive": true, "internalUseOnly": true, "requireCallStore": true } ]}Authorization
oauth2 returns:readOAuth2 client-credentials grant.
In: header
Scope: returns:read
Query Parameters
0 < value10 < value <= 50020length <= 50"asc"Value in
- "asc"
- "desc"
Value in
- "CUSTOMER"
- "RTS"
- "BLIND"
Value in
- "true"
- "false"
Header Parameters
Scope results to one client (brand). Resolve a client name to its id via GET /api/clients/lookup. Validated against the credential's tenant; ignored by a client-pinned credential.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/returns"{ "success": true, "data": [ { "id": "string", "clientId": "string", "clientName": "string", "clientCode": "string", "warehouseId": "string", "warehouseName": "string", "orderId": "string", "orderNumber": "string", "rmaNumber": "string", "externalReturnId": "string", "externalSource": "SHOPIFY", "type": "CUSTOMER", "outboundShipmentId": "string", "outboundShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "status": "LABEL_CREATED" }, "status": "PENDING", "settlement": "RESEND_AS_IS", "currency": "string", "presentmentCurrency": "string", "reasonCode": { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE" }, "reasonNote": "string", "customerName": "string", "customerEmail": "string", "customerPhone": "string", "returnFromAddress": { "name": "string", "company": "string", "line1": "string", "line2": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "phone": "string" }, "labelType": "STORE_PAID", "trackingNumber": "string", "carrierService": "string", "returnShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "labelUrl": "string", "labelData": "string", "labelFormat": "string" }, "refundStatus": "NOT_REQUESTED", "refundAmount": "string", "refundIssuedAt": "2019-08-24T14:15:22Z", "refundIssuedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "notes": "string", "createdBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "receivedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "completedAt": "2019-08-24T14:15:22Z", "lineCount": 0, "totalExpected": 0, "totalReceived": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" } ], "pagination": { "page": 0, "limit": 0, "total": 0, "totalPages": 0 }}Tenant-wide credentials only. A credential pinned to one client is refused (403), as that client's portal users are; use a tenant-wide credential with X-Client-Id. Opens an RMA against one of the client's orders. Each line names the order line and the quantity expected back; type defaults to CUSTOMER. The client comes from the x-client-id header.
Authorization
oauth2 returns:writeOAuth2 client-credentials grant.
In: header
Scope: returns:write
Header Parameters
Optional client-supplied key that makes this write safe to retry. A replay of a completed key returns the original response; an in-flight duplicate gets 409. A key is bound to the operation — method, URL and request body — and to the caller — the credential and its token scopes; reusing it with any of those changed gets 422.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/returns" \ -H "Content-Type: application/json" \ -d '{ "lines": [ { "skuId": "string", "expectedQuantity": 1 } ] }'{ "success": true, "data": { "id": "string", "clientId": "string", "clientName": "string", "clientCode": "string", "warehouseId": "string", "warehouseName": "string", "orderId": "string", "orderNumber": "string", "rmaNumber": "string", "externalReturnId": "string", "externalSource": "SHOPIFY", "type": "CUSTOMER", "outboundShipmentId": "string", "outboundShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "status": "LABEL_CREATED" }, "status": "PENDING", "settlement": "RESEND_AS_IS", "currency": "string", "presentmentCurrency": "string", "reasonCode": { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE" }, "reasonNote": "string", "customerName": "string", "customerEmail": "string", "customerPhone": "string", "returnFromAddress": { "name": "string", "company": "string", "line1": "string", "line2": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "phone": "string" }, "labelType": "STORE_PAID", "trackingNumber": "string", "carrierService": "string", "returnShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "labelUrl": "string", "labelData": "string", "labelFormat": "string" }, "refundStatus": "NOT_REQUESTED", "refundAmount": "string", "refundIssuedAt": "2019-08-24T14:15:22Z", "refundIssuedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "notes": "string", "createdBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "receivedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "completedAt": "2019-08-24T14:15:22Z", "lineCount": 0, "totalExpected": 0, "totalReceived": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lines": [ { "id": "string", "returnId": "string", "orderLineId": "string", "skuId": "string", "skuCode": "string", "skuName": "string", "skuDescription": "string", "skuBarcode": "string", "skuImageUrl": "string", "skuNonPhysical": true, "lotTracked": true, "storageRequirementIds": [ "string" ], "shippedLotIds": [ "string" ], "shippedLots": [ { "id": "string", "lotNumber": "string", "expiresAt": "2019-08-24T14:15:22Z" } ], "suggestedBins": [ { "binId": "string", "binLabel": "string", "zoneName": "string", "isPickable": true, "source": "PICKED_FROM", "lastHeldAt": "2019-08-24T14:15:22Z" } ], "unitPrice": 0, "expectedQuantity": 0, "receivedQuantity": 0, "status": "PENDING", "reasonCodeId": "string", "reasonCode": { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE" }, "reasonNote": "string", "refundType": "REFUND", "isUnexpected": true, "notes": "string", "receipts": [ { "id": "string", "quantity": 0, "inspectionResult": "UNDAMAGED", "disposition": "RESTOCK", "bin": { "id": "string", "label": "string" }, "lot": { "id": "string", "lotNumber": "string" }, "performedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "autoReceived": true, "notes": "string", "createdAt": "2019-08-24T14:15:22Z" } ] } ] }}Authorization
oauth2 returns:readOAuth2 client-credentials grant.
In: header
Scope: returns:read
Path Parameters
Return id
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/returns/string"{ "success": true, "data": { "id": "string", "clientId": "string", "clientName": "string", "clientCode": "string", "warehouseId": "string", "warehouseName": "string", "orderId": "string", "orderNumber": "string", "rmaNumber": "string", "externalReturnId": "string", "externalSource": "SHOPIFY", "type": "CUSTOMER", "outboundShipmentId": "string", "outboundShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "status": "LABEL_CREATED" }, "status": "PENDING", "settlement": "RESEND_AS_IS", "currency": "string", "presentmentCurrency": "string", "reasonCode": { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE" }, "reasonNote": "string", "customerName": "string", "customerEmail": "string", "customerPhone": "string", "returnFromAddress": { "name": "string", "company": "string", "line1": "string", "line2": "string", "city": "string", "state": "string", "zip": "string", "country": "string", "phone": "string" }, "labelType": "STORE_PAID", "trackingNumber": "string", "carrierService": "string", "returnShipment": { "id": "string", "trackingNumber": "string", "carrierService": "string", "labelUrl": "string", "labelData": "string", "labelFormat": "string" }, "refundStatus": "NOT_REQUESTED", "refundAmount": "string", "refundIssuedAt": "2019-08-24T14:15:22Z", "refundIssuedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "notes": "string", "createdBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "receivedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "completedAt": "2019-08-24T14:15:22Z", "lineCount": 0, "totalExpected": 0, "totalReceived": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lines": [ { "id": "string", "returnId": "string", "orderLineId": "string", "skuId": "string", "skuCode": "string", "skuName": "string", "skuDescription": "string", "skuBarcode": "string", "skuImageUrl": "string", "skuNonPhysical": true, "lotTracked": true, "storageRequirementIds": [ "string" ], "shippedLotIds": [ "string" ], "shippedLots": [ { "id": "string", "lotNumber": "string", "expiresAt": "2019-08-24T14:15:22Z" } ], "suggestedBins": [ { "binId": "string", "binLabel": "string", "zoneName": "string", "isPickable": true, "source": "PICKED_FROM", "lastHeldAt": "2019-08-24T14:15:22Z" } ], "unitPrice": 0, "expectedQuantity": 0, "receivedQuantity": 0, "status": "PENDING", "reasonCodeId": "string", "reasonCode": { "id": "string", "code": "string", "description": "string", "labelPolicy": "NOT_RETURNABLE" }, "reasonNote": "string", "refundType": "REFUND", "isUnexpected": true, "notes": "string", "receipts": [ { "id": "string", "quantity": 0, "inspectionResult": "UNDAMAGED", "disposition": "RESTOCK", "bin": { "id": "string", "label": "string" }, "lot": { "id": "string", "lotNumber": "string" }, "performedBy": { "id": "string", "firstName": "string", "lastName": "string", "email": "string" }, "autoReceived": true, "notes": "string", "createdAt": "2019-08-24T14:15:22Z" } ] } ], "inspectionBins": [ { "binId": "string", "binLabel": "string", "zoneName": "string" } ], "brandAreaBins": [ { "binId": "string", "binLabel": "string", "zoneName": "string" } ], "outboundSync": { "status": "PENDING", "attempts": 0, "lastError": "string", "lastAttemptAt": "2019-08-24T14:15:22Z", "nextRunAt": "2019-08-24T14:15:22Z" } }}