API de inventario
What each establishment you reach holds of each product that tracks its stock (tracks_stock), one level per product and establishment, by product. product_id keeps one product's levels and establishment_id one establishment's. A product never counted at an establishment has no level there: it holds nothing.
apiKeyAuthorizationBearer <token>Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.
limit?integerHow many per page, from 1 to 100.
1 <= value <= 10020cursor?stringThe next_cursor or prev_cursor of a previous response. Without a cursor, the first page.
length <= 200created_at[gte]?stringOnly what was created at or after this moment, ISO 8601 with its offset.
date-timecreated_at[lte]?stringOnly what was created at or before this moment, ISO 8601 with its offset.
date-timeupdated_at[gte]?stringOnly what last changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.
date-timeupdated_at[lte]?stringOnly what last changed at or before this moment, ISO 8601 with its offset.
date-timeproduct_id?stringuuidestablishment_id?stringThe establishment (GET /v1/ec/establishments).
uuidA page of levels
application/json- response
object*"list""list"data*array<>next_cursor*|The next page (older); null if there are no more.
prev_cursor*|The previous page (newer); null on the first.
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/stock-levels'{
"object": "list",
"data": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"object": "stock_level",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"establishment_id": "79c2ed6a-4f04-4a25-97dc-40ebc08eda04",
"on_hand": "string",
"reorder_point": "string",
"status": "in_stock",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}Every change of stock at the establishments you reach, newest first: what each document, held sale and adjustment moved, with what the establishment held after it. With product_id, that product's kardex. Read it by cursor to keep a system of your own in step: there is no event per movement.
apiKeyAuthorizationBearer <token>Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.
limit?integerHow many per page, from 1 to 100.
1 <= value <= 10020cursor?stringThe next_cursor or prev_cursor of a previous response. Without a cursor, the first page.
length <= 200created_at[gte]?stringOnly what was created at or after this moment, ISO 8601 with its offset.
date-timecreated_at[lte]?stringOnly what was created at or before this moment, ISO 8601 with its offset.
date-timeupdated_at[gte]?stringOnly what last changed at or after this moment, ISO 8601 with its offset: poll with the time of your last read to get what changed since.
date-timeupdated_at[lte]?stringOnly what last changed at or before this moment, ISO 8601 with its offset.
date-timeproduct_id?stringuuidestablishment_id?stringThe establishment (GET /v1/ec/establishments).
uuidkind?string"opening""sale""sale_correction""sale_reversal""return""return_reversal""adjustment"source_id?stringOnly what one document, held sale or adjustment moved.
uuidA page of movements
application/json- response
object*"list""list"data*array<>next_cursor*|The next page (older); null if there are no more.
prev_cursor*|The previous page (newer); null on the first.
curl -X GET 'https://api-sandbox.fiscalbase.io/v1/ec/stock-movements'{
"object": "list",
"data": [
{
"object": "stock_movement",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
"description": "string",
"establishment_id": "79c2ed6a-4f04-4a25-97dc-40ebc08eda04",
"kind": "opening",
"reason": "shrinkage",
"quantity": "string",
"balance_after": "string",
"occurred_on": "2019-08-24",
"source": {
"type": "document",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"document_type": "invoice",
"number": "string"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
],
"next_cursor": "string",
"prev_cursor": "string"
}Moves stock at an establishment for a reason, product by product: shrinkage, expired, damaged, a return from a consumidor final without a credit note. Each line's quantity is signed. One movement per product, with the level, at once. A mistake is corrected with another adjustment: movements are never edited. Requires an Idempotency-Key: a retry without one would move the stock again.
apiKeyAuthorizationBearer <token>Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.
idempotency-key*stringRequired. Without it a retry could move the stock again. A retry with the same key and body answers the first answer instead; the same key with another body is 409 idempotency_key_reused.
1 <= length <= 255application/json- body
establishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidreason*stringWhy: shrinkage, expired, damaged, theft, internal_use (used by the business), found, correction, return_without_credit_note (a consumidor final's return, which no credit note can carry), production (made here) or other. Writing off shrinkage is not the sworn declaration the SRI asks to deduct it.
"shrinkage""expired""damaged""theft""internal_use""found""correction""return_without_credit_note""production""other"note?string1 <= length <= 500lines*array<>1 <= items <= 200Adjusted
application/json- response
object*"stock_adjustment""stock_adjustment"id*stringuuidestablishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidkind*string"opening""adjustment"reason*|"shrinkage""expired""damaged""theft""internal_use""found""correction""return_without_credit_note""production""other"nullnote*string|nullmovements*array<>The movement it wrote for each product whose quantity changed. A count that matches the shelf writes none.
created_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/stock-adjustments' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"establishment_id": "01a21860-66e9-7451-af97-7ca8c7c9efbf",
"reason": "found",
"lines": [
{
"product_id": "01a21860-6762-74e8-b8e9-7029c45a7c45",
"quantity": "5"
}
]
}'{
"object": "stock_adjustment",
"id": "01a21860-6772-7f8b-b295-6f70272f0210",
"establishment_id": "01a21860-66e9-7451-af97-7ca8c7c9efbf",
"kind": "adjustment",
"reason": "found",
"note": null,
"movements": [
{
"product_id": "01a21860-6762-74e8-b8e9-7029c45a7c45",
"quantity": "5",
"balance_after": "5"
}
],
"created_at": "2026-11-26T15:01:40.847Z"
}Only reorder_point: a quantity changes through movements (a sale, an adjustment, a count), never by setting it. A product with no level at the establishment yet gets one, holding nothing. Answers the level as GET /v1/ec/stock-levels lists it.
apiKeyAuthorizationBearer <token>Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.
product_id*stringuuidestablishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidapplication/json- body
reorder_point*|At or under this the product is to be reordered at this establishment, and stock_level.fell_low is sent as it crosses it; null: never.
The level, with its reorder point
application/json- response
id*stringuuidobject*"stock_level""stock_level"product_id*stringuuidestablishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidon_hand*stringWhat the establishment holds, the sum of its movements. Negative after a sale the business let through without stock (warn), until an adjustment or a count settles it.
reorder_point*|At or under this the product is to be reordered at this establishment; null: never.
status*stringnegative below zero, out at zero, low at or under reorder_point, in_stock otherwise.
"in_stock""low""out""negative"created_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://api-sandbox.fiscalbase.io/v1/ec/stock-levels/497f6eca-6276-4993-bfeb-53cbbbba6f08/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-H 'Content-Type: application/json' \
-d '{
"reorder_point": "4"
}'{
"id": "01a21860-8556-7a59-b5c6-ebb575b91818",
"object": "stock_level",
"product_id": "01a21860-8531-7f83-ae5e-e3f35ed4fbd9",
"establishment_id": "01a21860-84e7-7ea5-acad-c1a34b085f81",
"on_hand": "10",
"reorder_point": "4",
"status": "in_stock",
"created_at": "2026-11-26T15:01:48.497Z",
"updated_at": "2026-11-26T15:01:52.668Z"
}What the shelf holds now, product by product, for a system that keeps its own stock: each product's level at the establishment becomes its count, the movement being the difference, and a product counted starts tracking its stock. Inventory starts here: documents imported from before never rebuild it. Requires an Idempotency-Key.
apiKeyAuthorizationBearer <token>Your API key, which acts for the one business it was created for: fb_live_… keys work at api.fiscalbase.io and issue in live, and fb_sandbox_… keys work at api-sandbox.fiscalbase.io and issue in sandbox, on the simulated SRI. A key sent to the other host is refused with api_key_wrong_host, which names its host.
idempotency-key*stringRequired. Without it a retry could move the stock again. A retry with the same key and body answers the first answer instead; the same key with another body is 409 idempotency_key_reused.
1 <= length <= 255application/json- body
establishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidlines*array<>1 <= items <= 200Counted
application/json- response
object*"stock_adjustment""stock_adjustment"id*stringuuidestablishment_id*stringThe establishment (GET /v1/ec/establishments).
uuidkind*string"opening""adjustment"reason*|"shrinkage""expired""damaged""theft""internal_use""found""correction""return_without_credit_note""production""other"nullnote*string|nullmovements*array<>The movement it wrote for each product whose quantity changed. A count that matches the shelf writes none.
created_at*stringdate-timecurl -X POST 'https://api-sandbox.fiscalbase.io/v1/ec/stock-counts' \
-H 'idempotency-key: string' \
-H 'Content-Type: application/json' \
-d '{
"establishment_id": "01a21860-84e7-7ea5-acad-c1a34b085f81",
"lines": [
{
"product_id": "01a21860-8531-7f83-ae5e-e3f35ed4fbd9",
"quantity": "10"
}
]
}'{
"object": "stock_adjustment",
"id": "01a21860-8554-7d5f-8ef8-d55e404ee4e2",
"establishment_id": "01a21860-84e7-7ea5-acad-c1a34b085f81",
"kind": "opening",
"reason": null,
"note": null,
"movements": [
{
"product_id": "01a21860-8531-7f83-ae5e-e3f35ed4fbd9",
"quantity": "10",
"balance_after": "10"
}
],
"created_at": "2026-11-26T15:01:48.497Z"
}