Stock Management

URA keeps its own inventory ledger for every registered good. Stock must be reported before fiscalisation (unless negative stock is enabled in your URA settings) - otherwise invoices fail with EFRIS error 1600 (inventory shortage). Increases and decreases share one endpoint:

POST/stock-maintain

The body pairs a header object with an items array:

{
    "goodsStockIn": { "...": "operation header" },
    "goodsStockInItem": [ { "...": "one entry per good" } ]
}

Conditional field rules

Which header fields are required - or must be empty - depends on the operation you are performing:

Rule Condition
stockInType required when operationType = 101
stockInType must be empty when operationType = 102
supplierTin must be empty when operationType = 102 or stockInType = 103
supplierName required when operationType = 101 (except stockInType = 103)
adjustType required when operationType = 102
adjustType must be empty when operationType = 101
remarks required when operationType = 102 and adjustType = 104
productionBatchNo / productionDate must be empty when stockInType ≠ 103

Each item line needs either goodsCode or commodityGoodsId (the EFRIS internal ID) - they cannot both be empty.

A. Stock increase - import / local purchase

{
    "goodsStockIn": {
        "operationType": "101", // 101: Increase inventory
        "supplierTin": "1000001234",
        "supplierName": "Supplier XYZ",
        "stockInType": "102", // 102: Local Purchase (101: Import)
        "stockInDate": "2026-05-02", // yyyy-MM-dd
        "goodsTypeCode": "101"
    },
    "goodsStockInItem": [
        {
            "goodsCode": "SKU-BOTTLE-01",
            "quantity": "100",
            "unitPrice": "18000", // Commodity purchase price - can be 0
            "measureUnit": "101"
        }
    ]
}

stockInType codes - required when operationType = 101:

Code Meaning Notes
101 Import supplierTin and supplierName required
102 Local Purchase supplierTin and supplierName required
103 Manufacture / Assembling supplierTin and supplierName must be empty; see scenario B
104 Opening Stock Use for the initial stock load when first going live; see scenario C

B. Stock increase - manufacture / assembling

When stockInType = "103", supplier fields must be empty (EFRIS errors 2138/2139) and the production fields become available:

{
    "goodsStockIn": {
        "operationType": "101",
        "stockInType": "103", // Manufacture/Assembling
        "stockInDate": "2026-05-02",
        "productionBatchNo": "BATCH-2026-001", // Batch/lot number of the manufactured goods
        "productionDate": "2026-05-01" // yyyy-MM-dd - date of manufacture
    },
    "goodsStockInItem": [
        {
            "goodsCode": "SKU-BOTTLE-01",
            "quantity": "500",
            "unitPrice": "15000",
            "measureUnit": "101"
        }
    ]
}
For all other stockInType values, productionBatchNo and productionDate must be empty.

C. Stock increase - opening stock

Use this once per good when moving an existing business onto EFRIS:

{
    "goodsStockIn": {
        "operationType": "101",
        "supplierName": "Opening Balance",
        "stockInType": "104", // Opening Stock
        "stockInDate": "2026-01-01"
    },
    "goodsStockInItem": [
        {
            "goodsCode": "SKU-BOTTLE-01",
            "quantity": "1000",
            "unitPrice": "18000",
            "measureUnit": "101"
        }
    ]
}

D. Stock decrease

Decreases use operationType: "102" with an adjustType explaining why the stock is leaving outside of a sale:

{
    "goodsStockIn": {
        "operationType": "102", // 102: Inventory reduction
        "adjustType": "102", // Required when operationType = 102
        "remarks": "Damaged goods in warehouse"
    },
    "goodsStockInItem": [
        {
            "goodsCode": "SKU-BOTTLE-01",
            "quantity": "10",
            "unitPrice": "18000",
            "measureUnit": "101"
        }
    ]
}

adjustType codes - required when operationType = 102:

Code Meaning Notes
101 Expired Goods
102 Damaged Goods
103 Personal Uses
104 Others remarks is required when adjustType = 104
105 Raw Material(s)
Multiple values may be comma-separated, e.g. "adjustType": "101,102".

Optional header fields (both directions): branchId, invoiceNo, isCheckBatchNo ("0"/"1", default "0"), rollBackIfError ("0"/"1", default "0" - set "1" to roll back the whole batch if any single item fails), goodsTypeCode ("101" Goods / "102" Fuel). Fuel items additionally support fuelTankId, lossQuantity, originalQuantity.

E. Stock transfer between branches

POST/transfer-stock

Transfers stock from one branch to another within the same TIN. Get valid branchId values from the branches lookup.

{
    "goodsStockTransfer": {
        "sourceBranchId": "206637525568955296",
        "destinationBranchId": "206637528324276772",
        "transferTypeCode": "101",
        "remarks": ""
    },
    "goodsStockTransferItem": [
        {
            "goodsCode": "SKU-BOTTLE-01",
            "quantity": "100",
            "remarks": ""
        }
    ]
}

transferTypeCode:

Code Meaning
101 Out of Stock Adjust
102 Error Adjust
103 Others - remarks is REQUIRED

Business rules:

  • sourceBranchId and destinationBranchId cannot be the same.
  • If transferTypeCode is "103", remarks cannot be empty.
  • Multiple transfer types may be comma-separated, e.g. "101,102".

What comes next

With goods registered and stock loaded, you are ready to fiscalise sales - see Fiscal Invoices. To verify quantities at any time, use the stock queries in Data Lookups.

Stuck on an integration step? Our engineers reply fast.