Zaktualizuj pozycję zamówienia
PUT
/api/v3/Orders/{orderId}/LineItems/{lineItemId}
const url = 'https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Orders/1/LineItems/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":1,"product":{"id":1,"warehouseId":"example","platformId":"example","name":"example","code":"example","ean":"example","bundleId":"example","storage":"example","variantId":"example","imageUrl":"example","parentName":"example","additionalEans":[{"ean":"example","quantity":1,"description":"example"}]},"quantity":1,"quantityPicked":1,"quantityPacked":1,"tax":{"symbol":"example","rate":1},"price":{"currency":"example","unitPrice":1},"elasticFields":[{"fieldName":"example","fieldType":"example","fieldValue":"example","elasticFieldsDefinition":{"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 PUT \ --url https://twoja-instancja-smerp-api.enterprise.sellrocket.pl/api/v3/Orders/1/LineItems/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": 1, "product": { "id": 1, "warehouseId": "example", "platformId": "example", "name": "example", "code": "example", "ean": "example", "bundleId": "example", "storage": "example", "variantId": "example", "imageUrl": "example", "parentName": "example", "additionalEans": [ { "ean": "example", "quantity": 1, "description": "example" } ] }, "quantity": 1, "quantityPicked": 1, "quantityPacked": 1, "tax": { "symbol": "example", "rate": 1 }, "price": { "currency": "example", "unitPrice": 1 }, "elasticFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "elasticFieldsDefinition": { "fieldName": "example", "fieldDisplayName": "example", "fieldType": "example", "predefinedValues": [ "example" ] } } ] }'Odpowiednik setOrderProductFields 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”orderId
wymagane
integer format: int64
lineItemId
wymagane
integer format: int64
Treść żądania
Dział zatytułowany „Treść żądania”Typ treściapplication/json
object
id
integer format: int64
product
object
id
integer format: int64
warehouseId
string
platformId
string
name
string
code
string
ean
string
bundleId
string
storage
string
variantId
string
imageUrl
string
parentName
string
additionalEans
Array<object>
object
ean
string
quantity
number format: double
description
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
Cena brutto
number format: double
elasticFields
Array<object>
object
fieldName
string
fieldType
string
fieldValue
string
elasticFieldsDefinition
object
fieldName
string
fieldDisplayName
string
fieldType
string
predefinedValues
Array<string>
Examplegenerated
{ "id": 1, "product": { "id": 1, "warehouseId": "example", "platformId": "example", "name": "example", "code": "example", "ean": "example", "bundleId": "example", "storage": "example", "variantId": "example", "imageUrl": "example", "parentName": "example", "additionalEans": [ { "ean": "example", "quantity": 1, "description": "example" } ] }, "quantity": 1, "quantityPicked": 1, "quantityPacked": 1, "tax": { "symbol": "example", "rate": 1 }, "price": { "currency": "example", "unitPrice": 1 }, "elasticFields": [ { "fieldName": "example", "fieldType": "example", "fieldValue": "example", "elasticFieldsDefinition": { "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"}
