# Stock movements It returns the list of changes in product quantity, which were done within one stock. Supports the Paging . This endpoint supports optional parts using the parameter (see Section on demand). Please note that there is some performance penalty associated with the usage of "orderCode" and/or query . Endpoint: GET /api/stocks/{stockId}/movements Version: 1.0.0 Security: shoptetAccessToken, shoptetPrivateApiToken ## Path parameters: - `stockId` (number, required) ID of stock for which we would like the movements. Example: "1" ## Query parameters: - `lastId` (number) ID of last transfered record. If missing, the older records are sent. Example: "45" - `changeTimeFrom` (string) Date of move, in ISO 8601 format, lower limit. It is not possible to use it as break poit, it is not unique value. Optional. Example: "2021-03-01T00:00:00+0100" - `orderCode` (string) Filtering according to order code. Example: "2017000049" - `include` (string) Optional parts of response. Example: "orderCode,productGuid,sumAmount" ## Header parameters: - `Content-Type` (string, required) ## Response 200 fields (application/json): - `data` (object, required) - `data.movements` (array, required) - `data.movements.id` (integer, required) Synthetic unique incremental ID of log with changes in stock - `data.movements.productCode` (string, required) unique identification of the product variant. - `data.movements.actualAmount` (string,null, required) Current quantity in stock after carrying out the change, as a decimal with three decimal places. - `data.movements.amountChange` (string,null, required) Change in stock quantity, as a decimal with three decimal places. - `data.movements.changedBy` (string,null, required) Can have the following values: - if the change was invoked by the e-shop administrator - if the change was invoked by the e-shop customer - e-mail or for all other cases. Upon a change invoked by a REST API request, the form of the e-mail is generated as per template `api.service-{service-id}@{e-shop-domain}. - `data.movements.changeTime` (string,null, required) DateTime of product stock movement. - `data.movements.orderCode` (string,null) Code of order which initiated stock movement, present only with include flag - `data.movements.productGuid` (any) - `data.movements.sumAmount` (string,null) Sum of all stocks for the product in time after amount change was executed. - `data.paginator` (object, required) - `data.paginator.totalCount` (integer, required) total number of available records - `data.paginator.page` (integer, required) current page - `data.paginator.pageCount` (integer, required) total available of pages - `data.paginator.itemsOnPage` (integer, required) number of currently returned records - `data.paginator.itemsPerPage` (integer, required) required number of records per page - `errors` (array,null, required) - `errors.errorCode` (string, required) Short text error identification - `errors.message` (string, required) Descriptive error message - `errors.instance` (string, required) Identification of the entity referenced