Inbound Data Model
What each inbound subject represents, the fields that identify a record, required fields, nesting and validation rules.
Every kind of data you can load into GAINS has its own inbound endpoint. This page describes each one: what it represents in GAINS, which fields identify a record, which fields are required, how records nest, and the rules GAINS Connect checks before it accepts a record. Read it when you map your own data to GAINS Connect for the first time.
The API Reference lists every field with its type and maximum length. This page covers what the reference does not make obvious. How a batch is accepted and tracked is described in Inbound Endpoints & Integration Tasks.
How to read this page
Each subject has a short table:
| Row | Meaning |
|---|---|
| Identified by | The fields that make one record distinct from another. Where the subject has a delete endpoint, these are the fields its delete takes; see Deleting Data & SKU-Location Review. |
| Structure | How records nest. The 1000-record limit counts top-level records only. |
| Rules | Checks beyond required fields, maximum lengths and formats. |
Rules common to every subject:
- The format of a date depends on the field; the API Reference gives each field's format. See Dates and times.
- Field names, value types and the
400for an unknown field are described in Data Formats & Conventions. - Where a subject accepts
ExtendedData, see Extended Data - Inbound.
Some dates are required although the API Reference shows them as optionalGAINS Connect rejects a record without these dates:
RequestDateandOrderEntryDateon usage transactions, andPromiseDateandOrderReleaseDateon their lines;EffectiveFromon bill of material components;GeneratedOnon imported forecasts;StartDateandEndDateon weekly and monthly calendar overrides, andModifiedScheduleon daily ones; and on deletes,CustomerRequestDatefor demand transactions,OrderReleaseDatefor usage transactions andEffectiveFromfor bills of material.
Master data
SKUs
An item in the GAINS item master, independent of where it is stocked.
| Row | Detail |
|---|---|
| Endpoint | POST /skus |
| Identified by | ItemCode |
| Required | ItemCode, Description, Department, Group |
| Structure | One flat record per item. Accepts ExtendedData. |
| Delete | POST /skus/delete |
Locations
A distribution center, warehouse, branch or other place where items are planned or stocked.
| Row | Detail |
|---|---|
| Endpoint | POST /locations |
| Identified by | LocationCode |
| Required | LocationCode, Type |
| Structure | One flat record per location. ParentDefaultCode names its default parent location. Accepts ExtendedData. |
| Rules | Latitude from -90 to 90 and Longitude from -180 to 180, each at most 10 characters long including sign and decimal point. |
| Delete | POST /locations/delete |
SKU-locations
An item at a location, the level at which GAINS forecasts and plans inventory.
| Row | Detail |
|---|---|
| Endpoint | POST /skus-locations |
| Identified by | ItemCode and LocationCode |
| Required | ItemCode, LocationCode |
| Structure | One flat record per SKU-location. Accepts ExtendedData. |
| Rules | Costs, prices, quantities, lead time and service level must be zero or greater. |
| Delete | POST /skus-locations/delete. Nothing is deleted until you approve the request. |
Customers
A customer and one of its ship-to destinations.
| Row | Detail |
|---|---|
| Endpoint | POST /customers |
| Identified by | CustomerCode and ShipToCode |
| Required | CustomerCode, ShipToCode |
| Structure | One flat record per customer ship-to. |
| Rules | Latitude from -90 to 90 and Longitude from -180 to 180, each at most 30 characters long. |
| Delete | POST /customers/delete |
Vendors
A supplier, optionally specific to the location that receives from it.
| Row | Detail |
|---|---|
| Endpoint | POST /vendors |
| Identified by | VendorCode and ReceiveLocationCode |
| Required | VendorCode, Name |
| Structure | One flat record per vendor and receiving location. |
| Rules | Email must be a valid email address. Latitude from -90 to 90 and Longitude from -180 to 180, sent as strings. |
| Delete | POST /vendors/delete |
Sourcing and product structure
Vendor alternatives
The vendors that can supply an item at a location, with their costs, lead times and production capacity.
| Row | Detail |
|---|---|
| Endpoint | POST /vendor-alternatives |
| Identified by | ItemCode, LocationCode, ProductionLine and CapacityAllocGroup |
| Required | ItemCode, LocationCode, at least one entry in Vendors. Per vendor: SupplierCode, ProductionLine, CapacityAllocGroup. |
| Structure | One record per SKU-location, with its vendors under Vendors. Each vendor accepts ExtendedData. |
| Rules | SupplierType is M (manufactured), P (purchased) or empty. |
| Delete | POST /vendor-alternatives/delete |
Vendor constraints
Purchase order minimums, maximums and lead times that apply to a vendor.
| Row | Detail |
|---|---|
| Endpoint | POST /vendor-constraints |
| Identified by | VendorCode and ReceiveLocationCode. An omitted ReceiveLocationCode means every receiving location. |
| Required | VendorCode, POQuantity, POUnitOfMeasure, POType, POIntegrity |
| Structure | One flat record per constraint. |
| Rules | VendorType 1 to 3, POUnitOfMeasure 1 to 4, POType 1 to 6, POIntegrity 1 or 2. |
| Delete | None |
Partner vendor parameters
Vendor costs, capacity and price breaks for an item, sent by a partner. See Introduction to Partner APIs.
| Row | Detail |
|---|---|
| Endpoint | POST /partners/vendor-parameters |
| Identified by | ItemCode, SupplierCode, and LocationCode per location |
| Required | ItemCode, SupplierCode, at least one entry in Locations |
| Structure | One record per item and vendor, with its locations under Locations. Each location accepts ExtendedData. |
| Rules | At most 3 PriceBreaks per location, numbered from 1 with no gaps and no repeats. |
| Delete | None |
Bills of material
The components that make up a kit at the location where it is assembled.
| Row | Detail |
|---|---|
| Endpoint | POST /bills-of-material |
| Identified by | KitItemCode, KitLocationCode, ComponentItemCode, ComponentLocationCode and EffectiveFrom |
| Required | KitItemCode, at least one entry in KitLocations. Per kit location: KitLocationCode and at least one entry in Components. Per component: ComponentItemCode, ComponentLocationCode, ComponentQty, EffectiveFrom. |
| Structure | Kit → KitLocations → Components. |
| Delete | POST /bills-of-material/delete |
Supercessions
A new SKU-location that replaces one or more old ones.
| Row | Detail |
|---|---|
| Endpoint | POST /supercessions |
| Identified by | The new and the old ItemCode and LocationCode |
| Required | NewItem with ItemCode and LocationCode; at least one entry in OldItems, each with ItemCode and LocationCode |
| Structure | One record per new SKU-location, with the SKU-locations it replaces under OldItems. |
| Rules | An old SKU-location cannot be the new one. |
| Delete | POST /supercessions/delete |
SKU-location alternatives
A SKU-location that can be substituted for another, with the cost of substituting and of transporting it.
| Row | Detail |
|---|---|
| Endpoint | POST /skul-alternatives |
| Identified by | TargetItemCode, TargetLocationCode, SourceItemCode and SourceLocationCode |
| Required | All four codes, and FixedSubstitutionCost, VariableSubstitutionCost, FixedTransportCost, VariableTransportCost |
| Structure | One flat record per substitution. |
| Rules | The source SKU-location must differ from the target. |
| Delete | None |
Price breaks
Quantity discounts and expediting costs for a SKU-location.
| Row | Detail |
|---|---|
| Endpoint | POST /price-breaks |
| Identified by | ItemCode and LocationCode; each break by its Break number |
| Required | ItemCode, LocationCode, at least one entry in PriceBreaks. Per break: Break, Discount, UnitCost, MinOrderQty. |
| Structure | One record per SKU-location, with its breaks under PriceBreaks. |
| Rules | Break from 1 to 5, numbered from 1 with no gaps and no repeats. Discount, DelayPercent and ExpeditePerOrder from 0 to 1. |
| Delete | POST /price-breaks/delete |
Inventory
Inventory availability
On-hand and unshipped quantities of an item at each location.
| Row | Detail |
|---|---|
| Endpoint | POST /inventory-availability |
| Identified by | ItemCode and LocationCode |
| Required | ItemCode, at least one entry in Locations. Per location: LocationCode, OnHandQty, UnshippedQty. |
| Structure | One record per item, with its locations under Locations. |
| Delete | None |
Inventory lots
On-hand quantity of an item by lot, at each location.
| Row | Detail |
|---|---|
| Endpoint | POST /inventory-lots |
| Identified by | ItemCode, LocationCode and LotNo |
| Required | ItemCode, at least one entry in Locations. Per location: LocationCode and at least one entry in Lots. Per lot: LotNo, LotOnHandQuantity. |
| Structure | Item → Locations → Lots. Each lot accepts ExtendedData. |
| Delete | None |
Transactions
Demand transactions
Sales order lines, both shipped history and open orders.
| Row | Detail |
|---|---|
| Endpoint | POST /demand-transactions, or POST /demand-transactions-splits for lines split across dates or lots |
| Identified by | OrderNumber, LineNumber, ItemCode, IdealShipFromLocationCode, CustomerRequestDate and CustomerShipToCode, the fields a delete takes |
| Required | At least one entry in LineItems. Per line: ItemCode, RequestedQuantity. With splits, per line: ItemCode, LineNumber and at least one entry in SplitItems; per split: SplitNumber, RequestedQuantity. |
| Structure | One record per order header, with its lines under LineItems. Fields marked "(Line Override)" in the API Reference replace the header value for that line. Header and lines accept ExtendedData. |
| Rules | IdealShipFromLocationCode and CustomerRequestDate must each be set on the header or on every line. With splits, CustomerRequestDate may instead be set on every split. OrderType from 0 to 4. |
| Delete | POST /demand-transactions/delete |
OrderNumber is optional on the load but required to delete. Send it, with LineNumber, on every transaction you may need to delete later.
A header carries values its lines share; a line overrides them where it differs:
[
{
"IdealShipFromLocationCode": "CHI01",
"ActualShipFromLocationCode": "CHI01",
"CustomerRequestDate": "2026-05-22",
"OrderEntryDate": "2026-05-18",
"OrderNumber": "SO-100482",
"CustomerShipToCode": "ST-01",
"CustomerCode": "C-10452",
"LineItems": [
{
"ItemCode": "ASM-7701",
"RequestedQuantity": 40,
"ShippedQuantity": 40,
"SalesPrice": 18.75,
"LineNumber": "1",
"OrderType": 0,
"Status": "03"
},
{
"ItemCode": "ASM-7702",
"CustomerRequestDate": "2026-05-29",
"RequestedQuantity": 12,
"LineNumber": "2",
"OrderType": 0,
"Status": "00"
}
]
}
]Demand events
Promotions and other events that change demand for SKU-locations over a period.
| Row | Detail |
|---|---|
| Endpoint | POST /demand-events |
| Identified by | EventId |
| Required | EventId. Per detail: ItemCode, LocationCode. |
| Structure | One record per event, with the SKU-locations it affects under Details. Event and details accept ExtendedData. |
| Rules | EndDate must be on or after StartDate. |
| Delete | POST /demand-events/delete |
Supply transactions
Purchase, transfer and work order lines: what is on order and what has been received.
| Row | Detail |
|---|---|
| Endpoint | POST /supply-transactions, or POST /supply-transactions-splits for lines split across dates or statuses |
| Identified by | OrderNumber, LineNumber, and SplitNumber for split lines |
| Required | OrderNumber, OriginalOrderCreateDate, at least one entry in LineItems. Per line: LineNumber, ItemCode, LocationCode, Status. With splits, Status moves to each split; per split: SplitNumber, Status. |
| Structure | One record per order header, with its lines under LineItems, and with splits, each line's SplitItems. Fields marked "(Line Override)" replace the header value for that line. Header and lines accept ExtendedData. |
| Rules | SupplierCode must be set on the header or on every line. Status should be 00 planned, 01 in transit, 02 in process, 03 closed or 04 cancelled. |
| Delete | POST /supply-transactions/delete |
POST /supply-transactions/link-order records the number your own system gave to an order that GAINS generated. It takes one object, not an array: the GAINS TrackingNumber and your ExternalOrderId, both required. It creates no task and answers 202 with no body; a request that fails its checks answers 400.
Usage transactions
Components consumed by work orders.
| Row | Detail |
|---|---|
| Endpoint | POST /usage-transactions |
| Identified by | WorkOrderNumber, ActualLocationCode, OrderReleaseDate, WorkLineNumber and ItemCode, the fields a delete takes |
| Required | IdealLocationCode, ActualLocationCode, RequestDate, OrderEntryDate, at least one entry in LineItems. Per line: ItemCode, PromiseDate, OrderReleaseDate, RequestedQuantity, ProducedQuantity, WorkOrderNumber, WorkLineNumber, WorkSplit, Status. |
| Structure | One record per header, with its lines under LineItems. |
| Delete | POST /usage-transactions/delete |
Work order components
The kits a work order assembles and the components each kit consumes.
| Row | Detail |
|---|---|
| Endpoint | POST /work-order-components |
| Identified by | WorkOrderNumber, KitItemCode, KitLocationCode, ComponentItemCode and ComponentLocationCode |
| Required | WorkOrderNumber, at least one entry in Kits. Per kit: KitItemCode, KitLocationCode and at least one entry in Components. Per component: ComponentItemCode, ComponentLocationCode, LineNumber, SplitNumber. |
| Structure | Work order → Kits → Components. |
| Delete | None |
Planning inputs
Imported forecasts
A monthly forecast you produce outside GAINS, per SKU-location.
| Row | Detail |
|---|---|
| Endpoint | POST /forecasts |
| Identified by | ItemCode and LocationCode; each forecast you send by its GeneratedOn |
| Required | ItemCode, at least one entry in Locations. Per location: LocationCode, GeneratedOn and at least 12 ForecastBuckets. Per bucket: ForecastPeriodNumber, ForecastQuantity. |
| Structure | Item → Locations → ForecastBuckets. |
| Rules | ForecastPeriodNumber from 1 to 24, numbered from 1 with no gaps and no repeats. |
| Delete | POST /forecasts/delete |
Leading indicator inputs
Values of an external indicator, by period, that GAINS uses in leading indicator analysis.
| Row | Detail |
|---|---|
| Endpoint | POST /lia-input/weekly, POST /lia-input/monthly |
| Identified by | ItemCode, LocationCode and Channel |
| Required | ItemCode, at least one entry in Locations. Per location: LocationCode, VariableName and at least one entry in Inputs. Per input: BucketNumber, Quantity. |
| Structure | Item → Locations → Inputs. |
| Rules | BucketNumber from 1 to 104 weekly, 1 to 36 monthly, with no repeats within a location. |
| Delete | None |
Calendar overrides
Exceptions to a location's working calendar: days it does, or does not, receive, ship, produce, release or deliver.
| Row | Detail |
|---|---|
| Endpoint | POST /calendar/daily, POST /calendar/weekly, POST /calendar/monthly |
| Identified by | Daily and weekly: LocationCode and OverrideType. Monthly: LocationCode, StartDate and EndDate. |
| Required | All: LocationCode, AppliesTo. Daily: OverrideType, ModifiedSchedule. Weekly: OverrideType, StartDate, EndDate, ModifiedSchedule. Monthly: StartDate, EndDate, ModifiedSchedule. |
| Structure | One flat record per override. |
| Rules | OverrideType is E (exclude working time) or I (include it). AppliesTo lists one or more of receive, ship, production, release, delivery. ModifiedSchedule is one date on a daily override; a list of lowercase day names (monday to sunday) on a weekly one; a list of days of the month ("1" to "31") on a monthly one. |
| Delete | None |
[
{
"LocationCode": "CHI01",
"OverrideType": "E",
"Description": "No Saturday receiving June to August",
"StartDate": "2026-06-01",
"EndDate": "2026-08-31",
"ModifiedSchedule": ["saturday"],
"AppliesTo": ["receive", "delivery"]
}
]Custom data
Data that fits none of the subjects above can be loaded through a custom schema that GAINS sets up for you. See Custom Schema.
Related guides
- Inbound Endpoints & Integration Tasks: responses, tasks and task statuses.
- Rejected Records: reading
RejectedRecordsandRecordKey. - Load Throughput & Retries: batch sizing and retrying safely.
Updated about 9 hours ago
