{"openapi":"3.1.0","info":{"title":"PassportLoop API","version":"1.0.0","description":"Read Digital Product Passports and save drafts. Publishing, billing, settings and the team stay in the PassportLoop app. Values written with a key stay \"to confirm\" until a person at the brand confirms them, unless the brand switched that off for the key. Keys come with the Growth, Pro and Agency plans; make one in Settings, API. At most 120 requests a minute per key.","contact":{"email":"support@passportloop.com"}},"servers":[{"url":"https://api.passportloop.com"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A key from Settings, API, starting with plk_."}},"parameters":{"org":{"name":"org","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The brand id, shown next to the key in Settings, API."},"id":{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"field":{"type":"string"},"message":{"type":"string"}}},"NewPassport":{"type":"object","required":["template_key"],"properties":{"template_key":{"type":"string","examples":["battery-lmt","gpsr"]},"gtin":{"type":"string","pattern":"^\\d{8,14}$"}}},"NewDraft":{"type":"object","required":["data"],"properties":{"data":{"type":"object","description":"The full set of values, shaped like the template schema (GET /v1/templates/{key}/{version})."},"custom_data":{"type":"object"},"change_note":{"type":"string","maxLength":500},"base_version_no":{"type":"integer","description":"The draft version you started from; a newer save by someone else gives 409."}}}},"responses":{"Unauthorized":{"description":"The key is missing, unknown or revoked, or the plan does not include the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key may not do this.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"More than 120 requests in a minute.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/templates":{"get":{"summary":"Templates available to the brand","responses":{"200":{"description":"Templates with their current version"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/templates/{key}/{version}":{"get":{"summary":"A template version: fields, labels, applicability and JSON schema","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The template document"}}}},"/v1/organizations/{org}/products":{"get":{"summary":"Products imported from shops, feeds and files","parameters":[{"$ref":"#/components/parameters/org"}],"responses":{"200":{"description":"Products"}}}},"/v1/organizations/{org}/passports":{"get":{"summary":"Passports (models), newest first","parameters":[{"$ref":"#/components/parameters/org"}],"responses":{"200":{"description":"Passports"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"summary":"Create a draft passport (drafts keys)","parameters":[{"$ref":"#/components/parameters/org"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPassport"}}}},"responses":{"201":{"description":"Created"},"400":{"description":"Invalid input"},"403":{"$ref":"#/components/responses/Forbidden"}}}},"/v1/organizations/{org}/passports/{id}":{"get":{"summary":"One passport with its latest draft, field sources and what is still to confirm","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"The passport"},"404":{"description":"Not found"}}}},"/v1/organizations/{org}/passports/{id}/versions":{"get":{"summary":"Every draft save, with fingerprints (key of an owner, admin or editor)","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Draft saves"}}},"post":{"summary":"Save a new draft (drafts keys). Never publishes.","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewDraft"}}}},"responses":{"201":{"description":"Saved"},"400":{"description":"Values that do not fit the template"},"409":{"description":"Someone saved in the meantime"}}}},"/v1/organizations/{org}/passports/{id}/versions/{no}":{"get":{"summary":"One draft save","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"},{"name":"no","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"The draft save"}}}},"/v1/organizations/{org}/passports/{id}/releases":{"get":{"summary":"Published releases","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Releases"}}}},"/v1/organizations/{org}/passports/{id}/items":{"get":{"summary":"Item passports (one per serial number)","parameters":[{"$ref":"#/components/parameters/org"},{"$ref":"#/components/parameters/id"}],"responses":{"200":{"description":"Item passports"}}}},"/mcp":{"post":{"summary":"The AI connector (Model Context Protocol, Streamable HTTP). Tools: list_passports, get_passport, get_template, create_passport, save_draft.","responses":{"200":{"description":"JSON-RPC answer"}}}}},"webhooks":{"passport.published":{"post":{"summary":"A release was published. Signed with the PassportLoop-Signature header: t=<seconds>,v1=<HMAC-SHA256 of \"<t>.<body>\" with your webhook secret>.","responses":{"200":{"description":"Any 2xx answer counts as received"}}}},"supplier.submitted":{"post":{"summary":"A supplier sent documents through a request link.","responses":{"200":{"description":"Any 2xx answer counts as received"}}}}}}