Skip to main content

Update Initial Pack Event

Method: PUT
/data-provider/events/initial-pack/{id}

As a Data Provider in the iFoodDS partner program, you use the iFoodDS Initial Pack Event API to update FSMA 204 Initial Pack event data on behalf of shared customers to the iFoodDS Trace Exchange platform. This streamlines the capture and sharing of customer’s FSMA 204 ship event data promoting efficiency for our shared customers.

Event records will be stored for a minimum of two years.

info

This endpoint is being refined and thus subject to change. These docs will update when changes are made.

Request

Type: application/json

The {id} of the path is the event ID retrieved from:

  1. Completion of a succesful POST. Example: "request_ids": ["9ed5911f-f6a4-4ba2-9eb4-d6428237be28"]
  2. Within the payload results of a GET. Example: "id": "7b5c43c3-3526-4135-a602-0e3979c21d88"

The body of the request comprises three main sections: the productMasterDataList, the locationMasterList, and the eventList. The first two sections are there to reduce the duplication of data you need to provide for the eventList.

{
"productMasterDataList": [
{
"itemCode": "<item code>",
"itemDescription": "<item description>",
"isFtlItem": true,
"ftlCategory": "<FTL (Food Traceability List) category>",
"brandName": "<brand name>",
"packStyle": "<pack style>",
"packSize": "<pack size>",
"productCommodity": "<product commodity>",
"productVariety": "<product variety>",
"scientificName": "<scientific name>",
"acceptableSpeciesName": "<acceptable species name>",
"gtin": "<GTIN (Global Trade Item Number)>",
"itemUpc": "<item UPC (Universal Product Code)>",
"innerPackUpc": "<inner pack UPC>",
"plu": "<PLU (Price Look-up)>",
"alternateItemCode": "<alternate item code>",
"isCoveredByGdst": true
}
],
"locationMasterList": [
{
"locationName": "<location name>",
"locationCode": "<location code>",
"locationType": "<location type>",
"parentLocationId": "<parent location id>",
"gln": "<GLN (global location number)>",
"glnAssignedBy": "<GLN assigned by>",
"duns": "<DUNS number>",
"alternateLocationCode": "<alternate location id>",
"phoneNumber": "<phone number>",
"isPrimaryLocation": true,
"isCoveredByGdst": false,
"address": {
"streetAddress1": "<street address 1>",
"streetAddress2": "<street address 2>",
"city": "<city>",
"state": "<state>",
"postalCode": "<postal code>",
"country": "<country code>"
},
"geoLocation": {
"gpsCoordinates": [
"<latitude>",
"<longitude>"
],
"geoFence": [
[
"<latitude1>",
"<longitude1>"
],
[
"<latitude2>",
"<longitude2>"
]
]
}
}
],
"eventList": {
"dataProviderVendorId": "<data provider vendor id>",
"dataProviderVendorName": "<data provider vendor name>",
"workOrderNumber": "<work order number>",
"eventDateTime": "<event date time>",
"initialPackingLocationId": "<initial packing location id>",
"racsUsedInInitialPacking": [
{
"woLineNumber": "<work order line number>",
"racProductId": "<raw agricultural commodity product id>",
"racUsedQuantity": <raw agricultural commodity used quantity>,
"racUsedUom": "<raw agricultural commodity used uom>",
"harvestFarmLocationId": "<harvest farm location id>",
"harvestFieldLocationId": "<harvest field location id>",
"harvestPondLocationId": "<harvest pond location id>",
"harvestCompany": "<harvest company>",
"harvestCompanyPhone": "<harvest company phone>",
"harvestDate": "<harvest date>",
"coolingLocationId": "<cooling location id>",
"coolingDate": "<cooling date>",
}
],
"foodsProducedInInitialPacking": {
"woLineNumber": "<work order line number>",
"foodProducedProductId": "<food produced product id>",
"foodProducedLotNumber": "<food produced lot number>",
"foodProducedCaseGtin": "<food produced case gtin>",
"foodProducedQuantity": <food produced quantity>,
"foodProducedUom": "<food produced uom>",
"foodProducedExpirationDate": "<food produced expiration date>",
"foodProducedProductionDate": "<food produced production date>",
"foodProducedPackagingDate": "<food produced packaging date>",
"foodProducedBestBeforeDate": "<food produced best before date>",
"foodProducedHarvestDate": "<food produced harvest date>"
}
}
}

Data Constraints

Please note the following data constraints:

  • strings allow a maximum of 100 characters
  • dates must use the format: yyyy-MM-dd
  • datetimes must use the format: yyyy-MM-ddTHH:mm:ssZ (UTC) or yyyy-MM-ddTHH:mm:ss-hh:00 (UTC minus) or yyyy-MM-ddTHH:mm:ss+hh:00 (UTC plus)

