Pobierz ostatnie zmiany stanów
POST
/api/history/v3/stocks/latest
const url = 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/history/v3/stocks/latest';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '[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/history/v3/stocks/latest \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '[ 1 ]'Zwraca najnowsze wpisy historii stanów magazynowych dla przekazanych produktów. To operacja odczytu.
Autoryzacja
Dział zatytułowany „Autoryzacja”Treść żądania
Dział zatytułowany „Treść żądania”Array<integer>
Examplegenerated
[ 1]Array<integer>
Examplegenerated
[ 1]Array<integer>
Examplegenerated
[ 1]Odpowiedzi
Dział zatytułowany „Odpowiedzi”Success
object
stocks
Array<object>
object
historyId
integer format: int64
productId
integer format: int64
quantity
integer format: int32
previousQuantity
integer format: int32
warehouseId
integer format: int64
locationName
string
updatedAt
string format: date-time
actor
string
prices
Array<object>
object
priceGroupId
integer format: int64
price
number format: double
vat
number format: double
object
stocks
Array<object>
object
historyId
integer format: int64
productId
integer format: int64
quantity
integer format: int32
previousQuantity
integer format: int32
warehouseId
integer format: int64
locationName
string
updatedAt
string format: date-time
actor
string
prices
Array<object>
object
priceGroupId
integer format: int64
price
number format: double
vat
number format: double
Examplegenerated
{ "stocks": [ { "historyId": 1, "productId": 1, "quantity": 1, "previousQuantity": 1, "warehouseId": 1, "locationName": "example", "updatedAt": "2026-04-15T12:00:00Z", "actor": "example", "prices": [ { "priceGroupId": 1, "price": 1, "vat": 1 } ] } ]}object
stocks
Array<object>
object
historyId
integer format: int64
productId
integer format: int64
quantity
integer format: int32
previousQuantity
integer format: int32
warehouseId
integer format: int64
locationName
string
updatedAt
string format: date-time
actor
string
prices
Array<object>
object
priceGroupId
integer format: int64
price
number format: double
vat
number format: double
Examplegenerated
{ "stocks": [ { "historyId": 1, "productId": 1, "quantity": 1, "previousQuantity": 1, "warehouseId": 1, "locationName": "example", "updatedAt": "2026-04-15T12:00:00Z", "actor": "example", "prices": [ { "priceGroupId": 1, "price": 1, "vat": 1 } ] } ]}
