Pobierz historię stanów produktu
GET
/api/history/v3/stocks
const url = 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/history/v3/stocks?gtId=1&limit=100';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://twoja-instancja-pim-api.enterprise.sellrocket.pl/api/history/v3/stocks?gtId=1&limit=100' \ --header 'Authorization: Bearer <token>'Zwraca historię zmian stanów magazynowych wskazanego produktu.
Autoryzacja
Dział zatytułowany „Autoryzacja”Parametry
Dział zatytułowany „Parametry”Parametry zapytania
Dział zatytułowany „Parametry zapytania”gtId
wymagane
integer format: int64
limit
integer format: int32
Min value: 0, Max value: 100
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 } ] } ]}
