Inventory & Supply

Inventory availability and lots, supply and usage transactions, work order components, and linking a GAINS order to your own order number.

These subjects tell GAINS how much stock you hold, what is already on order, and what production consumes: on-hand quantities by location or by lot, purchase, transfer and work order lines, the components work orders use, and the components each work order kit needs. This page describes what each represents, what identifies a record, and how records nest. The endpoints, task types and extended data support are listed in Inbound Subjects; the API Reference lists every field.

All of these subjects refer to SKUs, locations, SKU-locations or vendors, so load that master data first; see Initial Load & Load Order.

What identifies a record

SubjectIdentified by
Inventory availabilityItemCode and LocationCode
Inventory lotsItemCode, LocationCode and LotNo
Supply transactionsOrderNumber, LineNumber, and SplitNumber for split lines
Usage transactionsWorkOrderNumber, ActualLocationCode, OrderReleaseDate, WorkLineNumber and ItemCode
Work order componentsWorkOrderNumber, KitItemCode, KitLocationCode, ComponentItemCode and ComponentLocationCode

Inventory availability

The on-hand and unshipped quantities of an item at each of its locations. One record is an item, with its locations under Locations. Loaded with POST /inventory-availability:

[
  {
    "ItemCode": "ASM-7701",
    "Locations": [
      { "LocationCode": "CHI01", "OnHandQty": 340, "UnshippedQty": 25 },
      { "LocationCode": "DAL02", "OnHandQty": 120, "UnshippedQty": 0 }
    ]
  }
]

Inventory lots

The on-hand quantity of an item by lot, at each location. Use it when you track lots, for example for shelf life. Records nest three levels deep: item → Locations → Lots. Loaded with POST /inventory-lots.

Supply transactions

Purchase, transfer and work order lines: what is on order and what has been received. One record is an order header, with its lines under LineItems. Loaded with POST /supply-transactions; use POST /supply-transactions-splits when a line is split across dates or statuses, and each line then carries its splits under SplitItems.

As with demand transactions, a header carries the values its lines share, and a line overrides them where it differs; fields a line can override are marked "(Line Override)" in the API Reference. The supplier must be known for every line: set it on the header, or on every line.

Send open lines and keep them current as they are received, closed or cancelled, so that GAINS does not order again what is already on its way.

A delete names a line by OrderNumber and LineNumber, plus SplitNumber for a split line.

Linking a GAINS order to your own order number

When GAINS generates an order and your system creates it under its own number, POST /supply-transactions/link-order records that number against the GAINS TrackingNumber:

{
  "TrackingNumber": 4821,
  "ExternalOrderId": "PO-2026-004821"
}

Unlike the other loads, it takes one object, not an array, creates no integration task, and answers 202 with no body.

Usage transactions

The components consumed by work orders. One record is a header, with its lines under LineItems. Loaded with POST /usage-transactions.

A delete requires only WorkOrderNumber, ActualLocationCode and OrderReleaseDate; WorkLineNumber and ItemCode complete the key. Send them both, as you loaded them, so that the delete names exactly the line you mean.

Work order components

The kits a work order assembles and the components each kit consumes. Records nest three levels deep: work order → Kits → Components. Loaded with POST /work-order-components.

Related


Did this page help you?