Utwórz zwrot
POST
/api/v4/returns
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v4/returns';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"platformOrderId":"example","platformReturnId":"example","referenceNumber":"example","smerpConnection":{"id":"example","context":"example"},"returnLineItems":[{"id":"example","name":"example","quantity":1,"price":1,"reason":"example","omsReturnReasonId":1,"clientNote":"example"}],"returnParcels":[{"connectionId":"example","shipmentId":"example","trackingNumber":"example","carrierId":"example","createdAt":"2026-04-15T12:00:00Z","manualShipment":true}],"setOrderAsReturnedOnly":true,"externalPackage":true,"buyerComment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v4/returns \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "platformOrderId": "example", "platformReturnId": "example", "referenceNumber": "example", "smerpConnection": { "id": "example", "context": "example" }, "returnLineItems": [ { "id": "example", "name": "example", "quantity": 1, "price": 1, "reason": "example", "omsReturnReasonId": 1, "clientNote": "example" } ], "returnParcels": [ { "connectionId": "example", "shipmentId": "example", "trackingNumber": "example", "carrierId": "example", "createdAt": "2026-04-15T12:00:00Z", "manualShipment": true } ], "setOrderAsReturnedOnly": true, "externalPackage": true, "buyerComment": "example" }'Odpowiednik addOrderReturn w BaseLinker. Operacja asynchroniczna – zwraca zadanie (job), którego wynik sprawdzisz w Zadaniach asynchronicznych.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
platformOrderId
string
platformReturnId
string
referenceNumber
string
smerpConnection
object
id
string
context
string
returnLineItems
Array<object>
object
id
string
name
string
quantity
integer format: int32
price
number format: double
reason
string
omsReturnReasonId
integer format: int64
clientNote
string
returnParcels
Array<object>
object
connectionId
string
shipmentId
string
trackingNumber
string
carrierId
string
createdAt
string format: date-time
manualShipment
boolean
setOrderAsReturnedOnly
boolean
externalPackage
boolean
buyerComment
string
Examplegenerated
{ "platformOrderId": "example", "platformReturnId": "example", "referenceNumber": "example", "smerpConnection": { "id": "example", "context": "example" }, "returnLineItems": [ { "id": "example", "name": "example", "quantity": 1, "price": 1, "reason": "example", "omsReturnReasonId": 1, "clientNote": "example" } ], "returnParcels": [ { "connectionId": "example", "shipmentId": "example", "trackingNumber": "example", "carrierId": "example", "createdAt": "2026-04-15T12:00:00Z", "manualShipment": true } ], "setOrderAsReturnedOnly": true, "externalPackage": true, "buyerComment": "example"}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
Typ treściapplication/json
object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
result
status
string
command
string
scope
string
scopeValue
string
silentMode
boolean
ajsChainId
string
ajsChainVisits
string
Example
{ "status": "New"}
