{
"type": "https://errors.invoiceapi.mx/auth_unauthorized",
"title": "Authentication required",
"status": 401,
"code": "auth.unauthorized",
"detail": "Missing or invalid API key.",
"remediation": "Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.",
"doc_url": "/docs/errors#auth-unauthorized",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/idempotency_key_reuse",
"title": "Idempotency-Key reused with a different request body",
"status": 409,
"code": "idempotency.key_reuse",
"detail": "This Idempotency-Key was already used for a different payload.",
"remediation": "Reuse an Idempotency-Key only for byte-identical retries; use a fresh key otherwise.",
"doc_url": "/docs/errors#idempotency-key_reuse",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/request_validation_failed",
"title": "Request validation failed",
"status": 422,
"code": "request.validation_failed",
"detail": "One or more fields did not satisfy the schema.",
"remediation": "Fix the fields listed in `errors` and resubmit.",
"doc_url": "/docs/errors#request-validation_failed",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limit.exceeded",
"detail": "Too many requests for this key + request class (reads and writes are limited separately).",
"remediation": "Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.",
"doc_url": "/docs/errors#rate_limit-exceeded",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/internal_error",
"title": "Internal server error",
"status": 500,
"code": "internal.error",
"detail": "An unexpected error occurred.",
"remediation": "Retry later; contact support with the request_id if it persists.",
"doc_url": "/docs/errors#internal-error",
"request_id": "req_2P9K3sample"
}
ticket_invoices
Self-invoice a ticket from a photo
Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: "extracting"; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.
{
"type": "https://errors.invoiceapi.mx/auth_unauthorized",
"title": "Authentication required",
"status": 401,
"code": "auth.unauthorized",
"detail": "Missing or invalid API key.",
"remediation": "Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.",
"doc_url": "/docs/errors#auth-unauthorized",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/idempotency_key_reuse",
"title": "Idempotency-Key reused with a different request body",
"status": 409,
"code": "idempotency.key_reuse",
"detail": "This Idempotency-Key was already used for a different payload.",
"remediation": "Reuse an Idempotency-Key only for byte-identical retries; use a fresh key otherwise.",
"doc_url": "/docs/errors#idempotency-key_reuse",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/request_validation_failed",
"title": "Request validation failed",
"status": 422,
"code": "request.validation_failed",
"detail": "One or more fields did not satisfy the schema.",
"remediation": "Fix the fields listed in `errors` and resubmit.",
"doc_url": "/docs/errors#request-validation_failed",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/rate_limit_exceeded",
"title": "Rate limit exceeded",
"status": 429,
"code": "rate_limit.exceeded",
"detail": "Too many requests for this key + request class (reads and writes are limited separately).",
"remediation": "Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.",
"doc_url": "/docs/errors#rate_limit-exceeded",
"request_id": "req_2P9K3sample"
}
{
"type": "https://errors.invoiceapi.mx/internal_error",
"title": "Internal server error",
"status": 500,
"code": "internal.error",
"detail": "An unexpected error occurred.",
"remediation": "Retry later; contact support with the request_id if it persists.",
"doc_url": "/docs/errors#internal-error",
"request_id": "req_2P9K3sample"
}
Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 request.invalid_version. Echoed back on every response.
Safely retry any POST. The first response is stored for 24h and replayed byte-for-byte for identical retries (the replay adds an idempotent-replayed: true header). Reusing the key with a different body is 409 idempotency.key_reuse; an in-flight duplicate is 409 idempotency.key_processing. This makes retrying a 502/429 safe — no duplicate stamp.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Invoice API","description":"Mexican CFDI 4.0 invoicing API — stamp, cancel, validate, and bulk-download.","colors":{"primary":"#16a34a","light":"#4ade80","dark":"#15803d"},"favicon":"https://mintcdn.com/invoiceapi/zn1ZuSpkXG_1Rv6s/favicon.svg?fit=max\u0026auto=format\u0026n=zn1ZuSpkXG_1Rv6s\u0026q=85\u0026s=77fb818571243295fe27cfc2fc5a1479","navbar":{"primary":{"type":"button","label":"Quickstart","href":"/quickstart"}},"footer":{"socials":{}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"invoiceapi","hasAudioNarration":false,"actualSubdomain":"invoiceapi","customDomains":[],"gitSource":{"type":"github","owner":"disruptive-learning","repo":"invoice_api","deployBranch":"main","contentDirectory":"mintlify","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6af0c2ca9dea37c9b4628d5f","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":69},{"language":"default","tag":"Documentation","count":15},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"fiscal_profiles","count":8},{"language":"default","tag":"invoices","count":7},{"language":"default","tag":"webhook_endpoints","count":6},{"language":"default","tag":"accounts","count":5},{"language":"default","tag":"downloads","count":5},{"language":"default","tag":"ticket_invoices","count":5},{"language":"default","tag":"api_keys","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo","slug":"/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo","pageMetadata":{"title":"Self-invoice a ticket from a photo","description":"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — `curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03`; a JSON body with `photo_base64` also works. Processing is asynchronous: the response comes back `status: \"extracting\"`; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to `completed`, `needs_review`, or `failed`. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ticket_invoices","href":"/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — \", _jsx(_components.code, {\n children: \"curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03\"\n }), \"; a JSON body with \", _jsx(_components.code, {\n children: \"photo_base64\"\n }), \" also works. Processing is asynchronous: the response comes back \", _jsx(_components.code, {\n children: \"status: \\\"extracting\\\"\"\n }), \"; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to \", _jsx(_components.code, {\n children: \"completed\"\n }), \", \", _jsx(_components.code, {\n children: \"needs_review\"\n }), \", or \", _jsx(_components.code, {\n children: \"failed\"\n }), \". Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Self-invoice a ticket from a photo","description":"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — `curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03`; a JSON body with `photo_base64` also works. Processing is asynchronous: the response comes back `status: \"extracting\"`; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to `completed`, `needs_review`, or `failed`. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ticket_invoices","href":"/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Self-invoice a ticket from a photo","tags":["ticket_invoices"],"description":"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — `curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03`; a JSON body with `photo_base64` also works. Processing is asynchronous: the response comes back `status: \"extracting\"`; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to `completed`, `needs_review`, or `failed`. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.","requestBody":"5fec709d-0072-4022-aebf-a08cec44d879","responses":{"201":"4065fa08-e2c8-485a-95c7-eb60a5833aa1","401":"edaf0f20-d471-477b-9d8d-6a41fca89793","409":"04d31ced-057c-47de-ba18-e500668eaf1a","422":"9500768b-1dc5-4600-be4e-61f09c19a014","429":"b5ed0fc8-76bd-4ac8-972f-3d19c40288a4","500":"16653192-4dc8-4ddc-bc19-33eaadcfcff8"},"parameters":["070973ec-4de0-474a-8c94-6076c96772a6","bc482330-9f25-48a8-8dc7-ce1f4bc85777","13eccc13-25b4-408e-8242-984b3a48ccfd"],"method":"post","type":"path","servers":["635d359e-7259-4c1b-85d0-ba526e2eadf6","7b3c3979-f167-4e3d-b673-287bd81ac5ef"],"security":["ac81f04c-077b-4e24-9b16-5ba61f34b1bb"],"path":"/v1/ticket_invoices","baseUrlOptions":["https://api.newinvoice.dev","http://localhost:3000"],"title":"Self-invoice a ticket from a photo","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"070973ec-4de0-474a-8c94-6076c96772a6":{"name":"Invoice-Version","in":"header","required":false,"description":"Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 `request.invalid_version`. Echoed back on every response.","schema":{"type":"string","example":"2026-07-10","isRequired":false,"description":"Pin a dated API release (Stripe-style). Omit to use the current version. An unknown value returns 400 `request.invalid_version`. Echoed back on every response.","uniqueKey":"","typeLabel":"string"}},"bc482330-9f25-48a8-8dc7-ce1f4bc85777":{"name":"Invoice-Account","in":"header","required":false,"description":"Connect: act on behalf of one of your connected accounts (its `acct_…`/`org_…` id). Omit to act as your own organization. Not honored on /v1/api_keys.","schema":{"type":"string","example":"org_2P9connectedacct","isRequired":false,"description":"Connect: act on behalf of one of your connected accounts (its `acct_…`/`org_…` id). Omit to act as your own organization. Not honored on /v1/api_keys.","uniqueKey":"","typeLabel":"string"}},"13eccc13-25b4-408e-8242-984b3a48ccfd":{"name":"Idempotency-Key","in":"header","required":false,"description":"Safely retry any POST. The first response is stored for 24h and replayed byte-for-byte for identical retries (the replay adds an `idempotent-replayed: true` header). Reusing the key with a different body is 409 `idempotency.key_reuse`; an in-flight duplicate is 409 `idempotency.key_processing`. This makes retrying a 502/429 safe — no duplicate stamp.","schema":{"type":"string","example":"a1b2c3d4-e5f6-4789-8abc-1234567890ab","isRequired":false,"description":"Safely retry any POST. The first response is stored for 24h and replayed byte-for-byte for identical retries (the replay adds an `idempotent-replayed: true` header). Reusing the key with a different body is 409 `idempotency.key_reuse`; an in-flight duplicate is 409 `idempotency.key_processing`. This makes retrying a 502/429 safe — no duplicate stamp.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"photo":{"type":"string","format":"binary","description":"The raw ticket image (JPEG/PNG) — no base64 needed.","isRequired":true,"uniqueKey":"photo","typeLabel":"file"},"fiscal_profile_id":{"type":"string","description":"Fiscal profile whose RFC/razón social/régimen/CP become the CFDI Receptor.","isRequired":true,"uniqueKey":"fiscal_profile_id","typeLabel":"string"},"uso_cfdi":{"type":"string","description":"c_UsoCFDI for the emitted CFDI (default G03).","uniqueKey":"uso_cfdi","typeLabel":"string"},"portal_url":{"type":"string","description":"Override the merchant self-invoice portal URL when the ticket prints none.","uniqueKey":"portal_url","typeLabel":"string"},"metadata":{"type":"string","description":"Integrator-owned metadata as a JSON string, e.g. {\"order_id\":\"123\"}.","uniqueKey":"metadata","typeLabel":"string"}},"required":["photo","fiscal_profile_id"],"uniqueKey":"","typeLabel":"object"},"example":{"photo":"@photo.cer","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"G03"},"examples":{"Example":{"title":"Example","value":{"photo":"@photo.cer","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"G03"}}},"exampleType":"examples"},"application/json":{"schema":{"type":"object","properties":{"photo_base64":{"type":"string","minLength":1,"description":"Base64 of the ticket image bytes (Content-Type application/json). No data: prefix.","isRequired":true,"uniqueKey":"photo_base64","typeLabel":"string"},"fiscal_profile_id":{"type":"string","minLength":1,"description":"Fiscal profile whose RFC/razón social/régimen/CP become the Receptor on the CFDI.","isRequired":true,"uniqueKey":"fiscal_profile_id","typeLabel":"string"},"mime_type":{"default":"image/jpeg","description":"Image MIME type, e.g. \"image/jpeg\" or \"image/png\".","type":"string","minLength":1,"uniqueKey":"mime_type","typeLabel":"string"},"uso_cfdi":{"default":"G03","description":"c_UsoCFDI for the emitted CFDI. Defaults to G03 (gastos en general).","type":"string","minLength":1,"uniqueKey":"uso_cfdi","typeLabel":"string"},"portal_url":{"description":"Override the merchant self-invoice portal URL when the ticket does not print one.","type":"string","format":"uri","uniqueKey":"portal_url","typeLabel":"string\u003curi>"},"metadata":{"description":"Integrator-owned key-value map, echoed back verbatim.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"metadata","typeLabel":"object"}},"required":["photo_base64","fiscal_profile_id"],"uniqueKey":"","typeLabel":"object"},"example":{"photo_base64":"string","mime_type":"image/jpeg","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"G03","portal_url":"https://example.com/webhooks/invoice","metadata":{}},"examples":{"Example":{"title":"Example","value":{"photo_base64":"string","mime_type":"image/jpeg","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"G03","portal_url":"https://example.com/webhooks/invoice","metadata":{}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"4065fa08-e2c8-485a-95c7-eb60a5833aa1":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","description":"Always \"ticket_invoice\".","enum":["ticket_invoice"],"isRequired":true,"uniqueKey":"object","typeLabel":"enum\u003cstring>"},"id":{"type":"string","description":"Ticket-invoice id.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","enum":["extracting","processing","needs_review","completed","failed"],"description":"Lifecycle: extracting → processing → completed | needs_review | failed. Poll or watch ticket_invoice.* webhooks.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"fiscal_profile_id":{"type":"string","description":"The Receptor fiscal profile.","isRequired":true,"uniqueKey":"fiscal_profile_id","typeLabel":"string"},"uso_cfdi":{"type":"string","description":"c_UsoCFDI requested for the emitted CFDI.","isRequired":true,"uniqueKey":"uso_cfdi","typeLabel":"string"},"merchant":{"oneOf":[{"type":"string","description":"Merchant name read off the ticket (the CFDI Emisor).","isRequired":true,"uniqueKey":"merchant.oneOf.0","typeLabel":"string"},{"type":"null","description":"Merchant name read off the ticket (the CFDI Emisor).","isRequired":true,"uniqueKey":"merchant.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"merchant","typeLabel":"string | null"},"merchant_rfc":{"oneOf":[{"type":"string","description":"Merchant RFC, when printed on the ticket.","isRequired":true,"uniqueKey":"merchant_rfc.oneOf.0","typeLabel":"string"},{"type":"null","description":"Merchant RFC, when printed on the ticket.","isRequired":true,"uniqueKey":"merchant_rfc.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"merchant_rfc","typeLabel":"string | null"},"portal_url":{"oneOf":[{"type":"string","description":"The merchant self-invoice portal used.","isRequired":true,"uniqueKey":"portal_url.oneOf.0","typeLabel":"string"},{"type":"null","description":"The merchant self-invoice portal used.","isRequired":true,"uniqueKey":"portal_url.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"portal_url","typeLabel":"string | null"},"portal_domain":{"oneOf":[{"type":"string","description":"Bare host of the portal (recipe key).","isRequired":true,"uniqueKey":"portal_domain.oneOf.0","typeLabel":"string"},{"type":"null","description":"Bare host of the portal (recipe key).","isRequired":true,"uniqueKey":"portal_domain.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"portal_domain","typeLabel":"string | null"},"folio":{"oneOf":[{"type":"string","description":"Ticket folio / web id used to look it up.","isRequired":true,"uniqueKey":"folio.oneOf.0","typeLabel":"string"},{"type":"null","description":"Ticket folio / web id used to look it up.","isRequired":true,"uniqueKey":"folio.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"folio","typeLabel":"string | null"},"sucursal":{"oneOf":[{"type":"string","description":"Branch / station identifier, when needed.","isRequired":true,"uniqueKey":"sucursal.oneOf.0","typeLabel":"string"},{"type":"null","description":"Branch / station identifier, when needed.","isRequired":true,"uniqueKey":"sucursal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"sucursal","typeLabel":"string | null"},"currency":{"type":"string","description":"ISO-4217 currency, default MXN.","isRequired":true,"uniqueKey":"currency","typeLabel":"string"},"subtotal":{"oneOf":[{"type":"string","description":"Ticket subtotal as a decimal string.","isRequired":true,"uniqueKey":"subtotal.oneOf.0","typeLabel":"string"},{"type":"null","description":"Ticket subtotal as a decimal string.","isRequired":true,"uniqueKey":"subtotal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"subtotal","typeLabel":"string | null"},"total":{"oneOf":[{"type":"string","description":"Ticket total as a decimal string.","isRequired":true,"uniqueKey":"total.oneOf.0","typeLabel":"string"},{"type":"null","description":"Ticket total as a decimal string.","isRequired":true,"uniqueKey":"total.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"total","typeLabel":"string | null"},"ticket_date":{"oneOf":[{"type":"string","description":"Ticket date as printed, yyyy-mm-dd.","isRequired":true,"uniqueKey":"ticket_date.oneOf.0","typeLabel":"string"},{"type":"null","description":"Ticket date as printed, yyyy-mm-dd.","isRequired":true,"uniqueKey":"ticket_date.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"ticket_date","typeLabel":"string | null"},"confidence":{"oneOf":[{"type":"number","description":"Extraction confidence 0..1 (below the auto-submit threshold → needs_review).","isRequired":true,"uniqueKey":"confidence.oneOf.0","typeLabel":"number"},{"type":"null","description":"Extraction confidence 0..1 (below the auto-submit threshold → needs_review).","isRequired":true,"uniqueKey":"confidence.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"confidence","typeLabel":"number | null"},"uuid":{"oneOf":[{"type":"string","description":"SAT folio fiscal (UUID) of the emitted CFDI, when completed.","isRequired":true,"uniqueKey":"uuid.oneOf.0","typeLabel":"string"},{"type":"null","description":"SAT folio fiscal (UUID) of the emitted CFDI, when completed.","isRequired":true,"uniqueKey":"uuid.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"uuid","typeLabel":"string | null"},"portal_reference":{"oneOf":[{"type":"string","description":"Portal-side acuse/reference id, when shown.","isRequired":true,"uniqueKey":"portal_reference.oneOf.0","typeLabel":"string"},{"type":"null","description":"Portal-side acuse/reference id, when shown.","isRequired":true,"uniqueKey":"portal_reference.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"portal_reference","typeLabel":"string | null"},"recipe_id":{"oneOf":[{"type":"string","description":"The learned portal recipe used/produced for this run.","isRequired":true,"uniqueKey":"recipe_id.oneOf.0","typeLabel":"string"},{"type":"null","description":"The learned portal recipe used/produced for this run.","isRequired":true,"uniqueKey":"recipe_id.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"recipe_id","typeLabel":"string | null"},"error":{"oneOf":[{"type":"object","description":"Failure detail when status is failed/needs_review, else null.","required":["code","message","remediation"],"properties":{"code":{"type":"string","description":"Stable machine code, e.g. \"autofactura.portal_unknown\".","isRequired":true,"uniqueKey":"error.oneOf.0.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable failure description.","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable fix for a human or agent.","isRequired":true,"uniqueKey":"error.oneOf.0.remediation","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","description":"Failure detail when status is failed/needs_review, else null.","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"object | null"},"metadata":{"oneOf":[{"type":"object","description":"Echoed integrator metadata.","additionalProperties":{"type":"string","uniqueKey":"metadata.oneOf.0.additionalProperties","typeLabel":"string"},"isRequired":true,"uniqueKey":"metadata.oneOf.0","typeLabel":"object"},{"type":"null","description":"Echoed integrator metadata.","isRequired":true,"uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"metadata","typeLabel":"object | null"},"livemode":{"type":"boolean","description":"True if created with a live-mode key.","isRequired":true,"uniqueKey":"livemode","typeLabel":"boolean"},"created_at":{"type":"string","description":"Creation timestamp, ISO-8601 UTC.","isRequired":true,"uniqueKey":"created_at","typeLabel":"string"},"updated_at":{"type":"string","description":"Last update timestamp, ISO-8601 UTC.","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string"}},"required":["object","id","status","fiscal_profile_id","uso_cfdi","merchant","merchant_rfc","portal_url","portal_domain","folio","sucursal","currency","subtotal","total","ticket_date","confidence","uuid","portal_reference","recipe_id","error","metadata","livemode","created_at","updated_at"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"example":{"object":"ticket_invoice","id":"obj_2P9K3sample","status":"extracting","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"string","merchant":"string","merchant_rfc":"string","portal_url":"https://example.com/webhooks/invoice","portal_domain":"string","folio":"string","sucursal":"string","currency":"MXN","subtotal":"116.00","total":"116.00","ticket_date":"string","confidence":1,"uuid":"5FB2822E-396D-4725-8521-CDC4BDD20CCF","portal_reference":"string","recipe_id":"obj_2P9K3sample","error":{"code":"string","message":"string","remediation":"string"},"metadata":{},"livemode":false,"created_at":"2026-07-10T18:25:43Z","updated_at":"2026-07-10T18:25:43Z"},"examples":{"Example":{"title":"Example","value":{"object":"ticket_invoice","id":"obj_2P9K3sample","status":"extracting","fiscal_profile_id":"fp_2P9K3sample","uso_cfdi":"string","merchant":"string","merchant_rfc":"string","portal_url":"https://example.com/webhooks/invoice","portal_domain":"string","folio":"string","sucursal":"string","currency":"MXN","subtotal":"116.00","total":"116.00","ticket_date":"string","confidence":1,"uuid":"5FB2822E-396D-4725-8521-CDC4BDD20CCF","portal_reference":"string","recipe_id":"obj_2P9K3sample","error":{"code":"string","message":"string","remediation":"string"},"metadata":{},"livemode":false,"created_at":"2026-07-10T18:25:43Z","updated_at":"2026-07-10T18:25:43Z"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}},"RateLimit-Limit":{"description":"IETF draft rate-limit: the ceiling of the token bucket consulted for this request class (reads and writes have independent buckets).","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"IETF draft rate-limit: tokens left in the bucket after this request.","schema":{"type":"integer","example":99}},"RateLimit-Reset":{"description":"IETF draft rate-limit: seconds until the bucket refills to its ceiling.","schema":{"type":"integer","example":1}}},"exampleType":"examples"},"edaf0f20-d471-477b-9d8d-6a41fca89793":{"description":"Missing or invalid API key.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem+json error with agent-first extensions.","properties":{"type":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"code":{"type":"string","description":"Stable dotted machine code to switch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable next step for a human or agent.","uniqueKey":"remediation","typeLabel":"string"},"pac":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"pac.provider","typeLabel":"string"},"codigo":{"type":"string","uniqueKey":"pac.codigo","typeLabel":"string"},"mensaje":{"type":"string","uniqueKey":"pac.mensaje","typeLabel":"string"}},"uniqueKey":"pac","typeLabel":"object"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"uniqueKey":"","typeLabel":"object"},"example":{"type":"https://errors.invoiceapi.mx/auth_unauthorized","title":"Authentication required","status":401,"code":"auth.unauthorized","detail":"Missing or invalid API key.","remediation":"Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.","doc_url":"/docs/errors#auth-unauthorized","request_id":"req_2P9K3sample"},"examples":{"Example":{"title":"Example","value":{"type":"https://errors.invoiceapi.mx/auth_unauthorized","title":"Authentication required","status":401,"code":"auth.unauthorized","detail":"Missing or invalid API key.","remediation":"Send `Authorization: Bearer sk_test_...` (or sk_live_...) with a valid API key.","doc_url":"/docs/errors#auth-unauthorized","request_id":"req_2P9K3sample"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}}},"exampleType":"examples"},"04d31ced-057c-47de-ba18-e500668eaf1a":{"description":"Conflict (e.g. idempotency/state).","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem+json error with agent-first extensions.","properties":{"type":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"code":{"type":"string","description":"Stable dotted machine code to switch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable next step for a human or agent.","uniqueKey":"remediation","typeLabel":"string"},"pac":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"pac.provider","typeLabel":"string"},"codigo":{"type":"string","uniqueKey":"pac.codigo","typeLabel":"string"},"mensaje":{"type":"string","uniqueKey":"pac.mensaje","typeLabel":"string"}},"uniqueKey":"pac","typeLabel":"object"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"uniqueKey":"","typeLabel":"object"},"example":{"type":"https://errors.invoiceapi.mx/idempotency_key_reuse","title":"Idempotency-Key reused with a different request body","status":409,"code":"idempotency.key_reuse","detail":"This Idempotency-Key was already used for a different payload.","remediation":"Reuse an Idempotency-Key only for byte-identical retries; use a fresh key otherwise.","doc_url":"/docs/errors#idempotency-key_reuse","request_id":"req_2P9K3sample"},"examples":{"Example":{"title":"Example","value":{"type":"https://errors.invoiceapi.mx/idempotency_key_reuse","title":"Idempotency-Key reused with a different request body","status":409,"code":"idempotency.key_reuse","detail":"This Idempotency-Key was already used for a different payload.","remediation":"Reuse an Idempotency-Key only for byte-identical retries; use a fresh key otherwise.","doc_url":"/docs/errors#idempotency-key_reuse","request_id":"req_2P9K3sample"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}}},"exampleType":"examples"},"9500768b-1dc5-4600-be4e-61f09c19a014":{"description":"Request validation failed.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem+json error with agent-first extensions.","properties":{"type":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"code":{"type":"string","description":"Stable dotted machine code to switch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable next step for a human or agent.","uniqueKey":"remediation","typeLabel":"string"},"pac":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"pac.provider","typeLabel":"string"},"codigo":{"type":"string","uniqueKey":"pac.codigo","typeLabel":"string"},"mensaje":{"type":"string","uniqueKey":"pac.mensaje","typeLabel":"string"}},"uniqueKey":"pac","typeLabel":"object"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"uniqueKey":"","typeLabel":"object"},"example":{"type":"https://errors.invoiceapi.mx/request_validation_failed","title":"Request validation failed","status":422,"code":"request.validation_failed","detail":"One or more fields did not satisfy the schema.","remediation":"Fix the fields listed in `errors` and resubmit.","doc_url":"/docs/errors#request-validation_failed","request_id":"req_2P9K3sample"},"examples":{"Example":{"title":"Example","value":{"type":"https://errors.invoiceapi.mx/request_validation_failed","title":"Request validation failed","status":422,"code":"request.validation_failed","detail":"One or more fields did not satisfy the schema.","remediation":"Fix the fields listed in `errors` and resubmit.","doc_url":"/docs/errors#request-validation_failed","request_id":"req_2P9K3sample"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}}},"exampleType":"examples"},"b5ed0fc8-76bd-4ac8-972f-3d19c40288a4":{"description":"Rate limit exceeded — back off per the Retry-After header.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem+json error with agent-first extensions.","properties":{"type":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"code":{"type":"string","description":"Stable dotted machine code to switch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable next step for a human or agent.","uniqueKey":"remediation","typeLabel":"string"},"pac":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"pac.provider","typeLabel":"string"},"codigo":{"type":"string","uniqueKey":"pac.codigo","typeLabel":"string"},"mensaje":{"type":"string","uniqueKey":"pac.mensaje","typeLabel":"string"}},"uniqueKey":"pac","typeLabel":"object"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"uniqueKey":"","typeLabel":"object"},"example":{"type":"https://errors.invoiceapi.mx/rate_limit_exceeded","title":"Rate limit exceeded","status":429,"code":"rate_limit.exceeded","detail":"Too many requests for this key + request class (reads and writes are limited separately).","remediation":"Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.","doc_url":"/docs/errors#rate_limit-exceeded","request_id":"req_2P9K3sample"},"examples":{"Example":{"title":"Example","value":{"type":"https://errors.invoiceapi.mx/rate_limit_exceeded","title":"Rate limit exceeded","status":429,"code":"rate_limit.exceeded","detail":"Too many requests for this key + request class (reads and writes are limited separately).","remediation":"Back off and retry after the number of seconds in the Retry-After header; batch work or lower your request rate.","doc_url":"/docs/errors#rate_limit-exceeded","request_id":"req_2P9K3sample"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}},"RateLimit-Limit":{"description":"IETF draft rate-limit: the ceiling of the token bucket consulted for this request class (reads and writes have independent buckets).","schema":{"type":"integer","example":100}},"RateLimit-Remaining":{"description":"IETF draft rate-limit: tokens left in the bucket after this request.","schema":{"type":"integer","example":99}},"RateLimit-Reset":{"description":"IETF draft rate-limit: seconds until the bucket refills to its ceiling.","schema":{"type":"integer","example":1}},"Retry-After":{"description":"Seconds to wait before retrying (RFC 9110). Present on 429 and on retryable upstream failures.","schema":{"type":"integer","example":1}}},"exampleType":"examples"},"16653192-4dc8-4ddc-bc19-33eaadcfcff8":{"description":"Internal server error.","content":{"application/problem+json":{"schema":{"type":"object","description":"RFC 9457 problem+json error with agent-first extensions.","properties":{"type":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"type","typeLabel":"string\u003curi>"},"title":{"type":"string","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","isRequired":true,"uniqueKey":"status","typeLabel":"integer"},"code":{"type":"string","description":"Stable dotted machine code to switch on.","isRequired":true,"uniqueKey":"code","typeLabel":"string"},"request_id":{"type":"string","isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"detail":{"type":"string","uniqueKey":"detail","typeLabel":"string"},"remediation":{"type":"string","description":"Actionable next step for a human or agent.","uniqueKey":"remediation","typeLabel":"string"},"pac":{"type":"object","properties":{"provider":{"type":"string","uniqueKey":"pac.provider","typeLabel":"string"},"codigo":{"type":"string","uniqueKey":"pac.codigo","typeLabel":"string"},"mensaje":{"type":"string","uniqueKey":"pac.mensaje","typeLabel":"string"}},"uniqueKey":"pac","typeLabel":"object"},"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"required":["type","title","status","code","request_id"],"uniqueKey":"","typeLabel":"object"},"example":{"type":"https://errors.invoiceapi.mx/internal_error","title":"Internal server error","status":500,"code":"internal.error","detail":"An unexpected error occurred.","remediation":"Retry later; contact support with the request_id if it persists.","doc_url":"/docs/errors#internal-error","request_id":"req_2P9K3sample"},"examples":{"Example":{"title":"Example","value":{"type":"https://errors.invoiceapi.mx/internal_error","title":"Internal server error","status":500,"code":"internal.error","detail":"An unexpected error occurred.","remediation":"Retry later; contact support with the request_id if it persists.","doc_url":"/docs/errors#internal-error","request_id":"req_2P9K3sample"}}},"exampleType":"examples"}},"headers":{"Request-Id":{"description":"Unique id for this request. Also the `request_id` in every error body — log it and quote it to support; idempotency keys off it too.","schema":{"type":"string","example":"req_2P9K3sample"}},"Invoice-Version":{"description":"The dated API version resolved for this request (request header → key pin → current). Echoed on every response.","schema":{"type":"string","example":"2026-07-15"}},"traceparent":{"description":"W3C Trace Context. When you send a valid `traceparent`, the response continues the trace (same trace-id, a fresh span-id, sampled flag).","schema":{"type":"string","example":"00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01"}}},"exampleType":"examples"}},"security":{"ac81f04c-077b-4e24-9b16-5ba61f34b1bb":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: `Authorization: Bearer sk_test_...` or `sk_live_...`.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"635d359e-7259-4c1b-85d0-ba526e2eadf6":{"url":"https://api.newinvoice.dev","description":"Production"},"7b3c3979-f167-4e3d-b673-287bd81ac5ef":{"url":"http://localhost:3000","description":"Local development"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key: `Authorization: Bearer sk_test_...` or `sk_live_...`.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key: `Authorization: Bearer sk_test_...` or `sk_live_...`.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"invoiceapi","siteName":"Invoice API","title":"Self-invoice a ticket from a photo - Invoice API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-08T18:43:28.675Z","originalFileLocation":"api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: \u0026quot;extracting\u0026quot;; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Invoice API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Self-invoice a ticket from a photo - Invoice API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: \u0026quot;extracting\u0026quot;; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Invoice API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://invoiceapi.mintlify.site/_mintlify/api/og/v2?division=ticket_invoices\u0026amp;title=Self-invoice+a+ticket+from+a+photo\u0026amp;description=Turn+a+merchant+ticket+%28gas+station%2C+restaurant%2C+retail%29+into+a+CFDI+by+uploading+a+photo.+The+simplest+way+is+multipart+%E2%80%94+%60curl+-F+photo%3D%40ticket.jpg+-F+fiscal_\u0026amp;theme=6729f16123681879c7445b79\u0026amp;signature=faa00ccb73464d7e4c858e1c9395017e8308b5152b9effa6a067b330fb41f9e4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Self-invoice a ticket from a photo - Invoice API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: \u0026quot;extracting\u0026quot;; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://invoiceapi.mintlify.site/_mintlify/api/og/v2?division=ticket_invoices\u0026amp;title=Self-invoice+a+ticket+from+a+photo\u0026amp;description=Turn+a+merchant+ticket+%28gas+station%2C+restaurant%2C+retail%29+into+a+CFDI+by+uploading+a+photo.+The+simplest+way+is+multipart+%E2%80%94+%60curl+-F+photo%3D%40ticket.jpg+-F+fiscal_\u0026amp;theme=6729f16123681879c7445b79\u0026amp;signature=faa00ccb73464d7e4c858e1c9395017e8308b5152b9effa6a067b330fb41f9e4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/invoiceapi/BFU6Hg8PMnpYZfzc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Invoice API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16a34a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://invoiceapi.mintlify.app/#organization\",\"name\":\"Invoice API\",\"url\":\"https://invoiceapi.mintlify.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://invoiceapi.mintlify.app#website\",\"name\":\"Invoice API\",\"url\":\"https://invoiceapi.mintlify.app\",\"publisher\":{\"@id\":\"https://invoiceapi.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo#webpage\",\"url\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo\",\"name\":\"Self-invoice a ticket from a photo\",\"description\":\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: \\\"extracting\\\"; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\",\"dateModified\":\"2026-11-08T18:43:28.675Z\",\"isPartOf\":{\"@id\":\"https://invoiceapi.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ticket_invoices\",\"item\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/list-ticket-invoices\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Self-invoice a ticket from a photo\",\"item\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo#apireference\",\"headline\":\"Self-invoice a ticket from a photo\",\"name\":\"Self-invoice a ticket from a photo\",\"description\":\"Turn a merchant ticket (gas station, restaurant, retail) into a CFDI by uploading a photo. The simplest way is multipart — curl -F photo=@ticket.jpg -F fiscal_profile_id=fp_... -F uso_cfdi=G03; a JSON body with photo_base64 also works. Processing is asynchronous: the response comes back status: \\\"extracting\\\"; the API reads the ticket, drives the merchant self-invoice portal (learning a reusable recipe the first time it sees a portal, replaying it thereafter), and moves to completed, needs_review, or failed. Poll GET /v1/ticket_invoices/:id or subscribe to ticket_invoice.* webhooks. Send an Idempotency-Key to make retries safe.\",\"url\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo\",\"mainEntityOfPage\":{\"@id\":\"https://invoiceapi.mintlify.app/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo#webpage\"},\"dateModified\":\"2026-11-08T18:43:28.675Z\",\"publisher\":{\"@id\":\"https://invoiceapi.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://invoiceapi.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Invoice API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Invoice API","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"Get ","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /","href":"/api-reference/get-"},{"title":"Get healthz","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /healthz","href":"/api-reference/get-healthz"},{"title":"Get health","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /health","href":"/api-reference/get-health"},{"title":"Get openapijson","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /openapi.json","href":"/api-reference/get-openapijson"},{"title":"Get llmstxt","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /llms.txt","href":"/api-reference/get-llmstxt"},{"title":"Get llms fulltxt","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /llms-full.txt","href":"/api-reference/get-llms-fulltxt"},{"title":"Get docserrors","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /docs/errors","href":"/api-reference/get-docserrors"}]},{"group":"docs","pages":[{"title":"Serve a how-to guide as markdown.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /docs/guides/{slug}","href":"/api-reference/docs/serve-a-how-to-guide-as-markdown"}]},{"group":"api_keys","pages":[{"title":"List API keys","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/api_keys","href":"/api-reference/api_keys/list-api-keys"},{"title":"Create an API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/api_keys","href":"/api-reference/api_keys/create-an-api-key"},{"title":"Revoke an API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/api_keys/{id}","href":"/api-reference/api_keys/revoke-an-api-key"},{"title":"Update an API key","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/api_keys/{id}","href":"/api-reference/api_keys/update-an-api-key"}]},{"group":"accounts","pages":[{"title":"List connected accounts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/accounts","href":"/api-reference/accounts/list-connected-accounts"},{"title":"Create a connected account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/accounts","href":"/api-reference/accounts/create-a-connected-account"},{"title":"Retrieve a connected account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/accounts/{id}","href":"/api-reference/accounts/retrieve-a-connected-account"},{"title":"Offboard a connected account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/accounts/{id}","href":"/api-reference/accounts/offboard-a-connected-account"},{"title":"Update a connected account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/accounts/{id}","href":"/api-reference/accounts/update-a-connected-account"}]},{"group":"fiscal_profiles","pages":[{"title":"List fiscal profiles","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/fiscal_profiles","href":"/api-reference/fiscal_profiles/list-fiscal-profiles"},{"title":"Create a fiscal profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/fiscal_profiles","href":"/api-reference/fiscal_profiles/create-a-fiscal-profile"},{"title":"Retrieve a fiscal profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/fiscal_profiles/{id}","href":"/api-reference/fiscal_profiles/retrieve-a-fiscal-profile"},{"title":"Delete a fiscal profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/fiscal_profiles/{id}","href":"/api-reference/fiscal_profiles/delete-a-fiscal-profile"},{"title":"Update a fiscal profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/fiscal_profiles/{id}","href":"/api-reference/fiscal_profiles/update-a-fiscal-profile"},{"title":"Sign the carta manifiesto","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/fiscal_profiles/{id}/manifest","href":"/api-reference/fiscal_profiles/sign-the-carta-manifiesto"},{"title":"Enable automatic SAT synchronization","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/fiscal_profiles/{id}/sync","href":"/api-reference/fiscal_profiles/enable-automatic-sat-synchronization"},{"title":"Disable automatic SAT synchronization","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/fiscal_profiles/{id}/sync","href":"/api-reference/fiscal_profiles/disable-automatic-sat-synchronization"}]},{"group":"invoices","pages":[{"title":"List invoices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/invoices","href":"/api-reference/invoices/list-invoices"},{"title":"Create an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/invoices","href":"/api-reference/invoices/create-an-invoice"},{"title":"Stamp a draft invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/invoices/{id}/stamp","href":"/api-reference/invoices/stamp-a-draft-invoice"},{"title":"Retrieve an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/invoices/{id}","href":"/api-reference/invoices/retrieve-an-invoice"},{"title":"Download the CFDI XML","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/invoices/{id}/xml","href":"/api-reference/invoices/download-the-cfdi-xml"},{"title":"Download the CFDI PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/invoices/{id}/pdf","href":"/api-reference/invoices/download-the-cfdi-pdf"},{"title":"Cancel an invoice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/invoices/{id}/cancel","href":"/api-reference/invoices/cancel-an-invoice"}]},{"group":"validations","pages":[{"title":"Validate a CFDI","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/validations","href":"/api-reference/validations/validate-a-cfdi"},{"title":"Retrieve a validation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/validations/{id}","href":"/api-reference/validations/retrieve-a-validation"}]},{"group":"ticket_invoices","pages":[{"title":"List ticket invoices","description":"List ticket invoices newest-first with cursor pagination. Filter by status (extracting, processing, needs_review, completed, failed).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/ticket_invoices","href":"/api-reference/ticket_invoices/list-ticket-invoices"},{"title":"Self-invoice a ticket from a photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ticket_invoices","href":"/api-reference/ticket_invoices/self-invoice-a-ticket-from-a-photo"},{"title":"Retrieve a ticket invoice","description":"Fetch one ticket invoice by id, including its current lifecycle status.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/ticket_invoices/{id}","href":"/api-reference/ticket_invoices/retrieve-a-ticket-invoice"},{"title":"Download the CFDI XML","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/ticket_invoices/{id}/xml","href":"/api-reference/ticket_invoices/download-the-cfdi-xml"},{"title":"List learned portal recipes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/portal_recipes","href":"/api-reference/ticket_invoices/list-learned-portal-recipes"}]},{"group":"downloads","pages":[{"title":"List massive downloads","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/downloads","href":"/api-reference/downloads/list-massive-downloads"},{"title":"Request a massive download","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/downloads","href":"/api-reference/downloads/request-a-massive-download"},{"title":"Retrieve a massive download","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/downloads/{id}","href":"/api-reference/downloads/retrieve-a-massive-download"},{"title":"List download packages","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/downloads/{id}/files","href":"/api-reference/downloads/list-download-packages"},{"title":"Download a package","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/downloads/{id}/files/{seq}","href":"/api-reference/downloads/download-a-package"}]},{"group":"sat_documents","pages":[{"title":"List CFDIs the SAT has on file","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/sat_documents","href":"/api-reference/sat_documents/list-cfdis-the-sat-has-on-file"}]},{"group":"webhook_endpoints","pages":[{"title":"List webhook endpoints","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/webhook_endpoints","href":"/api-reference/webhook_endpoints/list-webhook-endpoints"},{"title":"Create a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/webhook_endpoints","href":"/api-reference/webhook_endpoints/create-a-webhook-endpoint"},{"title":"List webhook deliveries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/webhook_endpoints/{id}/deliveries","href":"/api-reference/webhook_endpoints/list-webhook-deliveries"},{"title":"Retrieve a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/webhook_endpoints/{id}","href":"/api-reference/webhook_endpoints/retrieve-a-webhook-endpoint"},{"title":"Delete a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/webhook_endpoints/{id}","href":"/api-reference/webhook_endpoints/delete-a-webhook-endpoint"},{"title":"Update a webhook endpoint","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/webhook_endpoints/{id}","href":"/api-reference/webhook_endpoints/update-a-webhook-endpoint"}]},{"group":"events","pages":[{"title":"List events","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/events","href":"/api-reference/events/list-events"},{"title":"Retrieve an event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/events/{id}","href":"/api-reference/events/retrieve-an-event"},{"title":"Resend an event","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/events/{id}/resend","href":"/api-reference/events/resend-an-event"}]},{"group":"balance","pages":[{"title":"Retrieve the stamping balance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/balance","href":"/api-reference/balance/retrieve-the-stamping-balance"}]},{"group":"billing","pages":[{"title":"Get subscription and usage state","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/billing","href":"/api-reference/billing/get-subscription-and-usage-state"},{"title":"Start a subscription checkout","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/billing/checkout_sessions","href":"/api-reference/billing/start-a-subscription-checkout"},{"title":"Open the billing portal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/billing/portal_sessions","href":"/api-reference/billing/open-the-billing-portal"}]},{"group":"usage","pages":[{"title":"List usage records","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/usage","href":"/api-reference/usage/list-usage-records"}]},{"group":"catalogs","pages":[{"title":"List SAT catalogs","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/catalogs","href":"/api-reference/catalogs/list-sat-catalogs"},{"title":"Retrieve a SAT catalog","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/catalogs/{catalog}","href":"/api-reference/catalogs/retrieve-a-sat-catalog"}]},{"group":"versions","pages":[{"title":"List every dated API version and how to pin one (public, no auth).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/versions","href":"/api-reference/versions/list-every-dated-api-version-and-how-to-pin-one-public-no-auth"}]}]}]},"basePath":"","title":"Self-invoice a ticket from a photo - Invoice API","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CBsVopKK.js","utils-DZAk68jJ.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-D32AYZrP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-D_A5_cny.js","snippetPresets-xNRfS9th.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BIB25-tq.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CydJ4w4j.js","shallow-CYPBeQSG.js","getApiPlaygroundDisplay-A5xJVBOu.js","CodeSnippet-BVRTgi3m.js","CodeSnippets-DjD6BSlt.js","Page-Dr40SSJq.js","getPastedJson-D4V4JyrR.js","icon-uhcnG22T.js","MethodPill-CM-ZQdGH.js","DuplicateIcon-B_WnOiNf.js","createIcon-CJsb8utt.js","DynamicMarkdown-D-2HDKEp.js","SectionHeading-KP5xmMgQ.js","axios-vUo_bRtp.js","Markdown-D_k0dg6k.js","clsx-DK3K4Z1S.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DE3EVdvd.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-fN9H9n9g.js"]}