Skip to content

FISCALISTO / API / REFERENCE

Inventory

Open in ChatGPTOpen in ClaudeOpen in Cursor

The object Warehouse

Fields
  1. 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*string

Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

issuer*string

The warehouse's issuer.

name*string

Its name («Matriz», its branch's, or the one given in the app).

code*|

Its short code, or null.

type*string

warehouse (own warehouse) or consignment (goods on consignment with a customer, still yours).

One of"warehouse""consignment"
branch*|

Its branch (brn_…), or null if it belongs to the Matriz.

default*boolean

true si es el almacén del que vende y recibe su sucursal.

archived*boolean

true 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

Fields
  1. StockMovement

A stock entry or exit (the stock ledger): a sale, a purchase, an adjustment, a transfer…

id*string

Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

issuer*string

The issuer.

product*string

The product (prd_…).

warehouse*string

The warehouse (whs_…).

type*string

sale (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).

One of"sale""purchase""customer_return""supplier_return""adjustment""count""transfer_out""transfer_in""production_consumption""production_output""initial""cost""reversal"
quantity*number

How much came in (positive) or went out (negative).

unit_cost*number

The unit cost it came in or went out with, in pesos without IVA.

value*number

quantity × 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*boolean

true 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

Fields
  1. StockAdjustment

A stock adjustment: what came into or went out of a warehouse for opening inventory, shrinkage, theft, a count…

id*string

Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

issuer*string

The issuer.

warehouse*string

The warehouse (whs_…).

reason*string

The reason (see POST /v1/stock_adjustments).

One of"shrinkage""theft""damage""expiration""internal_use""gift""initial""surplus""count""other"
note*|

Its note, or null.

status*string

applied (it already moved stock), pending (awaiting approval in the app), rejected or reversed (it was undone).

One of"applied""pending""rejected""reversed"
value*number

What 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

Fields
  1. 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*string

Object identifier, with its prefix (iss_, inv_, ret_, cus_, prd_, emp_, bat_, brn_, whs_, stm_, adj_, evt_, whe_).

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

issuer*string

The issuer.

number*string

Its folio, like OP-12.

status*string

draft (nothing has moved), in_process (the components already went out), completed (what was produced already came in) or cancelled (everything went back).

One of"draft""in_process""completed""cancelled"
product*string

What is produced (prd_…).

quantity*number

How many units were planned.

quantity_made*|

How many actually came out, or null if it hasn't finished.

warehouse*string

The warehouse the components come out of (whs_…).

destination_warehouse*string

The 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

Fields
  1. StockLevel

What there is of a product in a warehouse, and what it is worth.

id*string

Its id (stl_…): the product in that warehouse. It works as starting_after.

livemode*boolean

true in production (fk_live_ keys), false in test mode (fk_test_). Test objects aren't valid before the SAT.

object*string

What kind of object it is («invoice», «customer»…).

product*string

The product (prd_…).

warehouse*string

The warehouse (whs_…).

on_hand*number

What there is, in the product's unit (all its lots).

reserved*number

What is reserved by accepted quotes that haven't been invoiced.

available*number

on_hand minus reserved: what can be sold.

value*number

What 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?