{"info":{"title":"Provanza API","version":"1.1.0","description":"Provanza automates proof-of-delivery retrieval for logistics, finance, and support teams.\n\n## Typical integration flow\n\n1. Create an organization API key in the Provanza dashboard under **Settings → API access**.\n2. Send the key as `Authorization: Bearer <api key>` to the `/api/v1` endpoints.\n3. Register outbound shipments with descriptions and ad-hoc product lines, then create public share links for customer-facing live tracking.\n4. Use **Submit a POD request** for one-off automation, or **Preview a batch** before **Submit a batch** for bulk imports.\n5. Poll **Get a POD request**, **List POD requests**, or **Get a POD request group** until rows move from `queued` / `processing` into a terminal status.\n6. Download successful artifacts with **Get a POD artifact** or **Download a POD group archive**. R2-enabled deployments return public bearer-style download URLs; local/private fallback environments may return inline base64 payloads.\n7. Watch **List POD requests needing input** and use **Update POD postal code** when a carrier needs a ZIP / postal code.\n\n## Recommendations\n\n- Keep API keys server-side only. Do not place them in browsers, mobile apps, or shared spreadsheets.\n- Use batch preview to catch unsupported, duplicate, or ambiguous tracking numbers before creating billable work.\n- Treat `needs_input`, `not_found`, and `failed` as attention states; retry only eligible failed/not-found requests.\n- Growth workspaces can hold 1 active API key and Pro workspaces can hold 3 active API keys. Rotate by creating a replacement and revoking the old key when your plan allows it.\n- The API is organization-scoped: keys can only access POD data for the organization that created them.\n- Public R2 download URLs are bearer links. Anyone who obtains a returned artifact or archive URL can download that file directly from R2."},"servers":[{"url":"/api/v1","description":"Current API origin"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Shipments","description":"Register and enrich organization shipments for integration workflows."},{"name":"Shipment Changes","description":"Reconcile parcel state and read durable organization shipment changes."},{"name":"Public Sharing","description":"Create, inspect, revoke, and enrich customer-facing shipment share links."},{"name":"POD Requests","description":"Create, list, inspect, retry, and download individual proof-of-delivery work."},{"name":"Batch Workflows","description":"Preview and submit bulk tracking-number batches before monitoring their groups."},{"name":"Group Archives","description":"Inspect batch groups and download ZIP archives for completed POD artifacts."},{"name":"Needs Input","description":"Resolve carrier requests for missing or corrected ZIP / postal-code input."},{"name":"Insights","description":"Read organization-scoped POD overview metrics and attention counts."}],"openapi":"3.1.1","components":{"schemas":{"PagePaginationInput":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":25}}},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991},"pageSize":{"type":"integer","minimum":1,"maximum":100},"totalItems":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasPreviousPage":{"type":"boolean"},"hasNextPage":{"type":"boolean"},"startItem":{"type":"integer","minimum":0,"maximum":9007199254740991},"endItem":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["page","pageSize","totalItems","totalPages","hasPreviousPage","hasNextPage","startItem","endItem"]},"PodRequestSummary":{"type":"object","properties":{"id":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"status":{"enum":["queued","processing","completed","needs_input","not_found","failed"],"type":"string"},"artifact":{"$ref":"#/components/schemas/PodRequestArtifact"},"failureCode":{"enum":["postal_code_required","postal_code_rejected","document_not_found","shipment_not_delivered","carrier_unavailable","invalid_request","document_render_failed","generation_failed"],"type":"string"},"failureMessage":{"type":"string"},"postalCode":{"type":"string"},"postalCodeSource":{"enum":["explicit","workspace_default"],"type":"string"},"inputRequired":{"$ref":"#/components/schemas/PodInputRequired"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"}},"required":["id","carrier","trackingNumber","status","createdAt","updatedAt"]},"PodRequestArtifact":{"type":"object","properties":{"fileName":{"type":"string"},"contentType":{"type":"string"},"downloadUrl":{"type":"string","format":"uri"}},"required":["fileName","contentType"]},"PodInputRequired":{"type":"object","properties":{"field":{"const":"postal_code"},"reason":{"enum":["missing","rejected"],"type":"string"},"message":{"type":"string"}},"required":["field","reason","message"]},"SubmitPodRequestInput":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"carrierNetwork":{"type":"string","minLength":1,"maxLength":64},"trackingNumber":{"type":"string","minLength":1},"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["carrier","trackingNumber"]},"SubmitPodRequestOutput":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/PodRequestSummary"},"reusedExisting":{"type":"boolean"}},"required":["request","reusedExisting"]},"ListPodRequestsInput":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":25},"search":{"type":"string","minLength":1,"maxLength":128},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"status":{"enum":["queued","processing","completed","needs_input","not_found","failed"],"type":"string"},"tag":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"groupId":{"type":"string","format":"uuid"},"createdFrom":{"type":"string","format":"date-time"},"createdTo":{"type":"string","format":"date-time"},"sort":{"enum":["created_desc","created_asc","completed_desc"],"type":"string"}}},"ListPodRequestsOutput":{"type":"object","properties":{"requests":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"status":{"enum":["queued","processing","completed","needs_input","not_found","failed"],"type":"string"},"artifact":{"$ref":"#/components/schemas/PodRequestArtifact"},"failureCode":{"enum":["postal_code_required","postal_code_rejected","document_not_found","shipment_not_delivered","carrier_unavailable","invalid_request","document_render_failed","generation_failed"],"type":"string"},"failureMessage":{"type":"string"},"postalCode":{"type":"string"},"postalCodeSource":{"enum":["explicit","workspace_default"],"type":"string"},"inputRequired":{"$ref":"#/components/schemas/PodInputRequired"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","color","createdAt","updatedAt"]}}},"required":["id","carrier","trackingNumber","status","createdAt","updatedAt","tags"]}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"totalRequests":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsInputCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["requests","pagination","totalRequests","needsInputCount"]},"GetPodRequestInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"]},"PodArtifactOutput":{"anyOf":[{"type":"object","properties":{"delivery":{"const":"public_url"},"fileName":{"type":"string"},"contentType":{"type":"string"},"downloadUrl":{"type":"string","format":"uri"}},"required":["delivery","fileName","contentType","downloadUrl"]},{"type":"object","properties":{"delivery":{"const":"inline_payload"},"fileName":{"type":"string"},"contentType":{"type":"string"},"bodyBase64":{"type":"string"}},"required":["delivery","fileName","contentType","bodyBase64"]}]},"UpdatePodPostalCodeInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["id","postalCode"]},"PodNeedsInputRow":{"type":"object","properties":{"request":{"$ref":"#/components/schemas/PodRequestSummary"},"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"},"groupRow":{"$ref":"#/components/schemas/PodRequestGroupRow"}},"required":["request"]},"ListPodNeedsInputOutput":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/PodNeedsInputRow"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"totalRows":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["rows","pagination","totalRows"]},"PodBatchEntry":{"type":"object","properties":{"clientId":{"type":"string","minLength":1},"value":{"type":"string"},"postalCode":{"type":"string","minLength":1,"maxLength":32},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"carrierNetwork":{"type":"string","minLength":1,"maxLength":64}},"required":["clientId","value"]},"PodBatchPreviewInput":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":50},"entries":{"type":"array","minItems":1,"maxItems":5000,"items":{"$ref":"#/components/schemas/PodBatchEntry"}},"statusFilter":{"enum":["ready","existing","duplicate","empty","invalid","unsupported","ambiguous","needs_postal_code"],"type":"string"},"sort":{"enum":["priority","position"],"type":"string","default":"priority"},"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["entries"]},"PodBatchPreviewRow":{"type":"object","properties":{"clientId":{"type":"string"},"value":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"postalCode":{"type":"string"},"message":{"type":"string"},"status":{"enum":["ready","existing","duplicate","empty","invalid","unsupported","ambiguous","needs_postal_code"],"type":"string"},"existingRequest":{"$ref":"#/components/schemas/PodRequestSummary"},"candidateCarriers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"suggestedCarrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"postalCodeRequirement":{"enum":["required","conditional","unused"],"type":"string"}},"required":["clientId","value","message","status"]},"PodBatchPreviewOutput":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/PodBatchPreviewRow"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"totalEntries":{"type":"integer","minimum":0,"maximum":9007199254740991},"acceptedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"blockedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"statusCounts":{"type":"object","properties":{"ready":{"type":"integer","minimum":0,"maximum":9007199254740991},"existing":{"type":"integer","minimum":0,"maximum":9007199254740991},"duplicate":{"type":"integer","minimum":0,"maximum":9007199254740991},"empty":{"type":"integer","minimum":0,"maximum":9007199254740991},"invalid":{"type":"integer","minimum":0,"maximum":9007199254740991},"unsupported":{"type":"integer","minimum":0,"maximum":9007199254740991},"ambiguous":{"type":"integer","minimum":0,"maximum":9007199254740991},"needs_postal_code":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["ready","existing","duplicate","empty","invalid","unsupported","ambiguous","needs_postal_code"]},"chargeableReadyCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"ambiguityGroups":{"type":"array","items":{"type":"object","properties":{"carriers":{"type":"array","minItems":2,"items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"suggestedCarrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"clientIds":{"type":"array","items":{"type":"string"}}},"required":["carriers","count","clientIds"]}},"limit":{"const":5000}},"required":["rows","pagination","totalEntries","acceptedCount","blockedCount","statusCounts","chargeableReadyCount","ambiguityGroups","limit"]},"PodBatchSubmitInput":{"type":"object","properties":{"entries":{"type":"array","minItems":1,"maxItems":5000,"items":{"$ref":"#/components/schemas/PodBatchEntry"}},"label":{"type":"string","minLength":1,"maxLength":120},"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["entries"]},"PodBatchSubmitRow":{"type":"object","properties":{"clientId":{"type":"string"},"value":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"postalCode":{"type":"string"},"message":{"type":"string"},"status":{"enum":["submitted","reused","duplicate","empty","invalid","unsupported","ambiguous","needs_postal_code","failed","waiting_for_allowance"],"type":"string"},"request":{"$ref":"#/components/schemas/PodRequestSummary"}},"required":["clientId","value","message","status"]},"PodBatchSubmitOutput":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/PodBatchSubmitRow"}},"totalEntries":{"type":"integer","minimum":0,"maximum":9007199254740991},"submittedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reusedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"waitingForAllowanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"}},"required":["rows","totalEntries","submittedCount","reusedCount","rejectedCount","waitingForAllowanceCount"]},"PodRequestGroupSummary":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"status":{"enum":["empty","in_progress","needs_input","ready"],"type":"string"},"counts":{"$ref":"#/components/schemas/PodRequestGroupCounts"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","label","status","counts","createdAt","updatedAt"]},"PodRequestGroupCounts":{"type":"object","properties":{"totalEntries":{"type":"integer","minimum":0,"maximum":9007199254740991},"submittedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reusedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"waitingForAllowanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"processingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"downloadableCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFoundCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsInputCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsAttentionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"noActionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["totalEntries","submittedCount","reusedCount","rejectedCount","waitingForAllowanceCount","processingCount","completedCount","downloadableCount","notFoundCount","failedCount","needsInputCount","needsAttentionCount","noActionCount"]},"PodRequestGroupRow":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"clientId":{"type":"string"},"value":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"postalCode":{"type":"string"},"status":{"enum":["submitted","reused","duplicate","empty","invalid","unsupported","ambiguous","needs_postal_code","failed","waiting_for_allowance"],"type":"string"},"message":{"type":"string"},"request":{"$ref":"#/components/schemas/PodRequestSummary"},"candidateCarriers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"suggestedCarrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","position","clientId","value","status","message","createdAt","updatedAt"]},"ListPodRequestGroupsOutput":{"type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/components/schemas/PodRequestGroupSummary"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"totalGroups":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["groups","pagination","totalGroups"]},"GetPodRequestGroupInput":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":25},"id":{"type":"string","format":"uuid"},"rowFilter":{"enum":["attention","failed","ready","no_action","postal_code"],"type":"string"}},"required":["id"]},"PodRequestGroupDetail":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/PodRequestGroupRow"}},"pagination":{"$ref":"#/components/schemas/PaginationMeta"},"availableCarriers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"retryEligibility":{"type":"object","properties":{"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"notFoundCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"inProgressCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["failedCount","notFoundCount","inProgressCount"]},"ambiguousCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"ambiguousCarrierOptions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"ambiguousSuggestions":{"type":"array","items":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["carrier","count"]}},"postalCodeCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"postalCodeCarriers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"waitingFreeCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["group","rows","pagination","availableCarriers","retryEligibility","ambiguousCount","ambiguousCarrierOptions","ambiguousSuggestions","postalCodeCount","postalCodeCarriers","waitingFreeCount"]},"PodRequestGroupArchiveInput":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"includeManifest":{"type":"boolean","default":true},"carriers":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}}},"required":["id"]},"PodRequestGroupArchiveOutput":{"anyOf":[{"type":"object","properties":{"fileName":{"type":"string"},"contentType":{"const":"application/zip"},"includedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailableCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery":{"const":"public_url"},"downloadUrl":{"type":"string","format":"uri"}},"required":["fileName","contentType","includedCount","unavailableCount","delivery","downloadUrl"]},{"type":"object","properties":{"fileName":{"type":"string"},"contentType":{"const":"application/zip"},"includedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"unavailableCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"delivery":{"const":"inline_payload"},"bodyBase64":{"type":"string"}},"required":["fileName","contentType","includedCount","unavailableCount","delivery","bodyBase64"]}]},"PodOverviewSummary":{"type":"object","properties":{"range":{"enum":["7d","30d","90d"],"type":"string"},"requestedRange":{"enum":["7d","30d","90d"],"type":"string"},"windowStart":{"type":"string"},"windowEnd":{"type":"string"},"generatedAt":{"type":"string"},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"processingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsAttentionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"statusCounts":{"$ref":"#/components/schemas/PodStatusCounts"},"carrierCounts":{"$ref":"#/components/schemas/PodCarrierCounts"},"dailyCounts":{"type":"array","items":{"$ref":"#/components/schemas/PodOverviewDailyCount"}}},"required":["range","requestedRange","windowStart","windowEnd","generatedAt","totalCount","completedCount","processingCount","needsAttentionCount","statusCounts","carrierCounts","dailyCounts"]},"PodOverviewDailyCount":{"type":"object","properties":{"date":{"type":"string"},"totalCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"completedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"processingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"needsAttentionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["date","totalCount","completedCount","processingCount","needsAttentionCount"]},"PodStatusCounts":{"type":"object","properties":{"queued":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed":{"type":"integer","minimum":0,"maximum":9007199254740991},"needs_input":{"type":"integer","minimum":0,"maximum":9007199254740991},"not_found":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["queued","processing","completed","needs_input","not_found","failed"]},"PodCarrierCounts":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"additionalProperties":{"type":"integer","minimum":0,"maximum":9007199254740991}},"ErrorResponse":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable oRPC error code."},"message":{"type":"string","description":"Human-readable error message."}}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Organization API key","description":"Use an organization API key as a Bearer token."}},"responses":{"BadRequest":{"description":"The request body, path, or query parameters are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"A valid organization API key bearer token is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"The API key is not allowed to perform this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"The requested organization-scoped resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PaymentRequired":{"description":"The organization must complete billing before using this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"InternalServerError":{"description":"The API request could not be completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/pod-carriers":{"get":{"operationId":"pods.carrierOptions","summary":"List selectable POD carriers","description":"Lists every catalog carrier a POD request can be submitted for, with the selectable national networks of brands that run several.","tags":["POD Requests"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"carriers":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string"},"countryCode":{"type":"string"},"popular":{"type":"boolean"},"networks":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string","minLength":1,"maxLength":64},"name":{"type":"string"},"countryCode":{"type":"string"}},"required":["network"]}}},"required":["slug","name","popular","networks"]}}},"required":["carriers"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests":{"post":{"operationId":"pods.submit","summary":"Submit a POD request","description":"Submits one proof-of-delivery request for the authenticated organization.","tags":["POD Requests"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPodRequestInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPodRequestOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]},"get":{"operationId":"pods.list","summary":"List POD requests","description":"Lists organization-scoped POD requests with optional search and filters.","tags":["POD Requests"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":128},"allowEmptyValue":true,"allowReserved":true},{"name":"carrier","in":"query","schema":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["queued","processing","completed","needs_input","not_found","failed"],"type":"string"},"allowEmptyValue":true,"allowReserved":true},{"name":"tag","in":"query","schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"allowEmptyValue":true,"allowReserved":true},{"name":"groupId","in":"query","schema":{"type":"string","format":"uuid"},"allowEmptyValue":true,"allowReserved":true},{"name":"createdFrom","in":"query","schema":{"type":"string","format":"date-time"},"allowEmptyValue":true,"allowReserved":true},{"name":"createdTo","in":"query","schema":{"type":"string","format":"date-time"},"allowEmptyValue":true,"allowReserved":true},{"name":"sort","in":"query","schema":{"enum":["created_desc","created_asc","completed_desc"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPodRequestsOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/batch/preview":{"post":{"operationId":"pods.previewBatch","summary":"Preview a batch of POD requests","description":"Validates and classifies a batch before submission without starting new POD work.","tags":["Batch Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodBatchPreviewInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodBatchPreviewOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/batch":{"post":{"operationId":"pods.submitBatch","summary":"Submit a batch of POD requests","description":"Submits valid rows as organization-scoped POD requests and records every row in a batch group.","tags":["Batch Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodBatchSubmitInput"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodBatchSubmitOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups":{"get":{"operationId":"pods.listGroups","summary":"List POD request groups","description":"Lists batch submission groups for the authenticated organization with optional name search and status filter.","tags":["Group Archives"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":120},"allowEmptyValue":true,"allowReserved":true},{"name":"status","in":"query","schema":{"enum":["empty","in_progress","needs_input","ready"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPodRequestGroupsOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}":{"delete":{"operationId":"pods.deleteGroup","summary":"Delete an empty POD request group","description":"Deletes a batch group that has no recorded entries. Groups with entries cannot be deleted.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]},"get":{"operationId":"pods.getGroup","summary":"Get a POD request group","description":"Returns a paginated group detail for an organization-scoped POD batch.","tags":["Group Archives"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true},{"name":"rowFilter","in":"query","schema":{"enum":["attention","failed","ready","no_action","postal_code"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodRequestGroupDetail"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/rows/{rowId}/carrier":{"post":{"operationId":"pods.resolveGroupRowCarrier","summary":"Resolve a carrier for one ambiguous group row","description":"Assigns an operator-selected carrier to a single ambiguous batch row and submits the POD request.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"rowId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"required":["carrier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodRequestGroupRow"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/postal-codes":{"post":{"operationId":"pods.provideGroupPostalCodes","summary":"Provide postal codes for batch rows that wait for one","description":"Submits each skipped needs_postal_code row with its postal code and restarts each needs_input request with its postal code. `postalCodeForAll` applies one postal code to every waiting row of the batch that `rows` does not name. Rows that do not wait for a postal code, and rows the plan allowance cannot cover, are rejected one by one; the other rows are still processed. Skipped rows take capacity first, in batch order.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"rowId":{"type":"string","format":"uuid"},"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["rowId","postalCode"]},"default":[]},"postalCodeForAll":{"type":"string","minLength":1,"maxLength":32}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"rowId":{"type":"string","format":"uuid"},"status":{"const":"updated"},"row":{"$ref":"#/components/schemas/PodRequestGroupRow"}},"required":["rowId","status","row"]},{"type":"object","properties":{"rowId":{"type":"string","format":"uuid"},"status":{"const":"rejected"},"error":{"enum":["row_not_found","not_waiting_for_postal_code","submit_failed","allowance_exhausted","invalid_entry"],"type":"string"},"message":{"type":"string"}},"required":["rowId","status","error","message"]}]}},"updatedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rejectedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"}},"required":["results","updatedCount","rejectedCount","group"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/carrier":{"post":{"operationId":"pods.resolveGroupCarrier","summary":"Resolve a carrier for all ambiguous group rows","description":"Assigns an operator-selected carrier to every ambiguous batch row it is a valid candidate for and submits those POD requests. With `suggestedOnly`, only rows whose check digit suggests that carrier are assigned.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"suggestedOnly":{"type":"boolean"}},"required":["carrier"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"resolvedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"}},"required":["resolvedCount","skippedCount","group"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/archive":{"get":{"operationId":"pods.groupArchive","summary":"Download a POD group archive","description":"Returns a public R2 URL for the ZIP archive when public delivery is enabled, or an inline ZIP payload for local/private fallback environments.","tags":["Group Archives"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"includeManifest","in":"query","schema":{"type":"boolean","default":true},"allowEmptyValue":true,"allowReserved":true},{"name":"carriers","in":"query","schema":{"type":"array","minItems":1,"items":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"}},"style":"deepObject","explode":true,"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodRequestGroupArchiveOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/retry":{"post":{"operationId":"pods.retryGroup","summary":"Retry POD requests in a group","description":"Retries eligible failed POD requests in a group and can optionally include not-found rows and recover stale in-progress rows.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"includeNotFound":{"type":"boolean","default":false},"recoverInProgress":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"},"rows":{"type":"array","items":{"type":"object","properties":{"rowId":{"type":"string","format":"uuid"},"requestId":{"type":"string","format":"uuid"},"trackingNumber":{"type":"string"},"status":{"enum":["retried","already_processing","not_eligible","failed"],"type":"string"},"message":{"type":"string"},"request":{"$ref":"#/components/schemas/PodRequestSummary"}},"required":["rowId","status","message"]}},"requestedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"retriedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"alreadyProcessingCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"notEligibleCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"failedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["group","rows","requestedCount","retriedCount","alreadyProcessingCount","notEligibleCount","failedCount"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-request-groups/{id}/resume":{"post":{"operationId":"pods.resumeGroup","summary":"Resume rows waiting for allowance","description":"Submits a group's rows that were waiting for plan allowance again, in batch order, under the same allowance gate as batch submission.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/PodRequestGroupSummary"},"startedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reusedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"waitingForAllowanceCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["group","startedCount","reusedCount","waitingForAllowanceCount"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/overview":{"get":{"operationId":"pods.overview","summary":"Get POD overview metrics","description":"Returns recent organization-scoped POD status, carrier, and daily aggregates.","tags":["Insights"],"parameters":[{"name":"range","in":"query","schema":{"enum":["7d","30d","90d"],"type":"string"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodOverviewSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/needs-input":{"get":{"operationId":"pods.needsInput","summary":"List POD requests needing input","description":"Lists organization POD rows waiting for corrected ZIP or postal-code input.","tags":["Needs Input"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"maximum":9007199254740991,"default":1},"allowEmptyValue":true,"allowReserved":true},{"name":"pageSize","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPodNeedsInputOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/{id}/postal-code":{"post":{"operationId":"pods.updatePostalCode","summary":"Update POD postal code","description":"Updates ZIP or postal-code input for an authorized needs-input POD request.","tags":["Needs Input"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"postalCode":{"type":"string","minLength":1,"maxLength":32}},"required":["postalCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodRequestSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/{id}":{"get":{"operationId":"pods.get","summary":"Get a POD request","description":"Returns one organization-scoped POD request by id.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"carrier":{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"trackingNumber":{"type":"string"},"status":{"enum":["queued","processing","completed","needs_input","not_found","failed"],"type":"string"},"artifact":{"$ref":"#/components/schemas/PodRequestArtifact"},"failureCode":{"enum":["postal_code_required","postal_code_rejected","document_not_found","shipment_not_delivered","carrier_unavailable","invalid_request","document_render_failed","generation_failed"],"type":"string"},"failureMessage":{"type":"string"},"postalCode":{"type":"string"},"postalCodeSource":{"enum":["explicit","workspace_default"],"type":"string"},"inputRequired":{"$ref":"#/components/schemas/PodInputRequired"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"completedAt":{"type":"string"},"tags":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":80},"color":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","slug","name","color","createdAt","updatedAt"]}}},"required":["id","carrier","trackingNumber","status","createdAt","updatedAt","tags"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/{id}/artifact":{"get":{"operationId":"pods.artifact","summary":"Get a POD artifact","description":"Returns a public R2 URL for an authorized POD artifact when public delivery is enabled, or an inline payload for local/private fallback environments.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodArtifactOutput"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/pod-requests/{id}/retry":{"post":{"operationId":"pods.retry","summary":"Retry a POD request","description":"Retries an eligible failed or not-found POD request for the authenticated organization.","tags":["POD Requests"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PodRequestSummary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipments":{"post":{"operationId":"shipments.register","summary":"Register or reuse a shipment","description":"Registers an organization shipment with optional recipient-facing description and product lines.","tags":["Shipments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"enum":["amazon-logistics","austrian-post","bpost","bring","canada-post","chronopost","colissimo","correos","ctt","dhl","dhl-ecommerce","dhl-paket","dpd","fedex","fedex-smartpost","gls","landmark","old-dominion","ontrac","poste-italiane","postnl","postnord","royal-mail","seur","brt","speedy","jadlog","swiss-post","ups","usps"],"type":"string"},"postalCode":{"type":"string","minLength":1,"maxLength":32},"direction":{"enum":["inbound","outbound"],"type":"string","default":"outbound"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["productName"]}},"externalSource":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},"externalReference":{"type":"string","minLength":1,"maxLength":256}},"required":["trackingNumber"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shipment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trackingNumber":{"type":"string"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"podCarrier":{"anyOf":[{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoPod":{"type":"boolean"},"podRequestId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","trackingNumber","carrier","podCarrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","autoPod","podRequestId","createdAt","updatedAt"]},"productLines":{"type":"array","items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"created":{"type":"boolean"}},"required":["shipment","productLines","created"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipments/{id}":{"get":{"operationId":"shipments.get","summary":"Get a registered shipment","tags":["Shipments"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shipment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"trackingNumber":{"type":"string"},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"podCarrier":{"anyOf":[{"type":"string","minLength":1,"maxLength":72,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"autoPod":{"type":"boolean"},"podRequestId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","trackingNumber","carrier","podCarrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","autoPod","podRequestId","createdAt","updatedAt"]},"productLines":{"type":"array","items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]}},"required":["shipment","productLines"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipments/{shipmentId}/sharing":{"post":{"operationId":"shipments.updateSharingDetails","summary":"Replace shipment sharing details","tags":["Shipments"],"parameters":[{"name":"shipmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["productName"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shipmentId":{"type":"string","format":"uuid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}}},"required":["shipmentId","description","productLines"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipment-changes":{"get":{"operationId":"shipmentChanges.list","summary":"List durable shipment changes","description":"Pages organization shipment changes in global cursor order.","tags":["Shipment Changes"],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":250,"default":100},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"cursor":{"type":"string","minLength":1,"maxLength":512},"change":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"const":1},"eventId":{"type":"string","format":"uuid"},"type":{"const":"shipment.updated"},"organizationId":{"type":"string","minLength":1},"shipmentId":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"occurredAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"},"data":{"type":"object","properties":{"shipment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"type":"string","minLength":1,"maxLength":120},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{},"name":{}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{},"carrier":{},"method":{}}},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{},"label":{},"value":{}}},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parcelIntentId","externalSource","externalReference","trackingNumber","carrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","productLines","revision","changedAt","supersededAt","supersededByShipmentId","createdAt","updatedAt"]},"newEvents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"description":{"type":"string","maxLength":2000},"location":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"occurredAt":{"type":"string","format":"date-time"},"details":{"anyOf":[{"type":"object","properties":{"stage":{"type":"string"},"localTimestamp":{"type":"string"},"subStatus":{"type":"string"},"address":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"timeBasis":{"enum":["explicit","calibrated","unverified"],"type":"string"}}},{"type":"null"}]}},"required":["id","status","description","location","occurredAt","details"]}}},"required":["shipment","newEvents"]}},"required":["schemaVersion","eventId","type","organizationId","shipmentId","parcelIntentId","externalSource","externalReference","revision","occurredAt","createdAt","data"]}]}},"required":["cursor","change"]}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["items","nextCursor","hasMore"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"description":"410","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"SHIPMENT_CHANGE_CURSOR_EXPIRED"},"status":{"const":410},"message":{"type":"string","default":"SHIPMENT_CHANGE_CURSOR_EXPIRED"},"data":{"type":"object","properties":{"code":{"const":"CURSOR_EXPIRED"},"bootstrapHighWaterCursor":{"type":"string","minLength":1,"maxLength":512}},"required":["code","bootstrapHighWaterCursor"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipment-parcels":{"get":{"operationId":"shipmentChanges.listCurrentParcels","summary":"List current parcel state","description":"Pages parcel state captured at a reconciliation high-water cursor.","tags":["Shipment Changes"],"parameters":[{"name":"highWaterCursor","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":512},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":250,"default":100},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"parcels":{"type":"array","items":{"type":"object","properties":{"parcelIntent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalSource":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},"externalReference":{"type":"string","minLength":1,"maxLength":256},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","externalSource","externalReference","createdAt","updatedAt"]},"currentAttempt":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"type":"string","minLength":1,"maxLength":120},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parcelIntentId","externalSource","externalReference","trackingNumber","carrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","productLines","revision","changedAt","supersededAt","supersededByShipmentId","createdAt","updatedAt"]},{"type":"null"}]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"type":"string","minLength":1,"maxLength":120},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parcelIntentId","externalSource","externalReference","trackingNumber","carrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","productLines","revision","changedAt","supersededAt","supersededByShipmentId","createdAt","updatedAt"]}}},"required":["parcelIntent","currentAttempt","attempts"]}},"highWaterCursor":{"type":"string","minLength":1,"maxLength":512},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["parcels","highWaterCursor","nextCursor","hasMore"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"410":{"description":"410","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"SHIPMENT_CHANGE_CURSOR_EXPIRED"},"status":{"const":410},"message":{"type":"string","default":"SHIPMENT_CHANGE_CURSOR_EXPIRED"},"data":{"type":"object","properties":{"code":{"const":"CURSOR_EXPIRED"},"bootstrapHighWaterCursor":{"type":"string","minLength":1,"maxLength":512}},"required":["code","bootstrapHighWaterCursor"]}},"required":["defined","code","status","message","data"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/shipment-parcels/{externalSource}/{externalReference}":{"get":{"operationId":"shipmentChanges.getParcel","summary":"Get a parcel and its shipment attempts","tags":["Shipment Changes"],"parameters":[{"name":"externalSource","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"}},{"name":"externalReference","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"parcel":{"type":"object","properties":{"parcelIntent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"externalSource":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},"externalReference":{"type":"string","minLength":1,"maxLength":256},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","externalSource","externalReference","createdAt","updatedAt"]},"currentAttempt":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"type":"string","minLength":1,"maxLength":120},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parcelIntentId","externalSource","externalReference","trackingNumber","carrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","productLines","revision","changedAt","supersededAt","supersededByShipmentId","createdAt","updatedAt"]},{"type":"null"}]},"attempts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"parcelIntentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"externalSource":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9]+(?:[._-][a-z0-9]+)*$"},{"type":"null"}]},"externalReference":{"anyOf":[{"type":"string","minLength":1,"maxLength":256},{"type":"null"}]},"trackingNumber":{"type":"string","minLength":1,"maxLength":128},"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"direction":{"enum":["inbound","outbound"],"type":"string"},"status":{"type":"string","minLength":1,"maxLength":120},"subStatus":{"anyOf":[{"type":"string"},{"type":"null"}]},"origin":{"anyOf":[{"type":"string"},{"type":"null"}]},"originCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"originRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"destination":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationCountry":{"anyOf":[{"type":"string"},{"type":"null"}]},"destinationRegion":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimatedDeliveryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryFromAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"estimatedDeliveryToAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"trackingDetails":{"anyOf":[{"type":"object","properties":{"origin":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"destination":{"type":"object","properties":{"country":{"enum":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"],"type":"string"},"state":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"postalCode":{"type":"string"},"raw":{"type":"string"}}},"milestones":{"type":"array","items":{"type":"object","properties":{"keyStage":{"type":"string"},"timestamp":{"type":"string"},"localTimestamp":{"type":"string"}},"required":["keyStage"]},"default":[]},"metrics":{"type":"object","properties":{"daysOfTransit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysOfTransitDone":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"daysAfterLastUpdate":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"enrichment":{"type":"object","properties":{"weight":{"type":"string"},"services":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}}},"default":[]},"senderLabel":{"type":"string"},"fromLabel":{"type":"string"},"toLabel":{"type":"string"},"externalLinks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"carrier":{"type":"string"},"method":{"type":"string"}},"required":["url"]},"default":[]},"attributes":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"default":[]}}},"estimatedDeliveryRange":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"to":{"anyOf":[{"type":"string","format":"date"},{"type":"string","format":"date-time"}]},"basis":{"enum":["carrier","unspecified"],"type":"string"}}},"statusConflict":{"type":"object","properties":{"reportedStatus":{"enum":["pending","info_received","in_transit","out_for_delivery","delivery_attempt_failed","available_for_pickup","delivered","returned","exception","expired"],"type":"string"}},"required":["reportedStatus"]}}},{"type":"null"}]},"lastEventAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"publicDescription":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"changedAt":{"type":"string","format":"date-time"},"supersededAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"supersededByShipmentId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","parcelIntentId","externalSource","externalReference","trackingNumber","carrier","direction","status","subStatus","origin","originCountry","originRegion","destination","destinationCountry","destinationRegion","estimatedDeliveryAt","estimatedDeliveryFromAt","estimatedDeliveryToAt","trackingDetails","lastEventAt","deliveredAt","archivedAt","postalCode","publicDescription","productLines","revision","changedAt","supersededAt","supersededByShipmentId","createdAt","updatedAt"]}}},"required":["parcelIntent","currentAttempt","attempts"]},"highWaterCursor":{"type":"string","minLength":1,"maxLength":512}},"required":["parcel","highWaterCursor"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/share-links":{"post":{"operationId":"shareLinks.create","summary":"Create a public share link","tags":["Public Sharing"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"enum":["shipment","batch"],"type":"string"},"targetId":{"type":"string","format":"uuid"},"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string","default":"postal_code"},"password":{"type":"string","minLength":8,"maxLength":128}},"required":["targetType","targetId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"targetType":{"enum":["shipment","batch"],"type":"string"},"targetId":{"type":"string","format":"uuid"},"token":{"type":"string","pattern":"^slk_[A-Za-z0-9_-]{43}$"},"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string"},"publicPath":{"type":"string","pattern":"^\\/share\\/slk_.*"},"createdAt":{"type":"string"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetType","targetId","token","accessMode","publicPath","createdAt","revokedAt"]}},"required":["link"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/share-links/{targetType}/{targetId}":{"get":{"operationId":"shareLinks.get","summary":"Get a public share link","tags":["Public Sharing"],"parameters":[{"name":"targetType","in":"path","required":true,"schema":{"enum":["shipment","batch"],"type":"string"}},{"name":"targetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"targetType":{"enum":["shipment","batch"],"type":"string"},"targetId":{"type":"string","format":"uuid"},"token":{"type":"string","pattern":"^slk_[A-Za-z0-9_-]{43}$"},"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string"},"publicPath":{"type":"string","pattern":"^\\/share\\/slk_.*"},"createdAt":{"type":"string"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetType","targetId","token","accessMode","publicPath","createdAt","revokedAt"]},{"type":"null"}]},"postalCodeUnlockAvailable":{"type":"boolean"}},"required":["link","postalCodeUnlockAvailable"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/share-links/{id}/revoke":{"post":{"operationId":"shareLinks.revoke","summary":"Revoke a public share link","tags":["Public Sharing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"targetType":{"enum":["shipment","batch"],"type":"string"},"targetId":{"type":"string","format":"uuid"},"token":{"type":"string","pattern":"^slk_[A-Za-z0-9_-]{43}$"},"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string"},"publicPath":{"type":"string","pattern":"^\\/share\\/slk_.*"},"createdAt":{"type":"string"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetType","targetId","token","accessMode","publicPath","createdAt","revokedAt"]}},"required":["link"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/share-links/{id}/access":{"post":{"operationId":"shareLinks.updateAccess","summary":"Update public share link access","tags":["Public Sharing"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string"},"password":{"type":"string","minLength":8,"maxLength":128}},"required":["accessMode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"link":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"targetType":{"enum":["shipment","batch"],"type":"string"},"targetId":{"type":"string","format":"uuid"},"token":{"type":"string","pattern":"^slk_[A-Za-z0-9_-]{43}$"},"accessMode":{"enum":["postal_code","password","unrestricted"],"type":"string"},"publicPath":{"type":"string","pattern":"^\\/share\\/slk_.*"},"createdAt":{"type":"string"},"revokedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","targetType","targetId","token","accessMode","publicPath","createdAt","revokedAt"]}},"required":["link"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/sharing/shipments/{shipmentId}":{"post":{"operationId":"shareLinks.updateShipmentDetails","summary":"Update shipment public sharing details","tags":["Public Sharing"],"parameters":[{"name":"shipmentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"productLines":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]}},"required":["productName"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"shipmentId":{"type":"string","format":"uuid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"productLines":{"type":"array","items":{"type":"object","properties":{"productName":{"type":"string","minLength":1,"maxLength":200},"variantName":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"null"}]},"imageUrl":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}]},"sku":{"anyOf":[{"type":"string","minLength":1,"maxLength":500},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"id":{"type":"string","format":"uuid"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["productName","id","position"]}}},"required":["shipmentId","description","productLines"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}},"/sharing/shipment-batches/{batchId}":{"post":{"operationId":"shareLinks.updateBatchDetails","summary":"Update batch public sharing details","tags":["Public Sharing"],"parameters":[{"name":"batchId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]}},"required":["description"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["batchId","description"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}},"security":[{"bearerAuth":[]}]}}}}