{"openapi":"3.1.0","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Registly Agent Ordering API","version":"0.2.0","description":"Discover, quote, request, and pay for official company documents. Pilot orders are reviewed before a final amount is exposed through Stripe's Machine Payments Protocol."},"x-service-info":{"categories":["business","procurement","company-registry"],"docs":{"homepage":"https://registly.app","apiReference":"https://registly.app/docs","llms":"https://registly.app/llms.txt"}},"tags":[{"name":"Catalog","description":"Discover orderable registry products."},{"name":"Orders","description":"Quote, request, and track fulfillment."},{"name":"Payments","description":"Pay reviewed order totals with Stripe over MPP."}],"servers":[{"url":"https://registly.app"}],"paths":{"/api/catalog":{"get":{"tags":["Catalog"],"operationId":"listDocumentCatalog","summary":"List jurisdictions and document products","responses":{"200":{"description":"Current document catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}}}}},"/api/quote":{"post":{"tags":["Orders"],"operationId":"quoteDocument","summary":"Generate a document order estimate","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"201":{"description":"Quote generated","content":{"application/json":{"schema":{"type":"object","required":["quote"],"properties":{"quote":{"$ref":"#/components/schemas/Quote"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"}}}},"/api/orders":{"post":{"tags":["Orders"],"operationId":"createPilotOrder","summary":"Submit a pilot document order for review","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable key, up to 200 characters, that makes agent retries return the original order.","schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderRequest"}}}},"responses":{"200":{"description":"The matching order already exists for this idempotency key.","headers":{"Idempotent-Replayed":{"description":"True when an existing order was returned.","schema":{"type":"string","const":"true"}}},"content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"$ref":"#/components/schemas/CreatedOrder"}}}}}},"202":{"description":"Order accepted for review; no payment taken","headers":{"Idempotent-Replayed":{"description":"False for a newly accepted order.","schema":{"type":"string","const":"false"}}},"content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"$ref":"#/components/schemas/CreatedOrder"}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"409":{"description":"The idempotency key was already used with a different request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/orders/{order_id}":{"get":{"tags":["Orders"],"operationId":"getOrderStatus","summary":"Retrieve an order status","parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Order status","content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"$ref":"#/components/schemas/OrderStatus"}}}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/orders/{order_id}/payment":{"post":{"tags":["Payments"],"operationId":"payReviewedOrder","summary":"Pay a reviewed order through Stripe MPP","description":"The first request returns an HTTP 402 MPP challenge. Authorize the exact server-bound amount with a Stripe Shared Payment Token, then retry with Authorization: Payment. This operation never accepts a buyer-supplied charge amount.","x-payment-info":{"offers":[{"amount":null,"currency":"GBP","description":"Dynamic final order total, fixed by Registly review and returned in the 402 challenge.","intent":"charge","method":"stripe"},{"amount":null,"currency":"USD","description":"Dynamic final order total, fixed by Registly review and returned in the 402 challenge.","intent":"charge","method":"stripe"}]},"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Registly-Max-Amount-Minor","in":"header","required":false,"description":"Optional caller-enforced ceiling in minor units. Registly returns 412 without issuing a payment challenge when the reviewed total exceeds it.","schema":{"type":"integer","minimum":1}}],"requestBody":{"required":false,"description":"No payment parameters are accepted. An empty JSON object may be sent for clients that require a POST body.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"maxProperties":0}}}},"responses":{"200":{"description":"Payment succeeded or was already paid. A new successful charge includes an MPP Payment-Receipt header.","headers":{"Payment-Receipt":{"description":"Base64url-encoded MPP receipt containing the Stripe PaymentIntent reference.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["order"],"properties":{"order":{"$ref":"#/components/schemas/PaymentResult"}}}}}},"402":{"description":"MPP payment challenge. Retry with an Authorization: Payment credential.","headers":{"WWW-Authenticate":{"description":"Serialized MPP Stripe charge challenge.","schema":{"type":"string"}}}},"409":{"description":"Order is not payment-ready, is processing, or is paused for reconciliation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"412":{"description":"Reviewed total exceeds the caller's spend ceiling."},"503":{"description":"Stripe MPP is not configured in the current environment."}}}}},"components":{"responses":{"InvalidRequest":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}},"CatalogResponse":{"type":"object","required":["service","mode","jurisdictions","documents","ordering"],"properties":{"service":{"const":"Registly"},"mode":{"const":"pilot"},"jurisdictions":{"type":"array","items":{"$ref":"#/components/schemas/Jurisdiction"}},"documents":{"type":"array","items":{"$ref":"#/components/schemas/DocumentProduct"}},"ordering":{"type":"object","additionalProperties":{"type":"string"}}}},"Jurisdiction":{"type":"object","required":["id","name","authority","currency"],"properties":{"id":{"type":"string","enum":["uk","delaware","adgm"]},"name":{"type":"string"},"compactName":{"type":"string"},"authority":{"type":"string"},"region":{"type":"string"},"currency":{"type":"string","enum":["GBP","USD"]},"sourceUrl":{"type":"string","format":"uri"},"note":{"type":"string"}}},"DocumentProduct":{"type":"object","required":["slug","jurisdiction","name","description","standardPriceMinor","standardDelivery","requirements","includes","sourceUrl"],"properties":{"slug":{"type":"string"},"jurisdiction":{"type":"string","enum":["uk","delaware","adgm"]},"name":{"type":"string"},"shortName":{"type":"string"},"description":{"type":"string"},"category":{"type":"string","enum":["certificate","certified-copy","package"]},"standardPriceMinor":{"type":["integer","null"]},"expressPriceMinor":{"type":["integer","null"]},"standardDelivery":{"type":"string"},"expressDelivery":{"type":["string","null"]},"access":{"type":"string","enum":["public","authorization-may-be-required"]},"requirements":{"type":"array","items":{"type":"string"}},"includes":{"type":"array","items":{"type":"string"}},"sourceUrl":{"type":"string","format":"uri"}}},"QuoteRequest":{"type":"object","required":["document_slug","company_name"],"properties":{"document_slug":{"type":"string"},"company_name":{"type":"string"},"registry_number":{"type":"string"},"speed":{"type":"string","enum":["standard","express"]}}},"Quote":{"type":"object","required":["quote_id","status","document_slug","document_name","company_name","jurisdiction","authority","speed","delivery","total_display","payment_required","expires_at"],"properties":{"quote_id":{"type":"string"},"status":{"type":"string","enum":["estimated","manual_review"]},"document_slug":{"type":"string"},"document_name":{"type":"string"},"company_name":{"type":"string"},"registry_number":{"type":"string"},"jurisdiction":{"type":"string"},"authority":{"type":"string"},"speed":{"type":"string","enum":["standard","express"]},"delivery":{"type":"string"},"currency":{"type":["string","null"],"enum":["GBP","USD",null]},"total_minor":{"type":["integer","null"]},"total_display":{"type":"string"},"payment_required":{"const":false},"payment_note":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}},"OrderRequest":{"allOf":[{"$ref":"#/components/schemas/QuoteRequest"},{"type":"object","required":["requester_email"],"properties":{"requester_email":{"type":"string","format":"email"}}}]},"CreatedOrder":{"type":"object","required":["order_id","status","payment_status","document_name","company_name","total_display","status_url","api_status_url","payment_protocol","payment_url"],"properties":{"order_id":{"type":"string"},"quote_id":{"type":"string"},"status":{"const":"awaiting_review"},"payment_status":{"const":"not_charged"},"document_name":{"type":"string"},"company_name":{"type":"string"},"registry_number":{"type":"string"},"jurisdiction":{"type":"string"},"delivery":{"type":"string"},"total_display":{"type":"string"},"next_action":{"type":"string"},"status_url":{"type":"string"},"api_status_url":{"type":"string"},"payment_protocol":{"const":"mpp"},"payment_url":{"type":"string","format":"uri"}}},"OrderStatus":{"type":"object","required":["order_id","quote_id","document_slug","document_name","jurisdiction","company_name","registry_number","delivery_speed","status","payment_status","currency","total_minor","created_at","updated_at","payment_required","payment_protocol","payment_method","payment_url"],"properties":{"order_id":{"type":"string"},"quote_id":{"type":"string"},"document_slug":{"type":"string"},"document_name":{"type":"string"},"jurisdiction":{"type":"string"},"company_name":{"type":"string"},"registry_number":{"type":"string"},"delivery_speed":{"type":"string","enum":["standard","express"]},"status":{"type":"string"},"payment_status":{"type":"string","enum":["not_charged","payment_required","processing","paid","failed"]},"payment_required":{"type":"boolean"},"payment_protocol":{"const":"mpp"},"payment_method":{"const":"stripe"},"payment_url":{"type":"string","format":"uri"},"currency":{"type":["string","null"]},"total_minor":{"type":["integer","null"]},"total_kind":{"type":"string","enum":["pilot_estimate","final_reviewed"]},"estimated_total_minor":{"type":["integer","null"]},"final_total_minor":{"type":["integer","null"]},"payment_ready_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"payment_reference":{"type":["string","null"]},"next_action":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}},"PaymentResult":{"type":"object","required":["order_id","status","payment_status","payment_protocol","payment_method"],"properties":{"order_id":{"type":"string"},"status":{"const":"paid"},"payment_status":{"const":"paid"},"payment_protocol":{"const":"mpp"},"payment_method":{"const":"stripe"},"currency":{"type":"string"},"final_total_minor":{"type":"integer"},"payment_reference":{"type":["string","null"]},"paid_at":{"type":["string","null"],"format":"date-time"},"already_paid":{"type":"boolean"},"next_action":{"type":"string"}}}}}}