{"id":19528504,"url":"https://github.com/orca-scan/simplified-product-data","last_synced_at":"2025-04-26T11:33:13.568Z","repository":{"id":221389002,"uuid":"753819852","full_name":"orca-scan/simplified-product-data","owner":"orca-scan","description":"A simple data structure for products","archived":false,"fork":false,"pushed_at":"2024-02-14T01:37:46.000Z","size":38,"stargazers_count":5,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T00:09:22.147Z","etag":null,"topics":["barcodes","json","product"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orca-scan.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-06T21:09:07.000Z","updated_at":"2024-02-15T16:32:58.000Z","dependencies_parsed_at":"2024-11-11T01:19:42.270Z","dependency_job_id":"691c23d2-f3c6-48fb-ac11-9190bc8d9307","html_url":"https://github.com/orca-scan/simplified-product-data","commit_stats":null,"previous_names":["orca-scan/simplified-product-data"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orca-scan%2Fsimplified-product-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orca-scan%2Fsimplified-product-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orca-scan%2Fsimplified-product-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orca-scan%2Fsimplified-product-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orca-scan","download_url":"https://codeload.github.com/orca-scan/simplified-product-data/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250980697,"owners_count":21517704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barcodes","json","product"],"created_at":"2024-11-11T01:19:00.040Z","updated_at":"2025-04-26T11:33:13.365Z","avatar_url":"https://github.com/orca-scan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simplified Product Data (SPD)\n\n**Simplified Product Data** is an open source data structure designed to provide developers with easy access to core product information _(including parsed barcode data)_ when a [GS1 Digital Link](https://orcascan.com/solutions/how-to-create-a-gs1-digital-link-qr-code-059f8b29) barcode is scanned.\n\nFor example this [GS1 Digital Link homepage](https://orca.link/01/05065016432004) returns [SPD](example.json) when requested using `Accept: application/json`:\n\n```bash\ncurl -H \"Accept: application/json\" https://id.juxfood.com/01/05065016432004\n```\n\n## Data Structure\n\nSPD contains 3 top level objects:\n* [product](#product)\n* [org](#org)\n* [links](#links)\n\n### `product`\n\nCore product information:\n\nProperty       | Type            | Description\n:--------------|:----------------|:------------------------------------------------------------\n`url`          | `string`        | URL of the product page\n`language`     | `string`        | Language code for the product information\n`title`        | `string`        | Title of the product\n`description`  | `string`        | A brief description of the product\n`images`       | `array[object]` | Array of objects containing [product images](#productimages)\n`barcode`      | `object`        | Object containing [decoded barcode data](#productbarcode)\n`price`        | `string`        | Price of the product\n`currency`     | `string`        | Currency code for the price\n`availability` | `string`        | Availability status of the product\n\n#### `product.images`\n\nArray of product image objects _(see [example.json](example.json#L7))_:\n\nProperty | Type     | Description\n:--------|:---------|:------------------------\n`url`    | `string` | URL of the product image\n`type`   | `string` | Image mime type\n\n#### `product.barcode`\n\nDecoded barcode information _(see [example.json](example.json#L13))_:\n\nProperty          | Type            | Description\n:-----------------|:----------------|:-----------------------------------------------------------------\n`isValid`         | `boolean`       | True if valid, otherwise false\n`gtin`            | `string`        | The GS1 Global Trade Item Number (GTIN)\n`gtin8`           | `string`        | 8 digit version of the GTIN\n`gtin12`          | `string`        | 12 digit version of the GTIN\n`gtin13`          | `string`        | 13 digit version of the GTIN\n`gtin14`          | `string`        | 14 digit version of the GTIN\n`machineReadable` | `string`        | Machine readable version incuding hidden characters\n`humanReadable`   | `string`        | Human Readable Interpretation (HRI) version\n`digitalLink`     | `string`        | GS1 Digital Link version of the barcode\n`imageUrl`        | `string`        | Url to access the barcode image\n`values`          | `array[object]` | Array of decoded barcode values _(expiry dates, lot numbers etc)_\n\n### `org`\n\nHigh level organisation information:\n\nProperty     | Type     | Description\n:------------|:---------|:----------------------------------------------------------\n`url`        | `string` | URL of the organization's homepage\n`name`       | `string` | Name of the organization\n`faviconUrl` | `string` | URL of the organization's favicon\n`logoUrl`    | `string` | URL of the organization's logo\n`logoColors` | `object` | Object containing [logo color information](#orglogocolors)\n\n#### `org.logoColors`\n\nLogo color information _(see [example.json](example.json#L43))_:\n\nProperty     | Type            | Description\n:------------|:----------------|:----------------------------------------------------\n`lightest`   | `string`        | lightest color found in the logo in hex format\n`darkest`    | `string`        | darkest color found in the logo in hex format\n`dominant`   | `string`        | Most dominant colour found in the logo in hex format\n`background` | `string`        | Background color found  in the logo in hex format\n`palette`    | `array[string]` | Array of colours found in the logo\n\n### `links`\n\nArray of related links _(see [example.json](example.json#L58))_:\n\nProperty | Type     | Description\n:--------|:---------|:-------------------------------------------\n`href`   | `string` | URL associated with the link\n`rel`    | `string` | The relationship of the link to the product\n`method` | `string` | HTTP method used to access the link\n`title`  | `string` | A display friendly title for the link\n\n### Complete Data Structure\n\n```json\n{\n  \"product\": {\n    \"url\": \"https://www.juxfood.com/products/beetroot-80g\",\n    \"language\": \"en\",\n    \"title\": \"Beetroot 80g Pot\",\n    \"description\": \"9 small fresh beetroots in every pot! Unlock cardiovascular benefits with beets\",\n    \"images\": [\n      {\n        \"url\": \"http://www.juxfood.com/cdn/shop/files/11_a223a8ca-d342-44ff-baf4-fbd48246e188.png?v=1706723201\",\n        \"type\": \"image/png\"\n      }\n    ],\n    \"barcode\": {\n      \"isValid\": true,\n      \"gtin\": \"05065016432004\",\n      \"gtin8\": \"\",\n      \"gtin12\": \"\",\n      \"gtin13\": \"5065016432004\",\n      \"gtin14\": \"05065016432004\",\n      \"machineReadable\": \"\\u001d0105065016432004\",\n      \"humanReadable\": \"(01)05065016432004\",\n      \"digitalLink\": \"https://id.juxfood.com/01/05065016432004\",\n      \"imageUrl\": \"https://id.juxfood.com/01/05065016432004.svg\",\n      \"values\": [\n        {\n          \"ai\": \"01\",\n          \"name\": \"GTIN\",\n          \"description\": \"Global Trade Item Number\",\n          \"raw\": \"05065016432004\",\n          \"value\": \"05065016432004\"\n        }\n      ]\n    },\n    \"price\": \"\",\n    \"currency\": \"\",\n    \"availability\": \"\"\n  },\n  \"org\": {\n    \"url\": \"https://www.juxfood.com/\",\n    \"name\": \"JUXfood\",\n    \"faviconUrl\": \"https://www.juxfood.com/cdn/shop/files/JUX_LOGO_BLACK_square.png?crop=center\u0026height=32\u0026v=1693931039\u0026width=32\",\n    \"logoUrl\": \"https://www.juxfood.com/cdn/shop/files/jux-logo.png?v=1686223843\u0026width=500\",\n    \"logoColors\": {\n      \"lightest\": \"#313131\",\n      \"darkest\": \"#040404\",\n      \"dominant\": \"#040404\",\n      \"background\": \"#00000000\",\n      \"palette\": [\n        \"#313131\",\n        \"#040404\",\n        \"#1c1c1c\",\n        \"#141414\",\n        \"#0c0c0c\",\n        \"#041008\"\n      ]\n    }\n  },\n  \"links\": [\n    {\n      \"href\": \"https://www.juxfood.com/products/beetroot-80g\",\n      \"rel\": \"gs1:pip\",\n      \"method\": \"GET\",\n      \"title\": \"Info\"\n    },\n    {\n      \"href\": \"https://www.juxfood.com/collections/all\",\n      \"rel\": \"gs1:promotion\",\n      \"method\": \"GET\",\n      \"title\": \"Promotion\"\n    },\n    {\n      \"href\": \"https://www.juxfood.com/blogs/recipes\",\n      \"rel\": \"gs1:recipeInfo\",\n      \"method\": \"GET\",\n      \"title\": \"Recipe\"\n    },\n    {\n      \"href\": \"https://www.facebook.com/JUXfood\",\n      \"title\": \"Facebook\",\n      \"rel\": \"facebook\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://www.instagram.com/juxfood/\",\n      \"title\": \"Instagram\",\n      \"rel\": \"instagram\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://www.linkedin.com/company/juxfood/\",\n      \"title\": \"Linked In\",\n      \"rel\": \"linkedin\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://www.tiktok.com/@juxfood\",\n      \"title\": \"TikTok\",\n      \"rel\": \"tiktok\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://id.gs1.org/01/05065016432004\",\n      \"rel\": \"resolver\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://id.juxfood.com/01/05065016432004.json\",\n      \"rel\": \"self\",\n      \"method\": \"GET\"\n    },\n    {\n      \"href\": \"https://raw.githubusercontent.com/orca-scan/simplified-product-data/v1.0.0/schema.json\",\n      \"rel\": \"describedby\",\n      \"method\": \"GET\"\n    }\n  ]\n}\n```\n\n## Motivation\n\nThe new [GS1 Digital Link barcode](https://orcascan.com/solutions/how-to-create-a-gs1-digital-link-qr-code-059f8b29#how-does-gs1-digital-link-work) will replace all retail barcodes by 2027. It's designed to connect physical products to the internet by turning each [GS1 GTIN](https://orcascan.com/solutions/how-to-create-a-gs1-digital-link-qr-code-059f8b29#what-is-a-gs1-gtin) into a URL that humans and machines can follow for data.\n\nThe trouble is, the [GS1 Digital Link spec](https://ref.gs1.org/standards/digital-link/uri-syntax/) still requires developer to:\n* Parse barcode values within their application code\n* Follow links and execute multiple request for core product information\n* Navigate complex JSON objects to extract core product information\n\nThe goal of [SPD](https://github.com/orca-scan/simplified-product-data) is to provide the above information to the developer in the first request. Additional information such as ingredients can be obtained by following the related `rel=gs1:ingredientsInfo` link in the `links` array.\n\n## Background\n\n**Simplified Product Data** was created by the [Orca Scan team](https://orcascan.com/about-us) as part of the [GS1 Digital Link solution](https://orcascan.com/solutions/how-to-create-a-gs1-digital-link-qr-code-059f8b29). Orca Scan automatically generates a GS1 Digital Link homepage for every GS1 GTIN, the SPD format is returned when requesting a GS1 Digital Link URL with the HTTP header `Accept: application/json`.\n\n## How to Contribute\n\nThere are a couple of ways to get involved:\n\n* **Suggestions:** share your feedback/concerns/suggestions via GitHub Issues\n* **Contribute:** submit a Pull Requests with improvements\n\n## License\n\nLicensed under the [MIT License](LICENSE) \u0026copy; [Orca Scan](https://orcascan.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forca-scan%2Fsimplified-product-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forca-scan%2Fsimplified-product-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forca-scan%2Fsimplified-product-data/lists"}