Product Data

Required

  • itemCode (string): The vendor or purchaser item code that will be referenced in the event
  • itemDescription (string): Product Description from the product owner or original purchase order

Additional information will be required in the eventList section.

Optional

  • alternateItemCode (string): This field provides sender and shipper to use and alternate identifier for products. This could be a URL, a UUID, or other globally unique identification scheme. The important thing is that it is unique per product and shared between shipper and receiver. For example, this could be a GS1 Digital Link URL for the product
  • gtin (string): Case-level Global Trade Identification Number (GTIN-14). GS1 GTIN Executive Summary
  • itemUpc (string): Item-level Universal Product Code, may be GTIN-8, GTIN-12, or GTIN-13. GS1 GTIN Executive Summary
  • innerPackUpc (string): Point of sale barcode, may be GTIN-8, GTIN-12, GTIN-13, or GTIN-14. GS1 GTIN Executive Summary
  • plu (string): Item-level Price Look-up Code. PLU Codes Search — IFPS
  • isFtlItem (boolean): Indicates whether product is on the Food Traceability List (FTL)
  • ftlCategory (string)*: Indicates the product's FTL category, i.e. “soft cheese”, “shell eggs”, “nut butter”, “cucumbers”, “herbs”, “leafy greens”, “melons”, “peppers”, “sprouts”, “tomatoes”, “tropical tree fruits”, “fresh-cut fruits”, “fresh-cut vegetables”, “finfish”, “smoked finfish”, “crustaceans”, “molluscan shellfish”, “ready-to-eat deli salads”, or “multiple-ftl-ingredients” *Required if on the FTL - brandName (string): The brand of the product that appears on the consumer package
  • packStyle (string): Product's pack style, e.g. "Case", "Carton", "Tray", "Clamshell", etc.
  • packSize (string): Product's pack size as Packaging Configuration OR Count OR Weight + Unit of Measure, e.g. "20 x 12 oz bags"
  • productCommodity (string): For fresh produce, a description of the commodity, e.g. "Peppers"
  • productVariety (string): For fresh produce a description of the variety when applicable, e.g. "Jalapeno"
  • scientificName (string): For seafood the scientific name of the species, see: FDA Seafood List
  • acceptableSpeciesName (string): For seafood a description of the common species name, see: FDA Seafood List
  • isCoveredByGdst (boolean): Flag to indicate that product is part of GDST

Location Data

Required

  • locationName (string): Name of vendor's or purchaser's location referenced in the event
  • locationCode (string): Vendor's or purchaser's location code referenced in the event

If address and contact information is already set up in master data with locationCode, then the address information is not required. Otherwise, it is required. Provide at least one of the following:

  • gln (string): GS1 Global Location Number, a 13-digit string. GS1 GTIN Executive Summary
  • duns (string): Dun & Bradstreet Data Universal Numbering System number, a 9-digit string
  • address (object):
    • streetAddress1 (string): Physical street address line 1 information
    • streetAddress2 (string): Physical street address line 2 information, if applicable
    • city (string): City location
    • state (string): State or region location
    • postalCode (string): ZIP or postal code
    • country (string): Country location
    • geoLocation optional (object): Consisting of either...
      • gpsCoordinates as an array of strings representing the latitude followed by longitude expressed in degrees and minutes OR
      • geoFence as an array of string arrays representing the latitude followed by longitude expressed in degrees and minutes for each set of coordinates defining the geo fence

Optional

  • locationType (string): Indicates whether the location is "Internal", "Supplier", or "Customer"
  • parentLocationId (string): To create a hierarchy of locations (divisions, regions, etc.), use this field to point to the location’s parent location
  • glnAssignedBy (string): Indicates whether it was assigned by "GS1", "GLOBALGAP", "Internal", "Trading Partner", or "Other"
  • alternateLocationCode (string): This field provides sender and shipper to use and alternate identifier for connecting locations. This could be a URL, a UUID, or other globally unique identification scheme. The important thing is that it is unique per location and is shared between shipper and receiver. For example, this could be a GS1 Digital Link or Google Place ID
  • phoneNumber (string)*: Phone number including country code with format: +1.999.999.999 *This field is required if address is used to identify location
  • isPrimaryLocation (boolean): This indicates that the location is the primary headquarter location for the organization
  • isCoveredByGdst (boolean): Indicates that this location is covered by the Global Dialogue on Seafood Traceability requirements

Event Data

warning

When sending an event payload, the payload must contain the complete set of records for the corresponding event date time. DO NOT send more than one payload with the same event date time.

