Dodaj pozycję do zwrotu
POST
/api/v3/returns/{returnId}/lineItems
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/returns/1/lineItems';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"returnsReasonId":1,"returnsPositionStatusId":1,"platformId":"example","product":{"id":1,"warehouseId":"example","platformId":"example","name":"example","code":"example","ean":"example","bundleId":"example","storage":"example","imageUrl":"example","parentName":"example","location":"example","variantId":"example"},"quantity":1,"quantityPicked":1,"quantityPacked":1,"tax":{"symbol":"example","rate":1},"price":{"currency":"example","unitPrice":1},"originalCreatedAt":"2026-04-15T12:00:00Z","miniatures":{"originalImageUrl":"example","selector":"example","entityId":"example"},"clientNote":"example","additionalFields":[{"fieldName":"example","fieldType":"example","fieldValue":"example","additionalFieldDefinition":{"fieldName":"example","fieldDisplayName":"example","fieldType":"example","predefinedValues":["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/v3/returns/1/lineItems \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "returnsReasonId": 1, "returnsPositionStatusId": 1, "platformId": "example", "product": { "id": 1, "warehouseId": "example", "platformId": "example", "name": "example", "code": "example", "ean": "example", "bundleId": "example", "storage": "example", "imageUrl": "example", "parentName": "example", "location": "example", "variantId": "example" }, "quantity": 1, "quantityPicked": 1, "quantityPacked": 1, "tax": { "symbol": "example", "rate": 1 }, "price": { "currency": "example", "unitPrice": 1 }, "originalCreatedAt": "2026-04-15T12:00:00Z", "miniatures": { "originalImageUrl": "example", "selector": "example", "entityId": "example" }, "clientNote": "example", "additionalFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] }'Odpowiednik addOrderReturnProduct w BaseLinker. Operacja asynchroniczna – zwraca zadanie (job), którego wynik sprawdzisz w Zadaniach asynchronicznych.
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry ścieżki
Dział zatytułowany „Parametry ścieżki”returnId
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
returnsReasonId
integer format: int64
returnsPositionStatusId
integer format: int32
platformId
string
product
object
id
integer format: int64
warehouseId
string
platformId
string
name
string
code
string
ean
string
bundleId
string
storage
string
imageUrl
string
parentName
string
location
string
variantId
string
quantity
number format: double
quantityPicked
number format: double
quantityPacked
number format: double
tax
object
symbol
string
rate
number format: double
price
object
currency
string
unitPrice
number format: double
originalCreatedAt
string format: date-time
miniatures
object
originalImageUrl
string
selector
string
entityId
string
clientNote
string
additionalFields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
additionalFieldDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
Examplegenerated
{ "returnsReasonId": 1, "returnsPositionStatusId": 1, "platformId": "example", "product": { "id": 1, "warehouseId": "example", "platformId": "example", "name": "example", "code": "example", "ean": "example", "bundleId": "example", "storage": "example", "imageUrl": "example", "parentName": "example", "location": "example", "variantId": "example" }, "quantity": 1, "quantityPicked": 1, "quantityPacked": 1, "tax": { "symbol": "example", "rate": 1 }, "price": { "currency": "example", "unitPrice": 1 }, "originalCreatedAt": "2026-04-15T12:00:00Z", "miniatures": { "originalImageUrl": "example", "selector": "example", "entityId": "example" }, "clientNote": "example", "additionalFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "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"}
