Skip to main content
POST
/
v1
/
stocks
/
count
Create a stock count
curl --request POST \
  --url https://dev.flextell.ai/api/v1/stocks/count \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant: <x-tenant>' \
  --data '
{
  "warehouse_id": 2,
  "items": [
    {
      "product_id": 2,
      "boxes": 1,
      "inner_units": 1,
      "base_units": 1
    }
  ],
  "notes": "<string>"
}
'
{
  "success": "<string>",
  "data": {
    "items": [
      {
        "count": null,
        "movement": {
          "id": 123,
          "product": {
            "id": 123,
            "name": "<string>"
          },
          "warehouse": {
            "id": 123,
            "name": "<string>"
          },
          "type": "<string>",
          "direction": "<string>",
          "quantity": 123,
          "unit_label": "<string>",
          "reference": "<string>",
          "user": {
            "id": 123,
            "name": "<string>"
          },
          "notes": "<string>",
          "effective_at": "2023-11-07T05:31:56Z",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z"
        }
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Body

application/json
warehouse_id
integer
required

Filter by warehouse ID.

Required range: x >= 1
items
object[]
required

List of items.

Minimum array length: 1
notes
string | null

Internal notes.

Maximum string length: 65535

Response

success
string
required
data
object
required