Get

[POST] .../v1/userstock/get

Returns information about warehouses available to the user. Use this method to retrieve stock access assignments for a specific user before configuring warehouse permissions or POS availability. The request requires user_id; in the public contract pass it through filters and the response returns UserStock records with stock details. The caller must have user stock get permission; missing body, invalid user_id, denied access, missing user records and persistent storage errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
filters Array of Filter Optional Optional filters by fields available for this API method.

Filterable Fields

Field Type Description
user_id int User ID whose stock assignments must be returned.

Request Example

{
  "filters": [
    {
      "Field": "user_id",
      "Operator": "Equal",
      "Value": "17"
    }
  ]
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Array of UserStock Result array.

Response Example

{
  "ok": true,
  "result": [
    {
      "id": 31,
      "user_id": 17,
      "stock": {
        "id": 8,
        "name": "Main store",
        "address": "Tashkent, Buyuk Ipak Yuli 10",
        "firm": {
          "id": 2,
          "name": "REGOS Retail",
          "group": {
            "id": 1,
            "name": "Retail group"
          }
        },
        "area": 120.500,
        "description": "Primary retail stock",
        "deleted_mark": false,
        "last_update": 1712345600
      }
    }
  ]
}