Required

  • dataProviderVendorId (string): Your ID for the vendor/supplier
  • workOrderNumber (string): The work order or production order number you assigned.
  • eventDateTime (datetime): Date when initial packing is complete.
  • racProductId (string): This is your internal Product ID for the raw agricultural commodity used in initial packing. This should be stored in your master data.
  • racUsedQuantity (string): The number of units of this TLC used in Initial Packing.
  • foodProducedProductId (string): This Product ID should be stored in your master data. If the cases you produce in initial packing are labeled with case GTIN-14s, the GTIN should be stored in the product master data record for the Product ID referenced.
  • foodProducedLotNumber (string): This is the Lot Number for the foods produced in initial packing.
  • foodProducedQuantity (number): The number of units of this TLC produced in initial packing.

One of the following is required, the others are Optional

  • foodProducedExpirationDate (date): Food Produced Expiration Date
  • foodProducedProductionDate (date): Food Produced Production Date
  • foodProducedPackagingDate (date): Food Produced Packaging Date
  • foodProducedBestBeforeDate (date): Food Produced Best Before Date
  • foodProducedHarvestDate (date): Food Produced Harvest Date

Optional

  • dataProviderVendorName (string): Name of the vendor/supplier
  • initialPackingLocationId (string): Location of initial packing.
  • racUsedUom (string): Unit of measure (e.g., Case) for TLC received.
  • harvestFarmLocationId (string): References a location set up in master data.
  • harvestFieldLocationId (string): References a location set up in master data for the specific field where harvesting occurred.
  • harvestPondLocationId (string): References a location set up in master data for the specific pond where harvesting occurred.
  • harvestCompany (string): Name of the company that performed the harvesting.
  • harvestCompanyPhone (string): Contact phone number for the harvest company.
  • harvestDate (date): This is the date of harvest for the RAC.
  • coolingLocationId (string): This points to the master data record for the cooling location (prior to initial packing).
  • coolingDate (date): This is the date of cooling prior to initial packing
  • woLineNumber (string): This links the TLC to the line item on the work order.
  • foodProducedCaseGtin (string): GTIN-14 of cases of food produced
  • foodProducedUom (string): Unit of measure (e.g., Case) produced in initial packing

Sample Payload

