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:

RowMeaning
Identified byThe 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.
StructureHow records nest. The 1000-record limit counts top-level records only.
RulesChecks beyond required fields, maximum lengths and formats.

Rules common to every subject:

🚧

Some dates are required although the API Reference shows them as optional

GAINS Connect rejects a record without these dates: RequestDate and OrderEntryDate on usage transactions, and PromiseDate and OrderReleaseDate on their lines; EffectiveFrom on bill of material components; GeneratedOn on imported forecasts; StartDate and EndDate on weekly and monthly calendar overrides, and ModifiedSchedule on daily ones; and on deletes, CustomerRequestDate for demand transactions, OrderReleaseDate for usage transactions and EffectiveFrom for bills of material.

Master data

SKUs

An item in the GAINS item master, independent of where it is stocked.

RowDetail
EndpointPOST /skus
Identified byItemCode
RequiredItemCode, Description, Department, Group
StructureOne flat record per item. Accepts ExtendedData.
DeletePOST /skus/delete

Locations

A distribution center, warehouse, branch or other place where items are planned or stocked.

RowDetail
EndpointPOST /locations
Identified byLocationCode
RequiredLocationCode, Type
StructureOne flat record per location. ParentDefaultCode names its default parent location. Accepts ExtendedData.
RulesLatitude from -90 to 90 and Longitude from -180 to 180, each at most 10 characters long including sign and decimal point.
DeletePOST /locations/delete

SKU-locations

An item at a location, the level at which GAINS forecasts and plans inventory.

RowDetail
EndpointPOST /skus-locations
Identified byItemCode and LocationCode
RequiredItemCode, LocationCode
StructureOne flat record per SKU-location. Accepts ExtendedData.
RulesCosts, prices, quantities, lead time and service level must be zero or greater.
DeletePOST /skus-locations/delete. Nothing is deleted until you approve the request.

Customers

A customer and one of its ship-to destinations.

RowDetail
EndpointPOST /customers
Identified byCustomerCode and ShipToCode
RequiredCustomerCode, ShipToCode
StructureOne flat record per customer ship-to.
RulesLatitude from -90 to 90 and Longitude from -180 to 180, each at most 30 characters long.
DeletePOST /customers/delete

Vendors

A supplier, optionally specific to the location that receives from it.

RowDetail
EndpointPOST /vendors
Identified byVendorCode and ReceiveLocationCode
RequiredVendorCode, Name
StructureOne flat record per vendor and receiving location.
RulesEmail must be a valid email address. Latitude from -90 to 90 and Longitude from -180 to 180, sent as strings.
DeletePOST /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.

RowDetail
EndpointPOST /vendor-alternatives
Identified byItemCode, LocationCode, ProductionLine and CapacityAllocGroup
RequiredItemCode, LocationCode, at least one entry in Vendors. Per vendor: SupplierCode, ProductionLine, CapacityAllocGroup.
StructureOne record per SKU-location, with its vendors under Vendors. Each vendor accepts ExtendedData.
RulesSupplierType is M (manufactured), P (purchased) or empty.
DeletePOST /vendor-alternatives/delete

Vendor constraints

Purchase order minimums, maximums and lead times that apply to a vendor.

RowDetail
EndpointPOST /vendor-constraints
Identified byVendorCode and ReceiveLocationCode. An omitted ReceiveLocationCode means every receiving location.
RequiredVendorCode, POQuantity, POUnitOfMeasure, POType, POIntegrity
StructureOne flat record per constraint.
RulesVendorType 1 to 3, POUnitOfMeasure 1 to 4, POType 1 to 6, POIntegrity 1 or 2.
DeleteNone

Partner vendor parameters

Vendor costs, capacity and price breaks for an item, sent by a partner. See Introduction to Partner APIs.

RowDetail
EndpointPOST /partners/vendor-parameters
Identified byItemCode, SupplierCode, and LocationCode per location
RequiredItemCode, SupplierCode, at least one entry in Locations
StructureOne record per item and vendor, with its locations under Locations. Each location accepts ExtendedData.
RulesAt most 3 PriceBreaks per location, numbered from 1 with no gaps and no repeats.
DeleteNone

Bills of material

The components that make up a kit at the location where it is assembled.

RowDetail
EndpointPOST /bills-of-material
Identified byKitItemCode, KitLocationCode, ComponentItemCode, ComponentLocationCode and EffectiveFrom
RequiredKitItemCode, at least one entry in KitLocations. Per kit location: KitLocationCode and at least one entry in Components. Per component: ComponentItemCode, ComponentLocationCode, ComponentQty, EffectiveFrom.
StructureKit → KitLocations → Components.
DeletePOST /bills-of-material/delete

Supercessions

A new SKU-location that replaces one or more old ones.

RowDetail
EndpointPOST /supercessions
Identified byThe new and the old ItemCode and LocationCode
RequiredNewItem with ItemCode and LocationCode; at least one entry in OldItems, each with ItemCode and LocationCode
StructureOne record per new SKU-location, with the SKU-locations it replaces under OldItems.
RulesAn old SKU-location cannot be the new one.
DeletePOST /supercessions/delete

SKU-location alternatives

A SKU-location that can be substituted for another, with the cost of substituting and of transporting it.

RowDetail
EndpointPOST /skul-alternatives
Identified byTargetItemCode, TargetLocationCode, SourceItemCode and SourceLocationCode
RequiredAll four codes, and FixedSubstitutionCost, VariableSubstitutionCost, FixedTransportCost, VariableTransportCost
StructureOne flat record per substitution.
RulesThe source SKU-location must differ from the target.
DeleteNone

Price breaks

