Przejdź do głównej zawartości

Utwórz zwrot

POST
/api/v4/returns
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.

Typ treściapplication/json
object
platformOrderId
string
nullable
platformReturnId
string
nullable
referenceNumber
string
nullable
smerpConnection
object
id
string
nullable
context
string
nullable
returnLineItems
Array<object>
nullable
object
id
string
nullable
name
string
nullable
quantity
integer format: int32
price
number format: double
reason
string
nullable
omsReturnReasonId
integer format: int64
nullable
clientNote
string
nullable
returnParcels
Array<object>
nullable
object
connectionId
string
nullable
shipmentId
string
nullable
trackingNumber
string
nullable
carrierId
string
nullable
createdAt
string format: date-time
manualShipment
boolean
setOrderAsReturnedOnly
boolean
externalPackage
boolean
buyerComment
string
nullable <= 1024 characters
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"
}

Success

Typ treściapplication/json
object
id
integer format: int64
createdAt
string format: date-time
updatedAt
string format: date-time
payload
nullable
result
nullable
status
string
Dozwolone wartości: New InProgress Completed Failed
command
string
nullable
scope
string
nullable
scopeValue
string
nullable
silentMode
boolean
ajsChainId
string
nullable
ajsChainVisits
string
nullable
Example
{
"status": "New"
}