FISCALISTO / API / REFERENCE
Inventory
Warehouses, stock, movements (kardex) and adjustments: each invoice that sells a product with track_stock takes out what it sells.
Guide to Inventory: what each endpoint is for, step by step and with examples.
The object Warehouse
- Warehouse
An issuer's warehouse: one for the Matriz and one per branch are created on their own; each invoice takes stock out of its branch's warehouse.
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe warehouse's issuer.
name*stringIts name («Matriz», its branch's, or the one given in the app).
code*|Its short code, or null.
type*stringwarehouse (own warehouse) or consignment (goods on consignment with a customer, still yours).
"warehouse""consignment"branch*|Its branch (brn_…), or null if it belongs to the Matriz.
default*booleantrue si es el almacén del que vende y recibe su sucursal.
archived*booleantrue if archived.
created_at*|When it was created.
Example Warehouse
{ "id": "whs_OufpKqnrvx9p1", "object": "warehouse", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "name": "Matriz", "code": null, "type": "warehouse", "branch": null, "default": true, "archived": false, "created_at": "2026-10-27T09:12:00-06:00"}The object StockMovement
- StockMovement
A stock entry or exit (the stock ledger): a sale, a purchase, an adjustment, a transfer…
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe issuer.
product*stringThe product (prd_…).
warehouse*stringThe warehouse (whs_…).
type*stringsale (an invoice), purchase (a purchase), customer_return, supplier_return, adjustment, count (physical count), transfer_out, transfer_in, production_consumption (a component that went to production), production_output (what was produced), initial, cost (a cost adjustment) or reversal (undoes another, like a canceled invoice).
"sale""purchase""customer_return""supplier_return""adjustment""count""transfer_out""transfer_in""production_consumption""production_output""initial""cost""reversal"quantity*numberHow much came in (positive) or went out (negative).
unit_cost*numberThe unit cost it came in or went out with, in pesos without IVA.
value*numberquantity × unit_cost: how much the inventory value changed.
lot*|The lot or serial number, or null.
source*What caused it: type invoice (id is the CFDI's UUID), adjustment (adj_…), production (mfo_…), receipt, transfer, count or ticket.
reason*|The reason for an adjustment, or null.
date*|When it happened, Mexico City time (the CFDI's Fecha on a sale).
reversed*booleantrue if a later movement undid it.
created_at*|When it was recorded.
Example StockMovement
{ "id": "stm_OufpKqnrvx9p7", "object": "stock_movement", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "product": "prd_OufpKqnrvx9p2", "warehouse": "whs_OufpKqnrvx9p1", "type": "sale", "quantity": -2, "unit_cost": 90, "value": -180, "lot": null, "source": { "type": "invoice", "id": "5F1E8C2A-3B7D-4C9E-A1B2-C3D4E5F60718" }, "reason": null, "date": "2026-10-27T10:15:42", "reversed": false, "created_at": "2026-10-27T10:15:43-06:00"}The object StockAdjustment
- StockAdjustment
A stock adjustment: what came into or went out of a warehouse for opening inventory, shrinkage, theft, a count…
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe issuer.
warehouse*stringThe warehouse (whs_…).
reason*stringThe reason (see POST /v1/stock_adjustments).
"shrinkage""theft""damage""expiration""internal_use""gift""initial""surplus""count""other"note*|Its note, or null.
status*stringapplied (it already moved stock), pending (awaiting approval in the app), rejected or reversed (it was undone).
"applied""pending""rejected""reversed"value*numberWhat what it moved is worth, in pesos without IVA.
lines*array<>What came in or went out of each product.
created_at*|When it was made.
Example StockAdjustment
{ "id": "adj_OufpKqnrvx9p1", "object": "stock_adjustment", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "warehouse": "whs_OufpKqnrvx9p1", "reason": "initial", "note": "Inventario de apertura", "status": "applied", "value": 4500, "lines": [ { "product": "prd_OufpKqnrvx9p2", "quantity": 50, "unit_cost": 90, "lot": null } ], "created_at": "2026-10-27T09:30:00-06:00"}The object ProductionOrder
- ProductionOrder
A production order: the recipe's components go out of one warehouse and what is produced goes into another at its real cost.
id*stringObject identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
issuer*stringThe issuer.
number*stringIts folio, like OP-12.
status*stringdraft (nothing has moved), in_process (the components already went out), completed (what was produced already came in) or cancelled (everything went back).
"draft""in_process""completed""cancelled"product*stringWhat is produced (prd_…).
quantity*numberHow many units were planned.
quantity_made*|How many actually came out, or null if it hasn't finished.
warehouse*stringThe warehouse the components come out of (whs_…).
destination_warehouse*stringThe warehouse what is produced goes into (whs_…).
lot*|The lot of what is produced, or null.
due_date*|By when (YYYY-MM-DD), or null.
note*|Its note, or null.
components*array<>What it takes, from the recipe for quantity with its shrinkage: quantity what was planned, quantity_used what went out and value what it cost (pesos without IVA). tracks_stock false is a service: it only adds its cost.
other_costs*array<>Labor, gas, packaging…: they are added to the cost of what is produced.
materials_cost*|What the components that went out cost, or null before starting.
unit_cost*|(materials_cost + other_costs) ÷ quantity_made: the cost each unit came in at, or null if it hasn't finished.
created_at*|When it was made.
started_at*|When the components went out, or null.
completed_at*|When what was produced came in, or null.
cancelled_at*|When it was canceled, or null.
Example ProductionOrder
{ "id": "mfo_OufpKqnrvx9p1", "object": "production_order", "livemode": false, "issuer": "iss_OufpKqnrvx9p", "number": "OP-1", "status": "completed", "product": "prd_OufpKqnrvx9p5", "quantity": 20, "quantity_made": 19, "warehouse": "whs_OufpKqnrvx9p1", "destination_warehouse": "whs_OufpKqnrvx9p1", "lot": null, "due_date": "2026-11-20", "note": null, "components": [ { "product": "prd_OufpKqnrvx9p3", "quantity": 20, "quantity_used": 20, "tracks_stock": true, "value": 400 }, { "product": "prd_OufpKqnrvx9p4", "quantity": 2, "quantity_used": 2, "tracks_stock": true, "value": 120 } ], "other_costs": [ { "description": "Gas", "amount": 80 } ], "materials_cost": 520, "unit_cost": 31.5789, "created_at": "2026-11-19T09:00:00-06:00", "started_at": "2026-11-19T09:05:00-06:00", "completed_at": "2026-11-19T12:30:00-06:00", "cancelled_at": null}The object StockLevel
- StockLevel
What there is of a product in a warehouse, and what it is worth.
id*stringIts id (stl_…): the product in that warehouse. It works as starting_after.
livemode*booleantrue in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.
object*stringWhat kind of object it is («invoice», «customer»…).
product*stringThe product (prd_…).
warehouse*stringThe warehouse (whs_…).
on_hand*numberWhat there is, in the product's unit (all its lots).
reserved*numberWhat is reserved by accepted quotes that haven't been invoiced.
available*numberon_hand minus reserved: what can be sold.
value*numberWhat that stock is worth at its cost, in pesos without IVA.
average_cost*|value / on_hand: the unit cost, or null without stock.
Example StockLevel
{ "id": "stl_OufpKqnrvx9p4gfFC6", "object": "stock_level", "livemode": false, "product": "prd_OufpKqnrvx9p2", "warehouse": "whs_OufpKqnrvx9p1", "on_hand": 48, "reserved": 6, "available": 42, "value": 4320, "average_cost": 90}Was this page helpful?
Calculate the tax discrepancy GET
Like «Discrepancia fiscal» (personas físicas, art. 91 LISR): expenses with CFDIs in their name and deposits into their accounts for the year, minus transfers between their accounts, loans and refunds, against the declared income; what's left is what SAT would presume is income. An issuer that's a persona moral answers parameter_invalid. It doesn't use stamps.
List warehouses GET
The issuer's warehouses, most recent first: the head office's and one per branch are created on their own. All on one page.