Sprawdź, czy produkty zmieszczą się w opakowaniu
POST
/api/packing/v2/fit
const url = 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/packing/v2/fit';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"containerId":1,"products":[{"productId":1,"quantity":1}]}'};
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-pim-api.enterprise.sellrocket.pl/api/packing/v2/fit \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "containerId": 1, "products": [ { "productId": 1, "quantity": 1 } ] }'Weryfikuje na podstawie wymiarów, czy podany zestaw produktów zmieści się w opakowaniu.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”object
containerId
integer format: int64
products
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
Examplegenerated
{ "containerId": 1, "products": [ { "productId": 1, "quantity": 1 } ]}object
containerId
integer format: int64
products
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
Examplegenerated
{ "containerId": 1, "products": [ { "productId": 1, "quantity": 1 } ]}object
containerId
integer format: int64
products
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
Examplegenerated
{ "containerId": 1, "products": [ { "productId": 1, "quantity": 1 } ]}Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
object
isFit
boolean
containerId
integer format: int64
fitProducts
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
coordX
number format: double
coordY
number format: double
coordZ
number format: double
dim1
number format: double
dim2
number format: double
dim3
number format: double
object
isFit
boolean
containerId
integer format: int64
fitProducts
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
coordX
number format: double
coordY
number format: double
coordZ
number format: double
dim1
number format: double
dim2
number format: double
dim3
number format: double
Examplegenerated
{ "isFit": true, "fitProducts": [ { "productId": 1, "quantity": 1, "coordX": 1, "coordY": 1, "coordZ": 1, "dim1": 1, "dim2": 1, "dim3": 1 } ]}object
isFit
boolean
containerId
integer format: int64
fitProducts
Array<object>
object
productId
integer format: int64
quantity
integer format: int32
coordX
number format: double
coordY
number format: double
coordZ
number format: double
dim1
number format: double
dim2
number format: double
dim3
number format: double
Examplegenerated
{ "isFit": true, "fitProducts": [ { "productId": 1, "quantity": 1, "coordX": 1, "coordY": 1, "coordZ": 1, "dim1": 1, "dim2": 1, "dim3": 1 } ]}
