{"openapi":"3.1.0","info":{"title":"Polarpass public passport API","version":"1.0.0","description":"Read published digital product passports. No account or key is needed. Every response holds only data the brand made public. Reads are limited to 300 per minute per IP address, and QR and GS1 redirects to 60."},"servers":[{"url":"https://api.polarpass.eu/api"}],"components":{"schemas":{"PassportJsonLd":{"type":"object","properties":{"@context":{},"@type":{"type":"array","items":{"type":"string"}},"@id":{"type":"string"},"name":{"type":"string"}},"required":["@type","@id","name"],"additionalProperties":{},"description":"A schema.org Product with GS1 and Polarpass terms. It holds only data the brand made public. The Polarpass terms are listed at /developers/vocabulary on the website."},"PublicPassport":{"type":"object","properties":{"error":{"type":"boolean","enum":[false]},"data":{"type":"object","properties":{},"additionalProperties":{}}},"required":["error","data"],"description":"The published passport as the passport page reads it: product, public sections, images, documents, version and version history."}},"parameters":{}},"paths":{"/public/passports/{slug}/jsonld":{"get":{"summary":"Get a published passport as JSON-LD","tags":["Public passports"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":240,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The passport's public slug, the last part of its /p/ address.","example":"oak-chair-1a2b3c4d5e"},"required":true,"description":"The passport's public slug, the last part of its /p/ address.","name":"slug","in":"path"},{"schema":{"type":"string","description":"Reading language: en, nl, de or fr. Applied when the passport has that translation."},"required":false,"description":"Reading language: en, nl, de or fr. Applied when the passport has that translation.","name":"lang","in":"query"},{"schema":{"type":"string","description":"A brand's own passport domain. Limits the read to passports of that workspace."},"required":false,"description":"A brand's own passport domain. Limits the read to passports of that workspace.","name":"hostname","in":"query"}],"responses":{"200":{"description":"The current published version as JSON-LD, including the current product status.","headers":{"ETag":{"description":"Validator for If-None-Match.","schema":{"type":"string"}},"Cache-Control":{"description":"How long the response may be reused.","schema":{"type":"string"}}},"content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/PassportJsonLd"}}}},"304":{"description":"Not modified since the ETag sent in If-None-Match."},"404":{"description":"Unknown or unpublished passport, or an unknown version.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}},"429":{"description":"Too many requests. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}}}}},"/public/passports/{slug}/versions/{version}/jsonld":{"get":{"summary":"Get one published passport version as JSON-LD","tags":["Public passports"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":240,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The passport's public slug, the last part of its /p/ address.","example":"oak-chair-1a2b3c4d5e"},"required":true,"description":"The passport's public slug, the last part of its /p/ address.","name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^[1-9]\\d{0,9}$","description":"A published version number, starting at 1.","example":"2"},"required":true,"description":"A published version number, starting at 1.","name":"version","in":"path"},{"schema":{"type":"string","description":"Reading language: en, nl, de or fr. Applied when the passport has that translation."},"required":false,"description":"Reading language: en, nl, de or fr. Applied when the passport has that translation.","name":"lang","in":"query"},{"schema":{"type":"string","description":"A brand's own passport domain. Limits the read to passports of that workspace."},"required":false,"description":"A brand's own passport domain. Limits the read to passports of that workspace.","name":"hostname","in":"query"}],"responses":{"200":{"description":"One published version as JSON-LD, exactly as published. It leaves out the current product status.","headers":{"ETag":{"description":"Validator for If-None-Match.","schema":{"type":"string"}},"Cache-Control":{"description":"How long the response may be reused.","schema":{"type":"string"}}},"content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/PassportJsonLd"}}}},"304":{"description":"Not modified since the ETag sent in If-None-Match."},"404":{"description":"Unknown or unpublished passport, or an unknown version.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}},"429":{"description":"Too many requests. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}}}}},"/public/passports/{slug}":{"get":{"summary":"Get a published passport as JSON","tags":["Public passports"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":240,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The passport's public slug, the last part of its /p/ address.","example":"oak-chair-1a2b3c4d5e"},"required":true,"description":"The passport's public slug, the last part of its /p/ address.","name":"slug","in":"path"},{"schema":{"type":"string","description":"A brand's own passport domain. Limits the read to passports of that workspace."},"required":false,"description":"A brand's own passport domain. Limits the read to passports of that workspace.","name":"hostname","in":"query"}],"responses":{"200":{"description":"The current published version with its version history and current product status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPassport"}}}},"404":{"description":"Unknown or unpublished passport, or an unknown version.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}},"429":{"description":"Too many requests. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}}}}},"/public/passports/{slug}/versions/{version}":{"get":{"summary":"Get one published passport version as JSON","tags":["Public passports"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":240,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The passport's public slug, the last part of its /p/ address.","example":"oak-chair-1a2b3c4d5e"},"required":true,"description":"The passport's public slug, the last part of its /p/ address.","name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^[1-9]\\d{0,9}$","description":"A published version number, starting at 1.","example":"2"},"required":true,"description":"A published version number, starting at 1.","name":"version","in":"path"},{"schema":{"type":"string","description":"A brand's own passport domain. Limits the read to passports of that workspace."},"required":false,"description":"A brand's own passport domain. Limits the read to passports of that workspace.","name":"hostname","in":"query"}],"responses":{"200":{"description":"One published version as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPassport"}}}},"404":{"description":"Unknown or unpublished passport, or an unknown version.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}},"429":{"description":"Too many requests. Retry after the number of seconds in Retry-After.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"boolean","enum":[true]},"errorMessage":{"type":"string","example":"Failed to fetch data"}},"required":["error","errorMessage"]}}}}}}},"/public/gs1/01/{gtin}":{"get":{"summary":"Resolve a GS1 Digital Link to its passport","tags":["Public passports"],"parameters":[{"schema":{"type":"string","pattern":"^\\d{14}$","description":"The GTIN as 14 digits. Add /10/{batch} and then /21/{serial} for narrower passports.","example":"09506000134352"},"required":true,"description":"The GTIN as 14 digits. Add /10/{batch} and then /21/{serial} for narrower passports.","name":"gtin","in":"path"}],"responses":{"302":{"description":"Redirects to the passport page registered for this GS1 Digital Link."},"404":{"description":"No published passport is registered for this identifier."},"429":{"description":"Too many requests."}}}},"/public/qr/{slug}/scan":{"get":{"summary":"Open a passport from its QR code","tags":["Public passports"],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":240,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","description":"The passport's public slug, the last part of its /p/ address.","example":"oak-chair-1a2b3c4d5e"},"required":true,"description":"The passport's public slug, the last part of its /p/ address.","name":"slug","in":"path"}],"responses":{"302":{"description":"Redirects to the passport page. This is the address a passport-link QR code carries."},"404":{"description":"The passport is not published or has no active QR code."},"429":{"description":"Too many requests."}}}},"/public/openapi.json":{"get":{"summary":"Get the public read API description","tags":["Public passports"],"responses":{"200":{"description":"This document.","content":{"application/json":{"schema":{"type":"object","properties":{"openapi":{"type":"string"}},"required":["openapi"],"additionalProperties":{}}}}}}}}},"webhooks":{}}