# Stock movements

### Webhooks

Currently supported stock movement types:&#x20;

* stock\_correction
* completition

Every stock movent type offers webhook when new stock stock movement of that type is created

List of currently available webhooks:

* CREATE\_STOCK\_MOVEMENT\_STOCK\_CORRECTION
* CREATE\_STOCK\_MOVEMENT\_COMPLETITION

### API Endpoints

## POST /stock-movements/filter

> Filter stock movements

```json
{"openapi":"3.1.1","info":{"title":"Public Gateway Documentation","version":"2.0.0"},"servers":[{"url":"https://gw.new.skladon.net/v2"}],"security":[{"authorization":[],"XApiKey":[]}],"components":{"securitySchemes":{"authorization":{"type":"apiKey","name":"authorization","in":"header"}},"schemas":{"StockMovementsGridResponse":{"type":"object","properties":{"statusCode":{"type":"number","default":200},"message":{"type":"string"},"data":{"$ref":"#/components/schemas/StockMovementsGrid"}},"required":["statusCode","message"]},"StockMovementsGrid":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"count":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"expirationDate":{"type":"string","format":"date"},"id":{"type":"integer"},"lot":{"type":"string"},"sku":{"type":"string"},"type":{"type":"string","enum":["stock_correction","order","return","receiving","completition","order_surplus","order_confirmed","return_confirmed","receiving_confirmed"]}},"required":["count","createdAt","updatedAt","expirationDate","id","lot","sku","type"]}},"request":{"$ref":"#/components/schemas/StockMovementGridRequest"},"totalCount":{"type":"number"}}},"StockMovementGridRequest":{"type":"object","properties":{"page":{"type":"integer","description":"Page number, can be used for pagination","default":1,"minimum":1},"items":{"type":"integer","description":"items per page","default":10,"minimum":1,"maximum":1000},"columns":{"$ref":"#/components/schemas/StockMovementColumns"},"sorts":{"$ref":"#/components/schemas/StockMovementSorts"},"filters":{"$ref":"#/components/schemas/StockMovementOrFilters"}}},"StockMovementColumns":{"type":"array","description":"List of columns you want to retrieve. If empty, all possible columns will be retrieved","items":{"$ref":"#/components/schemas/StockMovementColumn"}},"StockMovementColumn":{"type":"string","enum":["count","createdAt","updatedAt","expirationDate","id","lot","sku","type"]},"StockMovementSorts":{"type":"array","items":{"$ref":"#/components/schemas/StockMovementSortItem"}},"StockMovementSortItem":{"type":"object","properties":{"column":{"type":"string","description":"Name of the column to order by","minLength":2,"$ref":"#/components/schemas/StockMovementColumn"},"direction":{"type":"string","description":"Direction of the order","enum":["ASC","DESC","asc","desc"]}},"required":["column","direction"]},"StockMovementOrFilters":{"type":"array","description":"Array of AndFilters. They will be joined with OR operator.","items":{"$ref":"#/components/schemas/StockMovementAndFilters"}},"StockMovementAndFilters":{"type":"array","description":"Array of AND filters. Filters you specify in this array will be joined with AND operator.","items":{"$ref":"#/components/schemas/StockMovementFilterItem"}},"StockMovementFilterItem":{"type":"object","properties":{"column":{"$ref":"#/components/schemas/StockMovementColumn","minLength":2},"operator":{"type":"string","description":"\n                                eq - equal\n                                neq - not equal\n                                gt -  greater than\n                                gte - greater than or equal\n                                lt - less than\n                                lte - less than equal\n                                in - in array of values (expects array of values in value property)\n                                nin - not in array of values (expects array of values in value property)\n                                like - like\n                                nline - not like\n                                between - between given interval (expects array of two values in value),\n                                nbetween - not between given interval (expects array of two values in value)\n                                null - is null\n                                notnull - is not null\n                                empty - is null or empty string\n                                notempty - is not null neither empty string","enum":["eq","neq","like","nlike","likein","gt","lt","gte","lte","in","nin","between","nbetween","null","notnull","empty","notempty"]},"value":{"type":"string","description":"Value can be string, number, boolean or array"}},"required":["column","operator","value"]},"ErrorMessageResponse":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]}}},"paths":{"/stock-movements/filter":{"post":{"summary":"Filter stock movements","operationId":"postStockMovementsFilter","parameters":[{"schema":{"type":"string"},"description":"This is the eshop key you receive during onboarding.","name":"x-api-key","in":"header","required":true},{"schema":{"type":"string"},"description":"Token you get from calling /users/login","name":"authorization","in":"header","required":true}],"tags":["StockMovements"],"responses":{"200":{"description":"Success response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMovementsGridResponse"}}}},"401":{"description":"Unauthorized response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorMessageResponse"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMovementGridRequest"}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.skladon.com/main/integration/api/stock-movements.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
