{"openapi":"3.1.0","info":{"title":"Public API","description":"Public Chamber Certification API.\n\n**Authentication:** Use the `id_token` from `POST /public/api/v1/auth/token` in the `Authorization: Bearer` header. Do not use `access_token`.\n\n**Issuing PDFs:** `GET /public/api/v1/application/{applicationId}/issue` requires `processingMethod=ELECTRONICALLY` and status `APPROVED` or `ISSUED`.","version":"v1"},"servers":[{"url":"/","description":"Default Server URL"}],"tags":[{"name":"Public System Info endpoint","description":"Public system info used on unauthenticated pages"},{"name":"Authentication","description":"Obtain tokens for the Public API"},{"name":"Certificate of Origin","description":"APIs for managing certificates of origin"},{"name":"Partners endpoint","description":"Rest endpoint for Partners related actions"},{"name":"ShipEngine webhooks","description":"Listener for ShipEngine tracking notifications"},{"name":"Password Reset","description":"Reset password using AWS Cognito"},{"name":"Certificate verification endpoint","description":"Public rest endpoint for certificate verification"}],"paths":{"/public/api/v1/verify/manual":{"post":{"tags":["Certificate verification endpoint"],"summary":"Verify a certificate by certificate number and issue date","description":"Public manual lookup of a certificate by CO number and issue date","operationId":"verifyManually","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualVerificationInput"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateVerificationDto"}}}}}}},"/public/api/v1/ship-engine/tracking/{chamberId}/{token}":{"post":{"tags":["ShipEngine webhooks"],"summary":"Receive a ShipEngine tracking notification","description":"Called by ShipEngine, not by the web app. Records the delivery date, place and signer on every application of that chamber's ShipEngine account that shipped under the tracking number; every status other than Delivered is acknowledged and ignored.","operationId":"track","parameters":[{"name":"chamberId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"OK"}}}},"/public/api/v1/forgot-password/{email}":{"post":{"tags":["Password Reset"],"summary":"Confirm new password using verification code","operationId":"forgotPasswordProcess","parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"uuid"}}}}}}},"/public/api/v1/auth/token":{"post":{"tags":["Authentication"],"summary":"Get tokens","description":"Exchanges username/password for tokens. For subsequent Public API calls, send the **id_token** (not access_token) as `Authorization: Bearer <id_token>`.","operationId":"getToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"Tokens issued. Use id_token for API authorization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Unsupported grant_type (only password is supported)","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"description":"Invalid credentials","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/public/api/v1/auth/challenge":{"post":{"tags":["Authentication"],"operationId":"respondToChallenge","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MfaChallengeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}}},"/public/api/v1/application/other-document":{"post":{"tags":["Certificate of Origin"],"summary":"Submit a new other document application","operationId":"submitCertificateOD","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ODRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CoResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/public/api/v1/application/certificate-of-origin":{"post":{"tags":["Certificate of Origin"],"summary":"Submit a new certificate of origin application","operationId":"submitCertificate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CoResponse"}}}}},"security":[{"BearerAuth":[]}]}},"/public/api/v1/verify/{token}":{"get":{"tags":["Certificate verification endpoint"],"summary":"Verify a certificate by verification token","description":"Public lookup of a certificate by the opaque verification token from its QR code","operationId":"verifyByToken","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateVerificationDto"}}}}}}},"/public/api/v1/verify/{token}/pdf":{"get":{"tags":["Certificate verification endpoint"],"summary":"Download the certificate copy PDF for a verified certificate","description":"Returns the certificate copy PDF for a valid verification token","operationId":"downloadCertificateCopy","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/pdf":{"schema":{"type":"string","format":"byte"}}}}}}},"/public/api/v1/system-info/branding-header":{"get":{"tags":["Public System Info endpoint"],"summary":"Get default branding header","description":"Get the default branding header image URL for login/signup pages","operationId":"getBrandingHeader","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandingHeaderDto"}}}}}}},"/public/api/v1/partners/{id}":{"get":{"tags":["Partners endpoint"],"summary":"Get Public Partner info by id","description":"Get Public Partner info by id","operationId":"findPublicPartnerById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPartnerDto"}}}}}}},"/public/api/v1/application/{applicationId}/issue":{"get":{"tags":["Certificate of Origin"],"summary":"Issue Application","description":"Returns the certified PDF for an application as Base64-encoded JSON.\n\n**Preconditions (all required):**\n- Authorize with `id_token` (`Authorization: Bearer <id_token>`)\n- Application `processingMethod` must be `ELECTRONICALLY`\n- Application status must be `APPROVED` or `ISSUED`\n\nIf status is `APPROVED`, this call also transitions the application to `ISSUED`.","operationId":"getCertifiedPdf","parameters":[{"name":"applicationId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Certified PDF returned as Base64 JSON","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PdfResponse"}}}},"400":{"description":"Preconditions failed. Message is either \"Application must be in either APPROVED or ISSUED status\" or \"Only applications with ELECTRONICALLY processing method can be issued\".","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInfoDto"}}}},"401":{"description":"Missing or invalid Bearer id_token","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PdfResponse"}}}},"403":{"description":"Authenticated caller cannot access this application","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInfoDto"}}}},"404":{"description":"Application not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorInfoDto"}}}}},"security":[{"BearerAuth":[]}]}},"/public/api/v1/application/status":{"get":{"tags":["Certificate of Origin"],"summary":"Get application statuses","description":"Get the status and fees for one or more applications","operationId":"getApplicationStatuses","parameters":[{"name":"applicationIds","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ApplicationStatusResponse"}}}}},"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"ManualVerificationInput":{"type":"object","properties":{"coNumber":{"type":"string","minLength":1},"issuedDate":{"type":"string","format":"date"}},"required":["coNumber","issuedDate"]},"CertificateVerificationDto":{"type":"object","properties":{"status":{"type":"string","enum":["VALID","VOIDED"]},"coNumber":{"type":"string"},"chamberName":{"type":"string"},"issuedDate":{"type":"string","format":"date"},"exporter":{"type":"string"},"destinationCountry":{"type":"string"},"certificateType":{"type":"string"},"partnerLogoUrl":{"type":"string"},"partnerLogoLinkUrl":{"type":"string"},"chamberLogoUrl":{"type":"string"},"chamberLogoLinkUrl":{"type":"string"},"verificationToken":{"type":"string"}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"integer","format":"int64"},"id_token":{"type":"string"},"challengeName":{"type":"string"},"session":{"type":"string"}}},"TokenRequest":{"type":"object","properties":{"grant_type":{"type":"string"},"username":{"type":"string"},"password":{"type":"string"}}},"MfaChallengeRequest":{"type":"object","properties":{"session":{"type":"string"},"challengeResponse":{"type":"string"},"username":{"type":"string"},"challengeType":{"type":"string"}}},"Address":{"type":"object","properties":{"address1":{"type":"string","minLength":1},"address2":{"type":"string"},"address3":{"type":"string"},"address4":{"type":"string"},"address5":{"type":"string"},"city":{"type":"string","minLength":1},"subdivision":{"type":"string"},"postalCode":{"type":"string","minLength":1},"countryISOCode":{"type":"string","minLength":1,"pattern":"^[A-Z]{2}$"},"name":{"type":"string","minLength":1}},"required":["address1","city","countryISOCode","name","postalCode"]},"Attachment":{"type":"object","properties":{"fileName":{"type":"string","minLength":1},"fileContent":{"type":"string","description":"Base64 encoded file contents","minLength":1},"documentType":{"type":"string"},"certificationMethod":{"type":"string","enum":["NONE","CHAMBER_CERTIFY","LEGALIZE_APOSTILLE"]}},"required":["certificationMethod","documentType","fileContent","fileName"]},"ODRequest":{"type":"object","properties":{"poNumber":{"type":"string"},"processingMethod":{"type":"string","enum":["ELECTRONICALLY","CHAMBER_PRINT","LEGALIZE_APOSTILLE"]},"referenceNumber":{"type":"string","minLength":1},"chamberInstructions":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"},"minItems":1},"consignor":{"$ref":"#/components/schemas/Address"},"shippingEmail":{"type":"string"},"shippingPhone":{"type":"string"},"shippingCompanyName":{"type":"string"},"shippingContactName":{"type":"string"},"shippingAddress":{"$ref":"#/components/schemas/ShippingAddress"},"status":{"type":"string","enum":["DRAFT","SUBMIT_TO_CHAMBER"]},"countryOfDestination":{"type":"string","minLength":1,"pattern":"^[A-Z]{2}$"}},"required":["attachments","consignor","countryOfDestination","processingMethod","referenceNumber","status"]},"ShippingAddress":{"type":"object","properties":{"address1":{"type":"string","minLength":1},"address2":{"type":"string"},"address3":{"type":"string"},"address4":{"type":"string"},"address5":{"type":"string"},"city":{"type":"string","minLength":1},"subdivision":{"type":"string"},"postalCode":{"type":"string","minLength":1},"countryISOCode":{"type":"string","minLength":1,"pattern":"^[A-Z]{2}$"}},"required":["address1","city","countryISOCode","postalCode"]},"CoResponse":{"type":"object","properties":{"applicationId":{"type":"string"},"applicationStatus":{"type":"string"},"fees":{"type":"number"}}},"CoRequest":{"type":"object","properties":{"poNumber":{"type":"string"},"processingMethod":{"type":"string","enum":["ELECTRONICALLY","CHAMBER_PRINT","LEGALIZE_APOSTILLE"]},"referenceNumber":{"type":"string","minLength":1},"chamberInstructions":{"type":"string"},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/Attachment"},"minItems":1},"consignor":{"$ref":"#/components/schemas/Address"},"shippingEmail":{"type":"string"},"shippingPhone":{"type":"string"},"shippingCompanyName":{"type":"string"},"shippingContactName":{"type":"string"},"shippingAddress":{"$ref":"#/components/schemas/ShippingAddress"},"status":{"type":"string","enum":["DRAFT","SUBMIT_TO_CHAMBER"]},"itemNumber":{"type":"string","minLength":1},"remarks":{"type":"string"},"totalShipmentWeight":{"type":"string","minLength":1},"transportMethod":{"type":"string"},"countriesOfOrigin":{"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"},"minItems":1},"consignee":{"$ref":"#/components/schemas/Address"}},"required":["attachments","consignee","consignor","countriesOfOrigin","itemNumber","processingMethod","referenceNumber","status","totalShipmentWeight"]},"BrandingHeaderDto":{"type":"object","properties":{"brandingHeaderFile":{"type":"string"}}},"PublicPartnerDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"titleTag":{"type":"string"},"faviconS3":{"type":"string"},"loginLogoUrl":{"type":"string"},"loginLogoFile":{"type":"string"},"brandingHeaderFile":{"type":"string"},"chamberName":{"type":"string"},"chamberLogoFile":{"type":"string"},"chamberLogoLinkUrl":{"type":"string"},"certificationPrefix":{"type":"string"},"certificationSupportEmail":{"type":"string"}}},"PdfResponse":{"type":"object","properties":{"applicationId":{"type":"string"},"applicationStatus":{"type":"string"},"pdfContent":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string"}}},"ErrorInfoDto":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"fieldValidationErrors":{"type":"array","items":{"$ref":"#/components/schemas/FieldValidationDTO"}},"timestamp":{"type":"string","format":"date-time"}}},"FieldValidationDTO":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"},"code":{"type":"string"},"start":{"type":"integer","format":"int32"},"end":{"type":"integer","format":"int32"}}},"ApplicationStatus":{"type":"object","properties":{"applicationId":{"type":"string"},"status":{"type":"string"},"fees":{"type":"number"}}},"ApplicationStatusResponse":{"type":"object","properties":{"applications":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationStatus"}}}}},"securitySchemes":{"BearerAuth":{"type":"http","description":"id_token (not access_token). Obtain tokens from POST /public/api/v1/auth/token, then send Authorization: Bearer <id_token>.","name":"BearerAuth","scheme":"bearer","bearerFormat":"JWT"}}}}