Zaktualizuj zwrot
PUT
/api/v4/returns/{id}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v4/returns/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"payments":{"paymentName":"example","payments":[{"platformId":"example","platformName":"example","finishedAtUtc":"2026-04-15T12:00:00Z","paymentAmount":{"currency":"example","amount":1}}]},"delivery":{"recipient":{"username":"example","firstName":"example","lastName":"example","companyName":"example","phone":"example","address":{"apartmentNo":"example","houseNo":"example","street":"example","city":"example","postCode":"example","state":"example","countryCode":"example"}},"cost":{"currency":"example","amount":1}},"summary":{"totalToPay":{"currency":"example","amount":1}},"buyer":{"email":"example","username":"example","phone":"example"},"returnStatusId":1,"additionalField1":"example","additionalField2":"example","packStationId":1,"orderReturnAccountNumber":"example","orderReturnIBan":"example","orderReturnSwitft":"example","sellerComments":["example"],"fulfillmentStatus":1,"orderId":1,"lineItems":[{"id":1,"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","additionalFields":[{"fieldName":"example","fieldType":"example","fieldValue":"example","additionalFieldDefinition":{"fieldName":"example","fieldDisplayName":"example","fieldType":"example","predefinedValues":["example"]}}],"miniatures":{"originalImageUrl":"example","selector":"example","entityId":"example"},"clientNote":"example"}],"elasticFields":[{"fieldName":"example","fieldType":"example","fieldValue":"example","definition":{"fieldName":"example","fieldDisplayName":"example","fieldType":"example","predefinedValues":["example"]}}],"referenceNumber":"example","externalPackage":true,"buyerComment":"example","userName":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v4/returns/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "payments": { "paymentName": "example", "payments": [ { "platformId": "example", "platformName": "example", "finishedAtUtc": "2026-04-15T12:00:00Z", "paymentAmount": { "currency": "example", "amount": 1 } } ] }, "delivery": { "recipient": { "username": "example", "firstName": "example", "lastName": "example", "companyName": "example", "phone": "example", "address": { "apartmentNo": "example", "houseNo": "example", "street": "example", "city": "example", "postCode": "example", "state": "example", "countryCode": "example" } }, "cost": { "currency": "example", "amount": 1 } }, "summary": { "totalToPay": { "currency": "example", "amount": 1 } }, "buyer": { "email": "example", "username": "example", "phone": "example" }, "returnStatusId": 1, "additionalField1": "example", "additionalField2": "example", "packStationId": 1, "orderReturnAccountNumber": "example", "orderReturnIBan": "example", "orderReturnSwitft": "example", "sellerComments": [ "example" ], "fulfillmentStatus": 1, "orderId": 1, "lineItems": [ { "id": 1, "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", "additionalFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ], "miniatures": { "originalImageUrl": "example", "selector": "example", "entityId": "example" }, "clientNote": "example" } ], "elasticFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "definition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ], "referenceNumber": "example", "externalPackage": true, "buyerComment": "example", "userName": "example" }'Odpowiednik setOrderReturnFields 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”id
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
payments
object
paymentName
string
payments
Array<object>
object
platformId
string
platformName
string
finishedAtUtc
string format: date-time
paymentAmount
object
currency
string
amount
number format: double
delivery
object
recipient
object
username
string
firstName
string
lastName
string
companyName
string
phone
string
address
object
apartmentNo
string
houseNo
string
street
string
city
string
postCode
string
state
string
countryCode
string
cost
object
currency
string
amount
number format: double
summary
object
totalToPay
object
currency
string
amount
number format: double
buyer
object
email
string
username
string
phone
string
returnStatusId
integer format: int64
additionalField1
string
additionalField2
string
packStationId
integer format: int64
orderReturnAccountNumber
string
orderReturnIBan
string
orderReturnSwitft
string
sellerComments
Array<string>
fulfillmentStatus
integer format: int64
orderId
integer format: int64
lineItems
Array<object>
object
id
integer format: int64
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
additionalFields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
additionalFieldDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
miniatures
object
originalImageUrl
string
selector
string
entityId
string
clientNote
string
elasticFields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
definition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
referenceNumber
string
externalPackage
boolean
buyerComment
string
userName
string
Examplegenerated
{ "payments": { "paymentName": "example", "payments": [ { "platformId": "example", "platformName": "example", "finishedAtUtc": "2026-04-15T12:00:00Z", "paymentAmount": { "currency": "example", "amount": 1 } } ] }, "delivery": { "recipient": { "username": "example", "firstName": "example", "lastName": "example", "companyName": "example", "phone": "example", "address": { "apartmentNo": "example", "houseNo": "example", "street": "example", "city": "example", "postCode": "example", "state": "example", "countryCode": "example" } }, "cost": { "currency": "example", "amount": 1 } }, "summary": { "totalToPay": { "currency": "example", "amount": 1 } }, "buyer": { "email": "example", "username": "example", "phone": "example" }, "returnStatusId": 1, "additionalField1": "example", "additionalField2": "example", "packStationId": 1, "orderReturnAccountNumber": "example", "orderReturnIBan": "example", "orderReturnSwitft": "example", "sellerComments": [ "example" ], "fulfillmentStatus": 1, "orderId": 1, "lineItems": [ { "id": 1, "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", "additionalFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "additionalFieldDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ], "miniatures": { "originalImageUrl": "example", "selector": "example", "entityId": "example" }, "clientNote": "example" } ], "elasticFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "definition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ], "referenceNumber": "example", "externalPackage": true, "buyerComment": "example", "userName": "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"}
