Skip to main content

Get Initial Pack Events

Method: GET
/events/initial-pack

As a Customer of iFoodDS, you can use the Get Initial Pack Event API to query initial pack event data from the iFoodDS Trace Exchange platform.

info

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

Request

Type: application/json

Retrieving initial pack events via the API is done through paging. The request requires a series of query parameters which define the page that must be returned. These parameters must be supplied in the url when the get is executed in order to return the result set for the page being queried.

Query Parameters

Optional

  • page (number): The page index of the events to return. The first page is index 0.
  • size (number): The number of results to return per page. Default value is 20.
  • submitStartDateTime (datetime): Filters results to include only events submitted after the specified date and time.
  • submitEndDateTime (datetime): Filters results to include only events submitted before the specified date and time.
  • eventStartDateTime (datetime): Filters results to include only events with an event date and time after the specified date and time.
  • eventEndDateTime (datetime): Filters results to include only events with an event date and time before the specified date and time.
  • workOrderNumber (string): The exact work order number on the event.
  • initialPackingLocationCode (string): The exact initial location packing code on the event.
  • racsUsedWoLineNumber (string): The exact racs used work order line number on the event.
  • foodProducedWoLineNumber (string): The exact food produced work order line number on the event.
  • racItemCode (string): The exact raw agricultural commodity item code on the event.
  • foodProducedItemCode (string): The exact food produced item code on the event.

Data Constraints

Please note the following data constraints:

  • datetimes must use the format: yyyy-MM-ddTHH:mm:ss

Response

Return result for the initial pack event data queried.