Quantity discounts and expediting costs for a SKU-location.

RowDetail
EndpointPOST /price-breaks
Identified byItemCode and LocationCode; each break by its Break number
RequiredItemCode, LocationCode, at least one entry in PriceBreaks. Per break: Break, Discount, UnitCost, MinOrderQty.
StructureOne record per SKU-location, with its breaks under PriceBreaks.
RulesBreak from 1 to 5, numbered from 1 with no gaps and no repeats. Discount, DelayPercent and ExpeditePerOrder from 0 to 1.
DeletePOST /price-breaks/delete

Inventory

Inventory availability

On-hand and unshipped quantities of an item at each location.

RowDetail
EndpointPOST /inventory-availability
Identified byItemCode and LocationCode
RequiredItemCode, at least one entry in Locations. Per location: LocationCode, OnHandQty, UnshippedQty.
StructureOne record per item, with its locations under Locations.
DeleteNone

Inventory lots

On-hand quantity of an item by lot, at each location.

RowDetail
EndpointPOST /inventory-lots
Identified byItemCode, LocationCode and LotNo
RequiredItemCode, at least one entry in Locations. Per location: LocationCode and at least one entry in Lots. Per lot: LotNo, LotOnHandQuantity.
StructureItem → Locations → Lots. Each lot accepts ExtendedData.
DeleteNone

Transactions

Demand transactions

Sales order lines, both shipped history and open orders.

RowDetail
EndpointPOST /demand-transactions, or POST /demand-transactions-splits for lines split across dates or lots
Identified byOrderNumber, LineNumber, ItemCode, IdealShipFromLocationCode, CustomerRequestDate and CustomerShipToCode, the fields a delete takes
RequiredAt 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.
StructureOne 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.
RulesIdealShipFromLocationCode 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.
DeletePOST /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.

RowDetail
EndpointPOST /demand-events
Identified byEventId
RequiredEventId. Per detail: ItemCode, LocationCode.
StructureOne record per event, with the SKU-locations it affects under Details. Event and details accept ExtendedData.
RulesEndDate must be on or after StartDate.
DeletePOST /demand-events/delete

Supply transactions

Purchase, transfer and work order lines: what is on order and what has been received.

RowDetail
EndpointPOST /supply-transactions, or POST /supply-transactions-splits for lines split across dates or statuses
Identified byOrderNumber, LineNumber, and SplitNumber for split lines
RequiredOrderNumber, OriginalOrderCreateDate, at least one entry in LineItems. Per line: LineNumber, ItemCode, LocationCode, Status. With splits, Status moves to each split; per split: SplitNumber, Status.
StructureOne 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.
RulesSupplierCode 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.
DeletePOST /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.

RowDetail
EndpointPOST /usage-transactions
Identified byWorkOrderNumber, ActualLocationCode, OrderReleaseDate, WorkLineNumber and ItemCode, the fields a delete takes
RequiredIdealLocationCode, ActualLocationCode, RequestDate, OrderEntryDate, at least one entry in LineItems. Per line: ItemCode, PromiseDate, OrderReleaseDate, RequestedQuantity, ProducedQuantity, WorkOrderNumber, WorkLineNumber, WorkSplit, Status.
StructureOne record per header, with its lines under LineItems.
DeletePOST /usage-transactions/delete

Work order components

The kits a work order assembles and the components each kit consumes.

RowDetail
EndpointPOST /work-order-components
Identified byWorkOrderNumber, KitItemCode, KitLocationCode, ComponentItemCode and ComponentLocationCode
RequiredWorkOrderNumber, at least one entry in Kits. Per kit: KitItemCode, KitLocationCode and at least one entry in Components. Per component: ComponentItemCode, ComponentLocationCode, LineNumber, SplitNumber.
StructureWork order → Kits → Components.
DeleteNone

Planning inputs

Imported forecasts

A monthly forecast you produce outside GAINS, per SKU-location.

RowDetail
EndpointPOST /forecasts
Identified byItemCode and LocationCode; each forecast you send by its GeneratedOn
RequiredItemCode, at least one entry in Locations. Per location: LocationCode, GeneratedOn and at least 12 ForecastBuckets. Per bucket: ForecastPeriodNumber, ForecastQuantity.
StructureItem → Locations → ForecastBuckets.
RulesForecastPeriodNumber from 1 to 24, numbered from 1 with no gaps and no repeats.
DeletePOST /forecasts/delete

Leading indicator inputs

Values of an external indicator, by period, that GAINS uses in leading indicator analysis.

RowDetail
EndpointPOST /lia-input/weekly, POST /lia-input/monthly
Identified byItemCode, LocationCode and Channel
RequiredItemCode, at least one entry in Locations. Per location: LocationCode, VariableName and at least one entry in Inputs. Per input: BucketNumber, Quantity.
StructureItem → Locations → Inputs.
RulesBucketNumber from 1 to 104 weekly, 1 to 36 monthly, with no repeats within a location.
DeleteNone

Calendar overrides

Exceptions to a location's working calendar: days it does, or does not, receive, ship, produce, release or deliver.

RowDetail
EndpointPOST /calendar/daily, POST /calendar/weekly, POST /calendar/monthly
Identified byDaily and weekly: LocationCode and OverrideType. Monthly: LocationCode, StartDate and EndDate.
RequiredAll: LocationCode, AppliesTo. Daily: OverrideType, ModifiedSchedule. Weekly: OverrideType, StartDate, EndDate, ModifiedSchedule. Monthly: StartDate, EndDate, ModifiedSchedule.
StructureOne flat record per override.
RulesOverrideType 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.
DeleteNone
[
  {
    "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


Did this page help you?