{
"productMasterDataList": [
{
"itemCode": "123",
"itemDescription": "Fresh Oysters",
"isFtlItem": true,
"ftlCategory": "seafood",
"brandName": "Sea Fresh",
"packStyle": "",
"packSize": "",
"productCommodity": "",
"productVariety": "",
"scientificName": "",
"acceptableSpeciesName": "",
"gtin": "",
"innerPackUpc": "",
"itemUpc": "",
"plu": "",
"alternateItemCode": "",
"isCoveredByGdst": true
},
{
"itemCode": "456",
"itemDescription": "Fresh Scallops",
"isFtlItem": true,
"ftlCategory": "seafood",
"brandName": "Sea Fresh",
"packStyle": "",
"packSize": "",
"productCommodity": "",
"productVariety": "",
"scientificName": "",
"acceptableSpeciesName": "",
"gtin": "01234567890123",
"innerPackUpc": "",
"itemUpc": "",
"plu": "",
"alternateItemCode": "2714-a",
"isCoveredByGdst": true
},
{
"itemCode": "123456",
"itemDescription": "Fresh Scallops/Oysters",
"isFtlItem": true,
"ftlCategory": "seafood",
"brandName": "Sea Fresh",
"packStyle": "",
"packSize": "",
"productCommodity": "",
"productVariety": "",
"scientificName": "",
"acceptableSpeciesName": "",
"gtin": "02345678901234",
"innerPackUpc": "",
"itemUpc": "",
"plu": "",
"alternateItemCode": "",
"isCoveredByGdst": true
}
],
"locationMasterList": [
{
"locationCode": "2790",
"locationType": "Internal",
"locationName": "Location 1",
"gln": "gln1",
"glnAssignedBy": "me",
"duns": "duns1",
"alternateLocationCode": "altid2480",
"phoneNumber": "+15555555555",
"isPrimaryLocation": true,
"isCoveredByGdst": true,
"parentLocationId": "3",
"address": {
"streetAddress1": "121 Seaway",
"streetAddress2": "Dock 121",
"city": "Seaside",
"state": "WA",
"postalCode": "99999",
"country": "USA"
},
"geoLocation": {
"gpsCoordinates": [
"36.271142",
"-78.593557"
],
"geoFence": [
[
"50.942499",
"6.898247"
],
[
"50.942275",
"6.898292"
],
[
"50.942263",
"6.898094"
],
[
"50.942106",
"6.898126"
],
[
"50.942130",
"6.898526"
],
[
"50.942512",
"6.898451"
],
[
"50.942499",
"6.898247"
]
]
}
},
{
"locationCode": "5596",
"locationType": "Internal",
"locationName": "Location 2",
"gln": "",
"glnAssignedBy": "",
"duns": "",
"alternateLocationCode": "altid2480",
"phoneNumber": "+15555555555",
"isPrimaryLocation": true,
"isCoveredByGdst": true,
"parentLocationId": "3",
"address": {
"streetAddress1": "121 Seaway",
"streetAddress2": "Dock 121",
"city": "Seaside",
"state": "WA",
"postalCode": "99999",
"country": "USA"
},
"geoLocation": {
"gpsCoordinates": [
"36.271142",
"-78.593557"
],
"geoFence": [
[
"50.942499",
"6.898247"
],
[
"50.942275",
"6.898292"
],
[
"50.942263",
"6.898094"
],
[
"50.942106",
"6.898126"
],
[
"50.942130",
"6.898526"
],
[
"50.942512",
"6.898451"
],
[
"50.942499",
"6.898247"
]
]
}
},
{
"locationCode": "07504550000005",
"locationType": "Customer",
"locationName": "Sea Farms R2",
"gln": "",
"glnAssignedBy": "",
"duns": "",
"alternateLocationCode": "",
"phoneNumber": "+15555555555",
"isPrimaryLocation": true,
"isCoveredByGdst": true,
"address": {
"streetAddress1": "1 Seaway",
"streetAddress2": "Dock 11",
"city": "Seaside",
"state": "WA",
"postalCode": "99999",
"country": "USA"
}
},
{
"locationCode": "2407",
"locationType": "Customer",
"locationName": "Location 3",
"gln": "",
"glnAssignedBy": "",
"duns": "",
"alternateLocationCode": "",
"phoneNumber": "+15555555555",
"isPrimaryLocation": true,
"isCoveredByGdst": true,
"address": {
"streetAddress1": "1 Seaway",
"streetAddress2": "Dock 11",
"city": "Seaside",
"state": "WA",
"postalCode": "99999",
"country": "USA"
}
},
{
"locationCode": "9874",
"locationType": "Customer",
"locationName": "Location 4",
"gln": "",
"glnAssignedBy": "",
"duns": "",
"alternateLocationCode": "",
"phoneNumber": "+15555555555",
"isPrimaryLocation": true,
"isCoveredByGdst": true,
"address": {
"streetAddress1": "1 Seaway",
"streetAddress2": "Dock 11",
"city": "Seaside",
"state": "WA",
"postalCode": "99999",
"country": "USA"
}
}
],
"eventList": {
"dataProviderVendorId": "DPV001",
"dataProviderVendorName": "Fresh Seafood Inc.",
"workOrderNumber": "w012345",
"eventDateTime": "2024-10-10T00:12:34Z",
"eventId": "241547154",
"initialPackingLocationCode": "07504550000005",
"racsUsedInInitialPacking": [
{
"woLineNumber": "1",
"racItemCode": "123",
"racUsedQuantity": 4,
"racUsedUom": "Case",
"harvestFarmLocationCode": "2790",
"harvestFieldLocationCode": "5596",
"harvestPondLocationCode": "2407",
"harvestCompany": "HC Inc.",
"harvestCompanyPhone": "+15555551212",
"harvestDate": "2024-12-01",
"coolingLocationCode": "8974",
"cooling_date": "2024-12-01"
},
{
"woLineNumber": "2",
"racItemCode": "456",
"racUsedQuantity": 9,
"racUsedUom": "Case",
"harvestFarmLocationCode": "2790",
"harvestFieldLocationCode": "5596",
"harvestPondLocationCode": "2407",
"harvestCompany": "HC Inc",
"harvestCompanyPhone": "+15555550101",
"harvestDate": "2024-12-01",
"coolingLocationCode": "9874",
"cooling_date": "2024-12-01"
}
],
"foodsProducedInInitialPacking": {
"woLineNumber": "1",
"foodProducedItemCode": "123456",
"foodProducedLotNumber": "MM",
"foodProducedCaseGtin": "NN",
"foodProducedQuantity": 13,
"foodProducedUom": "Case",
"foodProducedExpirationDate": "2025-06-01",
"foodProducedProductionDate": "2025-01-02",
"foodProducedPackagingDate": "2025-02-01",
"foodProducedBestBeforeDate": "2025-03-01",
"foodProducedHarvestDate": "2025-01-01"
}
}
}

Response

Initial Pack event data ingested successfully

{
"request_ids": ["1abc2f7e-6ca2-40ec-9566-19a850945d7f"]
}