{
"content": [
{
"id": "<event id>",
"location": {
"id": "<location id>",
"gln": "<gln>",
"city": "<city>",
"duns": "<duns>",
"state": "<state>",
"market": "<market>",
"region": "<region>",
"country": "<country>",
"geoFence": "<geo fence>",
"postalCode": "<postal code>",
"phoneNumber": "<phone number>",
"businessUnit": "<business unit>",
"locationName": "<location name>",
"locationType": "<location type>",
"glnAssignedBy": "<gln assigned by>",
"gpsCoordinates": "<gps coordinates>",
"streetAddress1": "<street address 1>",
"streetAddress2": "<street address 2>",
"isCoveredByGdst": <is covered by gdst>,
"parentLocationId": "<parent location id>",
"isPrimaryLocation": <is primary location>,
"alternateLocationId": "<alternate location id>"
},
"racsUsed": [
{
"gtin": "<gtin>",
"isFtlItem": <is ftl item>,
"packSize": "<pack size>",
"packStyle": "<pack style>",
"brandName": "<brand name>",
"businessUnit": "<business unit>",
"ftlCategory": "<ftl category>",
"harvestDate": "<harvest date>",
"innerPackUpc": "<inner pack upc>",
"racProductId": "<rac product id>",
"woLineNumber": "<work order line number>",
"harvestCompany": "<harvest company>",
"productVariety": "<product variety>",
"scientificName": "<scientific name>",
"itemDescription": "<item description>",
"productCommodity": "<product commodity>",
"racUsedQuantity": <rac used quantity>,
"alternateItemCode": "<alternate item code>",
"harvestCompanyPhone": "<harvest company phone>",
"racUsedQuantityUom": "<rac used quantity uom>",
"acceptableSpeciesName": "<acceptable species name>",
"farm": {
"id": "<farm id>",
"gln": "<farm gln>",
"city": "<farm city>",
"duns": "<farm duns>",
"state": "<farm state>",
"market": "<farm market>",
"region": "<farm region>",
"country": "<farm country>",
"geoFence": "<farm geo fence>",
"postalCode": "<farm postal code>",
"phoneNumber": "<farm phone number>",
"businessUnit": "<farm business unit>",
"locationName": "<farm location name>",
"locationType": "<farm location type>",
"glnAssignedBy": "<farm gln assigned by>",
"gpsCoordinates": "<farm gps coordinates>",
"streetAddress1": "<farm street address 1>",
"streetAddress2": "<farm street address 2>",
"isCoveredByGdst": <farm is covered by gdst>,
"parentLocationId": "<farm parent location id>",
"isPrimaryLocation": <farm is primary location>,
"alternateLocationId": "<farm alternate location id>"
},
"pond": {
"id": "<pond id>",
"gln": "<pond gln>",
"city": "<pond city>",
"duns": "<pond duns>",
"state": "<pond state>",
"market": "<pond market>",
"region": "<pond region>",
"country": "<pond country>",
"geoFence": "<pond geo fence>",
"postalCode": "<pond postal code>",
"phoneNumber": "<pond phone number>",
"businessUnit": "<pond business unit>",
"locationName": "<pond location name>",
"locationType": "<pond location type>",
"glnAssignedBy": "<pond gln assigned by>",
"gpsCoordinates": "<pond gps coordinates>",
"streetAddress1": "<pond street address 1>",
"streetAddress2": "<pond street address 2>",
"isCoveredByGdst": <pond is covered by gdst>,
"parentLocationId": "<pond parent location id>",
"isPrimaryLocation": <pond is primary location>,
"alternateLocationId": "<pond alternate location id>"
},
"field": {
"id": "<field id>",
"gln": "<field gln>",
"city": "<field city>",
"duns": "<field duns>",
"state": "<field state>",
"market": "<field market>",
"region": "<field region>",
"country": "<field country>",
"geoFence": "<field geo fence>",
"postalCode": "<field postal code>",
"phoneNumber": "<field phone number>",
"businessUnit": "<field business unit>",
"locationName": "<field location name>",
"locationType": "<field location type>",
"glnAssignedBy": "<field gln assigned by>",
"gpsCoordinates": "<field gps coordinates>",
"streetAddress1": "<field street address 1>",
"streetAddress2": "<field street address 2>",
"isCoveredByGdst": <field is covered by gdst>,
"parentLocationId": "<field parent location id>",
"isPrimaryLocation": <field is primary location>,
"alternateLocationId": "<field alternate location id>"
},
"cooling": {
"id": "<cooling id>",
"gln": "<cooling gln>",
"city": "<cooling city>",
"duns": "<cooling duns>",
"state": "<cooling state>",
"market": "<cooling market>",
"region": "<cooling region>",
"country": "<cooling country>",
"geoFence": "<cooling geo fence>",
"postalCode": "<cooling postal code>",
"phoneNumber": "<cooling phone number>",
"businessUnit": "<cooling business unit>",
"locationName": "<cooling location name>",
"locationType": "<cooling location type>",
"glnAssignedBy": "<cooling gln assigned by>",
"gpsCoordinates": "<cooling gps coordinates>",
"streetAddress1": "<cooling street address 1>",
"streetAddress2": "<cooling street address 2>",
"isCoveredByGdst": <cooling is covered by gdst>,
"parentLocationId": "<cooling parent location id>",
"isPrimaryLocation": <cooling is primary location>,
"alternateLocationId": "<cooling alternate location id>"
},
"coolingDate": "<cooling date>"
}
],
"foodProduced": [
{
"gtin": "<gtin>",
"isFtlItem": <is ftl item>,
"packSize": "<pack size>",
"brandName": "<brand name>",
"packStyle": "<pack style>",
"ftlCategory": "<ftl category>",
"businessUnit": "<business unit>",
"innerPackUpc": "<inner pack upc>",
"woLineNumber": "<work order line number>",
"productVariety": "<product variety>",
"scientificName": "<scientific name>",
"itemDescription": "<item description>",
"productCommodity": "<product commodity>",
"alternateItemCode": "<alternate item code>",
"lotCode": "<lot code>",
"quantity": <quantity>,
"acceptableSpeciesName": "<acceptable species name>",
"caseGtin": "<case gtin>",
"productId": "<product id>",
"harvestDate": "<harvest date>",
"quantityUom": "<quantity uom>",
"packagingDate": "<packaging date>",
"expirationDate": "<expiration date>",
"productionDate": "<production date>",
"bestBeforeDate": "<best before date>"
}
],
"workOrderNumber": "<work order number>",
"eventDateTime": "<event date time>"
}
],
"empty": <is page empty>,
"first": <is first page>,
"last": <is last page>,
"number": <page number>,
"numberOfElements": <number of elements>,
"pageable": {
"empty": <is page empty>,
"offset": <offset size>,
"pageNumber": <page number>,
"pageSize": <page size>,
"paged": <is paged>,
"sort": {
"empty": <is page empty>,
"sorted": <is sorted>,
"unsorted": <is unsorted>
},
"unpaged": <is unpaged>
},
"size": <page size>,
"sort": {
"empty": <is empty>,
"sorted": <is sorted>,
"unsorted": <is unsorted>
},
"totalElements": <total elements>,
"totalPages": <total pages>
}

