Get Initial Pack Events
/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.
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
- 200
- 400
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 eventlocation
(object): The location of the initial pack event (see Location object structure)racsUsed
(array): Array of Raw Agricultural Commodities usedgtin
(string): Case-level Global Trade Identification Number (GTIN-14). GS1 GTIN Executive SummaryisFtlItem
(boolean): Indicates if the item is on the Food Traceability ListpackSize
(string): Size of the packpackStyle
(string): Style of the packbrandName
(string): Brand namebusinessUnit
(string): Business unit identifierftlCategory
(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 FTLharvestDate
(date): Date of harvestinnerPackUpc
(string): Point of sale barcode, may be GTIN-8, GTIN-12, GTIN-13, or GTIN-14. GS1 GTIN Executive SummaryracProductId
(string): Product ID of the RACwoLineNumber
(string): Work order line numberharvestCompany
(string): Company that performed the harvestproductVariety
(string): Variety of the productscientificName
(string): Scientific nameitemDescription
(string): Description of the itemproductCommodity
(string): Commodity of the productracUsedQuantity
(number): Quantity of RAC usedalternateItemCode
(string): Alternate item codeharvestCompanyPhone
(string): Phone number of the harvest companyracUsedQuantityUom
(string): Unit of measure for the RAC quantityacceptableSpeciesName
(string): Acceptable species namefarm
(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 producedgtin
(string): Global Trade Item NumberisFtlItem
(boolean): Indicates if the item is on the Food Traceability ListpackSize
(string): Size of the packbrandName
(string): Brand namepackStyle
(string): Style of the packftlCategory
(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 FTLbusinessUnit
(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 numberproductVariety
(string): Variety of the productscientificName
(string): Scientific nameitemDescription
(string): Description of the itemproductCommodity
(string): Commodity of the productalternateItemCode
(string): Alternate item codelotCode
(string): Lot codequantity
(number): Quantity producedacceptableSpeciesName
(string): Acceptable species namecaseGtin
(string): GTIN of the caseproductId
(string): Product IDharvestDate
(date): Harvest datequantityUom
(string): Unit of measure for the quantitypackagingDate
(date): Packaging dateexpirationDate
(date): Expiration dateproductionDate
(date): Production datebestBeforeDate
(date): Best before date
workOrderNumber
(string): Work order numbereventDateTime
(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 identifiergln
(string): GS1 Global Location Number, a 13-digit string. GS1 GTIN Executive Summarycity
(string): City of the locationduns
(string): DUNS numberstate
(string): State of the locationmarket
(string): Market identifierregion
(string): Region identifiercountry
(string): Country of the locationgeoFence
(string): Geo-fence coordinatespostalCode
(string): Postal codephoneNumber
(string): Phone numberbusinessUnit
(string): Business unit identifierlocationName
(string): Name of the locationlocationType
(string): Type of the locationglnAssignedBy
(string): Entity that assigned the GLNgpsCoordinates
(string): GPS coordinatesstreetAddress1
(string): Primary street addressstreetAddress2
(string): Secondary street addressisCoveredByGdst
(boolean): Indicates if the location is covered by GDSTparentLocationId
(string): Parent location IDisPrimaryLocation
(boolean): Indicates if this is the primary locationalternateLocationId
(string): Alternate location ID
Pageable
pageable
(object)pageNumber
(number): The current page number in the page series. Index 0 is first pagepageSize
(number): The number of events contained in the pageoffset
(number): If there is an offset specified on there return results this will be populates. Default is 0unpaged
(boolean): If the record set is unpaged then true else falsepaged
(boolean): If the record set is paged then true else falsesort
(object)unsorted
(boolean): If the record set is unsorted then true else falsesorted
(boolean): If the record set is sorted then true else falseempty
(boolean): If the record set is empty then true else false
totalPages
(number): The total amount of pages that contain all events in the querytotalElements
(number): The total amount of events in the querylast
(boolean): If the page is the last in the series then true else falsenumberOfElements
(number): The total amount of events in the tablesize
(number): The number of events contained in the pagenumber
(number): The current page number in the page seriessort
(object)unsorted
(boolean): If the record set is unsorted then true else falsesorted
(boolean): If the record set is sorted then true else falseempty
(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 falseempty
(boolean): If the page is empty then true else false
Description of what user-fixable validation error occurred and in what part of the payload
{
"timestamp": "2024-12-08T20:47:54.096+00:00",
"status": 400,
"error": "Bad Request",
"message": "<error description>"
}