forked from gs1/GS1_DigitalLink_Resolver_CE
-
Notifications
You must be signed in to change notification settings - Fork 0
Manual Integration of Passport with Resolver
Yen Le Diep Hoang edited this page Sep 14, 2023
·
2 revisions
- Start repo on a Local or Server Environment (How to set up the test environment automatically)
The GS1 Digital Link converts a barcode into a web address. This repository provides the capability to create a comprehensive resolver service, enabling you to input information related to GTINs and other GS1 keys. It allows you to redirect web clients to their respective destinations. When creating a GS1 Resolver, you will add a passport to the targetURL
field and use 'application/json' as the mimeType
.
curl --location 'http://localhost/resolver' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 5555555555555' \
--data '[
{
"identificationKeyType": "gtin",
"identificationKey": "8935001810087",
"itemDescription": "Meat product",
"qualifierPath": "/",
"active": true,
"responses": [
{
"linkType": "gs1:pip",
"ianaLanguage": "en",
"context": "au",
"mimeType": "application/json",
"linkTitle": "Asset Information Page",
"targetUrl": "https://agtrace-passports.s3.ap-southeast-2.amazonaws.com/COO-passport.json",
"defaultLinkType": true,
"defaultIanaLanguage": true,
"defaultContext": true,
"defaultMimeType": true,
"fwqs": false,
"active": true
}
]
}
]'
- Identification Key Type (e.g. '01' for GTIN) - Application identifiers
- Identification Key Value (the GTIN's 14-digit barcode value (8-, 12- and 13-digit GTINs are zero-padded to make them 14-digits))
- Qualifier Path (often just the root path "/" but GTINs can have CPVs, lot numbers and serial numbers in the path, each separated by "/")
- LinkType (a word from the GS1 Web Vocabulary describing what sort of information is being requested. e.g. Product Info? User Manual?)
- Language (in which the information is authored in)
- Context (which in Community Edition can be any appropriate data value - in GS1 GO Resolver this is 'territory' such as 'FR' for France)
- MimeType or MediaType (how the information is formatted. e.g. 'text/html', 'application/json', using 'application/json' in this case)
- Target URL (link to the passport)