Content

  • id (uuid): The id of the initial pack event
  • location (object): The location of the initial pack event (see Location object structure)
  • racsUsed (array): Array of Raw Agricultural Commodities used
    • gtin (string): Case-level Global Trade Identification Number (GTIN-14). GS1 GTIN Executive Summary
    • isFtlItem (boolean): Indicates if the item is on the Food Traceability List
    • packSize (string): Size of the pack
    • packStyle (string): Style of the pack
    • brandName (string): Brand name
    • businessUnit (string): Business unit identifier
    • 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 
    • harvestDate (date): Date of harvest
    • innerPackUpc (string): Point of sale barcode, may be GTIN-8, GTIN-12, GTIN-13, or GTIN-14. GS1 GTIN Executive Summary
    • racProductId (string): Product ID of the RAC
    • woLineNumber (string): Work order line number
    • harvestCompany (string): Company that performed the harvest
    • productVariety (string): Variety of the product
    • scientificName (string): Scientific name
    • itemDescription (string): Description of the item
    • productCommodity (string): Commodity of the product
    • racUsedQuantity (number): Quantity of RAC used
    • alternateItemCode (string): Alternate item code
    • harvestCompanyPhone (string): Phone number of the harvest company
    • racUsedQuantityUom (string): Unit of measure for the RAC quantity
    • acceptableSpeciesName (string): Acceptable species name
    • farm (object): Farm location information (see Location object structure)
    • pond (object): Pond location information (see Location object structure)
    • field (object): Field location information (see Location object structure)
    • cooling (object): Cooling location information (see Location object structure)
    • coolingDate (datetime): Date of cooling
  • foodProduced (array): Array of food products produced
    • gtin (string): Global Trade Item Number
    • isFtlItem (boolean): Indicates if the item is on the Food Traceability List
    • packSize (string): Size of the pack
    • brandName (string): Brand name
    • packStyle (string): Style of the pack
    • 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 
    • businessUnit (string): Business unit identifier
    • `innerPackUpc (string): Point of sale barcode, may be GTIN-8, GTIN-12, GTIN-13, or GTIN-14. GS1 GTIN Executive Summary
    • woLineNumber (string): Work order line number
    • productVariety (string): Variety of the product
    • scientificName (string): Scientific name
    • itemDescription (string): Description of the item
    • productCommodity (string): Commodity of the product
    • alternateItemCode (string): Alternate item code
    • lotCode (string): Lot code
    • quantity (number): Quantity produced
    • acceptableSpeciesName (string): Acceptable species name
    • caseGtin (string): GTIN of the case
    • productId (string): Product ID
    • harvestDate (date): Harvest date
    • quantityUom (string): Unit of measure for the quantity
    • packagingDate (date): Packaging date
    • expirationDate (date): Expiration date
    • productionDate (date): Production date
    • bestBeforeDate (date): Best before date
  • workOrderNumber (string): Work order number
  • eventDateTime (datetime): Date and time of the event

Location Object

The location object contains information about the location where the initial pack event occurred:

  • id (string): Location identifier
  • gln (string): GS1 Global Location Number, a 13-digit string. GS1 GTIN Executive Summary
  • city (string): City of the location
  • duns (string): DUNS number
  • state (string): State of the location
  • market (string): Market identifier
  • region (string): Region identifier
  • country (string): Country of the location
  • geoFence (string): Geo-fence coordinates
  • postalCode (string): Postal code
  • phoneNumber (string): Phone number
  • businessUnit (string): Business unit identifier
  • locationName (string): Name of the location
  • locationType (string): Type of the location
  • glnAssignedBy (string): Entity that assigned the GLN
  • gpsCoordinates (string): GPS coordinates
  • streetAddress1 (string): Primary street address
  • streetAddress2 (string): Secondary street address
  • isCoveredByGdst (boolean): Indicates if the location is covered by GDST
  • parentLocationId (string): Parent location ID
  • isPrimaryLocation (boolean): Indicates if this is the primary location
  • alternateLocationId (string): Alternate location ID

Pageable

  • pageable (object)
    • pageNumber (number): The current page number in the page series. Index 0 is first page
    • pageSize (number): The number of events contained in the page
    • offset (number): If there is an offset specified on there return results this will be populates. Default is 0
    • unpaged (boolean): If the record set is unpaged then true else false
    • paged (boolean): If the record set is paged then true else false
    • sort (object)
      • unsorted (boolean): If the record set is unsorted then true else false
      • sorted (boolean): If the record set is sorted then true else false
      • empty (boolean): If the record set is empty then true else false
  • totalPages (number): The total amount of pages that contain all events in the query
  • totalElements (number): The total amount of events in the query
  • last (boolean): If the page is the last in the series then true else false
  • numberOfElements (number): The total amount of events in the table
  • size (number): The number of events contained in the page
  • number (number): The current page number in the page series
  • sort (object)
    • unsorted (boolean): If the record set is unsorted then true else false
    • sorted (boolean): If the record set is sorted then true else false
    • empty (boolean): If the record set is empty then true else false
  • first (boolean): If the page is the first in the series then true else false
  • empty (boolean): If the page is empty then true else false