{"openapi":"3.1.0","info":{"title":"Exac API for Mexican invoicing and CFDI","version":"1.0.0","description":"Organization-scoped programmatic access to Mexican invoicing and CFDI workflows, including draft creation, explicit SAT stamping and cancellation transitions, payroll, withholding documents, receipts, reports, and operational records. Requests require an environment-bound API key or OAuth access token and support Idempotency-Key replay protection. Each operation declares whether it is available in production only or in both production and sandbox."},"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"},{"url":"https://grateful-squid-667.convex.site","description":"Isolated Exac sandbox API deployment"}],"tags":[{"name":"Organization","description":"Manage organization identity, settings, membership, and lifecycle."},{"name":"Credentials","description":"Create, inspect, and revoke organization API credentials."},{"name":"Developer activity","description":"Inspect authenticated REST API and MCP request metadata for integration diagnostics."},{"name":"Fiscal setup","description":"Configure the fiscal certificates required by organization workflows."},{"name":"Files and delivery","description":"Prepare uploads and send or download files for supported organization documents."},{"name":"Contacts","description":"Manage customer and supplier master records used by fiscal and sales workflows."},{"name":"SAT","description":"Search SAT reference data, synchronize fiscal sources, extract tax profiles, and retrieve declarations and compliance opinions."},{"name":"Products","description":"Manage products, suppliers, and inventory projections."},{"name":"Employees","description":"Manage employee records used to issue payroll CFDI."},{"name":"Locations","description":"Manage branches used by sales receipts, inventory, and location-specific pricing."},{"name":"Settings","description":"Manage expense categories, sales-receipt fields, and fiscal series."},{"name":"Pricing","description":"Manage customer- and location-specific product price overrides."},{"name":"Imports","description":"Upload, preview, commit, and inspect bulk imports for products, customers, and suppliers."},{"name":"Quotes","description":"Create and manage commercial quotes through publication, payment, and settlement."},{"name":"CFDI","description":"Create, inspect, stamp, synchronize, cancel, archive, and retrieve Mexican CFDI documents, including income, credit-note, transfer, payroll, and payment-complement types."},{"name":"Withholding documents","description":"Create, inspect, cancel, archive, and retrieve Mexican withholding documents."},{"name":"Sales receipts","description":"Create, inspect, cancel, and refund point-of-sale sales receipts."},{"name":"Expenses","description":"Record and manage operational expenses and their settlement state."},{"name":"Accounts","description":"Read receivable and payable balances and record auditable account transactions."},{"name":"Reports","description":"Retrieve CFDI, sales, expense, collection, and tax reports."}],"components":{"headers":{"RequestId":{"description":"Stable identifier for this request, used to correlate it with organization activity.","schema":{"type":"string","pattern":"^req_[a-f0-9]{32}$","example":"req_0123456789abcdef0123456789abcdef"}},"WWWAuthenticate":{"description":"Bearer challenge with protected-resource metadata and, when applicable, the authentication or permission error.","schema":{"type":"string"}},"Allow":{"description":"HTTP methods allowed for this route.","schema":{"type":"string"}},"RetryAfter":{"description":"Seconds to wait before retrying the request.","schema":{"type":"integer","minimum":1}}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Exac API key or OAuth access token","description":"Every organization API key is bound to exactly one environment. The production server also accepts OAuth tokens governed by the user’s role; the sandbox server does not accept OAuth."}},"schemas":{"DocumentRef":{"type":"string","pattern":"^(cfdi|withholding|sales_receipt|quote|expense|declaration|tax_compliance_opinion|sales_receipt_refund):.+$"},"Money":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"required":["amount","currency"],"additionalProperties":false},"Pagination":{"type":"object","properties":{"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]},"hasMore":{"type":"boolean"}},"required":["nextCursor","hasMore"],"additionalProperties":false},"CfdiSummary":{"oneOf":[{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"kind":{"type":"string","const":"income"},"cfdiType":{"type":"string","const":"I"},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType"],"additionalProperties":false},{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"kind":{"type":"string","const":"credit_note"},"cfdiType":{"type":"string","const":"E"},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType"],"additionalProperties":false},{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"kind":{"type":"string","const":"transfer"},"cfdiType":{"type":"string","const":"T"}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType"],"additionalProperties":false},{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"kind":{"type":"string","const":"payroll"},"cfdiType":{"type":"string","const":"N"},"employeeId":{"type":"string"}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType"],"additionalProperties":false},{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"kind":{"type":"string","const":"payment_complement"},"cfdiType":{"type":"string","const":"P"}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType"],"additionalProperties":false}]},"CfdiDetail":{"oneOf":[{"$ref":"#/components/schemas/CfdiIncomeComplete"},{"$ref":"#/components/schemas/CfdiIncomePartial"},{"$ref":"#/components/schemas/CfdiCreditNoteComplete"},{"$ref":"#/components/schemas/CfdiCreditNotePartial"},{"$ref":"#/components/schemas/CfdiTransferComplete"},{"$ref":"#/components/schemas/CfdiTransferPartial"},{"$ref":"#/components/schemas/CfdiPayrollComplete"},{"$ref":"#/components/schemas/CfdiPayrollPartial"},{"$ref":"#/components/schemas/CfdiPaymentComplementComplete"},{"$ref":"#/components/schemas/CfdiPaymentComplementPartial"}]},"CfdiDraftInput":{"oneOf":[{"$ref":"#/components/schemas/CfdiIncomeInput"},{"$ref":"#/components/schemas/CfdiCreditNoteInput"},{"$ref":"#/components/schemas/CfdiTransferInput"},{"$ref":"#/components/schemas/CfdiPayrollInput"},{"$ref":"#/components/schemas/CfdiPaymentComplementInput"}]},"WithholdingDocument":{"oneOf":[{"$ref":"#/components/schemas/WithholdingComplete"},{"$ref":"#/components/schemas/WithholdingPartial"}]},"SalesReceipt":{"type":"object","properties":{"category":{"type":"string","const":"sales_receipt"},"folio":{"type":"string"},"customerName":{"type":"string"},"locationName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"paymentForm":{"type":"string"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"operationalBalance":{"type":"number"},"invoiceRequested":{"type":"boolean"},"items":{"type":"array","items":{"type":"object","properties":{"lineRef":{"type":"string"},"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"refundableQuantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"lineTotal":{"type":"number"},"refundableAmount":{"type":"number"}},"required":["lineRef","description","quantity","refundableQuantity","unitPrice","lineTotal","refundableAmount"],"additionalProperties":false}},"documentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"status":{"type":"string","enum":["open","invoiced","global_invoiced","canceled"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"businessDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paymentDueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"saleType":{"type":"string","enum":["paid","credit","courtesy"]}},"required":["category","folio","total","invoiceRequested","documentRef","status","createdAt","businessDate","saleType"],"additionalProperties":false},"Quote":{"type":"object","properties":{"folioNumber":{"type":"number"},"currency":{"type":"string","const":"MXN"},"customerId":{"type":"string"},"customerName":{"type":"string"},"customerEmail":{"type":"string"},"locationId":{"type":"string"},"locationName":{"type":"string"},"notes":{"type":"string"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"revisionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"documentRef":{"type":"string","pattern":"^quote:.+$"},"category":{"type":"string","const":"quote"},"status":{"type":"string","enum":["draft","sent","accepted","converted","expired","canceled"]},"items":{"type":"array","items":{"type":"object","properties":{"lineRef":{"type":"string"},"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxRate":{"type":"number"},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"},"unitName":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"totals":{"type":"object","properties":{"subtotal":{"type":"number"},"discount":{"type":"number"},"taxes":{"type":"number"},"total":{"type":"number"},"taxBreakdown":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["IVA","ISR"]},"factor":{"type":"string","enum":["Tasa","Exento"]},"rate":{"type":"number"},"withholding":{"type":"boolean"},"base":{"type":"number"},"amount":{"type":"number"},"label":{"type":"string"}},"required":["type","factor","rate","withholding","base","amount","label"],"additionalProperties":false}}},"required":["subtotal","taxes","total","taxBreakdown"],"additionalProperties":false},"issueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"validUntil":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"sentAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastPublishedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"acceptance":{"type":"object","properties":{"acceptedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"invoiceRequested":{"type":"boolean"},"fiscalTreatment":{"type":"string","enum":["public_general","specific_counterparty"]},"fiscalTotals":{"type":"object","properties":{"subtotal":{"type":"number"},"discount":{"type":"number"},"taxes":{"type":"number"},"total":{"type":"number"},"taxBreakdown":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["IVA","ISR"]},"factor":{"type":"string","enum":["Tasa","Exento"]},"rate":{"type":"number"},"withholding":{"type":"boolean"},"base":{"type":"number"},"amount":{"type":"number"},"label":{"type":"string"}},"required":["type","factor","rate","withholding","base","amount","label"],"additionalProperties":false}}},"required":["subtotal","taxes","total","taxBreakdown"],"additionalProperties":false},"fiscalCustomer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"},"email":{"type":"string"}},"required":["rfc","legalName","taxSystem","postalCode","cfdiUse","email"],"additionalProperties":false}},"required":["acceptedAt","invoiceRequested","fiscalTreatment","fiscalTotals"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"receiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"payment":{"type":"object","properties":{"paymentId":{"type":"string"},"source":{"type":"string","enum":["manual","online"]},"amount":{"type":"number"},"currency":{"type":"string","const":"MXN"},"paymentForm":{"type":"string"},"applicationStatus":{"type":"string","enum":["pending","processing","applied","failed","conflict"]},"applicationErrorCode":{"type":"string","enum":["payment_form_required","fiscal_drift","location_resolution_required","duplicate_payment","application_failed"]},"invoiceStatus":{"type":"string","enum":["pending","processing","issued","failed"]},"salesReceiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"cfdiDocumentRef":{"type":"string","pattern":"^cfdi:.+$"},"paidAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["paymentId","source","amount","currency","applicationStatus","paidAt"],"additionalProperties":false}},"required":["folioNumber","currency","customerName","documentRef","category","status","items","totals","issueDate","validUntil","createdAt","updatedAt"],"additionalProperties":false},"Expense":{"type":"object","properties":{"category":{"type":"string","const":"expense"},"description":{"type":"string"},"supplierName":{"type":"string"},"expenseCategory":{"type":"string"},"locationName":{"type":"string"},"settlementMode":{"type":"string","enum":["credit","paid"]},"paymentForm":{"type":"string"},"total":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"MXN"}},"required":["amount","currency"],"additionalProperties":false},"notes":{"type":"string"},"documentRef":{"type":"string","pattern":"^expense:.+$"},"occurredAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"businessDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["category","description","expenseCategory","settlementMode","paymentForm","total","documentRef","occurredAt","businessDate"],"additionalProperties":false},"Contact":{"oneOf":[{"type":"object","properties":{"contactId":{"type":"string","minLength":1},"legalName":{"type":"string"},"code":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"taxSystem":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"kind":{"type":"string","const":"customer"},"cfdiUse":{"type":"string"},"creditEnabled":{"type":"boolean"},"creditByDefault":{"type":"boolean"},"defaultPaymentTermDays":{"type":"integer","minimum":1,"maximum":365}},"required":["contactId","legalName","updatedAt","kind"],"additionalProperties":false},{"type":"object","properties":{"contactId":{"type":"string","minLength":1},"legalName":{"type":"string"},"code":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"taxSystem":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"kind":{"type":"string","const":"supplier"}},"required":["contactId","legalName","updatedAt","kind"],"additionalProperties":false}]},"Product":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"description":{"type":"string"},"sku":{"type":"string"},"code":{"type":"string"},"active":{"type":"boolean"},"price":{"type":"number"},"quantityDiscounts":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"minQuantity":{"type":"number"},"percentage":{"type":"number"}},"required":["minQuantity","percentage"],"additionalProperties":false}},"taxIncluded":{"type":"boolean"},"taxRate":{"type":"number"},"taxability":{"type":"string"},"taxExemptReason":{"type":"string"},"stock":{"type":"number"},"stockStatus":{"type":"string","enum":["available","out_of_stock"]},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["productId","description","active","price","updatedAt"],"additionalProperties":false},"ProgrammaticError":{"type":"object","properties":{"code":{"type":"string","enum":["validation_error","unauthenticated","forbidden","not_found","method_not_allowed","conflict","idempotency_conflict","operation_in_progress","recovery_required","rate_limited","provider_unavailable","internal"],"description":"Recommended action by code:\n\n- `validation_error` — Correct each details.issues entry using its path and stable issue code.\n- `unauthenticated` — Provide a valid API key or OAuth access token.\n- `forbidden` — Use a credential with the required permission.\n- `not_found` — Check the organization-scoped resource identifier.\n- `method_not_allowed` — Use the documented HTTP method.\n- `conflict` — Refresh the resource and resolve its current state.\n- `idempotency_conflict` — Use a new idempotency key for a changed request.\n- `operation_in_progress` — Wait for Retry-After, then repeat the exact request.\n- `recovery_required` — Do not retry automatically; reconcile the provider outcome.\n- `rate_limited` — Wait for Retry-After before retrying.\n- `provider_unavailable` — Retry only when the response marks the failure as retryable.\n- `internal` — Retry later and contact support if the error persists."},"message":{"type":"string"},"details":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]}},"message":{"type":"string"},"code":{"type":"string"}},"required":["path","message"],"additionalProperties":false}},"retryable":{"type":"boolean"},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","message","status"],"additionalProperties":false},"ApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ProgrammaticError"}},"required":["error"],"additionalProperties":false},"CfdiIncomeInput":{"type":"object","properties":{"pdfCustomSection":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"customerId":{"type":"string","minLength":1},"items":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"product"},"productId":{"type":"string","minLength":1,"description":"Existing Exac product ID"},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"}},"required":["kind","productId","quantity","unitPrice"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"satProductCode":{"type":"string","minLength":1,"description":"SAT product/service code"},"satUnitCode":{"type":"string","minLength":1,"description":"SAT unit code"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"},"taxRate":{"type":"number","minimum":0,"maximum":1},"taxability":{"type":"string","enum":["standard","zero","exempt"]}},"required":["kind","description","quantity","unitPrice","satProductCode","satUnitCode"],"additionalProperties":false}]}},"kind":{"type":"string","const":"income"},"cfdiUse":{"description":"Active SAT CFDI-use code.","x-exac-sat-catalog":"cfdi-uses","oneOf":[{"type":"string","title":"SAT c_UsoCFDI","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#cfdi-uses).","enum":["G01","D06","I07","I06","I01","I05","D09","G02","D04","I04","I03","D08","G03","D03","D02","D01","D05","I02","CN01","I08","CP01","D10","D07","S01"]}]},"payment":{"oneOf":[{"type":"object","properties":{"timing":{"type":"string","const":"single_payment"},"formCode":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"conditions":{"type":"string","maxLength":1000}},"required":["timing","formCode"],"additionalProperties":false},{"type":"object","properties":{"timing":{"type":"string","const":"deferred_or_installments"},"formCode":{"type":"string","const":"99"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Calendar date in YYYY-MM-DD format"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"conditions":{"type":"string","maxLength":1000}},"required":["timing","formCode"],"additionalProperties":false}]}},"required":["customerId","items","kind","cfdiUse","payment"],"additionalProperties":false,"title":"CFDI I · income"},"CfdiCreditNoteInput":{"type":"object","properties":{"pdfCustomSection":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"customerId":{"type":"string","minLength":1},"items":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"product"},"productId":{"type":"string","minLength":1,"description":"Existing Exac product ID"},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"}},"required":["kind","productId","quantity","unitPrice"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"satProductCode":{"type":"string","minLength":1,"description":"SAT product/service code"},"satUnitCode":{"type":"string","minLength":1,"description":"SAT unit code"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"},"taxRate":{"type":"number","minimum":0,"maximum":1},"taxability":{"type":"string","enum":["standard","zero","exempt"]}},"required":["kind","description","quantity","unitPrice","satProductCode","satUnitCode"],"additionalProperties":false}]}},"kind":{"type":"string","const":"credit_note"},"formCode":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"methodCode":{"type":"string","enum":["PPD","PUE"],"description":"Active SAT payment-method code. Defaults to PUE when omitted.","x-exac-sat-catalog":"payment-methods"},"relatedDocuments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"relationship":{"type":"string","enum":["07","03","06","01","02","04","05"],"description":"Active SAT CFDI relationship-type code.","x-exac-sat-catalog":"relationship-types"},"documents":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"Related CFDI UUIDs"}},"required":["relationship","documents"],"additionalProperties":false}}},"required":["customerId","items","kind","formCode","relatedDocuments"],"additionalProperties":false,"title":"CFDI E · credit_note"},"CfdiTransferInput":{"type":"object","properties":{"pdfCustomSection":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"customerId":{"type":"string","minLength":1},"items":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"product"},"productId":{"type":"string","minLength":1,"description":"Existing Exac product ID"},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"}},"required":["kind","productId","quantity","unitPrice"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0,"description":"Unit price in pesos"},"satProductCode":{"type":"string","minLength":1,"description":"SAT product/service code"},"satUnitCode":{"type":"string","minLength":1,"description":"SAT unit code"},"discount":{"type":"number","minimum":0},"taxIncluded":{"type":"boolean"},"taxRate":{"type":"number","minimum":0,"maximum":1},"taxability":{"type":"string","enum":["standard","zero","exempt"]}},"required":["kind","description","quantity","unitPrice","satProductCode","satUnitCode"],"additionalProperties":false}]}},"kind":{"type":"string","const":"transfer"}},"required":["customerId","items","kind"],"additionalProperties":false,"title":"CFDI T · transfer"},"CfdiPayrollInput":{"type":"object","properties":{"pdfCustomSection":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"kind":{"type":"string","const":"payroll"},"employeeId":{"type":"string","minLength":1},"payroll":{"type":"object","properties":{"paidOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"periodStartedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"periodEndedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paidDays":{"type":"number","exclusiveMinimum":0},"employee":{"type":"object","properties":{"curp":{"type":"string","minLength":1},"employeeNumber":{"type":"string","minLength":1},"socialSecurityNumber":{"type":"string","minLength":1},"employmentStartedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"contractType":{"description":"Active SAT payroll contract-type code.","x-exac-sat-catalog":"payroll-contract-types","oneOf":[{"type":"string","title":"SAT c_TipoContrato","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-contract-types).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"regimeType":{"description":"Active SAT payroll regime-type code.","x-exac-sat-catalog":"payroll-regime-types","oneOf":[{"type":"string","title":"SAT c_TipoRegimen","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-regime-types).","enum":["10","11","12","13","99","02","03","04","05","06","07","08","09"]}]},"paymentFrequency":{"description":"Active SAT payroll payment-frequency code.","x-exac-sat-catalog":"payroll-payment-frequencies","oneOf":[{"type":"string","title":"SAT c_PeriodicidadPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-payment-frequencies).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"stateCode":{"description":"Active SAT federal-entity code.","x-exac-sat-catalog":"federal-entities","oneOf":[{"type":"string","title":"SAT c_Estado","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#federal-entities).","enum":["AGU","BCN","BCS","CAM","CHP","CHH","COA","COL","CMX","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]}]},"positionRisk":{"type":"string","enum":["1","2","3","4","5","99"],"description":"Active SAT payroll position-risk code.","x-exac-sat-catalog":"payroll-position-risks"},"integratedDailySalary":{"type":"number","exclusiveMinimum":0}},"required":["curp","employeeNumber","employmentStartedOn","contractType","regimeType","paymentFrequency","stateCode"],"additionalProperties":false},"earnings":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"description":"Active SAT payroll earning-type code.","x-exac-sat-catalog":"payroll-earning-types","oneOf":[{"type":"string","title":"SAT c_TipoPercepcion","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-earning-types).","enum":["001","002","003","004","005","006","009","010","011","012","013","014","015","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","044","045","046","047","048","049","050","051","052","053"]}]},"taxableAmount":{"type":"number","minimum":0},"exemptAmount":{"type":"number","minimum":0}},"required":["type","taxableAmount","exemptAmount"],"additionalProperties":false}},"deductions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1,"description":"SAT deduction type code"},"amount":{"type":"number","exclusiveMinimum":0}},"required":["type","amount"],"additionalProperties":false}},"otherPayments":{"type":"array","items":{"type":"object","properties":{"type":{"description":"Active SAT payroll other-payment code.","x-exac-sat-catalog":"payroll-other-payment-types","oneOf":[{"type":"string","title":"SAT c_TipoOtroPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-other-payment-types).","enum":["999","001","002","003","004","005","006","007","008","009"]}]},"amount":{"type":"number","exclusiveMinimum":0},"employmentSubsidy":{"type":"number","minimum":0}},"required":["type","amount"],"additionalProperties":false}}},"required":["paidOn","employee","earnings"],"additionalProperties":false}},"required":["kind","employeeId","payroll"],"additionalProperties":false,"title":"CFDI N · payroll"},"CfdiPaymentComplementInput":{"type":"object","properties":{"pdfCustomSection":{"type":"string"},"kind":{"type":"string","const":"payment_complement"},"customerId":{"type":"string","minLength":1},"payment":{"type":"object","properties":{"formCode":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"paidLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"documents":{"minItems":1,"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","minLength":1},"amount":{"type":"number","exclusiveMinimum":0},"installment":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"description":"1-based payment sequence"},"previousBalance":{"type":"number","exclusiveMinimum":0,"description":"Balance before payment; then use prior remaining balance"},"series":{"type":"string"},"folio":{"type":"string"},"currency":{"type":"string","minLength":3,"maxLength":3},"exchangeRate":{"type":"number","exclusiveMinimum":0},"taxes":{"anyOf":[{"type":"string","const":"auto","description":"Let Exac calculate payment-level taxes from a related CFDI already known to the organization"},{"type":"object","properties":{"taxObject":{"type":"string","enum":["01","02","03","04","05","06","07","08"],"description":"SAT ObjetoImpDR from the related CFDI"},"entries":{"type":"array","items":{"type":"object","properties":{"base":{"type":"number","minimum":0},"type":{"type":"string","enum":["IVA","ISR","IEPS"]},"rate":{"type":"number","minimum":0},"factor":{"type":"string","enum":["Tasa","Cuota","Exento"]},"withholding":{"type":"boolean"}},"required":["base","type","rate"],"additionalProperties":false},"description":"Payment-level tax rows from the related CFDI"}},"required":["taxObject","entries"],"additionalProperties":false,"description":"Taxes for an external CFDI Exac cannot inspect"}],"description":"Use auto for known CFDIs; otherwise send taxObject and rows"}},"required":["uuid","amount","installment","previousBalance","taxes"],"additionalProperties":false}}},"required":["formCode","documents"],"additionalProperties":false}},"required":["kind","customerId","payment"],"additionalProperties":false,"title":"CFDI P · payment_complement"},"CfdiIncomeComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"income"},"cfdiType":{"type":"string","const":"I"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","issuer","receiver","items","payment","detail"],"additionalProperties":false},"CfdiIncomePartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"income"},"cfdiType":{"type":"string","const":"I"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","detail"],"additionalProperties":false},"CfdiCreditNoteComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"credit_note"},"cfdiType":{"type":"string","const":"E"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","relatedDocuments","kind","cfdiType","issuer","receiver","items","detail"],"additionalProperties":false},"CfdiCreditNotePartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"credit_note"},"cfdiType":{"type":"string","const":"E"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"payment":{"type":"object","properties":{"timing":{"type":"string","enum":["single_payment","deferred_or_installments"]},"formCode":{"type":"string"},"methodCode":{"type":"string"},"dueDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remainingBalance":{"type":"number"},"effectiveRemainingBalance":{"type":"number"},"manualAdjustmentNeedsReview":{"type":"boolean"},"conditions":{"type":"string"}},"required":["timing"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","detail"],"additionalProperties":false},"CfdiTransferComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"transfer"},"cfdiType":{"type":"string","const":"T"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","issuer","receiver","items","detail"],"additionalProperties":false},"CfdiTransferPartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"transfer"},"cfdiType":{"type":"string","const":"T"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","detail"],"additionalProperties":false},"CfdiPayrollComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"payroll"},"cfdiType":{"type":"string","const":"N"},"employeeId":{"type":"string"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"payroll":{"type":"object","properties":{"paidDays":{"type":"number"},"earnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"taxableAmount":{"type":"number"},"exemptAmount":{"type":"number"}},"additionalProperties":false}},"deductions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"additionalProperties":false}},"otherPayments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"},"employmentSubsidy":{"type":"number"}},"additionalProperties":false}},"totals":{"type":"object","properties":{"earnings":{"type":"number"},"deductions":{"type":"number"},"otherPayments":{"type":"number"},"net":{"type":"number"}},"additionalProperties":false},"employee":{"type":"object","properties":{"curp":{"type":"string"},"employeeNumber":{"type":"string"},"socialSecurityNumber":{"type":"string"},"contractType":{"type":"string"},"regimeType":{"type":"string"},"paymentFrequency":{"type":"string"},"stateCode":{"type":"string"},"positionRisk":{"type":"string"},"integratedDailySalary":{"type":"number"},"employmentStartedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false},"period":{"type":"object","properties":{"paidOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["paidOn"],"additionalProperties":false}},"required":["earnings","deductions","otherPayments","totals","employee","period"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","payroll","detail"],"additionalProperties":false},"CfdiPayrollPartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"kind":{"type":"string","const":"payroll"},"cfdiType":{"type":"string","const":"N"},"employeeId":{"type":"string"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"payroll":{"type":"object","properties":{"paidDays":{"type":"number"},"earnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"taxableAmount":{"type":"number"},"exemptAmount":{"type":"number"}},"additionalProperties":false}},"deductions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"}},"additionalProperties":false}},"otherPayments":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"amount":{"type":"number"},"employmentSubsidy":{"type":"number"}},"additionalProperties":false}},"totals":{"type":"object","properties":{"earnings":{"type":"number"},"deductions":{"type":"number"},"otherPayments":{"type":"number"},"net":{"type":"number"}},"additionalProperties":false},"employee":{"type":"object","properties":{"curp":{"type":"string"},"employeeNumber":{"type":"string"},"socialSecurityNumber":{"type":"string"},"contractType":{"type":"string"},"regimeType":{"type":"string"},"paymentFrequency":{"type":"string"},"stateCode":{"type":"string"},"positionRisk":{"type":"string"},"integratedDailySalary":{"type":"number"},"employmentStartedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"additionalProperties":false},"period":{"type":"object","properties":{"paidOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"startedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"endedOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["paidOn"],"additionalProperties":false}},"required":["earnings","deductions","otherPayments","totals","employee","period"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","detail"],"additionalProperties":false},"CfdiPaymentComplementComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"kind":{"type":"string","const":"payment_complement"},"cfdiType":{"type":"string","const":"P"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"paymentComplement":{"type":"object","properties":{"version":{"type":"string"},"totalPayments":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"number"},"exchangeRate":{"type":"number"},"relatedCfdis":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"currency":{"type":"string"},"taxObject":{"type":"string"},"installment":{"type":"string"},"balances":{"type":"object","properties":{"previous":{"type":"number"},"paid":{"type":"number"},"remaining":{"type":"number"}},"additionalProperties":false},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false}},"required":["uuid","currency"],"additionalProperties":false}},"formCode":{"type":"string"},"paidLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"required":["currency","amount","relatedCfdis","formCode","paidLocalDateTime"],"additionalProperties":false}}},"required":["version","totalPayments","payments"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","issuer","receiver","paymentComplement","detail"],"additionalProperties":false},"CfdiPaymentComplementPartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"receivablePlanId":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"category":{"type":"string","const":"cfdi"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"inventoryImpact":{"type":"object","properties":{"locationId":{"type":"string"},"status":{"type":"string","enum":["pending","deducted","reversed"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reversedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["status"],"additionalProperties":false},"customerId":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"fiscal":{"type":"object","properties":{"subtotal":{"type":"number"},"ivaTransferred":{"type":"number"},"ivaWithheld":{"type":"number"},"isrWithheld":{"type":"number"},"exchangeRate":{"type":"number"},"totalMxn":{"type":"number"},"placeOfIssue":{"type":"string"},"exportation":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"globalInformation":{"type":"object","properties":{"frequency":{"type":"string"},"months":{"type":"string"},"year":{"type":"number"}},"required":["frequency","months","year"],"additionalProperties":false},"cfdiUse":{"type":"string"},"stampedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"additionalProperties":false},"relatedDocuments":{"type":"array","items":{"type":"object","properties":{"relationshipType":{"type":"string"},"uuids":{"type":"array","items":{"type":"string"}}},"required":["relationshipType","uuids"],"additionalProperties":false}},"items":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string"},"quantity":{"type":"number"},"unitPrice":{"type":"number"},"discount":{"type":"number"},"unitName":{"type":"string"},"taxObject":{"type":"string"},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"kind":{"type":"string","const":"payment_complement"},"cfdiType":{"type":"string","const":"P"},"issuer":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"receiver":{"type":"object","properties":{"rfc":{"type":"string"},"legalName":{"type":"string"},"taxSystem":{"type":"string"},"postalCode":{"type":"string"},"cfdiUse":{"type":"string"}},"required":["rfc","legalName","taxSystem"],"additionalProperties":false},"paymentComplement":{"type":"object","properties":{"version":{"type":"string"},"totalPayments":{"type":"number"},"payments":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string"},"amount":{"type":"number"},"exchangeRate":{"type":"number"},"relatedCfdis":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string"},"series":{"type":"string"},"folio":{"type":"string"},"currency":{"type":"string"},"taxObject":{"type":"string"},"installment":{"type":"string"},"balances":{"type":"object","properties":{"previous":{"type":"number"},"paid":{"type":"number"},"remaining":{"type":"number"}},"additionalProperties":false},"taxes":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}},"withholdings":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"factorType":{"type":"string"},"rateOrFee":{"type":"string"},"amount":{"type":"string"},"base":{"type":"string"}},"required":["tax","factorType"],"additionalProperties":false}}},"required":["transfers","withholdings"],"additionalProperties":false}},"required":["uuid","currency"],"additionalProperties":false}},"formCode":{"type":"string"},"paidLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"}},"required":["currency","amount","relatedCfdis","formCode","paidLocalDateTime"],"additionalProperties":false}}},"required":["version","totalPayments","payments"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","kind","cfdiType","detail"],"additionalProperties":false},"WithholdingComplete":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"documentRef":{"type":"string","pattern":"^withholding:.+$"},"category":{"type":"string","const":"withholding"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"withholding":{"type":"object","properties":{"withholdingTypeCode":{"type":"string"},"description":{"type":"string"},"internalFolio":{"type":"string"},"period":{"type":"object","properties":{"fromMonth":{"type":"number"},"toMonth":{"type":"number"},"year":{"type":"number"}},"required":["fromMonth","toMonth","year"],"additionalProperties":false},"totals":{"type":"object","properties":{"operation":{"type":"number"},"gravable":{"type":"number"},"exempt":{"type":"number"},"retained":{"type":"number"}},"additionalProperties":false},"taxes":{"type":"array","items":{"type":"object","properties":{"tax":{"type":"string"},"amount":{"type":"number"},"paymentType":{"type":"string"}},"required":["tax","amount"],"additionalProperties":false}}},"required":["withholdingTypeCode","period","totals","taxes"],"additionalProperties":false},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"complete"}},"required":["availability"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","withholding","detail"],"additionalProperties":false},"WithholdingPartial":{"type":"object","properties":{"direction":{"type":"string","enum":["issued","received"]},"status":{"type":"string","enum":["draft","valid","canceled"]},"archived":{"type":"boolean"},"uuid":{"type":"string"},"counterpartyName":{"type":"string"},"total":{"$ref":"#/components/schemas/Money"},"documentRef":{"type":"string","pattern":"^withholding:.+$"},"category":{"type":"string","const":"withholding"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"detail":{"type":"object","properties":{"availability":{"type":"string","const":"partial"},"missing":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}}},"required":["availability","missing"],"additionalProperties":false}},"required":["direction","status","archived","total","documentRef","category","detail"],"additionalProperties":false}}},"paths":{"/v1/organization":{"get":{"operationId":"getOrganization","tags":["Organization"],"summary":"Get organization","description":"Returns the active organization’s public configuration, fiscal readiness, certificate status, portal settings, automation, and cashier access policy.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"timeZone":{"type":"string"},"branding":{"type":"object","properties":{"color":{"type":"string"},"logoUrl":{"type":"string"},"pdfOptions":{"type":"object","properties":{"codes":{"type":"boolean"},"productKey":{"type":"boolean"},"roundUnitPrice":{"type":"boolean"},"taxBreakdown":{"type":"boolean"},"iepsBreakdown":{"type":"boolean"},"renderCartaPorte":{"type":"boolean"}},"required":["codes","productKey","roundUnitPrice","taxBreakdown","iepsBreakdown","renderCartaPorte"],"additionalProperties":false}},"additionalProperties":false},"readiness":{"type":"object","properties":{"production":{"type":"boolean"},"csd":{"type":"boolean"},"fiel":{"type":"boolean"}},"required":["production","csd","fiel"],"additionalProperties":false},"certificates":{"type":"object","properties":{"csd":{"type":"object","properties":{"configured":{"type":"boolean"},"expiresAt":{"type":"string"},"serialNumber":{"type":"string"}},"required":["configured"],"additionalProperties":false},"fiel":{"type":"object","properties":{"configured":{"type":"boolean"},"expiresAt":{"type":"string"}},"required":["configured"],"additionalProperties":false}},"required":["csd","fiel"],"additionalProperties":false},"portal":{"type":"object","properties":{"slug":{"type":"string"},"enabled":{"type":"boolean"},"welcomeText":{"type":"string"},"supportEmail":{"type":"string"},"allowedCfdiUses":{"type":"array","items":{"type":"string"}},"receiptExpirationDays":{"type":"number"},"receiptStartingFolio":{"type":"number"},"receiptNextFolio":{"type":"number"},"receiptLocationScopedFolios":{"type":"boolean"},"receiptPrintWidth":{"type":"string"},"receiptLocationRequired":{"type":"boolean"},"receiptShowQrCode":{"type":"boolean"},"inventoryBlockOnNegativeStock":{"type":"boolean"}},"required":["enabled","receiptLocationScopedFolios","receiptLocationRequired","receiptShowQrCode","inventoryBlockOnNegativeStock"],"additionalProperties":false},"automation":{"type":"object","properties":{"cfdiSyncEnabled":{"type":"boolean"},"declarationSyncEnabled":{"type":"boolean"}},"required":["cfdiSyncEnabled","declarationSyncEnabled"],"additionalProperties":false},"cashierAccess":{"type":"object","properties":{"pricingDisplay":{"type":"string","enum":["show","hide"]},"canCancelReceipts":{"type":"boolean"}},"required":["pricingDisplay","canCancelReceipts"],"additionalProperties":false},"fiscal":{"type":"object","properties":{"legalName":{"type":"string"},"rfc":{"type":"string"},"taxSystem":{"type":"string"},"rfcPersonType":{"type":"string"},"usesBorderRegionStimulus":{"type":"boolean"},"website":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"municipality":{"type":"string"},"postalCode":{"type":"string"}},"required":["postalCode"],"additionalProperties":false}},"additionalProperties":false},"globalInvoice":{"type":"object","properties":{"enabled":{"type":"boolean"},"periodicity":{"type":"string"},"eligibilityStartAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastRunAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["enabled"],"additionalProperties":false}},"required":["name","timeZone","branding","readiness","certificates","portal","automation","fiscal","globalInvoice"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"name":"Ejemplo SA de CV","timeZone":"America/Mexico_City","branding":{},"readiness":{"production":false,"csd":false,"fiel":false},"certificates":{"csd":{"configured":false},"fiel":{"configured":false}},"portal":{"enabled":false,"receiptLocationScopedFolios":true,"receiptLocationRequired":false,"receiptShowQrCode":true,"inventoryBlockOnNegativeStock":false},"automation":{"cfdiSyncEnabled":false,"declarationSyncEnabled":false},"fiscal":{},"globalInvoice":{"enabled":false}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `org:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createOrganization","tags":["Organization"],"summary":"Create organization","description":"Creates and activates a new organization. Refresh the caller’s credential context after success to access it immediately.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"example":{"name":"Ejemplo SA de CV"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"operation":{"type":"string","const":"create"},"created":{"type":"boolean","const":true},"name":{"type":"string"},"reauthorizationRequired":{"type":"boolean","const":true}},"required":["operation","created","name","reauthorizationRequired"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"operation":"create","created":true,"name":"Ejemplo SA de CV","reauthorizationRequired":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Requires an OAuth user identity.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"patch":{"operationId":"updateOrganization","tags":["Organization"],"summary":"Update organization","description":"Updates exactly one organization settings section. The section selects the request shape. For a logo, prepare an organization_logo upload, send the image bytes to uploadUrl, then submit its fileRef in the branding section.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"section":{"type":"string","const":"profile"},"name":{"type":"string","minLength":1},"timeZone":{"type":"string","minLength":1}},"required":["section"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"fiscal"},"legalName":{"type":"string","minLength":1,"maxLength":100},"rfc":{"type":"string","minLength":12,"maxLength":13},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"address":{"type":"object","properties":{"postalCode":{"type":"string","pattern":"^\\d{5}$"},"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"municipality":{"type":"string"}},"required":["postalCode"],"additionalProperties":false},"usesBorderRegionStimulus":{"type":"boolean"},"website":{"type":"string","format":"uri"},"phone":{"type":"string"}},"required":["section","legalName","taxSystem","address"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"branding"},"color":{"type":"string","pattern":"^#[0-9A-Fa-f]{6}$"},"pdfOptions":{"type":"object","properties":{"codes":{"type":"boolean"},"productKey":{"type":"boolean"},"roundUnitPrice":{"type":"boolean"},"taxBreakdown":{"type":"boolean"},"iepsBreakdown":{"type":"boolean"},"renderCartaPorte":{"type":"boolean"}},"required":["codes","productKey","roundUnitPrice","taxBreakdown","iepsBreakdown","renderCartaPorte"],"additionalProperties":false},"logo":{"type":"object","properties":{"fileRef":{"type":"string","minLength":1}},"required":["fileRef"],"additionalProperties":false}},"required":["section"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"portal"},"slug":{"type":"string","minLength":3,"maxLength":30},"enabled":{"type":"boolean"},"welcomeText":{"type":"string"},"supportEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"allowedCfdiUses":{"type":"array","items":{"description":"Active SAT CFDI-use code.","x-exac-sat-catalog":"cfdi-uses","oneOf":[{"type":"string","title":"SAT c_UsoCFDI","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#cfdi-uses).","enum":["G01","D06","I07","I06","I01","I05","D09","G02","D04","I04","I03","D08","G03","D03","D02","D01","D05","I02","CN01","I08","CP01","D10","D07","S01"]}]}},"receiptExpirationDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]},"receiptStartingFolio":{"type":"integer","minimum":1,"maximum":9007199254740991},"receiptNextFolio":{"type":"integer","minimum":1,"maximum":9007199254740991},"receiptLocationScopedFolios":{"type":"boolean"},"receiptPrintWidth":{"type":"string","enum":["45mm","58mm","80mm","112mm","letter"]},"receiptLocationRequired":{"type":"boolean"},"receiptShowQrCode":{"type":"boolean"},"inventoryBlockOnNegativeStock":{"type":"boolean"}},"required":["section"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"globalInvoice"},"enabled":{"type":"boolean"},"periodicity":{"type":"string","enum":["day","week","fortnight","month","two_months"]},"eligibilityStartAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["section"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"automation"},"cfdiSyncEnabled":{"type":"boolean"},"declarationSyncEnabled":{"type":"boolean"}},"required":["section"],"additionalProperties":false},{"type":"object","properties":{"section":{"type":"string","const":"access"},"pricingDisplay":{"type":"string","enum":["show","hide"]},"canCancelReceipts":{"type":"boolean"}},"required":["section","pricingDisplay","canCancelReceipts"],"additionalProperties":false}]},"example":{"section":"branding","logo":{"fileRef":"file:example"}}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"timeZone":{"type":"string"},"branding":{"type":"object","properties":{"color":{"type":"string"},"logoUrl":{"type":"string"},"pdfOptions":{"type":"object","properties":{"codes":{"type":"boolean"},"productKey":{"type":"boolean"},"roundUnitPrice":{"type":"boolean"},"taxBreakdown":{"type":"boolean"},"iepsBreakdown":{"type":"boolean"},"renderCartaPorte":{"type":"boolean"}},"required":["codes","productKey","roundUnitPrice","taxBreakdown","iepsBreakdown","renderCartaPorte"],"additionalProperties":false}},"additionalProperties":false},"readiness":{"type":"object","properties":{"production":{"type":"boolean"},"csd":{"type":"boolean"},"fiel":{"type":"boolean"}},"required":["production","csd","fiel"],"additionalProperties":false},"certificates":{"type":"object","properties":{"csd":{"type":"object","properties":{"configured":{"type":"boolean"},"expiresAt":{"type":"string"},"serialNumber":{"type":"string"}},"required":["configured"],"additionalProperties":false},"fiel":{"type":"object","properties":{"configured":{"type":"boolean"},"expiresAt":{"type":"string"}},"required":["configured"],"additionalProperties":false}},"required":["csd","fiel"],"additionalProperties":false},"portal":{"type":"object","properties":{"slug":{"type":"string"},"enabled":{"type":"boolean"},"welcomeText":{"type":"string"},"supportEmail":{"type":"string"},"allowedCfdiUses":{"type":"array","items":{"type":"string"}},"receiptExpirationDays":{"type":"number"},"receiptStartingFolio":{"type":"number"},"receiptNextFolio":{"type":"number"},"receiptLocationScopedFolios":{"type":"boolean"},"receiptPrintWidth":{"type":"string"},"receiptLocationRequired":{"type":"boolean"},"receiptShowQrCode":{"type":"boolean"},"inventoryBlockOnNegativeStock":{"type":"boolean"}},"required":["enabled","receiptLocationScopedFolios","receiptLocationRequired","receiptShowQrCode","inventoryBlockOnNegativeStock"],"additionalProperties":false},"automation":{"type":"object","properties":{"cfdiSyncEnabled":{"type":"boolean"},"declarationSyncEnabled":{"type":"boolean"}},"required":["cfdiSyncEnabled","declarationSyncEnabled"],"additionalProperties":false},"cashierAccess":{"type":"object","properties":{"pricingDisplay":{"type":"string","enum":["show","hide"]},"canCancelReceipts":{"type":"boolean"}},"required":["pricingDisplay","canCancelReceipts"],"additionalProperties":false},"fiscal":{"type":"object","properties":{"legalName":{"type":"string"},"rfc":{"type":"string"},"taxSystem":{"type":"string"},"rfcPersonType":{"type":"string"},"usesBorderRegionStimulus":{"type":"boolean"},"website":{"type":"string"},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"municipality":{"type":"string"},"postalCode":{"type":"string"}},"required":["postalCode"],"additionalProperties":false}},"additionalProperties":false},"globalInvoice":{"type":"object","properties":{"enabled":{"type":"boolean"},"periodicity":{"type":"string"},"eligibilityStartAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastRunAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["enabled"],"additionalProperties":false}},"required":["name","timeZone","branding","readiness","certificates","portal","automation","fiscal","globalInvoice"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"name":"Ejemplo SA de CV","timeZone":"America/Mexico_City","branding":{},"readiness":{"production":false,"csd":false,"fiel":false},"certificates":{"csd":{"configured":false},"fiel":{"configured":false}},"portal":{"enabled":false,"receiptLocationScopedFolios":true,"receiptLocationRequired":false,"receiptShowQrCode":true,"inventoryBlockOnNegativeStock":false},"automation":{"cfdiSyncEnabled":false,"declarationSyncEnabled":false},"fiscal":{},"globalInvoice":{"enabled":false}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Permission depends on the body `section`: `profile` → `org:update`, `fiscal` → `settings:update`, `branding` → `settings:update`, `portal` → `settings:update`, `globalInvoice` → `settings:update`, `automation` → `settings:update`, `access` → `org:update`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"delete":{"operationId":"deleteOrganization","tags":["Organization"],"summary":"Delete organization","description":"Permanently deletes the active organization after confirmationName exactly matches its current name.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmationName":{"type":"string","minLength":1,"maxLength":100}},"required":["confirmationName"],"additionalProperties":false},"example":{"confirmationName":"Ejemplo SA de CV"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"operation":{"type":"string","const":"delete"},"deleted":{"type":"boolean","const":true},"userDeleted":{"type":"boolean"},"nextOrganizationAvailable":{"type":"boolean"},"reauthorizationRequired":{"type":"boolean"}},"required":["operation","deleted","userDeleted","nextOrganizationAvailable","reauthorizationRequired"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"operation":"delete","deleted":true,"userDeleted":false,"nextOrganizationAvailable":true,"reauthorizationRequired":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `org:delete` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/admin":{"put":{"operationId":"transferOrganizationAdmin","tags":["Organization"],"summary":"Transfer organization administrator","description":"Transfers the organization administrator role from the active administrator to another active member. Both references must identify active organization members.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentAdminRef":{"type":"string","pattern":"^member:"},"nextAdminRef":{"type":"string","pattern":"^member:"}},"required":["currentAdminRef","nextAdminRef"],"additionalProperties":false},"example":{"currentAdminRef":"member:current-admin","nextAdminRef":"member:next-admin"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/members":{"get":{"operationId":"listMembers","tags":["Organization"],"summary":"List members","description":"Returns active members and pending or historical invitations in one cursor-paginated collection. Filter by status when synchronizing membership state.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","pending","expired","revoked"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"memberRef":{"type":"string","pattern":"^member:"},"kind":{"type":"string","enum":["member","invitation"]},"email":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"receiptAccess":{"type":"object","properties":{"assignedLocationId":{"type":"string"},"canViewLocationSales":{"type":"boolean"}},"additionalProperties":false},"lastLoginAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["memberRef","kind","email","role","status"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"memberRef":"member:example","kind":"member","email":"developer@example.com","name":"Developer Example","role":"member","status":"active"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"post":{"operationId":"inviteMember","tags":["Organization"],"summary":"Invite member","description":"Invites a member with the selected role. Receipt-role invitations may include location-scoped receipt access.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"default":"member","type":"string","enum":["member","receipts"]},"receiptAccess":{"type":"object","properties":{"assignedLocationId":{"type":"string"},"canViewLocationSales":{"type":"boolean"}},"additionalProperties":false}},"required":["email"],"additionalProperties":false},"example":{"email":"developer@example.com","role":"member"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/members/{memberRef}":{"patch":{"operationId":"updateMember","tags":["Organization"],"summary":"Update member","description":"Updates the role and optional receipt access for an active member. Use the dedicated organization admin endpoint to assign the administrator role.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"memberRef","in":"path","required":true,"schema":{"type":"string","pattern":"^member:"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["member","receipts"]},"receiptAccess":{"type":"object","properties":{"assignedLocationId":{"type":"string"},"canViewLocationSales":{"type":"boolean"}},"additionalProperties":false}},"required":["role"],"additionalProperties":false},"example":{"role":"member"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"delete":{"operationId":"deleteMember","tags":["Organization"],"summary":"Delete member","description":"Removes an active member or revokes a pending invitation identified by memberRef. The owning members domain resolves the current state before applying the correct operation.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"memberRef","in":"path","required":true,"schema":{"type":"string","pattern":"^member:"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/members/{memberRef}/invitation-reminders":{"post":{"operationId":"resendMemberInvitation","tags":["Organization"],"summary":"Resend member invitation","description":"Sends another notification for a pending member invitation. The memberRef must identify an invitation rather than an active member.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"memberRef","in":"path","required":true,"schema":{"type":"string","pattern":"^member:"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `members:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/api-keys":{"get":{"operationId":"listApiKeys","tags":["Credentials"],"summary":"List credentials","description":"Lists organization-owned API keys without returning their secret values. Use id and lastUsedAt to audit and rotate credentials.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^api_key_[A-Za-z0-9_-]+$"},"name":{"type":"string"},"obfuscatedValue":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"string"}}},"required":["id","name","obfuscatedValue","createdAt","updatedAt","lastUsedAt","expiresAt","permissions"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"id":"api_key_example","name":"Production integration","obfuscatedValue":"sk_••••example","createdAt":"2026-07-14T00:00:00.000Z","updatedAt":null,"lastUsedAt":null,"expiresAt":null,"permissions":["api:full","api:production"]}]}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `apiKeys:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"post":{"operationId":"createApiKey","tags":["Credentials"],"summary":"Create API key","description":"Creates a full-access organization API key. The secret value is returned exactly once in this response; store it securely because later list calls only return an obfuscated value.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"example":{"name":"Production integration"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","pattern":"^api_key_[A-Za-z0-9_-]+$"},"name":{"type":"string"},"obfuscatedValue":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"string"}},"value":{"type":"string","minLength":1}},"required":["id","name","obfuscatedValue","createdAt","updatedAt","lastUsedAt","expiresAt","permissions","value"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"id":"api_key_example","name":"Production integration","obfuscatedValue":"sk_••••example","createdAt":"2026-07-14T00:00:00.000Z","updatedAt":null,"lastUsedAt":null,"expiresAt":null,"permissions":["api:full","api:production"],"value":"sk_example_secret_shown_once"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `apiKeys:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/api-keys/{keyId}":{"delete":{"operationId":"deleteApiKey","tags":["Credentials"],"summary":"Delete API key","description":"Permanently revokes an organization API key. A key cannot delete the credential currently authenticating the request.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string","pattern":"^api_key_[A-Za-z0-9_-]+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"success":{"type":"boolean","const":true}},"required":["success"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"success":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `apiKeys:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/organization/activity":{"get":{"operationId":"listProgrammaticRequests","tags":["Developer activity"],"summary":"List programmatic requests","description":"Lists authenticated REST API and MCP activity for the organization with cursor pagination and optional transport or outcome filters. Metadata is retained for 14 days; request bodies, authorization headers, idempotency keys, and fiscal secrets are never included.","security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"transport","in":"query","required":false,"schema":{"type":"string","enum":["api","mcp"]}},{"name":"outcome","in":"query","required":false,"schema":{"type":"string","enum":["success","error"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"requestId":{"type":"string"},"transport":{"type":"string","enum":["api","mcp"]},"operation":{"type":"string"},"method":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorKind":{"type":"string","enum":["user","service","agent"]},"credentialKind":{"type":"string","enum":["access_token","api_key"]},"credentialIdentifier":{"type":"string"},"outcome":{"type":"string","enum":["success","error"]},"statusCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"retryAfterSeconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"idempotencyDisposition":{"anyOf":[{"type":"string","enum":["in_progress","recovery_required","conflict","not_applicable"]},{"type":"null"}]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["requestId","transport","operation","method","actorKind","credentialKind","credentialIdentifier","outcome","statusCode","errorCode","retryable","retryAfterSeconds","idempotencyDisposition","durationMs","createdAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"requestId":"req_0123456789abcdef0123456789abcdef","transport":"api","operation":"listOrganization","method":"GET","actorKind":"service","credentialKind":"api_key","credentialIdentifier":"api_key_example","outcome":"success","statusCode":200,"errorCode":null,"retryable":null,"retryAfterSeconds":null,"idempotencyDisposition":"not_applicable","durationMs":42,"createdAt":"2026-09-02T18:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `apiKeys:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/organization/activity/{requestId}":{"get":{"operationId":"getProgrammaticRequest","tags":["Developer activity"],"summary":"Get programmatic request","description":"Returns the safe metadata projection for one organization-attributable programmatic request. Use the Request-Id response header to correlate a client call with this record.","security":[{"bearerAuth":[]}],"parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string","pattern":"^req_[a-f0-9]{32}$","examples":["req_0123456789abcdef0123456789abcdef"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"requestId":{"type":"string"},"transport":{"type":"string","enum":["api","mcp"]},"operation":{"type":"string"},"method":{"anyOf":[{"type":"string"},{"type":"null"}]},"actorKind":{"type":"string","enum":["user","service","agent"]},"credentialKind":{"type":"string","enum":["access_token","api_key"]},"credentialIdentifier":{"type":"string"},"outcome":{"type":"string","enum":["success","error"]},"statusCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"retryable":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"retryAfterSeconds":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"idempotencyDisposition":{"anyOf":[{"type":"string","enum":["in_progress","recovery_required","conflict","not_applicable"]},{"type":"null"}]},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["requestId","transport","operation","method","actorKind","credentialKind","credentialIdentifier","outcome","statusCode","errorCode","retryable","retryAfterSeconds","idempotencyDisposition","durationMs","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"requestId":"req_0123456789abcdef0123456789abcdef","transport":"api","operation":"listOrganization","method":"GET","actorKind":"service","credentialKind":"api_key","credentialIdentifier":"api_key_example","outcome":"success","statusCode":200,"errorCode":null,"retryable":null,"retryAfterSeconds":null,"idempotencyDisposition":"not_applicable","durationMs":42,"createdAt":"2026-09-02T18:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `apiKeys:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/organization/certificates/{kind}":{"put":{"operationId":"uploadCertificate","tags":["Fiscal setup"],"summary":"Upload certificate","description":"Configures an organization CSD or e.firma certificate. Send the certificate and private-key bytes as base64 plus the private-key password. The certificate RFC must match the organization fiscal identity.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["csd","fiel"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"certificateBase64":{"type":"string","minLength":1},"privateKeyBase64":{"type":"string","minLength":1},"password":{"type":"string","minLength":1},"certificateFileName":{"type":"string","minLength":1,"maxLength":255},"privateKeyFileName":{"type":"string","minLength":1,"maxLength":255}},"required":["certificateBase64","privateKeyBase64","password"],"additionalProperties":false},{"type":"object","properties":{"certificateBase64":{"type":"string","minLength":1},"privateKeyBase64":{"type":"string","minLength":1},"password":{"type":"string","minLength":1}},"required":["certificateBase64","privateKeyBase64","password"],"additionalProperties":false}]},"example":{"certificateBase64":"BASE64_CER","privateKeyBase64":"BASE64_KEY","password":"certificate-password","certificateFileName":"certificate.cer","privateKeyFileName":"private.key"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"csd"},"configured":{"type":"boolean","const":true},"rfc":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","configured","rfc","expiresAt","serialNumber"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fiel"},"configured":{"type":"boolean","const":true},"rfc":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"replaced":{"type":"boolean"}},"required":["kind","configured","rfc","expiresAt","replaced"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["csd","fiel"]},"configured":{"type":"boolean","const":false}},"required":["kind","configured"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false},"example":{"data":{"kind":"csd","configured":true,"rfc":"EJE010101AAA","expiresAt":"2030-01-01T00:00:00.000Z","serialNumber":"30001000000500003416"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `certificates:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]},"delete":{"operationId":"deleteCertificate","tags":["Fiscal setup"],"summary":"Delete certificate","description":"Removes the selected organization certificate material. Workflows that require it remain unavailable until a replacement is uploaded.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["csd","fiel"]}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"csd"},"configured":{"type":"boolean","const":true},"rfc":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"serialNumber":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","configured","rfc","expiresAt","serialNumber"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fiel"},"configured":{"type":"boolean","const":true},"rfc":{"type":"string"},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"replaced":{"type":"boolean"}},"required":["kind","configured","rfc","expiresAt","replaced"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["csd","fiel"]},"configured":{"type":"boolean","const":false}},"required":["kind","configured"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false},"example":{"data":{"kind":"csd","configured":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `certificates:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/uploads":{"post":{"operationId":"prepareUpload","tags":["Files and delivery"],"summary":"Prepare file upload","description":"Creates short-lived PUT instructions bound to one organization-owned fileRef. Upload the bytes to upload.url with the declared headers, then pass only fileRef to the consuming operation.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"purpose":{"type":"string","enum":["organization_logo","tax_profile_pdf"]},"fileName":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","minLength":1,"maxLength":100}},"required":["purpose","fileName","contentType"],"additionalProperties":false},"example":{"purpose":"tax_profile_pdf","fileName":"constancia.pdf","contentType":"application/pdf"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileRef":{"type":"string","pattern":"^file:.+$"},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["url","method","headers","expiresAt"],"additionalProperties":false}},"required":["fileRef","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fileRef":"file:example","upload":{"url":"https://uploads.example.com/file","method":"PUT","headers":{"Content-Type":"application/pdf"},"expiresAt":"2026-08-01T12:15:00.000Z"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Permission depends on the body `purpose`: `organization_logo` → `settings:update`, `tax_profile_pdf` → `customers:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/uploads/{fileRef}":{"delete":{"operationId":"deleteUpload","tags":["Files and delivery"],"summary":"Discard file upload","description":"Discards a prepared or failed upload that has not been consumed.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"fileRef","in":"path","required":true,"schema":{"type":"string","pattern":"^file:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileRef":{"type":"string","pattern":"^file:.+$"},"purpose":{"type":"string","enum":["organization_logo","tax_profile_pdf"]},"fileName":{"type":"string"},"contentType":{"type":"string"},"status":{"type":"string","enum":["prepared","processing","failed","consumed","deleted"]}},"required":["fileRef","purpose","fileName","contentType","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fileRef":"file:example","purpose":"tax_profile_pdf","fileName":"constancia.pdf","contentType":"application/pdf","status":"deleted"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The file's stored purpose determines the required permission: `organization_logo` → `settings:update`, `tax_profile_pdf` → `customers:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/contacts":{"get":{"operationId":"listContacts","tags":["Contacts"],"summary":"List contacts","description":"Lists customers or suppliers, selected by the required kind query parameter.","security":[{"bearerAuth":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["customer","supplier"]}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"contactId":"customer-example","legalName":"Estudio Jacaranda","email":"administracion@jacaranda.example","rfc":"AAA010101AAA","updatedAt":"2026-07-14T18:00:00.000Z","kind":"customer"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Permission depends on the query `kind`: `customer` → `customers:read`, `supplier` → `providers:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createContact","tags":["Contacts"],"summary":"Create contact","description":"Creates a customer or supplier. The required kind field is preserved in the returned contact projection.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"customer"},"legalName":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"code":{"type":"string"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false},"cfdiUse":{"description":"Active SAT CFDI-use code.","x-exac-sat-catalog":"cfdi-uses","oneOf":[{"type":"string","title":"SAT c_UsoCFDI","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#cfdi-uses).","enum":["G01","D06","I07","I06","I01","I05","D09","G02","D04","I04","I03","D08","G03","D03","D02","D01","D05","I02","CN01","I08","CP01","D10","D07","S01"]}]},"creditEnabled":{"type":"boolean"},"creditByDefault":{"type":"boolean"},"defaultPaymentTermDays":{"type":"integer","minimum":1,"maximum":365}},"required":["kind","legalName"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"supplier"},"legalName":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"code":{"type":"string"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false}},"required":["kind","legalName"],"additionalProperties":false}]},"example":{"kind":"customer","legalName":"Estudio Jacaranda","email":"administracion@jacaranda.example"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"],"additionalProperties":false},"example":{"data":{"contactId":"customer-example","legalName":"Estudio Jacaranda","email":"administracion@jacaranda.example","rfc":"AAA010101AAA","updatedAt":"2026-07-14T18:00:00.000Z","kind":"customer"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Permission depends on the body `kind`: `customer` → `customers:manage`, `supplier` → `providers:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/contacts/{contactId}":{"get":{"operationId":"getContact","tags":["Contacts"],"summary":"Get contact","description":"Returns one customer or supplier. The stored contact kind means callers do not repeat kind in the path or query.","security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"],"additionalProperties":false},"example":{"data":{"contactId":"customer-example","legalName":"Estudio Jacaranda","email":"administracion@jacaranda.example","rfc":"AAA010101AAA","updatedAt":"2026-07-14T18:00:00.000Z","kind":"customer"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The contact's stored kind determines the required permission: `customer` → `customers:read`, `supplier` → `providers:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateContact","tags":["Contacts"],"summary":"Update contact","description":"Updates one customer or supplier. This operation does not change the stored kind.","security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"legalName":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"code":{"type":"string"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false},"cfdiUse":{"description":"Active SAT CFDI-use code.","x-exac-sat-catalog":"cfdi-uses","oneOf":[{"type":"string","title":"SAT c_UsoCFDI","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#cfdi-uses).","enum":["G01","D06","I07","I06","I01","I05","D09","G02","D04","I04","I03","D08","G03","D03","D02","D01","D05","I02","CN01","I08","CP01","D10","D07","S01"]}]},"creditEnabled":{"type":"boolean"},"creditByDefault":{"type":"boolean"},"defaultPaymentTermDays":{"anyOf":[{"type":"integer","minimum":1,"maximum":365},{"type":"null"}]},"kind":{"type":"string","const":"customer"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"legalName":{"type":"string"},"email":{"type":"string"},"rfc":{"type":"string"},"code":{"type":"string"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"phone":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}},"required":["postalCode","country"],"additionalProperties":false},"kind":{"type":"string","const":"supplier"}},"required":["kind"],"additionalProperties":false}]},"example":{"email":"new-billing@example.com","kind":"customer"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}},"required":["data"],"additionalProperties":false},"example":{"data":{"contactId":"customer-example","legalName":"Estudio Jacaranda","email":"administracion@jacaranda.example","rfc":"AAA010101AAA","updatedAt":"2026-07-14T18:00:00.000Z","kind":"customer"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The contact's stored kind determines the required permission: `customer` → `customers:manage`, `supplier` → `providers:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteContact","tags":["Contacts"],"summary":"Delete contact","description":"Deletes one customer or supplier after checking organization ownership and dependent records.","security":[{"bearerAuth":[]}],"parameters":[{"name":"contactId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"contactId":{"type":"string","minLength":1}},"required":["removed","contactId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"contactId":"customer-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The contact's stored kind determines the required permission: `customer` → `customers:manage`, `supplier` → `providers:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/reference/sat-products":{"get":{"operationId":"searchSatProductCatalog","tags":["SAT"],"summary":"Search SAT products","description":"Searches the SAT product-and-service key reference catalog. Results are relevance-ranked and limited to the requested maximum.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","minLength":2}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"score":{"type":"number"}},"required":["key","description","score"],"additionalProperties":false}},"total":{"type":"integer","minimum":0}},"required":["data","total"],"additionalProperties":false},"example":{"data":[{"key":"43232408","description":"Software de desarrollo","score":9}],"total":1}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List products","description":"Lists organization products with the documented filters and cursor pagination so callers can discover stable product identifiers before reading or changing a record.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","inactive","all"]}},{"name":"stockStatus","in":"query","required":false,"schema":{"type":"string","enum":["available","out_of_stock"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"productId":"product-example","description":"Consultoría mensual","sku":"CONSULT-001","active":true,"price":2500,"taxIncluded":false,"taxRate":0.16,"taxability":"standard","stock":12,"stockStatus":"available","satProductCode":"80101500","satUnitCode":"E48","updatedAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Create product","description":"Creates a product or service with its catalog identity, pricing, tax configuration, and optional inventory settings.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":1},"sku":{"type":"string"},"code":{"type":"string"},"price":{"type":"number","exclusiveMinimum":0},"quantityDiscounts":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"minQuantity":{"type":"number"},"percentage":{"type":"number"}},"required":["minQuantity","percentage"],"additionalProperties":false}},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxExemptReason":{"type":"string"},"supplierIds":{"type":"array","items":{"type":"string"}},"locationIds":{"type":"array","items":{"type":"string"}},"classificationValueIds":{"maxItems":20,"type":"array","items":{"type":"string"}},"satProductCode":{"type":"string"},"satUnitCode":{"type":"string"}},"required":["description","price"],"additionalProperties":false},"example":{"description":"Consultoría mensual","sku":"CONSULT-001","price":2500,"taxIncluded":false,"taxability":"standard","satProductCode":"80101500","satUnitCode":"E48"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"],"additionalProperties":false},"example":{"data":{"productId":"product-example","description":"Consultoría mensual","sku":"CONSULT-001","active":true,"price":2500,"taxIncluded":false,"taxRate":0.16,"taxability":"standard","stock":12,"stockStatus":"available","satProductCode":"80101500","satUnitCode":"E48","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/products/{productId}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Get product","description":"Returns one organization-owned product with its current catalog, fiscal, pricing, and inventory-facing configuration.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"],"additionalProperties":false},"example":{"data":{"productId":"product-example","description":"Consultoría mensual","sku":"CONSULT-001","active":true,"price":2500,"taxIncluded":false,"taxRate":0.16,"taxability":"standard","stock":12,"stockStatus":"available","satProductCode":"80101500","satUnitCode":"E48","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Update product","description":"Replaces the editable catalog, pricing, tax, and inventory settings of one product or service.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantityDiscounts":{"anyOf":[{"maxItems":10,"type":"array","items":{"type":"object","properties":{"minQuantity":{"type":"number"},"percentage":{"type":"number"}},"required":["minQuantity","percentage"],"additionalProperties":false}},{"type":"null"}]},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxExemptReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplierIds":{"type":"array","items":{"type":"string"}},"locationIds":{"type":"array","items":{"type":"string"}},"classificationValueIds":{"maxItems":20,"type":"array","items":{"type":"string"}},"description":{"type":"string","minLength":1},"price":{"type":"number","exclusiveMinimum":0},"active":{"type":"boolean"},"satProductCode":{"anyOf":[{"type":"string"},{"type":"null"}]},"satUnitCode":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"example":{"price":2750}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Product"}},"required":["data"],"additionalProperties":false},"example":{"data":{"productId":"product-example","description":"Consultoría mensual","sku":"CONSULT-001","active":true,"price":2750,"taxIncluded":false,"taxRate":0.16,"taxability":"standard","stock":12,"stockStatus":"available","satProductCode":"80101500","satUnitCode":"E48","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteProduct","tags":["Products"],"summary":"Delete product","description":"Deletes one product or service after the owning domain verifies its organization and dependent records.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"productId":{"type":"string","minLength":1}},"required":["removed","productId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"productId":"product-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/inventory-movements":{"get":{"operationId":"listInventoryMovements","tags":["Products"],"summary":"List inventory movements","description":"Lists inventory movements using the documented product, location, operation, and date filters.","security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["register","entries","exits","returns"]}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"locationId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"movementId":{"type":"string"},"productId":{"type":"string","minLength":1},"productCode":{"type":"string"},"productSku":{"type":"string"},"productDescription":{"type":"string"},"productDeleted":{"type":"boolean"},"locationId":{"type":"string"},"locationName":{"type":"string"},"businessDate":{"type":"string"},"businessTimeZone":{"type":"string"},"delta":{"type":"number"},"direction":{"type":"string","enum":["entry","exit","neutral"]},"reason":{"type":"string","enum":["initial","sale","sale_reversal","restock","adjustment"]},"resultingStock":{"type":"number"},"resultingStockScope":{"type":"string","enum":["aggregate","location"]},"sourceType":{"type":"string","enum":["manual","sale","inventory_receipt","import"]},"sourceLabel":{"type":"string"},"receiptDocumentRef":{"type":"string"},"cfdiDocumentRef":{"type":"string"},"inventoryReceiptId":{"type":"string"},"supplierId":{"type":"string"},"supplierName":{"type":"string"},"note":{"type":"string"},"actorIdentifier":{"type":"string"},"actorName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["movementId","productId","productDescription","productDeleted","delta","direction","reason","resultingStock","resultingStockScope","sourceType","sourceLabel","createdAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"movementId":"movement-example","productId":"product-example","productCode":"SKU-001","productDescription":"Producto ejemplo","productDeleted":false,"locationId":"location-example","locationName":"Sucursal Centro","businessDate":"2026-07-27","businessTimeZone":"America/Mazatlan","delta":5,"direction":"entry","reason":"restock","resultingStock":12,"resultingStockScope":"location","sourceType":"inventory_receipt","sourceLabel":"Entrada OC-1042","inventoryReceiptId":"inventory-receipt-example","supplierId":"supplier-example","supplierName":"Proveedor Ejemplo","note":"Entrega completa","actorName":"Ana Operadora","createdAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/inventory-movement-operations":{"get":{"operationId":"listInventoryMovementOperations","tags":["Products"],"summary":"List inventory operations","description":"Groups related inventory movements into operations so callers can inspect business events instead of individual stock rows.","security":[{"bearerAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"view","in":"query","required":false,"schema":{"type":"string","enum":["register","entries","exits","returns"]}},{"name":"productId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"locationId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"searchQuery","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},{"name":"supplierId","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"sourceType","in":"query","required":false,"schema":{"type":"string","enum":["manual","sale","inventory_receipt","import"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"operationId":{"type":"string"},"businessDate":{"type":"string"},"businessTimeZone":{"type":"string"},"direction":{"type":"string","enum":["entry","exit","neutral"]},"reason":{"type":"string","enum":["initial","sale","sale_reversal","restock","adjustment"]},"sourceType":{"type":"string","enum":["manual","sale","inventory_receipt","import"]},"sourceLabel":{"type":"string"},"sourceReference":{"type":"string"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"locationId":{"type":"string"},"locationName":{"type":"string"},"supplierId":{"type":"string"},"supplierName":{"type":"string"},"receiptDocumentRef":{"type":"string"},"inventoryReceiptId":{"type":"string"},"note":{"type":"string"},"actorIdentifier":{"type":"string"},"actorName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["operationId","direction","reason","sourceType","sourceLabel","itemCount","createdAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"operationId":"inventory-operation-example","businessDate":"2026-07-27","businessTimeZone":"America/Mazatlan","direction":"entry","reason":"restock","sourceType":"inventory_receipt","sourceLabel":"Entrada OC-1042","sourceReference":"OC-1042","itemCount":2,"locationId":"location-example","locationName":"Sucursal Centro","supplierId":"supplier-example","supplierName":"Proveedor Ejemplo","inventoryReceiptId":"inventory-receipt-example","note":"Entrega completa","actorName":"Ana Operadora","createdAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/inventory-movement-operations/{operationId}/movements":{"get":{"operationId":"listInventoryOperationMovements","tags":["Products"],"summary":"List operation movements","description":"Lists every inventory movement that belongs to one organization-owned grouped operation.","security":[{"bearerAuth":[]}],"parameters":[{"name":"operationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"movementId":{"type":"string"},"productId":{"type":"string","minLength":1},"productCode":{"type":"string"},"productSku":{"type":"string"},"productDescription":{"type":"string"},"productDeleted":{"type":"boolean"},"locationId":{"type":"string"},"locationName":{"type":"string"},"businessDate":{"type":"string"},"businessTimeZone":{"type":"string"},"delta":{"type":"number"},"direction":{"type":"string","enum":["entry","exit","neutral"]},"reason":{"type":"string","enum":["initial","sale","sale_reversal","restock","adjustment"]},"resultingStock":{"type":"number"},"resultingStockScope":{"type":"string","enum":["aggregate","location"]},"sourceType":{"type":"string","enum":["manual","sale","inventory_receipt","import"]},"sourceLabel":{"type":"string"},"receiptDocumentRef":{"type":"string"},"cfdiDocumentRef":{"type":"string"},"inventoryReceiptId":{"type":"string"},"supplierId":{"type":"string"},"supplierName":{"type":"string"},"note":{"type":"string"},"actorIdentifier":{"type":"string"},"actorName":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["movementId","productId","productDescription","productDeleted","delta","direction","reason","resultingStock","resultingStockScope","sourceType","sourceLabel","createdAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"movementId":"movement-example","productId":"product-example","productCode":"SKU-001","productDescription":"Producto ejemplo","productDeleted":false,"locationId":"location-example","locationName":"Sucursal Centro","businessDate":"2026-07-27","businessTimeZone":"America/Mazatlan","delta":5,"direction":"entry","reason":"restock","resultingStock":12,"resultingStockScope":"location","sourceType":"inventory_receipt","sourceLabel":"Entrada OC-1042","inventoryReceiptId":"inventory-receipt-example","supplierId":"supplier-example","supplierName":"Proveedor Ejemplo","createdAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/products/{productId}/inventory-levels":{"get":{"operationId":"listProductInventoryLevels","tags":["Products"],"summary":"List inventory by location","description":"Returns the current stock level for one product at each visible organization location.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"inventoryLevelId":{"type":"string"},"productId":{"type":"string","minLength":1},"locationId":{"type":"string"},"locationName":{"type":"string"},"stock":{"type":"number"},"stockStatus":{"type":"string","enum":["available","out_of_stock"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["inventoryLevelId","productId","locationId","locationName","stock","stockStatus","updatedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"inventoryLevelId":"inventory-level-example","productId":"product-example","locationId":"location-example","locationName":"Sucursal Centro","stock":12,"stockStatus":"available","updatedAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/products/{productId}/suppliers":{"get":{"operationId":"listProductSuppliers","tags":["Products"],"summary":"List product suppliers","description":"Lists the suppliers linked to one product, including the relationship data used for purchasing and replenishment.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"supplierId":{"type":"string"},"legalName":{"type":"string"},"rfc":{"type":"string"},"email":{"type":"string"}},"required":["supplierId","legalName"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"example":{"data":[{"supplierId":"supplier-example","legalName":"Proveedor Ejemplo, S.A. de C.V.","rfc":"PEJ010101AAA","email":"compras@example.com"}]}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/products/{productId}/inventory":{"post":{"operationId":"updateProductInventory","tags":["Products"],"summary":"Update inventory","description":"Sets or restocks the product quantity at one location and records the resulting inventory movement.","security":[{"bearerAuth":[]}],"parameters":[{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"operation":{"type":"string","const":"set"},"locationId":{"type":"string"},"stock":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"note":{"type":"string"}},"required":["operation","stock"],"additionalProperties":false},{"type":"object","properties":{"operation":{"type":"string","const":"restock"},"locationId":{"type":"string"},"quantity":{"type":"number","exclusiveMinimum":0},"note":{"type":"string"}},"required":["operation","quantity"],"additionalProperties":false}]},"example":{"operation":"restock","locationId":"location-example","quantity":5,"note":"Supplier delivery"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locationId":{"type":"string"},"locationStock":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"}},"required":["product"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"locationId":"location-example","locationStock":12,"product":{"productId":"product-example","description":"Consultoría mensual","sku":"CONSULT-001","active":true,"price":2500,"taxIncluded":false,"taxRate":0.16,"taxability":"standard","stock":12,"stockStatus":"available","satProductCode":"80101500","satUnitCode":"E48","updatedAt":"2026-07-27T12:00:00.000Z"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/inventory-receipts":{"post":{"operationId":"createInventoryReceipt","tags":["Products"],"summary":"Receive supplier inventory","description":"Receives multiple products from one supplier into one location and records the stock changes as one atomic inventory receipt.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierId":{"type":"string","minLength":1},"locationId":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1,"maxLength":120},"note":{"type":"string","minLength":1,"maxLength":500},"items":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0}},"required":["productId","quantity"],"additionalProperties":false}}},"required":["supplierId","locationId","items"],"additionalProperties":false},"example":{"supplierId":"supplier-example","locationId":"location-example","reference":"OC-1042","note":"Entrega de proveedor","items":[{"productId":"product-example","quantity":5},{"productId":"product-example-2","quantity":3}]}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"inventoryReceiptId":{"type":"string"},"itemCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["inventoryReceiptId","itemCount"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"inventoryReceiptId":"inventory-receipt-example","itemCount":2}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/employees":{"get":{"operationId":"listEmployees","tags":["Employees"],"summary":"List employees","description":"Lists payroll employees with the documented search and pagination controls while preserving organization scope.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"name":{"type":"string"},"postalCode":{"type":"string"},"taxSystem":{"type":"string"},"employeeNumber":{"type":"string"},"curp":{"type":"string"},"socialSecurityNumber":{"type":"string"},"jobTitle":{"type":"string"},"department":{"type":"string"},"paymentFrequency":{"type":"string"},"employmentStartDate":{"type":"string"},"contractType":{"type":"string"},"workScheduleType":{"type":"string"},"regimeType":{"type":"string"},"rfc":{"type":"string"},"lastPayrollDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["employeeId","name","rfc"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"employeeId":"employee-example","name":"Persona Ejemplo","curp":"EJEA010101HSLXXX01","rfc":"EJE010101AAA","lastPayrollDate":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `employees:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createEmployee","tags":["Employees"],"summary":"Create employee","description":"Creates an employee record with its identity, employment terms, payroll configuration, and optional address.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"rfc":{"type":"string"},"curp":{"type":"string"},"postalCode":{"type":"string"},"employeeNumber":{"type":"string"},"employmentStartDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"socialSecurityNumber":{"type":"string"},"contractType":{"description":"Active SAT payroll contract-type code.","x-exac-sat-catalog":"payroll-contract-types","oneOf":[{"type":"string","title":"SAT c_TipoContrato","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-contract-types).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"regimeType":{"description":"Active SAT payroll regime-type code.","x-exac-sat-catalog":"payroll-regime-types","oneOf":[{"type":"string","title":"SAT c_TipoRegimen","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-regime-types).","enum":["10","11","12","13","99","02","03","04","05","06","07","08","09"]}]},"paymentFrequency":{"description":"Active SAT payroll payment-frequency code.","x-exac-sat-catalog":"payroll-payment-frequencies","oneOf":[{"type":"string","title":"SAT c_PeriodicidadPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-payment-frequencies).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"jobTitle":{"type":"string"},"department":{"type":"string"},"workScheduleType":{"description":"Active SAT payroll work-schedule code.","x-exac-sat-catalog":"payroll-work-schedule-types","oneOf":[{"type":"string","title":"SAT c_TipoJornada","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-work-schedule-types).","enum":["99","01","02","03","04","05","06","07","08"]}]},"positionRisk":{"type":"string","enum":["1","2","3","4","5","99"],"description":"Active SAT payroll position-risk code.","x-exac-sat-catalog":"payroll-position-risks"},"federalEntityCode":{"description":"Active SAT federal-entity code.","x-exac-sat-catalog":"federal-entities","oneOf":[{"type":"string","title":"SAT c_Estado","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#federal-entities).","enum":["AGU","BCN","BCS","CAM","CHP","CHH","COA","COL","CMX","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]}]},"recurringEarnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Active SAT payroll earning-type code.","x-exac-sat-catalog":"payroll-earning-types","oneOf":[{"type":"string","title":"SAT c_TipoPercepcion","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-earning-types).","enum":["001","002","003","004","005","006","009","010","011","012","013","014","015","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","044","045","046","047","048","049","050","051","052","053"]}]},"taxableAmount":{"type":"number"},"exemptAmount":{"type":"number"}},"required":["code","taxableAmount","exemptAmount"],"additionalProperties":false}},"recurringDeductions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"SAT payroll deduction-type code."},"amount":{"type":"number"}},"required":["code","amount"],"additionalProperties":false}},"recurringOtherPayments":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Active SAT payroll other-payment code.","x-exac-sat-catalog":"payroll-other-payment-types","oneOf":[{"type":"string","title":"SAT c_TipoOtroPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-other-payment-types).","enum":["999","001","002","003","004","005","006","007","008","009"]}]},"amount":{"type":"number"},"employmentSubsidy":{"type":"number"}},"required":["code","amount"],"additionalProperties":false}}},"required":["name","rfc","curp","postalCode","employeeNumber","employmentStartDate"],"additionalProperties":false},"example":{"name":"Persona Ejemplo","rfc":"EJE010101AAA","curp":"EJEA010101HSLXXX01","postalCode":"82110","employeeNumber":"EMP-001","employmentStartDate":"2026-01-01"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"name":{"type":"string"},"postalCode":{"type":"string"},"taxSystem":{"type":"string"},"employeeNumber":{"type":"string"},"curp":{"type":"string"},"socialSecurityNumber":{"type":"string"},"jobTitle":{"type":"string"},"department":{"type":"string"},"paymentFrequency":{"type":"string"},"employmentStartDate":{"type":"string"},"contractType":{"type":"string"},"workScheduleType":{"type":"string"},"regimeType":{"type":"string"},"rfc":{"type":"string"},"lastPayrollDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["employeeId","name","rfc"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"employeeId":"employee-example","name":"Persona Ejemplo","curp":"EJEA010101HSLXXX01","rfc":"EJE010101AAA","lastPayrollDate":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `employees:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/employees/{employeeId}":{"get":{"operationId":"getEmployee","tags":["Employees"],"summary":"Get employee","description":"Returns one organization-owned payroll employee and the profile fields required by neighboring payroll operations.","security":[{"bearerAuth":[]}],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"name":{"type":"string"},"postalCode":{"type":"string"},"taxSystem":{"type":"string"},"employeeNumber":{"type":"string"},"curp":{"type":"string"},"socialSecurityNumber":{"type":"string"},"jobTitle":{"type":"string"},"department":{"type":"string"},"paymentFrequency":{"type":"string"},"employmentStartDate":{"type":"string"},"contractType":{"type":"string"},"workScheduleType":{"type":"string"},"regimeType":{"type":"string"},"rfc":{"type":"string"},"lastPayrollDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["employeeId","name","rfc"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"employeeId":"employee-example","name":"Persona Ejemplo","curp":"EJEA010101HSLXXX01","rfc":"EJE010101AAA","lastPayrollDate":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `employees:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateEmployee","tags":["Employees"],"summary":"Update employee","description":"Replaces the editable identity, employment, payroll, and address data of one employee.","security":[{"bearerAuth":[]}],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"curp":{"type":"string"},"postalCode":{"type":"string"},"employeeNumber":{"type":"string"},"employmentStartDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"socialSecurityNumber":{"type":"string"},"contractType":{"description":"Active SAT payroll contract-type code.","x-exac-sat-catalog":"payroll-contract-types","oneOf":[{"type":"string","title":"SAT c_TipoContrato","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-contract-types).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"regimeType":{"description":"Active SAT payroll regime-type code.","x-exac-sat-catalog":"payroll-regime-types","oneOf":[{"type":"string","title":"SAT c_TipoRegimen","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-regime-types).","enum":["10","11","12","13","99","02","03","04","05","06","07","08","09"]}]},"paymentFrequency":{"description":"Active SAT payroll payment-frequency code.","x-exac-sat-catalog":"payroll-payment-frequencies","oneOf":[{"type":"string","title":"SAT c_PeriodicidadPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-payment-frequencies).","enum":["10","99","01","02","03","04","05","06","07","08","09"]}]},"jobTitle":{"type":"string"},"department":{"type":"string"},"workScheduleType":{"description":"Active SAT payroll work-schedule code.","x-exac-sat-catalog":"payroll-work-schedule-types","oneOf":[{"type":"string","title":"SAT c_TipoJornada","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-work-schedule-types).","enum":["99","01","02","03","04","05","06","07","08"]}]},"positionRisk":{"type":"string","enum":["1","2","3","4","5","99"],"description":"Active SAT payroll position-risk code.","x-exac-sat-catalog":"payroll-position-risks"},"federalEntityCode":{"description":"Active SAT federal-entity code.","x-exac-sat-catalog":"federal-entities","oneOf":[{"type":"string","title":"SAT c_Estado","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#federal-entities).","enum":["AGU","BCN","BCS","CAM","CHP","CHH","COA","COL","CMX","DUR","GUA","GRO","HID","JAL","MEX","MIC","MOR","NAY","NLE","OAX","PUE","QUE","ROO","SLP","SIN","SON","TAB","TAM","TLA","VER","YUC","ZAC"]}]},"recurringEarnings":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Active SAT payroll earning-type code.","x-exac-sat-catalog":"payroll-earning-types","oneOf":[{"type":"string","title":"SAT c_TipoPercepcion","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-earning-types).","enum":["001","002","003","004","005","006","009","010","011","012","013","014","015","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","044","045","046","047","048","049","050","051","052","053"]}]},"taxableAmount":{"type":"number"},"exemptAmount":{"type":"number"}},"required":["code","taxableAmount","exemptAmount"],"additionalProperties":false}},"recurringDeductions":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"SAT payroll deduction-type code."},"amount":{"type":"number"}},"required":["code","amount"],"additionalProperties":false}},"recurringOtherPayments":{"type":"array","items":{"type":"object","properties":{"code":{"description":"Active SAT payroll other-payment code.","x-exac-sat-catalog":"payroll-other-payment-types","oneOf":[{"type":"string","title":"SAT c_TipoOtroPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/payroll#payroll-other-payment-types).","enum":["999","001","002","003","004","005","006","007","008","009"]}]},"amount":{"type":"number"},"employmentSubsidy":{"type":"number"}},"required":["code","amount"],"additionalProperties":false}}},"additionalProperties":false},"example":{"jobTitle":"Engineering Manager"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"employeeId":{"type":"string","minLength":1},"name":{"type":"string"},"postalCode":{"type":"string"},"taxSystem":{"type":"string"},"employeeNumber":{"type":"string"},"curp":{"type":"string"},"socialSecurityNumber":{"type":"string"},"jobTitle":{"type":"string"},"department":{"type":"string"},"paymentFrequency":{"type":"string"},"employmentStartDate":{"type":"string"},"contractType":{"type":"string"},"workScheduleType":{"type":"string"},"regimeType":{"type":"string"},"rfc":{"type":"string"},"lastPayrollDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["employeeId","name","rfc"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"employeeId":"employee-example","name":"Persona Ejemplo","curp":"EJEA010101HSLXXX01","rfc":"EJE010101AAA","lastPayrollDate":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `employees:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteEmployee","tags":["Employees"],"summary":"Delete employee","description":"Deletes one employee after the owning domain verifies its organization and dependent payroll records.","security":[{"bearerAuth":[]}],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"employeeId":{"type":"string","minLength":1}},"required":["removed","employeeId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"employeeId":"employee-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `employees:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/locations":{"get":{"operationId":"listLocations","tags":["Locations"],"summary":"List locations","description":"Lists receipt locations visible to the caller, including each location’s stable identifier and display name.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"locationId":{"type":"string","minLength":1},"name":{"type":"string"},"folioPrefix":{"type":"string"},"timeZone":{"type":"string"},"address":{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},"pin":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},"radiusMeters":{"type":"number","minimum":0},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["locationId","name","updatedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"locationId":"location-example","name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City","updatedAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptOptions:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createLocation","tags":["Locations"],"summary":"Create location","description":"Creates a receipt location. Use an IANA time-zone identifier so business dates and calendar behavior remain unambiguous.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"folioPrefix":{"type":"string"},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"pin":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"example":{"name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locationId":{"type":"string","minLength":1},"name":{"type":"string"},"folioPrefix":{"type":"string"},"timeZone":{"type":"string"},"address":{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},"pin":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},"radiusMeters":{"type":"number","minimum":0},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["locationId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"locationId":"location-example","name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptLocations:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/locations/{locationId}":{"get":{"operationId":"getLocation","tags":["Locations"],"summary":"Get location","description":"Returns one receipt location, including its folio prefix and IANA time zone when configured.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locationId":{"type":"string","minLength":1},"name":{"type":"string"},"folioPrefix":{"type":"string"},"timeZone":{"type":"string"},"address":{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},"pin":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},"radiusMeters":{"type":"number","minimum":0},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["locationId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"locationId":"location-example","name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptOptions:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateLocation","tags":["Locations"],"summary":"Update location","description":"Replaces the editable name, folio prefix, and time-zone configuration of one receipt location.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"folioPrefix":{"type":"string"},"timeZone":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},{"type":"null"}]},"pin":{"anyOf":[{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},{"type":"null"}]},"radiusMeters":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]}},"required":["name"],"additionalProperties":false},"example":{"name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"locationId":{"type":"string","minLength":1},"name":{"type":"string"},"folioPrefix":{"type":"string"},"timeZone":{"type":"string"},"address":{"type":"object","properties":{"formattedAddress":{"type":"string"},"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string"},"placeId":{"type":"string"}},"additionalProperties":false},"pin":{"type":"object","properties":{"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180}},"required":["latitude","longitude"],"additionalProperties":false},"radiusMeters":{"type":"number","minimum":0},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["locationId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"locationId":"location-example","name":"Sucursal Centro","folioPrefix":"CTR","timeZone":"America/Mexico_City","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptLocations:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteLocation","tags":["Locations"],"summary":"Delete location","description":"Removes one receipt location after the owning domain checks organization ownership and dependent records.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"locationId":{"type":"string","minLength":1}},"required":["removed","locationId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"locationId":"location-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptLocations:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/expense-categories":{"get":{"operationId":"listExpenseCategories","tags":["Settings"],"summary":"List expense categories","description":"Lists organization expense categories with cursor pagination and optional name search.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"categoryId":{"type":"string","minLength":1},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["categoryId","name","updatedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"categoryId":"category-example","name":"Servicios profesionales","updatedAt":"2026-07-27T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createExpenseCategory","tags":["Settings"],"summary":"Create expense category","description":"Creates an organization expense category for classifying operational expenses.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false},"example":{"name":"Servicios profesionales"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"categoryId":{"type":"string","minLength":1},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["categoryId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"categoryId":"category-example","name":"Servicios profesionales","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/expense-categories/{categoryId}":{"get":{"operationId":"getExpenseCategory","tags":["Settings"],"summary":"Get expense category","description":"Returns one organization expense category by its stable identifier.","security":[{"bearerAuth":[]}],"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"categoryId":{"type":"string","minLength":1},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["categoryId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"categoryId":"category-example","name":"Servicios profesionales","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateExpenseCategory","tags":["Settings"],"summary":"Update expense category","description":"Renames one expense category without changing its stable identifier or existing expense assignments.","security":[{"bearerAuth":[]}],"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false},"example":{"name":"Servicios profesionales"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"categoryId":{"type":"string","minLength":1},"name":{"type":"string"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["categoryId","name","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"categoryId":"category-example","name":"Servicios profesionales","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteExpenseCategory","tags":["Settings"],"summary":"Delete expense category","description":"Removes one expense category after the owning domain checks whether it can be deleted safely.","security":[{"bearerAuth":[]}],"parameters":[{"name":"categoryId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"categoryId":{"type":"string","minLength":1}},"required":["removed","categoryId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"categoryId":"category-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/receipt-fields":{"get":{"operationId":"listSalesReceiptFields","tags":["Settings"],"summary":"List sales receipt fields","description":"Lists custom receipt fields in display order, including every configured select value.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"name":{"type":"string"},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"order":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["fieldId","name","type","required","order","values"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"fieldId":"field-example","name":"Mesa","type":"select","required":true,"order":0,"values":["Interior","Terraza"]}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptOptions:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createSalesReceiptField","tags":["Settings"],"summary":"Create sales receipt field","description":"Creates a select or checkbox receipt field. Select values are valid only for fields whose type is select.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"values":{"type":"array","items":{"type":"string","minLength":1}}},"required":["name","type","required"],"additionalProperties":false},"example":{"name":"Mesa","type":"select","required":true,"values":["Interior","Terraza"]}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"name":{"type":"string"},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"order":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["fieldId","name","type","required","order","values"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fieldId":"field-example","name":"Mesa","type":"select","required":true,"order":0,"values":["Interior","Terraza"]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptFields:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/receipt-fields/{fieldId}":{"get":{"operationId":"getSalesReceiptField","tags":["Settings"],"summary":"Get sales receipt field","description":"Returns one configurable sales-receipt field and its current input rules.","security":[{"bearerAuth":[]}],"parameters":[{"name":"fieldId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"name":{"type":"string"},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"order":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["fieldId","name","type","required","order","values"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fieldId":"field-example","name":"Mesa","type":"select","required":true,"order":0,"values":["Interior","Terraza"]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptOptions:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"patch":{"operationId":"updateSalesReceiptField","tags":["Settings"],"summary":"Update sales receipt field","description":"Replaces one custom receipt field definition and its select values.","security":[{"bearerAuth":[]}],"parameters":[{"name":"fieldId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"values":{"type":"array","items":{"type":"string","minLength":1}}},"required":["name","type","required"],"additionalProperties":false},"example":{"name":"Mesa","type":"select","required":true,"values":["Interior","Terraza"]}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fieldId":{"type":"string","minLength":1},"name":{"type":"string"},"type":{"type":"string","enum":["select","checkbox"]},"required":{"type":"boolean"},"order":{"type":"number"},"values":{"type":"array","items":{"type":"string"}}},"required":["fieldId","name","type","required","order","values"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fieldId":"field-example","name":"Mesa","type":"select","required":true,"order":0,"values":["Interior","Terraza"]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptFields:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteSalesReceiptField","tags":["Settings"],"summary":"Delete sales receipt field","description":"Deletes one custom receipt field and its configured options after the owning domain validates the change.","security":[{"bearerAuth":[]}],"parameters":[{"name":"fieldId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"fieldId":{"type":"string","minLength":1}},"required":["removed","fieldId"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"fieldId":"field-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptFields:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/fiscal-series":{"get":{"operationId":"getFiscalSeries","tags":["Settings"],"summary":"Get fiscal series","description":"Returns one fiscal series with its development and production folio counters.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["preparing","ready","attention_required"]},"initializedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastVerifiedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"series":{"type":"array","items":{"type":"object","properties":{"seriesId":{"type":"string","minLength":1},"code":{"type":"string"},"nextFolioProduction":{"type":"integer","minimum":1,"maximum":9007199254740991},"nextFolioDevelopment":{"type":"integer","minimum":1,"maximum":9007199254740991},"status":{"type":"string","enum":["active","inactive"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["seriesId","code","nextFolioProduction","nextFolioDevelopment","status","updatedAt"],"additionalProperties":false}}},"required":["status","series"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"status":"ready","initializedAt":"2026-07-27T12:00:00.000Z","lastVerifiedAt":"2026-07-27T12:00:00.000Z","series":[{"seriesId":"series-example","code":"A","nextFolioProduction":125,"nextFolioDevelopment":18,"status":"active","updatedAt":"2026-07-27T12:00:00.000Z"}]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `settings:update` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/settings/fiscal-series/{seriesId}":{"patch":{"operationId":"updateFiscalSeries","tags":["Settings"],"summary":"Update fiscal series","description":"Replaces the editable prefix, next folio, and document configuration of one fiscal series.","security":[{"bearerAuth":[]}],"parameters":[{"name":"seriesId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":25,"pattern":"^[A-Za-z0-9]+$"},"nextFolioProduction":{"type":"integer","minimum":1,"maximum":9007199254740991},"nextFolioDevelopment":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["code","nextFolioProduction","nextFolioDevelopment"],"additionalProperties":false},"example":{"code":"A","nextFolioProduction":126,"nextFolioDevelopment":19}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"seriesId":{"type":"string","minLength":1},"code":{"type":"string"},"nextFolioProduction":{"type":"integer","minimum":1,"maximum":9007199254740991},"nextFolioDevelopment":{"type":"integer","minimum":1,"maximum":9007199254740991},"status":{"type":"string","enum":["active","inactive"]},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["seriesId","code","nextFolioProduction","nextFolioDevelopment","status","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"seriesId":"series-example","code":"A","nextFolioProduction":125,"nextFolioDevelopment":18,"status":"active","updatedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `settings:update` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/pricing/customers/{customerId}":{"get":{"operationId":"listCustomerPrices","tags":["Pricing"],"summary":"List customer prices","description":"Lists product price overrides for one customer. The response includes the default price, effective override, and receipt/invoice tax modes for each product.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"description":{"type":"string"},"defaultPrice":{"type":"number"},"overridePrice":{"type":"number"},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string"},"taxRate":{"type":"number"}},"required":["productId","description","defaultPrice","overridePrice","taxIncluded"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"productId":"product-example","description":"Consultoría mensual","defaultPrice":2500,"overridePrice":2250,"taxIncluded":false,"taxability":"standard","taxRate":0.16}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `customers:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/pricing/customers/{customerId}/products/{productId}":{"put":{"operationId":"setCustomerPrice","tags":["Pricing"],"summary":"Set customer price","description":"Creates or replaces one customer-specific product price. Use DELETE on the same resource to return to the product default.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"number","minimum":0}},"required":["price"],"additionalProperties":false},"example":{"price":2250}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scope":{"type":"string","const":"customer"},"customerId":{"type":"string"},"productId":{"type":"string","minLength":1},"overridePrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"removed":{"type":"boolean"}},"required":["scope","customerId","productId","overridePrice","removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"scope":"customer","customerId":"customer-example","productId":"product-example","overridePrice":2250,"removed":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptPrices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteCustomerPrice","tags":["Pricing"],"summary":"Delete customer price","description":"Removes one customer-specific product price so future sales use the product default.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scope":{"type":"string","const":"customer"},"customerId":{"type":"string"},"productId":{"type":"string","minLength":1},"overridePrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"removed":{"type":"boolean"}},"required":["scope","customerId","productId","overridePrice","removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"scope":"customer","customerId":"customer-example","productId":"product-example","overridePrice":null,"removed":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptPrices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/pricing/locations/{locationId}":{"get":{"operationId":"listLocationPrices","tags":["Pricing"],"summary":"List location prices","description":"Lists product price overrides for one location, together with each product default price.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"productId":{"type":"string","minLength":1},"description":{"type":"string"},"defaultPrice":{"type":"number"},"overridePrice":{"type":"number"},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string"},"taxRate":{"type":"number"}},"required":["productId","description","defaultPrice","overridePrice","taxIncluded"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"productId":"product-example","description":"Consultoría mensual","defaultPrice":2500,"overridePrice":2350,"taxIncluded":false,"taxability":"standard","taxRate":0.16}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `products:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/pricing/locations/{locationId}/products/{productId}":{"put":{"operationId":"setLocationPrice","tags":["Pricing"],"summary":"Set location price","description":"Creates or replaces one location-specific product price. Use DELETE on the same resource to return to the product default.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"number","minimum":0}},"required":["price"],"additionalProperties":false},"example":{"price":2350}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scope":{"type":"string","const":"location"},"locationId":{"type":"string"},"productId":{"type":"string","minLength":1},"overridePrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"removed":{"type":"boolean"}},"required":["scope","locationId","productId","overridePrice","removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"scope":"location","locationId":"location-example","productId":"product-example","overridePrice":2350,"removed":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptPrices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteLocationPrice","tags":["Pricing"],"summary":"Delete location price","description":"Removes one location-specific product price so future sales use the product default.","security":[{"bearerAuth":[]}],"parameters":[{"name":"locationId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"productId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"scope":{"type":"string","const":"location"},"locationId":{"type":"string"},"productId":{"type":"string","minLength":1},"overridePrice":{"anyOf":[{"type":"number"},{"type":"null"}]},"removed":{"type":"boolean"}},"required":["scope","locationId","productId","overridePrice","removed"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"scope":"location","locationId":"location-example","productId":"product-example","overridePrice":null,"removed":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receiptPrices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/imports":{"get":{"operationId":"listImports","tags":["Imports"],"summary":"List imports","description":"Lists import runs for the active organization, optionally filtered by entity, so headless clients can monitor preparation, validation, execution, and failure states.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"entity","in":"query","required":false,"schema":{"type":"string","enum":["products","customers","suppliers"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"importRef":{"type":"string","pattern":"^import:","description":"Opaque importRef returned by the imports API"},"entity":{"type":"string","enum":["products","customers","suppliers"]},"fileName":{"type":"string"},"sourceFormat":{"type":"string","enum":["xml","csv","excel","html","database","unknown"]},"sourceSoftware":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed"]},"pricesIncludeIva":{"type":"boolean"},"progress":{"type":"object","properties":{"totalRows":{"type":"number"},"validRows":{"type":"number"},"skippedRows":{"type":"number"},"processedRows":{"type":"number"},"createdRows":{"type":"number"},"updatedRows":{"type":"number"},"fiscalLinkedRows":{"type":"number"},"linkedRows":{"type":"number"}},"required":["totalRows","validRows","skippedRows","processedRows","createdRows","updatedRows","fiscalLinkedRows","linkedRows"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["importRef","entity","sourceFormat","status","progress","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"importRef":"import:example","entity":"products","fileName":"products.xml","sourceFormat":"xml","status":"completed","progress":{"totalRows":10,"validRows":10,"skippedRows":0,"processedRows":10,"createdRows":8,"updatedRows":2,"fiscalLinkedRows":10,"linkedRows":0},"createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:01:00.000Z","completedAt":"2026-08-01T12:01:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/imports/{importRef}":{"get":{"operationId":"getImport","tags":["Imports"],"summary":"Get import","description":"Returns one import run with its current status, row counts, and validation or execution error when present.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"importRef","in":"path","required":true,"schema":{"type":"string","pattern":"^import:","description":"Opaque importRef returned by the imports API"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"importRef":{"type":"string","pattern":"^import:","description":"Opaque importRef returned by the imports API"},"entity":{"type":"string","enum":["products","customers","suppliers"]},"fileName":{"type":"string"},"sourceFormat":{"type":"string","enum":["xml","csv","excel","html","database","unknown"]},"sourceSoftware":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed"]},"pricesIncludeIva":{"type":"boolean"},"progress":{"type":"object","properties":{"totalRows":{"type":"number"},"validRows":{"type":"number"},"skippedRows":{"type":"number"},"processedRows":{"type":"number"},"createdRows":{"type":"number"},"updatedRows":{"type":"number"},"fiscalLinkedRows":{"type":"number"},"linkedRows":{"type":"number"}},"required":["totalRows","validRows","skippedRows","processedRows","createdRows","updatedRows","fiscalLinkedRows","linkedRows"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["importRef","entity","sourceFormat","status","progress","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"importRef":"import:example","entity":"products","fileName":"products.xml","sourceFormat":"xml","status":"completed","progress":{"totalRows":10,"validRows":10,"skippedRows":0,"processedRows":10,"createdRows":8,"updatedRows":2,"fiscalLinkedRows":10,"linkedRows":0},"createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:01:00.000Z","completedAt":"2026-08-01T12:01:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/imports/uploads":{"post":{"operationId":"prepareImportUpload","tags":["Imports"],"summary":"Prepare import upload","description":"Creates a server-bound uploadRef and short-lived PUT instructions. After uploading the file, use the same uploadRef to preview or commit it.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entity":{"type":"string","enum":["products","customers","suppliers"]},"fileName":{"type":"string","minLength":1,"maxLength":255,"pattern":"\\.(?:xml|json)$"}},"required":["entity","fileName"],"additionalProperties":false},"example":{"entity":"products","fileName":"products.xml"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uploadRef":{"type":"string","pattern":"^upload:","description":"Opaque uploadRef returned when an import upload is prepared"},"upload":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["url","method","headers","expiresAt"],"additionalProperties":false}},"required":["uploadRef","upload"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"uploadRef":"upload:example","upload":{"url":"https://uploads.example.com/import-file","method":"PUT","headers":{"Content-Type":"application/xml"},"expiresAt":"2026-08-01T12:15:00.000Z"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/imports/uploads/{uploadRef}/preview":{"post":{"operationId":"previewImport","tags":["Imports"],"summary":"Preview import","description":"Validates and previews the uploaded rows without changing catalog data. Returns mappings, row counts, missing fields, and representative skipped rows.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"uploadRef","in":"path","required":true,"schema":{"type":"string","pattern":"^upload:","description":"Opaque uploadRef returned when an import upload is prepared"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"fileRows":{"type":"number"},"sourceFormat":{"type":"string","enum":["xml","csv","excel","html","database","unknown"]},"sourceSoftware":{"type":"string"},"totalRows":{"type":"number"},"validRows":{"type":"number"},"skippedRows":{"type":"number"},"newRows":{"type":"number"},"updateRows":{"type":"number"},"sourceColumns":{"type":"array","items":{"type":"string"}},"fieldMappings":{"type":"array","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"label":{"type":"string"},"kind":{"type":"string","enum":["text","number","money","boolean"]},"required":{"type":"boolean"},"important":{"type":"boolean"},"sourceColumn":{"type":"string"},"status":{"type":"string","enum":["mapped","missing"]}},"required":["fieldKey","label","kind","required","important","status"],"additionalProperties":false}},"unmappedSourceColumns":{"type":"array","items":{"type":"string"}},"missingRequiredFields":{"type":"array","items":{"type":"string"}},"missingImportantFields":{"type":"array","items":{"type":"string"}},"sampleRows":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"skippedSamples":{"type":"array","items":{}},"duplicateSamples":{"type":"array","items":{}},"duplicateCodeRows":{"type":"number"},"duplicateDescriptionRows":{"type":"number"},"duplicateSourceKeyRows":{"type":"number"},"duplicateCodeSamples":{"type":"array","items":{}},"duplicateSourceKeySamples":{"type":"array","items":{}},"hasPrices":{"type":"boolean"},"hasStock":{"type":"boolean"},"fiscalReadyRows":{"type":"number"}},"required":["fileRows","sourceFormat","totalRows","validRows","skippedRows","newRows","updateRows","sourceColumns","fieldMappings","unmappedSourceColumns","missingRequiredFields","missingImportantFields","sampleRows","skippedSamples"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"fileRows":10,"sourceFormat":"xml","totalRows":10,"validRows":10,"skippedRows":0,"newRows":8,"updateRows":2,"sourceColumns":["description","price"],"fieldMappings":[],"unmappedSourceColumns":[],"missingRequiredFields":[],"missingImportantFields":[],"sampleRows":[],"skippedSamples":[]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/imports/uploads/{uploadRef}/commit":{"post":{"operationId":"commitImport","tags":["Imports"],"summary":"Commit import","description":"Starts the catalog import after preview. Product files with prices must declare pricesIncludeIva; stock imports may require inventoryLocationId. Reuse the same Idempotency-Key only for the identical request.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"uploadRef","in":"path","required":true,"schema":{"type":"string","pattern":"^upload:","description":"Opaque uploadRef returned when an import upload is prepared"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"importStock":{"description":"For product imports, also import stock quantities when true","type":"boolean"},"inventoryLocationId":{"description":"Destination location for imported stock; required when stock is imported and the organization has zero or multiple locations","type":"string","minLength":1},"pricesIncludeIva":{"description":"For product files containing prices, true when source prices already include IVA and false when IVA must be added","type":"boolean"}},"additionalProperties":false},"example":{"importStock":false}}}},"responses":{"202":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"importRef":{"type":"string","pattern":"^import:","description":"Opaque importRef returned by the imports API"},"entity":{"type":"string","enum":["products","customers","suppliers"]},"fileName":{"type":"string"},"sourceFormat":{"type":"string","enum":["xml","csv","excel","html","database","unknown"]},"sourceSoftware":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","failed"]},"pricesIncludeIva":{"type":"boolean"},"progress":{"type":"object","properties":{"totalRows":{"type":"number"},"validRows":{"type":"number"},"skippedRows":{"type":"number"},"processedRows":{"type":"number"},"createdRows":{"type":"number"},"updatedRows":{"type":"number"},"fiscalLinkedRows":{"type":"number"},"linkedRows":{"type":"number"}},"required":["totalRows","validRows","skippedRows","processedRows","createdRows","updatedRows","fiscalLinkedRows","linkedRows"],"additionalProperties":false},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["importRef","entity","sourceFormat","status","progress","createdAt","updatedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"importRef":"import:example","entity":"products","fileName":"products.xml","sourceFormat":"xml","status":"completed","progress":{"totalRows":10,"validRows":10,"skippedRows":0,"processedRows":10,"createdRows":8,"updatedRows":2,"fiscalLinkedRows":10,"linkedRows":0},"createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:01:00.000Z","completedAt":"2026-08-01T12:01:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/imports/uploads/{uploadRef}":{"delete":{"operationId":"deleteImportUpload","tags":["Imports"],"summary":"Discard import upload","description":"Discards an import upload that has not been committed and removes its temporary file.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"uploadRef","in":"path","required":true,"schema":{"type":"string","pattern":"^upload:","description":"Opaque uploadRef returned when an import upload is prepared"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"uploadRef":{"type":"string","pattern":"^upload:","description":"Opaque uploadRef returned when an import upload is prepared"},"entity":{"type":"string","enum":["products","customers","suppliers"]},"fileName":{"type":"string"},"status":{"type":"string","enum":["prepared","uploaded","committing","committed","deleted","failed"]}},"required":["uploadRef","entity","fileName","status"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"uploadRef":"upload:example","entity":"products","fileName":"products.xml","status":"deleted"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `imports:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/quotes":{"get":{"operationId":"listQuotes","tags":["Quotes"],"summary":"List quotes","description":"Lists quotes with the documented status, search, and pagination filters for the active organization.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Quote"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"draft","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-03","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createQuote","tags":["Quotes"],"summary":"Create quote","description":"Creates a draft quote from customer, line-item, pricing, settlement, and optional invoicing data.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"customerName":{"type":"string","minLength":1,"description":"Recipient name when no stored customer is selected."},"customerEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"locationId":{"type":"string","minLength":1},"validUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"items":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"product"},"productId":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"discount":{"type":"number","minimum":0}},"required":["kind","productId","quantity"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","exclusiveMinimum":0},"discount":{"type":"number","minimum":0},"satProductCode":{"type":"string","minLength":1},"satUnitCode":{"type":"string","minLength":1},"unitName":{"type":"string","minLength":1},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxRate":{"type":"number","minimum":0,"maximum":1}},"required":["kind","description","quantity","unitPrice","satProductCode"],"additionalProperties":false}]}},"notes":{"type":"string"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false}},"required":["validUntil","items"],"additionalProperties":false},"example":{"customerId":"customer-example","validUntil":"2026-08-03","items":[{"kind":"custom","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"satProductCode":"80101500","satUnitCode":"E48","taxIncluded":false,"taxability":"standard","taxRate":0.16}]}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"],"additionalProperties":false},"example":{"data":{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"draft","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-03","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/quotes/{documentRef}":{"get":{"operationId":"getQuote","tags":["Quotes"],"summary":"Get quote","description":"Returns one organization-owned quote with its current lifecycle, customer, line, and payment information.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"],"additionalProperties":false},"example":{"data":{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"draft","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-03","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"put":{"operationId":"updateQuote","tags":["Quotes"],"summary":"Update quote","description":"Fully replaces the editable customer, line-item, pricing, settlement, and invoicing data of a draft quote.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"customerName":{"type":"string","minLength":1,"description":"Recipient name when no stored customer is selected."},"customerEmail":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"locationId":{"type":"string","minLength":1},"validUntil":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"items":{"minItems":1,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"product"},"productId":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"discount":{"type":"number","minimum":0}},"required":["kind","productId","quantity"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","exclusiveMinimum":0},"discount":{"type":"number","minimum":0},"satProductCode":{"type":"string","minLength":1},"satUnitCode":{"type":"string","minLength":1},"unitName":{"type":"string","minLength":1},"taxIncluded":{"type":"boolean"},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxRate":{"type":"number","minimum":0,"maximum":1}},"required":["kind","description","quantity","unitPrice","satProductCode"],"additionalProperties":false}]}},"notes":{"type":"string"},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false}},"required":["validUntil","items"],"additionalProperties":false},"example":{"customerId":"customer-example","validUntil":"2026-08-10","items":[{"kind":"custom","description":"Consultoría mensual actualizada","quantity":1,"unitPrice":3000,"satProductCode":"80101500","satUnitCode":"E48","taxIncluded":false,"taxability":"standard","taxRate":0.16}]}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"],"additionalProperties":false},"example":{"data":{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"draft","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-10","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-02T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteQuote","tags":["Quotes"],"summary":"Delete quote","description":"Deletes a draft quote after the owning domain verifies that its current state still permits deletion.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"documentRef":{"type":"string","pattern":"^quote:.+$"}},"required":["removed","documentRef"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"documentRef":"quote:quote-example"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/quotes/{documentRef}/publish":{"post":{"operationId":"publishQuote","tags":["Quotes"],"summary":"Publish quote link","description":"Freezes a draft quote and returns its canonical customer portal link without requiring or sending email.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"portalUrl":{"type":"string","format":"uri"},"quote":{"$ref":"#/components/schemas/Quote"}},"required":["portalUrl","quote"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"portalUrl":"https://app.example.com/cotizacion/public-key","quote":{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"sent","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-03","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:00:00.000Z"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/quotes/{documentRef}/cancel":{"post":{"operationId":"cancelQuote","tags":["Quotes"],"summary":"Cancel quote","description":"Cancels a draft or sent quote. Accepted and converted quotes must be reconciled through their receipt or invoice.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Quote"}},"required":["data"],"additionalProperties":false},"example":{"data":{"folioNumber":42,"currency":"MXN","customerId":"customer-example","customerName":"Estudio Jacaranda","customerEmail":"administracion@jacaranda.example","documentRef":"quote:quote-example","category":"quote","status":"canceled","items":[{"lineRef":"quote-line-1","description":"Consultoría mensual","quantity":1,"unitPrice":2500,"taxIncluded":false,"taxability":"standard","taxRate":0.16,"satProductCode":"80101500","satUnitCode":"E48"}],"totals":{"subtotal":2500,"taxes":400,"total":2900,"taxBreakdown":[{"type":"IVA","factor":"Tasa","rate":0.16,"withholding":false,"base":2500,"amount":400,"label":"IVA 16%"}]},"issueDate":"2026-07-19","validUntil":"2026-08-03","createdAt":"2026-08-01T12:00:00.000Z","updatedAt":"2026-08-01T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/quotes/{documentRef}/payments":{"post":{"operationId":"recordQuotePayment","tags":["Quotes"],"summary":"Record quote payment","description":"Records the server-derived accepted total as a manual payment, or supplies the SAT payment form for an already confirmed online payment. It then asynchronously creates the receipt and requested invoice.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^quote:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentForm":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"paidAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"notes":{"type":"string"}},"required":["paymentForm"],"additionalProperties":false},"example":{"paymentForm":"03","notes":"Transferencia confirmada"}}}},"responses":{"202":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"paymentId":{"type":"string"},"source":{"type":"string","enum":["manual","online"]},"amount":{"type":"number"},"currency":{"type":"string","const":"MXN"},"paymentForm":{"type":"string"},"applicationStatus":{"type":"string","enum":["pending","processing","applied","failed","conflict"]},"applicationErrorCode":{"type":"string","enum":["payment_form_required","fiscal_drift","location_resolution_required","duplicate_payment","application_failed"]},"invoiceStatus":{"type":"string","enum":["pending","processing","issued","failed"]},"salesReceiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"cfdiDocumentRef":{"type":"string","pattern":"^cfdi:.+$"},"paidAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["paymentId","source","amount","currency","applicationStatus","paidAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"paymentId":"quote-payment-example","source":"manual","amount":2900,"currency":"MXN","paymentForm":"03","applicationStatus":"pending","paidAt":"2026-08-01T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `quotes:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/cfdis":{"get":{"operationId":"listCfdis","tags":["CFDI"],"summary":"List CFDIs","description":"Lists CFDIs using the documented fiscal, lifecycle, date, and pagination filters without mixing other document families.","security":[{"bearerAuth":[]}],"parameters":[{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["issued","received"],"description":"Filter by whether Exac issued or received the CFDI."}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","valid","canceled"],"description":"Filter by the current fiscal-document status."}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Include documents issued on or after this date."}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Include documents issued on or before this date."}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Search by counterparty, UUID, or amount. Cannot be combined with dateFrom, dateTo, or outstanding."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque cursor returned by the previous page. Pass it back unchanged."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"description":"Number of CFDI documents to return, from 1 to 50."}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["income","credit_note","transfer","payroll","payment_complement"],"description":"Filter by the public CFDI kind: income, credit_note, transfer, payroll, or payment_complement."}},{"name":"paymentTiming","in":"query","required":false,"schema":{"type":"string","enum":["single_payment","deferred_or_installments"],"description":"Filter by immediate or deferred payment timing."}},{"name":"outstanding","in":"query","required":false,"schema":{"type":"string","const":"true","description":"When true, return only CFDIs with an open balance."}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CfdiSummary"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"examples":{"default":{"value":{"data":[{"direction":"issued","status":"draft","archived":false,"counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","kind":"income","cfdiType":"I","payment":{"timing":"deferred_or_installments","conditions":"Crédito a 30 días"}}],"pagination":{"nextCursor":null,"hasMore":false}}},"mayFullMonth":{"summary":"Issued income CFDIs, May (complete page)","value":{"data":[{"direction":"issued","status":"valid","archived":false,"uuid":"00000000-0000-4000-8000-000000000002","counterpartyName":"Taller Nopal","total":{"amount":58000,"currency":"MXN"},"documentRef":"cfdi:nopal-may","category":"cfdi","issuedLocalDateTime":"2026-05-10T10:00:00","kind":"income","cfdiType":"I","payment":{"timing":"single_payment"}},{"direction":"issued","status":"valid","archived":false,"uuid":"00000000-0000-4000-8000-000000000003","counterpartyName":"Estudio Jacaranda","total":{"amount":34800,"currency":"MXN"},"documentRef":"cfdi:jacaranda-may","category":"cfdi","issuedLocalDateTime":"2026-05-12T10:00:00","kind":"income","cfdiType":"I","payment":{"timing":"single_payment"}}],"pagination":{"nextCursor":null,"hasMore":false}}},"juneFullMonth":{"summary":"Issued income CFDIs, June (complete page)","value":{"data":[{"direction":"issued","status":"valid","archived":false,"uuid":"00000000-0000-4000-8000-000000000004","counterpartyName":"Taller Nopal","total":{"amount":9280,"currency":"MXN"},"documentRef":"cfdi:nopal-june","category":"cfdi","issuedLocalDateTime":"2026-06-10T10:00:00","kind":"income","cfdiType":"I","payment":{"timing":"single_payment"}}],"pagination":{"nextCursor":null,"hasMore":false}}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. One of these permissions is required: `invoices:read`, `employees:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createCfdiDraft","tags":["CFDI"],"summary":"Create CFDI draft","description":"Creates a CFDI draft and derives canonical line taxes. For each partial payment, increase installment, use the preceding remaining balance as previousBalance, and use taxes: \"auto\" when Exac knows the related CFDI; otherwise provide its taxObject and payment-level taxes.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CfdiDraftInput"},"example":{"customerId":"customer-example","items":[{"kind":"custom","description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48","taxRate":0.16,"taxability":"standard"}],"kind":"income","cfdiUse":"G03","payment":{"timing":"deferred_or_installments","formCode":"99","conditions":"Crédito a 30 días"}},"examples":{"incomeProduct":{"summary":"Income CFDI with a stored product","value":{"customerId":"customer-example","items":[{"kind":"product","productId":"product-example","quantity":1,"unitPrice":100}],"kind":"income","cfdiUse":"S01","payment":{"timing":"single_payment","formCode":"03"}}},"incomeCustom":{"summary":"Income CFDI with a custom line","value":{"customerId":"customer-example","items":[{"kind":"custom","description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48","taxRate":0.16,"taxability":"standard"}],"kind":"income","cfdiUse":"G03","payment":{"timing":"deferred_or_installments","formCode":"99","conditions":"Crédito a 30 días"}}},"creditNote":{"summary":"Credit-note CFDI","value":{"customerId":"customer-example","items":[{"kind":"product","productId":"product-example","quantity":1,"unitPrice":100}],"kind":"credit_note","formCode":"03","relatedDocuments":[{"relationship":"01","documents":["00000000-0000-4000-8000-000000000001"]}]}},"transfer":{"summary":"Transfer CFDI","value":{"customerId":"customer-example","items":[{"kind":"product","productId":"product-example","quantity":1,"unitPrice":100}],"kind":"transfer"}},"payroll":{"summary":"Payroll CFDI","value":{"kind":"payroll","employeeId":"employee-example","payroll":{"paidOn":"2026-07-15","periodStartedOn":"2026-07-01","periodEndedOn":"2026-07-15","paidDays":15,"employee":{"curp":"GODE561231HDFRRN09","employeeNumber":"E-100","employmentStartedOn":"2025-01-01","contractType":"01","regimeType":"02","paymentFrequency":"04","stateCode":"CMX"},"earnings":[{"type":"001","taxableAmount":1000,"exemptAmount":0}]}}},"paymentComplement":{"summary":"Payment complement · automatic taxes","value":{"kind":"payment_complement","customerId":"customer-example","payment":{"formCode":"03","paidLocalDateTime":"2026-07-15T12:00:00","documents":[{"uuid":"00000000-0000-4000-8000-000000000001","amount":11600,"installment":1,"previousBalance":11600,"taxes":"auto"}]}}},"paymentComplementExternal":{"summary":"Payment complement · external CFDI taxes","value":{"kind":"payment_complement","customerId":"customer-example","payment":{"formCode":"03","paidLocalDateTime":"2026-07-15T12:00:00","documents":[{"uuid":"00000000-0000-4000-8000-000000000002","amount":104.08,"installment":1,"previousBalance":104.08,"taxes":{"taxObject":"02","entries":[{"base":100,"type":"IVA","rate":0.16,"factor":"Tasa"},{"base":100,"type":"ISR","rate":0.0125,"factor":"Tasa","withholding":true},{"base":100,"type":"IVA","rate":0.106667,"factor":"Tasa","withholding":true}]}}]}}}}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"draft","archived":false,"counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/cfdis/{documentRef}":{"get":{"operationId":"getCfdi","tags":["CFDI"],"summary":"Get CFDI","description":"Returns one CFDI by public document reference, including its current fiscal and lifecycle state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"draft","archived":false,"counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. One of these permissions is required: `invoices:read`, `employees:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"put":{"operationId":"updateCfdiDraft","tags":["CFDI"],"summary":"Update CFDI draft","description":"Fully replaces a CFDI draft and re-runs the same canonical tax resolution used at creation.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CfdiDraftInput"},"example":{"customerId":"customer-example","items":[{"kind":"custom","description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48","taxRate":0.16,"taxability":"standard"}],"kind":"income","cfdiUse":"G03","payment":{"timing":"deferred_or_installments","formCode":"99","conditions":"Crédito a 30 días"}}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"draft","archived":false,"counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/withholdings":{"get":{"operationId":"listWithholdings","tags":["Withholding documents"],"summary":"List withholdings","description":"Lists withholding documents with the documented date, status, search, and pagination controls.","security":[{"bearerAuth":[]}],"parameters":[{"name":"direction","in":"query","required":false,"schema":{"type":"string","enum":["issued","received"],"description":"Filter by whether Exac issued or received the CFDI."}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","valid","canceled"],"description":"Filter by the current fiscal-document status."}},{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Include documents issued on or after this date."}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Include documents issued on or before this date."}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Search by counterparty, UUID, or amount. Cannot be combined with dateFrom, dateTo, or outstanding."}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"description":"Opaque cursor returned by the previous page. Pass it back unchanged."}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"description":"Number of CFDI documents to return, from 1 to 50."}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WithholdingDocument"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"direction":"issued","status":"valid","archived":false,"counterpartyName":"Cliente Ejemplo","total":{"amount":160,"currency":"MXN"},"documentRef":"withholding:withholding-example","category":"withholding","withholding":{"withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"totals":{"operation":1000,"retained":160},"taxes":[{"tax":"iva","amount":160}]},"detail":{"availability":"complete"}}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createWithholding","tags":["Withholding documents"],"summary":"Create withholding","description":"Creates and stamps a withholding document from its period, operation amount, and retained taxes.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"withholdingTypeCode":{"description":"Active SAT withholding-type code.","x-exac-sat-catalog":"withholding-types","oneOf":[{"type":"string","title":"SAT c_ClaveRetenc","description":"View active codes and official names [here](/docs/en/sat-catalogs/withholdings#withholding-types).","enum":["10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","01","02","03","04","05","06","07","08","09"]}]},"period":{"type":"object","properties":{"fromMonth":{"type":"integer","minimum":1,"maximum":12},"toMonth":{"type":"integer","minimum":1,"maximum":12},"year":{"type":"integer","minimum":2000,"maximum":2100}},"required":["fromMonth","toMonth","year"],"additionalProperties":false},"operationAmount":{"type":"number","exclusiveMinimum":0,"description":"Operation amount in pesos"},"exemptAmount":{"description":"Exempt amount in pesos; defaults to zero","type":"number","minimum":0},"taxes":{"minItems":1,"type":"array","items":{"type":"object","properties":{"tax":{"type":"string","enum":["isr","iva","ieps"]},"amount":{"type":"number","exclusiveMinimum":0,"description":"Amount retained in pesos"},"paymentType":{"type":"string","enum":["definitive","provisional"]}},"required":["tax","amount","paymentType"],"additionalProperties":false}},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"description":{"description":"Required when withholdingTypeCode is 25","type":"string","minLength":1},"internalFolio":{"type":"string","minLength":1},"pdfCustomSection":{"type":"string"}},"required":["customerId","withholdingTypeCode","period","operationAmount","taxes"],"additionalProperties":false},"example":{"customerId":"customer-example","withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"operationAmount":1000,"taxes":[{"tax":"iva","amount":160,"paymentType":"definitive"}]},"examples":{"withholding":{"summary":"Withholding document","value":{"customerId":"customer-example","withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"operationAmount":1000,"taxes":[{"tax":"iva","amount":160,"paymentType":"definitive"}]}}}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WithholdingDocument"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"valid","archived":false,"counterpartyName":"Cliente Ejemplo","total":{"amount":160,"currency":"MXN"},"documentRef":"withholding:withholding-example","category":"withholding","withholding":{"withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"totals":{"operation":1000,"retained":160},"taxes":[{"tax":"iva","amount":160}]},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/withholdings/{documentRef}":{"get":{"operationId":"getWithholding","tags":["Withholding documents"],"summary":"Get withholding","description":"Returns one withholding document by public document reference with its current fiscal state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^withholding:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WithholdingDocument"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"valid","archived":false,"counterpartyName":"Cliente Ejemplo","total":{"amount":160,"currency":"MXN"},"documentRef":"withholding:withholding-example","category":"withholding","withholding":{"withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"totals":{"operation":1000,"retained":160},"taxes":[{"tax":"iva","amount":160}]},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/sales-receipts":{"get":{"operationId":"listSalesReceipts","tags":["Sales receipts"],"summary":"List sales receipts","description":"Lists cashier/POS sales receipts with filters and cursor pagination, including their invoicing and cancellation state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","invoiced","global_invoiced","canceled"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SalesReceipt"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"category":"sales_receipt","folio":"R-1001","customerName":"Estudio Jacaranda","total":{"amount":1250,"currency":"MXN"},"invoiceRequested":false,"documentRef":"sales_receipt:receipt-example","status":"open","createdAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-01-31","saleType":"paid"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createSalesReceipt","tags":["Sales receipts"],"summary":"Create sales receipt","description":"Creates a sales receipt from line items and payment details. Set invoiceRequested: true when it may later become a CFDI so Exac snapshots its SAT identity and tax treatment.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"productId":{"type":"string"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"unitPrice":{"type":"number","minimum":0},"discount":{"type":"number"},"taxIncluded":{"type":"boolean"}},"required":["description","quantity","unitPrice"],"additionalProperties":false}},"saleType":{"type":"string","enum":["paid","credit","courtesy"]},"paymentForm":{"description":"Required SAT payment-form code for paid and credit sales. Credit sales must use 99 (Por definir).","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"customer":{"description":"Use stored for an existing customer or walk_in for a sale guest. Defaults to walk_in when omitted.","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"stored"},"customerId":{"type":"string","minLength":1}},"required":["kind","customerId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"walk_in"},"name":{"type":"string","minLength":1},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["kind"],"additionalProperties":false}]},"locationId":{"type":"string"},"pricesIncludeIva":{"type":"boolean"},"notes":{"type":"string"},"customFields":{"type":"array","items":{"type":"object","properties":{"fieldName":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["fieldName","value"],"additionalProperties":false}},"collection":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"due_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"installments"},"terms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false}},"required":["kind","terms"],"additionalProperties":false}],"description":"Optional collection terms for a credit sale."},"invoiceRequested":{"description":"Set true when this receipt may become a CFDI. Exac snapshots the product SAT identity and tax treatment so later conversion does not depend on mutable catalog data.","type":"boolean"}},"required":["items","saleType"],"additionalProperties":false},"example":{"saleType":"paid","locationId":"location-example","items":[{"description":"Servicio","quantity":1,"unitPrice":1250}],"paymentForm":"03"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SalesReceipt"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"sales_receipt","folio":"R-1001","customerName":"Estudio Jacaranda","total":{"amount":1250,"currency":"MXN"},"invoiceRequested":false,"documentRef":"sales_receipt:receipt-example","status":"open","createdAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-01-31","saleType":"paid"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:create` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/sales-receipts/{documentRef}":{"get":{"operationId":"getSalesReceipt","tags":["Sales receipts"],"summary":"Get sales receipt","description":"Returns one POS sales receipt with its lines, totals, payment, invoicing, and lifecycle state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^sales_receipt:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SalesReceipt"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"sales_receipt","folio":"R-1001","customerName":"Estudio Jacaranda","total":{"amount":1250,"currency":"MXN"},"invoiceRequested":false,"documentRef":"sales_receipt:receipt-example","status":"open","createdAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-01-31","saleType":"paid"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/expenses":{"get":{"operationId":"listExpenses","tags":["Expenses"],"summary":"List expenses","description":"Lists operational expenses with the documented supplier, settlement, date, search, and pagination filters.","security":[{"bearerAuth":[]}],"parameters":[{"name":"dateFrom","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"dateTo","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}},{"name":"settlementMode","in":"query","required":false,"schema":{"type":"string","enum":["credit","paid"]}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Expense"}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"category":"expense","description":"Licencia anual de diseño","supplierName":"Nube Clara","expenseCategory":"Software","settlementMode":"paid","paymentForm":"03","total":{"amount":1200,"currency":"MXN"},"documentRef":"expense:nube-clara-20260713","occurredAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-07-13"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"post":{"operationId":"createExpense","tags":["Expenses"],"summary":"Create expense","description":"Records an operational expense with its amount, business date, category, and settlement state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"supplierId":{"type":"string"},"description":{"type":"string","minLength":1},"amount":{"type":"number","exclusiveMinimum":0},"categoryName":{"type":"string","minLength":1},"locationId":{"type":"string"},"businessDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"notes":{"type":"string"},"settlementMode":{"type":"string","enum":["credit","paid"]},"paymentForm":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false}},"required":["description","amount","categoryName","businessDate","settlementMode","paymentForm"],"additionalProperties":false},"example":{"supplierId":"supplier-example","description":"Licencia anual de diseño","amount":1200,"categoryName":"Software","businessDate":"2026-07-13","settlementMode":"paid","paymentForm":"03"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"expense","description":"Licencia anual de diseño","supplierName":"Nube Clara","expenseCategory":"Software","settlementMode":"paid","paymentForm":"03","total":{"amount":1200,"currency":"MXN"},"documentRef":"expense:nube-clara-20260713","occurredAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-07-13"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/expenses/{documentRef}":{"get":{"operationId":"getExpense","tags":["Expenses"],"summary":"Get expense","description":"Returns one organization-owned operational expense with its supplier, amount, and settlement details.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^expense:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"expense","description":"Licencia anual de diseño","supplierName":"Nube Clara","expenseCategory":"Software","settlementMode":"paid","paymentForm":"03","total":{"amount":1200,"currency":"MXN"},"documentRef":"expense:nube-clara-20260713","occurredAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-07-13"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]},"delete":{"operationId":"deleteExpense","tags":["Expenses"],"summary":"Delete expense","description":"Deletes an expense after checking its organization and dependent records.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^expense:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"removed":{"type":"boolean"},"documentRef":{"type":"string","pattern":"^expense:.+$"}},"required":["removed","documentRef"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"removed":true,"documentRef":"expense:nube-clara-20260713"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/declarations":{"get":{"operationId":"listDeclarations","tags":["SAT"],"summary":"List declarations","description":"Lists SAT declarations already synchronized for the organization using the documented fiscal-period and pagination filters.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"fiscalYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}},{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","const":"declaration"},"fiscalYear":{"type":"number"},"period":{"type":"number"},"periodicity":{"type":"string"},"declarationType":{"type":"string"},"complementaryType":{"type":"string"},"operationNumber":{"type":"string"},"captureLine":{"type":"string"},"status":{"type":"string"},"total":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"MXN"}},"required":["amount","currency"],"additionalProperties":false},"paidAmount":{"type":"number"},"documentRef":{"type":"string","pattern":"^declaration:.+$"},"scrapedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"filedAt":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paymentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["category","fiscalYear","period","periodicity","declarationType","operationNumber","documentRef","scrapedAt","filedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"category":"declaration","fiscalYear":2026,"period":6,"periodicity":"monthly","declarationType":"normal","operationNumber":"OP-123456","documentRef":"declaration:bruma-2026-06","scrapedAt":"2026-07-15T17:00:00.000Z","filedAt":"2026-07-15"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/declarations/{documentRef}":{"get":{"operationId":"getDeclaration","tags":["SAT"],"summary":"Get declaration","description":"Returns one declaration already synchronized from SAT; it does not prepare or submit a declaration.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^declaration:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"category":{"type":"string","const":"declaration"},"fiscalYear":{"type":"number"},"period":{"type":"number"},"periodicity":{"type":"string"},"declarationType":{"type":"string"},"complementaryType":{"type":"string"},"operationNumber":{"type":"string"},"captureLine":{"type":"string"},"status":{"type":"string"},"total":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string","const":"MXN"}},"required":["amount","currency"],"additionalProperties":false},"paidAmount":{"type":"number"},"documentRef":{"type":"string","pattern":"^declaration:.+$"},"scrapedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"filedAt":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"paymentDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"}},"required":["category","fiscalYear","period","periodicity","declarationType","operationNumber","documentRef","scrapedAt","filedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"declaration","fiscalYear":2026,"period":6,"periodicity":"monthly","declarationType":"normal","operationNumber":"OP-123456","documentRef":"declaration:bruma-2026-06","scrapedAt":"2026-07-15T17:00:00.000Z","filedAt":"2026-07-15"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/tax-compliance-opinions":{"get":{"operationId":"listTaxComplianceOpinions","tags":["SAT"],"summary":"List tax compliance opinions","description":"Lists SAT tax-compliance opinions already synchronized for the organization with cursor pagination.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string","const":"tax_compliance_opinion"},"status":{"type":"string","enum":["positive","negative","unknown"]},"pdfAvailable":{"type":"boolean"},"documentRef":{"type":"string","pattern":"^tax_compliance_opinion:.+$"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["category","status","pdfAvailable","documentRef","issuedLocalDateTime","retrievedAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"category":"tax_compliance_opinion","status":"positive","pdfAvailable":true,"documentRef":"tax_compliance_opinion:opinion-example","issuedLocalDateTime":"2026-07-15T12:00:00","retrievedAt":"2026-08-01T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/tax-compliance-opinions/{documentRef}":{"get":{"operationId":"getTaxComplianceOpinion","tags":["SAT"],"summary":"Get tax compliance opinion","description":"Returns one SAT tax-compliance opinion already synchronized for the organization.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^tax_compliance_opinion:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"category":{"type":"string","const":"tax_compliance_opinion"},"status":{"type":"string","enum":["positive","negative","unknown"]},"pdfAvailable":{"type":"boolean"},"documentRef":{"type":"string","pattern":"^tax_compliance_opinion:.+$"},"issuedLocalDateTime":{"type":"string","pattern":"^(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d{1,9}))?$"},"retrievedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["category","status","pdfAvailable","documentRef","issuedLocalDateTime","retrievedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"tax_compliance_opinion","status":"positive","pdfAvailable":true,"documentRef":"tax_compliance_opinion:opinion-example","issuedLocalDateTime":"2026-07-15T12:00:00","retrievedAt":"2026-08-01T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/sales-receipt-refunds":{"get":{"operationId":"listSalesReceiptRefunds","tags":["Sales receipts"],"summary":"List sales receipt refunds","description":"Lists refunds recorded against one organization-owned sales receipt.","security":[{"bearerAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","processing","completed","failed","recovery_required","canceled"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["commercial_refund","resico_reconciliation"]},"settlementMethod":{"type":"string","enum":["cash","transfer","original_method","customer_credit"]},"fiscalTreatment":{"type":"string","enum":["none","credit_note"]},"total":{"$ref":"#/components/schemas/Money"},"note":{"type":"string"},"documentRef":{"type":"string","pattern":"^sales_receipt_refund:.+$"},"category":{"type":"string","const":"sales_receipt_refund"},"receiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"status":{"type":"string","enum":["pending","processing","completed","failed","recovery_required","canceled"]},"businessDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["reason","settlementMethod","fiscalTreatment","total","documentRef","category","receiptDocumentRef","status","createdAt"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"reason":"commercial_refund","settlementMethod":"original_method","fiscalTreatment":"none","total":{"amount":250,"currency":"MXN"},"documentRef":"sales_receipt_refund:refund-example","category":"sales_receipt_refund","receiptDocumentRef":"sales_receipt:receipt-example","status":"pending","createdAt":"2026-07-15T12:00:00.000Z"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:read:all` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/sales-receipt-refunds/{documentRef}":{"get":{"operationId":"getSalesReceiptRefund","tags":["Sales receipts"],"summary":"Get sales receipt refund","description":"Returns one recorded sales-receipt refund and its resulting fiscal-document linkage when present.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^sales_receipt_refund:.+$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"reason":{"type":"string","enum":["commercial_refund","resico_reconciliation"]},"settlementMethod":{"type":"string","enum":["cash","transfer","original_method","customer_credit"]},"fiscalTreatment":{"type":"string","enum":["none","credit_note"]},"total":{"$ref":"#/components/schemas/Money"},"note":{"type":"string"},"documentRef":{"type":"string","pattern":"^sales_receipt_refund:.+$"},"category":{"type":"string","const":"sales_receipt_refund"},"receiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"status":{"type":"string","enum":["pending","processing","completed","failed","recovery_required","canceled"]},"businessDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["reason","settlementMethod","fiscalTreatment","total","documentRef","category","receiptDocumentRef","status","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"reason":"commercial_refund","settlementMethod":"original_method","fiscalTreatment":"none","total":{"amount":250,"currency":"MXN"},"documentRef":"sales_receipt_refund:refund-example","category":"sales_receipt_refund","receiptDocumentRef":"sales_receipt:receipt-example","status":"pending","createdAt":"2026-07-15T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:read:all` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/documents/{documentRef}/files/{file}":{"get":{"operationId":"downloadDocumentFile","tags":["Files and delivery"],"summary":"Download document file","description":"Downloads an available document file. For an unstamped CFDI draft, use preview_pdf to inspect the rendered PDF before stamping; the preview has no fiscal validity.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^cfdi:.+$"},{"type":"string","pattern":"^withholding:.+$"},{"type":"string","pattern":"^sales_receipt:.+$"},{"type":"string","pattern":"^quote:.+$"},{"type":"string","pattern":"^declaration:.+$"},{"type":"string","pattern":"^tax_compliance_opinion:.+$"}],"description":"DocumentRef for a CFDI, withholding, sales receipt, quote, declaration, or tax-compliance opinion. Expenses and refunds do not have downloadable files."}},{"name":"file","in":"path","required":true,"schema":{"type":"string","enum":["pdf","xml","zip","preview_pdf","cancellation_pdf","cancellation_xml","payment_pdf","full_pdf"],"description":"File selector. Use preview_pdf to render an unstamped CFDI draft before stamping. CFDIs also support pdf, xml, zip, cancellation_pdf, and cancellation_xml. Withholdings: pdf, xml, zip. Sales receipts and quotes: pdf. Declarations: pdf, payment_pdf, full_pdf. Opinions: pdf."}}],"responses":{"200":{"description":"Operation completed.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}},"application/xml":{"schema":{"type":"string","format":"binary"}},"application/zip":{"schema":{"type":"string","format":"binary"}}},"headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Content-Disposition":{"description":"Disposition and filename selected by the server file contract.","schema":{"type":"string"}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The document category encoded in the reference determines the required permission: `cfdi` → `invoices:read`, `withholding` → `invoices:read`, `sales_receipt` → `receipts:read`, `quote` → `quotes:read`, `declaration` → `sat:read`, `tax_compliance_opinion` → `sat:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"],"x-exac-sandbox-constraints":{"documentCategories":["cfdi","withholding","sales_receipt","quote"]}}},"/v1/cfdis/from-sales-receipts":{"post":{"operationId":"createCfdiDraftFromSalesReceipts","tags":["CFDI"],"summary":"Create CFDI draft from sales receipts","description":"Creates an unstamped CFDI draft from eligible sales receipts. Create invoiceable receipts with invoiceRequested: true; otherwise follow receipt_item_fiscal_identity_required and retry with remediation.receiptItems.","security":[{"bearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"salesReceiptRefs":{"minItems":1,"type":"array","items":{"type":"string","pattern":"^sales_receipt:.*"},"description":"One or more open receipt documentRefs from search_documents"},"customer":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"existing"},"customerId":{"type":"string","minLength":1}},"required":["kind","customerId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"public_general"}},"required":["kind"],"additionalProperties":false}]},"cfdiUse":{"description":"Active SAT CFDI-use code.","x-exac-sat-catalog":"cfdi-uses","oneOf":[{"type":"string","title":"SAT c_UsoCFDI","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#cfdi-uses).","enum":["G01","D06","I07","I06","I01","I05","D09","G02","D04","I04","I03","D08","G03","D03","D02","D01","D05","I02","CN01","I08","CP01","D10","D07","S01"]}]},"acknowledgeReconciliationDifference":{"description":"Required only after reviewing a reported fiscal difference","type":"boolean"},"reconciliationNote":{"type":"string","minLength":1},"paymentScheduleReplacement":{"description":"Required when batching credit receipts that already have operational payment schedules. Replaces them with one acknowledged invoice schedule.","type":"object","properties":{"acknowledged":{"type":"boolean","const":true},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["acknowledged","settlementTerms","reason"],"additionalProperties":false},"remediation":{"type":"object","properties":{"customerFiscalIdentity":{"type":"object","properties":{"rfc":{"type":"string","minLength":1},"taxSystem":{"description":"Active SAT tax-system code.","x-exac-sat-catalog":"tax-systems","oneOf":[{"type":"string","title":"SAT c_RegimenFiscal","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#tax-systems).","enum":["601","603","605","606","607","608","610","611","612","614","615","616","620","621","622","623","624","625","626"]}]},"postalCode":{"type":"string","minLength":1}},"additionalProperties":false},"receiptItems":{"type":"array","items":{"type":"object","properties":{"salesReceiptRef":{"type":"string","pattern":"^sales_receipt:.*"},"items":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"satProductCode":{"type":"string","minLength":1},"satUnitCode":{"type":"string","minLength":1},"saveToProduct":{"type":"boolean"}},"required":["index","satProductCode","satUnitCode"],"additionalProperties":false}}},"required":["salesReceiptRef","items"],"additionalProperties":false}}},"additionalProperties":false,"description":"Supply only when validation reports missing customer or item fiscal identity. Use the receipt reference and zero-based item index reported in details.issues."}},"required":["salesReceiptRefs","customer","cfdiUse"],"additionalProperties":false},"example":{"salesReceiptRefs":["sales_receipt:receipt-example"],"customer":{"kind":"existing","customerId":"customer-example"},"cfdiUse":"S01"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"cfdi":{"$ref":"#/components/schemas/CfdiDetail"},"salesReceiptRefs":{"type":"array","items":{"type":"string"}},"reconciliationDifference":{"type":"number"}},"required":["cfdi","salesReceiptRefs"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"cfdi":{"direction":"issued","status":"valid","archived":false,"uuid":"00000000-0000-4000-8000-000000000001","counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","series":"A","folio":"1042","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03","stampedLocalDateTime":"2026-07-15T12:01:00"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}},"salesReceiptRefs":["sales_receipt:receipt-example"]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. Required permissions: `invoices:manage`, `receipts:read`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/cfdis/{documentRef}/stamp":{"post":{"operationId":"stampCfdi","tags":["CFDI"],"summary":"Stamp CFDI","description":"Stamps a reviewed CFDI draft. Exac refuses to stamp when the provider draft no longer matches its canonical tax snapshot.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"emissionDate":{"description":"Optional SAT-valid emission timestamp to apply while stamping the draft","type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"valid","archived":false,"uuid":"00000000-0000-4000-8000-000000000001","counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","series":"A","folio":"1042","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03","stampedLocalDateTime":"2026-07-15T12:01:00"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/cfdis/{documentRef}/status/refresh":{"post":{"operationId":"refreshCfdiStatus","tags":["CFDI"],"summary":"Refresh status","description":"Queries SAT directly for the current CFDI status. If required verification data is missing, it derives and persists it from the fiscal XML before reconciling local status and cancellation state.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","enum":["webhook","sat_query","sat_bulk"]},"documentStatus":{"type":"string","enum":["valid","canceled","not_found"]},"cancellability":{"type":"string","enum":["unknown","not_cancellable","without_acceptance","with_acceptance"]},"cancellation":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"unchanged"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"none"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"pending"},"phase":{"type":"string","enum":["requested","verifying"]}},"required":["state","phase"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"rejected"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"expired"}},"required":["state"],"additionalProperties":false},{"type":"object","properties":{"state":{"type":"string","const":"completed"},"resolution":{"type":"string","enum":["accepted","without_acceptance","timeout","unknown"]}},"required":["state","resolution"],"additionalProperties":false}]},"observedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"cancellationDate":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["source","documentStatus","cancellability","cancellation","observedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"source":"sat_query","documentStatus":"valid","cancellability":"without_acceptance","cancellation":{"state":"none"},"observedAt":"2026-07-15T18:02:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/documents/{documentRef}/send":{"post":{"operationId":"sendDocument","tags":["Files and delivery"],"summary":"Send document","description":"Emails a supported production document or its available files to the selected recipient. Sandbox artifacts can be downloaded but not emailed.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^(cfdi|withholding|sales_receipt|quote):.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"description":"Attachment set to send; defaults to document","type":"string","enum":["document","cancellation_receipt"]},"recipient":{"description":"Recipient override; defaults to the saved receptor email","type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"additionalProperties":false},"example":{"recipient":"administracion@jacaranda.example"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"documentRef":{"type":"string"},"content":{"type":"string","enum":["document","cancellation_receipt"]},"recipient":{"type":"string"},"sent":{"type":"boolean","const":true}},"required":["documentRef","content","recipient","sent"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"documentRef":"cfdi:invoice-example","content":"document","recipient":"administracion@jacaranda.example","sent":true}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not satisfy the required authorization. The document category encoded in the reference determines the required permission: `cfdi` → `invoices:manage`, `withholding` → `invoices:manage`, `sales_receipt` → `receipts:update`, `quote` → `quotes:manage`.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/cfdis/{documentRef}/cancel":{"post":{"operationId":"cancelCfdi","tags":["CFDI"],"summary":"Cancel CFDI","description":"Requests cancellation of a stamped CFDI using the supplied SAT reason.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["01","02","03","04"],"description":"SAT cancellation reason code"},"replacementUuid":{"description":"Required when reason is 01","type":"string","minLength":1},"linkedReceiptBehavior":{"description":"Required when one or more directly linked receipts exist; applies to all of them","type":"string","enum":["reopen","cancel"]}},"required":["reason"],"additionalProperties":false},"example":{"reason":"02"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pending":{"type":"boolean"},"document":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["pending","document"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"pending":false,"document":{"direction":"issued","status":"canceled","archived":false,"uuid":"00000000-0000-4000-8000-000000000001","counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","series":"A","folio":"1042","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03","stampedLocalDateTime":"2026-07-15T12:01:00"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/cfdis/{documentRef}/archive":{"put":{"operationId":"archiveCfdi","tags":["CFDI"],"summary":"Archive CFDI","description":"Archives or restores a CFDI without changing its fiscal status.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean","description":"true archives a fiscal document; false restores it"}},"required":["archived"],"additionalProperties":false},"example":{"archived":true}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CfdiDetail"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"valid","archived":true,"uuid":"00000000-0000-4000-8000-000000000001","counterpartyName":"Estudio Jacaranda","total":{"amount":11600,"currency":"MXN"},"documentRef":"cfdi:invoice-example","category":"cfdi","issuedLocalDateTime":"2026-07-15T12:00:00","series":"A","folio":"1042","fiscal":{"subtotal":10000,"ivaTransferred":1600,"totalMxn":11600,"placeOfIssue":"82110","exportation":"01","cfdiUse":"G03","stampedLocalDateTime":"2026-07-15T12:01:00"},"kind":"income","cfdiType":"I","issuer":{"rfc":"EKU9003173C9","legalName":"Consultoría Bruma SA de CV","taxSystem":"601"},"receiver":{"rfc":"AAA010101AAA","legalName":"Estudio Jacaranda","taxSystem":"601","postalCode":"82110","cfdiUse":"G03"},"items":[{"description":"Consultoría administrativa · julio 2026","quantity":1,"unitPrice":10000,"satProductCode":"84111506","satUnitCode":"E48"}],"payment":{"timing":"deferred_or_installments","formCode":"99","methodCode":"PPD","remainingBalance":11600,"conditions":"Crédito a 30 días"},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/withholdings/{documentRef}/cancel":{"post":{"operationId":"cancelWithholding","tags":["Withholding documents"],"summary":"Cancel withholding","description":"Requests cancellation of a stamped withholding document using the supplied SAT reason.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^withholding:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["01","02","03","04"],"description":"SAT cancellation reason code"},"replacementUuid":{"description":"Required when reason is 01","type":"string","minLength":1},"linkedReceiptBehavior":{"description":"Required when one or more directly linked receipts exist; applies to all of them","type":"string","enum":["reopen","cancel"]}},"required":["reason"],"additionalProperties":false},"example":{"reason":"02"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pending":{"type":"boolean"},"document":{"$ref":"#/components/schemas/WithholdingDocument"}},"required":["pending","document"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"pending":false,"document":{"direction":"issued","status":"canceled","archived":false,"counterpartyName":"Cliente Ejemplo","total":{"amount":160,"currency":"MXN"},"documentRef":"withholding:withholding-example","category":"withholding","withholding":{"withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"totals":{"operation":1000,"retained":160},"taxes":[{"tax":"iva","amount":160}]},"detail":{"availability":"complete"}}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/withholdings/{documentRef}/archive":{"put":{"operationId":"archiveWithholding","tags":["Withholding documents"],"summary":"Archive withholding","description":"Archives or restores a withholding document without changing its fiscal status.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^withholding:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"archived":{"type":"boolean","description":"true archives a fiscal document; false restores it"}},"required":["archived"],"additionalProperties":false},"example":{"archived":true}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WithholdingDocument"}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"issued","status":"valid","archived":true,"counterpartyName":"Cliente Ejemplo","total":{"amount":160,"currency":"MXN"},"documentRef":"withholding:withholding-example","category":"withholding","withholding":{"withholdingTypeCode":"01","period":{"fromMonth":6,"toMonth":6,"year":2026},"totals":{"operation":1000,"retained":160},"taxes":[{"tax":"iva","amount":160}]},"detail":{"availability":"complete"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `invoices:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/sales-receipts/{documentRef}/cancel":{"post":{"operationId":"cancelSalesReceipt","tags":["Sales receipts"],"summary":"Cancel sales receipt","description":"Cancels an open sales receipt when its invoicing state allows cancellation.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^sales_receipt:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/SalesReceipt"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"sales_receipt","folio":"R-1001","customerName":"Estudio Jacaranda","total":{"amount":1250,"currency":"MXN"},"invoiceRequested":false,"documentRef":"sales_receipt:receipt-example","status":"canceled","createdAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-01-31","saleType":"paid"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:cancel` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/sales-receipts/{documentRef}/refunds":{"post":{"operationId":"createSalesReceiptRefund","tags":["Sales receipts"],"summary":"Refund sales receipt","description":"Creates a partial or full refund for a sales receipt using its selected settlement method.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^sales_receipt:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0},"reason":{"type":"string","enum":["commercial_refund","resico_reconciliation"]},"settlementMethod":{"type":"string","enum":["cash","transfer","original_method","customer_credit"]},"allocations":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"original_line"},"lineRef":{"type":"string","minLength":1},"adjustmentMode":{"type":"string","const":"quantity"},"quantity":{"type":"number","exclusiveMinimum":0}},"required":["kind","lineRef","adjustmentMode","quantity"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"original_line"},"lineRef":{"type":"string","minLength":1},"adjustmentMode":{"type":"string","const":"amount"},"amount":{"type":"number","exclusiveMinimum":0}},"required":["kind","lineRef","adjustmentMode","amount"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"custom"},"description":{"type":"string","minLength":1},"quantity":{"type":"number","exclusiveMinimum":0},"amount":{"type":"number","exclusiveMinimum":0},"productKey":{"type":"string","minLength":1},"unitKey":{"type":"string","minLength":1},"taxability":{"type":"string","enum":["standard","zero","exempt"]},"taxRate":{"type":"number","minimum":0,"maximum":1},"taxIncluded":{"type":"boolean"}},"required":["kind","description","quantity","amount","productKey","unitKey","taxability","taxRate","taxIncluded"],"additionalProperties":false}]}},"note":{"type":"string"}},"required":["amount","reason","settlementMethod"],"additionalProperties":false},"example":{"amount":250,"reason":"commercial_refund","settlementMethod":"original_method"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"reason":{"type":"string","enum":["commercial_refund","resico_reconciliation"]},"settlementMethod":{"type":"string","enum":["cash","transfer","original_method","customer_credit"]},"fiscalTreatment":{"type":"string","enum":["none","credit_note"]},"total":{"$ref":"#/components/schemas/Money"},"note":{"type":"string"},"documentRef":{"type":"string","pattern":"^sales_receipt_refund:.+$"},"category":{"type":"string","const":"sales_receipt_refund"},"receiptDocumentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"status":{"type":"string","enum":["pending","processing","completed","failed","recovery_required","canceled"]},"businessDate":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"completedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["reason","settlementMethod","fiscalTreatment","total","documentRef","category","receiptDocumentRef","status","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"reason":"commercial_refund","settlementMethod":"original_method","fiscalTreatment":"none","total":{"amount":250,"currency":"MXN"},"documentRef":"sales_receipt_refund:refund-example","category":"sales_receipt_refund","receiptDocumentRef":"sales_receipt:receipt-example","status":"pending","createdAt":"2026-07-15T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receipts:refund` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/expenses/{documentRef}/settlement":{"put":{"operationId":"setExpenseSettlement","tags":["Expenses"],"summary":"Set expense settlement","description":"Corrects an expense settlement classification. To pay an expense that already has a payable balance, record a payable payment instead of changing it to paid.","security":[{"bearerAuth":[]}],"parameters":[{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^expense:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"settlementMode":{"type":"string","const":"paid"},"paymentForm":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]}},"required":["settlementMode","paymentForm"],"additionalProperties":false},{"type":"object","properties":{"settlementMode":{"type":"string","const":"credit"},"paymentForm":{"type":"string","const":"99"}},"required":["settlementMode","paymentForm"],"additionalProperties":false}]},"example":{"settlementMode":"credit","paymentForm":"99"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Expense"}},"required":["data"],"additionalProperties":false},"example":{"data":{"category":"expense","description":"Licencia anual de diseño","supplierName":"Nube Clara","expenseCategory":"Software","settlementMode":"credit","paymentForm":"03","total":{"amount":1200,"currency":"MXN"},"documentRef":"expense:nube-clara-20260713","occurredAt":"2026-07-15T12:00:00.000Z","businessDate":"2026-07-13"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `expenses:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables":{"get":{"operationId":"listReceivableAccounts","tags":["Accounts"],"summary":"List receivable accounts","description":"Lists customer receivable accounts with the documented balance, status, search, and pagination filters.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"customerName":{"type":"string"},"email":{"type":"string"},"operationalBalance":{"type":"number"},"fiscalPpdBalance":{"type":"number"},"totalBalance":{"type":"number"},"rfc":{"type":"string"},"plans":{"type":"array","items":{"type":"object","properties":{"planId":{"type":"string"},"status":{"type":"string","enum":["active","settled","cancelled","superseded"]},"currency":{"type":"string"},"originalTotal":{"type":"number"},"transactionDate":{"type":"string"},"terms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"documentLabel":{"type":"string"},"installments":{"type":"array","items":{"type":"object","properties":{"installmentId":{"type":"string"},"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"dueDate":{"type":"string"},"amount":{"type":"number"},"paidAmount":{"type":"number"},"amountDue":{"type":"number"},"status":{"type":"string","enum":["upcoming","due","overdue","partially_paid","paid","cancelled"]}},"required":["installmentId","sequence","dueDate","amount","paidAmount","amountDue","status"],"additionalProperties":false}},"documentRef":{"type":"string","pattern":"^(cfdi|sales_receipt|quote|expense):.+$"}},"required":["planId","status","currency","originalTotal","transactionDate","terms","version","installments"],"additionalProperties":false}},"lastActivityAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastMovement":{"type":"object","properties":{"type":{"type":"string","enum":["credit_sale","payment","credit_sale_fiscal_transfer","credit_sale_reopen","credit_sale_reversal"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["type","createdAt"],"additionalProperties":false}},"required":["customerId","customerName","operationalBalance","fiscalPpdBalance","totalBalance"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"customerId":"customer-example","customerName":"Estudio Jacaranda","email":"administracion@jacaranda.example","operationalBalance":0,"fiscalPpdBalance":11600,"totalBalance":11600,"rfc":"AAA010101AAA"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables/{customerId}":{"get":{"operationId":"getReceivableAccount","tags":["Accounts"],"summary":"Get receivable account","description":"Returns one customer receivable account with its current balance and payment-plan state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"customerId":{"type":"string","minLength":1},"customerName":{"type":"string"},"email":{"type":"string"},"operationalBalance":{"type":"number"},"fiscalPpdBalance":{"type":"number"},"totalBalance":{"type":"number"},"rfc":{"type":"string"},"plans":{"type":"array","items":{"type":"object","properties":{"planId":{"type":"string"},"status":{"type":"string","enum":["active","settled","cancelled","superseded"]},"currency":{"type":"string"},"originalTotal":{"type":"number"},"transactionDate":{"type":"string"},"terms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"documentLabel":{"type":"string"},"installments":{"type":"array","items":{"type":"object","properties":{"installmentId":{"type":"string"},"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"dueDate":{"type":"string"},"amount":{"type":"number"},"paidAmount":{"type":"number"},"amountDue":{"type":"number"},"status":{"type":"string","enum":["upcoming","due","overdue","partially_paid","paid","cancelled"]}},"required":["installmentId","sequence","dueDate","amount","paidAmount","amountDue","status"],"additionalProperties":false}},"documentRef":{"type":"string","pattern":"^(cfdi|sales_receipt|quote|expense):.+$"}},"required":["planId","status","currency","originalTotal","transactionDate","terms","version","installments"],"additionalProperties":false}},"lastActivityAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastMovement":{"type":"object","properties":{"type":{"type":"string","enum":["credit_sale","payment","credit_sale_fiscal_transfer","credit_sale_reopen","credit_sale_reversal"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["type","createdAt"],"additionalProperties":false}},"required":["customerId","customerName","operationalBalance","fiscalPpdBalance","totalBalance"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"customerId":"customer-example","customerName":"Estudio Jacaranda","email":"administracion@jacaranda.example","operationalBalance":0,"fiscalPpdBalance":11600,"totalBalance":11600,"rfc":"AAA010101AAA"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables/{customerId}/transactions":{"get":{"operationId":"listReceivableTransactions","tags":["Accounts"],"summary":"List receivable transactions","description":"Lists the auditable ledger movements for one organization-owned receivable account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"movementId":{"type":"string"},"customerId":{"type":"string","minLength":1},"balanceType":{"type":"string","enum":["operational","fiscalPpd"]},"entryType":{"type":"string","enum":["charge","payment","transfer","reversal","adjustment"]},"amount":{"type":"number"},"balanceAfter":{"type":"number"},"documentLabel":{"type":"string"},"concept":{"type":"string"},"detail":{"type":"string"},"adjustmentReason":{"type":"string"},"adjustmentNote":{"type":"string"},"date":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["movementId","customerId","balanceType","entryType","amount","balanceAfter","documentLabel","concept","date"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables/{customerId}/payments":{"post":{"operationId":"createReceivablePayment","tags":["Accounts"],"summary":"Record received payment","description":"Records a customer payment, allocates it across the selected receipts, and returns the updated receivable balance.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allocations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"documentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"amount":{"type":"number","exclusiveMinimum":0}},"required":["documentRef","amount"],"additionalProperties":false}},"paymentForm":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"notes":{"type":"string"}},"required":["allocations","paymentForm"],"additionalProperties":false},"example":{"allocations":[{"documentRef":"sales_receipt:receipt-example","amount":500}],"paymentForm":"03","notes":"Bank transfer"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"direction":{"type":"string","const":"received"},"paymentId":{"type":"string"},"customerId":{"type":"string","minLength":1},"amount":{"type":"number"},"balance":{"type":"number"},"businessDate":{"type":"string"},"paidAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"allocations":{"type":"array","items":{"type":"object","properties":{"documentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"amount":{"type":"number"}},"required":["documentRef","amount"],"additionalProperties":false}}},"required":["direction","paymentId","customerId","amount","balance","businessDate","paidAt","allocations"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"received","paymentId":"payment-example","customerId":"customer-example","amount":500,"balance":1250,"businessDate":"2026-01-31","paidAt":"2026-07-27T12:00:00.000Z","allocations":[{"documentRef":"sales_receipt:receipt-example","amount":500}]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables/{customerId}/adjustments":{"post":{"operationId":"createReceivableAdjustment","tags":["Accounts"],"summary":"Adjust receivable balance","description":"Adjusts one unscheduled operational receipt or one PPD invoice effective balance. If a receipt has a payment plan, use rescheduleReceivablePlan so its installments and balance remain consistent.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"balanceType":{"type":"string","const":"operational"},"documentRef":{"type":"string","pattern":"^sales_receipt:.+$"},"targetBalance":{"type":"number","minimum":0},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["documentRef","targetBalance","reason"],"additionalProperties":false},{"type":"object","properties":{"balanceType":{"type":"string","const":"fiscalPpd"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"targetBalance":{"type":"number","minimum":0},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["balanceType","documentRef","targetBalance","reason"],"additionalProperties":false}]},"example":{"balanceType":"operational","documentRef":"sales_receipt:receipt-example","targetBalance":250,"reason":"Approved balance correction"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previousBalance":{"type":"number"},"previousDocumentBalance":{"type":"number"},"adjustmentAmount":{"type":"number"},"newBalance":{"type":"number"},"newDocumentBalance":{"type":"number"}},"required":["previousBalance","previousDocumentBalance","adjustmentAmount","newBalance","newDocumentBalance"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"previousBalance":1750,"previousDocumentBalance":750,"adjustmentAmount":-500,"newBalance":1250,"newDocumentBalance":250}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/receivables/{customerId}/plans/{planId}":{"put":{"operationId":"rescheduleReceivablePlan","tags":["Accounts"],"summary":"Edit receivable installments","description":"Replaces the dates and installment count of an entirely unpaid receivable plan while preserving its accepted total. The change is projected onto every linked quote, receipt, PPD invoice, payment portal, and calendar event.","security":[{"bearerAuth":[]}],"parameters":[{"name":"customerId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"planId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["settlementTerms","reason"],"additionalProperties":false},"example":{"settlementTerms":{"installmentCount":3,"firstDue":{"kind":"fixed_date","date":"2026-08-15"},"recurrence":{"kind":"anchor_day"}},"reason":"New schedule agreed with the customer"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"planId":{"type":"string","minLength":1},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"paymentDueDate":{"type":"string"},"installments":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"dueDate":{"type":"string"},"amount":{"type":"number"}},"required":["sequence","dueDate","amount"],"additionalProperties":false}}},"required":["planId","version","settlementTerms","paymentDueDate","installments"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"planId":"receivable-plan-example","version":2,"settlementTerms":{"installmentCount":3,"firstDue":{"kind":"fixed_date","date":"2026-08-15"},"recurrence":{"kind":"anchor_day"}},"paymentDueDate":"2026-10-15","installments":[{"sequence":1,"dueDate":"2026-08-15","amount":333.34},{"sequence":2,"dueDate":"2026-09-15","amount":333.33},{"sequence":3,"dueDate":"2026-10-15","amount":333.33}]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `receivables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables":{"get":{"operationId":"listPayableAccounts","tags":["Accounts"],"summary":"List payable accounts","description":"Lists supplier payable accounts with the documented balance, status, search, and pagination filters.","security":[{"bearerAuth":[]}],"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"supplierId":{"type":"string","minLength":1},"supplierName":{"type":"string"},"email":{"type":"string"},"balance":{"type":"number"},"operationalBalance":{"type":"number"},"fiscalPpdBalance":{"type":"number"},"totalBalance":{"type":"number"},"rfc":{"type":"string"},"lastActivityAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastMovement":{"type":"object","properties":{"type":{"type":"string","enum":["expense","payment","expense_reversal","charge","transfer","reversal","adjustment"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["type","createdAt"],"additionalProperties":false}},"required":["supplierId","supplierName","balance","operationalBalance","fiscalPpdBalance","totalBalance"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[{"supplierId":"supplier-example","supplierName":"Proveedor Ejemplo, S.A. de C.V.","email":"cobranza@example.com","balance":800,"operationalBalance":300,"fiscalPpdBalance":500,"totalBalance":800,"rfc":"PEJ010101AAA"}],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables/{supplierId}":{"get":{"operationId":"getPayableAccount","tags":["Accounts"],"summary":"Get payable account","description":"Returns one supplier payable account with its current balance and payment-plan state.","security":[{"bearerAuth":[]}],"parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"supplierId":{"type":"string","minLength":1},"supplierName":{"type":"string"},"email":{"type":"string"},"balance":{"type":"number"},"operationalBalance":{"type":"number"},"fiscalPpdBalance":{"type":"number"},"totalBalance":{"type":"number"},"rfc":{"type":"string"},"lastActivityAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lastMovement":{"type":"object","properties":{"type":{"type":"string","enum":["expense","payment","expense_reversal","charge","transfer","reversal","adjustment"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["type","createdAt"],"additionalProperties":false}},"required":["supplierId","supplierName","balance","operationalBalance","fiscalPpdBalance","totalBalance"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"supplierId":"supplier-example","supplierName":"Proveedor Ejemplo, S.A. de C.V.","email":"cobranza@example.com","balance":800,"operationalBalance":300,"fiscalPpdBalance":500,"totalBalance":800,"rfc":"PEJ010101AAA"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables/{supplierId}/transactions":{"get":{"operationId":"listPayableTransactions","tags":["Accounts"],"summary":"List payable transactions","description":"Lists the auditable ledger movements for one organization-owned payable account.","security":[{"bearerAuth":[]}],"parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"movementId":{"type":"string"},"supplierId":{"type":"string","minLength":1},"balanceType":{"type":"string","enum":["operational","fiscalPpd"]},"entryType":{"type":"string","enum":["charge","payment","transfer","reversal","adjustment"]},"amount":{"type":"number"},"balanceAfter":{"type":"number"},"documentLabel":{"type":"string"},"concept":{"type":"string"},"detail":{"type":"string"},"adjustmentReason":{"type":"string"},"adjustedFromBalance":{"type":"number"},"adjustedToBalance":{"type":"number"},"date":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["movementId","supplierId","balanceType","entryType","amount","balanceAfter","documentLabel","concept","date"],"additionalProperties":false}},"pagination":{"$ref":"#/components/schemas/Pagination"}},"required":["data","pagination"],"additionalProperties":false},"example":{"data":[],"pagination":{"nextCursor":null,"hasMore":false}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables/{supplierId}/payments":{"post":{"operationId":"createPayablePayment","tags":["Accounts"],"summary":"Record supplier payment","description":"Records a payment to a supplier, allocates it across selected expenses, and returns the updated payable balance.","security":[{"bearerAuth":[]}],"parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allocations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"documentRef":{"type":"string","pattern":"^expense:.+$"},"amount":{"type":"number","exclusiveMinimum":0}},"required":["documentRef","amount"],"additionalProperties":false}},"paymentForm":{"description":"Active SAT payment-form code.","x-exac-sat-catalog":"payment-forms","oneOf":[{"type":"string","title":"SAT c_FormaPago","description":"View active codes and official names [here](/docs/en/sat-catalogs/invoicing#payment-forms).","enum":["12","13","14","15","17","23","24","25","26","27","28","29","30","31","99","02","06","01","05","04","03","08"]}]},"notes":{"type":"string"}},"required":["allocations","paymentForm"],"additionalProperties":false},"example":{"allocations":[{"documentRef":"expense:expense-example","amount":800}],"paymentForm":"03","notes":"Supplier transfer"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"direction":{"type":"string","const":"paid"},"paymentId":{"type":"string"},"supplierId":{"type":"string","minLength":1},"amount":{"type":"number"},"balance":{"type":"number"},"businessDate":{"type":"string"},"paidAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"allocations":{"type":"array","items":{"type":"object","properties":{"documentRef":{"type":"string","pattern":"^expense:.+$"},"amount":{"type":"number"}},"required":["documentRef","amount"],"additionalProperties":false}}},"required":["direction","paymentId","supplierId","amount","balance","businessDate","paidAt","allocations"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"direction":"paid","paymentId":"payment-example","supplierId":"supplier-example","amount":800,"balance":0,"businessDate":"2026-01-31","paidAt":"2026-07-27T12:00:00.000Z","allocations":[{"documentRef":"expense:expense-example","amount":800}]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables/{supplierId}/adjustments":{"post":{"operationId":"createPayableAdjustment","tags":["Accounts"],"summary":"Adjust payable balance","description":"Adjusts one credit expense or one received PPD invoice effective balance, records the reason, and returns the resulting supplier and document balances.","security":[{"bearerAuth":[]}],"parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"balanceType":{"type":"string","const":"operational"},"documentRef":{"type":"string","pattern":"^expense:.+$"},"targetBalance":{"type":"number","minimum":0},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["documentRef","targetBalance","reason"],"additionalProperties":false},{"type":"object","properties":{"balanceType":{"type":"string","const":"fiscalPpd"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"targetBalance":{"type":"number","minimum":0},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["balanceType","documentRef","targetBalance","reason"],"additionalProperties":false}]},"example":{"balanceType":"operational","documentRef":"expense:expense-example","targetBalance":250,"reason":"Approved balance correction"}}}},"responses":{"201":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"previousBalance":{"type":"number"},"previousDocumentBalance":{"type":"number"},"adjustmentAmount":{"type":"number"},"newBalance":{"type":"number"},"newDocumentBalance":{"type":"number"}},"required":["previousBalance","previousDocumentBalance","adjustmentAmount","newBalance","newDocumentBalance"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"previousBalance":800,"previousDocumentBalance":500,"adjustmentAmount":-250,"newBalance":550,"newDocumentBalance":250}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/accounts/payables/{supplierId}/invoices/{documentRef}/plan":{"put":{"operationId":"setPayablePaymentPlan","tags":["Accounts"],"summary":"Plan received invoice payments","description":"Creates or clears the settlement schedule for an unpaid received PPD invoice and synchronizes its payable calendar events without classifying the invoice as an operational expense.","security":[{"bearerAuth":[]}],"parameters":[{"name":"supplierId","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"documentRef","in":"path","required":true,"schema":{"type":"string","pattern":"^cfdi:.+$"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"settlementTerms":{"anyOf":[{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},{"type":"null"}]}},"required":["settlementTerms"],"additionalProperties":false},"example":{"settlementTerms":{"installmentCount":3,"firstDue":{"kind":"fixed_date","date":"2026-08-15"},"recurrence":{"kind":"anchor_day"}}}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"settlementTerms":{"type":"object","properties":{"installmentCount":{"type":"integer","minimum":1,"maximum":60},"firstDue":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"transaction_date"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"months_after_transaction"},"months":{"type":"integer","minimum":1,"maximum":60}},"required":["kind","months"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"fixed_date"},"date":{"type":"string"}},"required":["kind","date"],"additionalProperties":false}]},"recurrence":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"anchor_day"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"day_of_month"},"day":{"type":"integer","minimum":1,"maximum":31}},"required":["kind","day"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"last_day"}},"required":["kind"],"additionalProperties":false}]}},"required":["installmentCount","firstDue","recurrence"],"additionalProperties":false},"paymentDueDate":{"type":"string"},"documentRef":{"type":"string","pattern":"^cfdi:.+$"},"plannedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["documentRef","plannedAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"settlementTerms":{"installmentCount":3,"firstDue":{"kind":"fixed_date","date":"2026-08-15"},"recurrence":{"kind":"anchor_day"}},"paymentDueDate":"2026-10-15","documentRef":"cfdi:invoice-example","plannedAt":"2026-07-27T12:00:00.000Z"}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `payables:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/tax/sync":{"post":{"operationId":"syncTaxData","tags":["SAT"],"summary":"Synchronize SAT data","description":"Schedules synchronization of one SAT source and fiscal period. First verify getOrganization readiness.fiel; a missing FIEL returns fiel_required with the exact recovery action.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"documents"},"dateFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dateTo":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"kind":{"type":"string","enum":["all","invoices","withholdings"]}},"required":["source","dateFrom","dateTo"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"declarations"},"fiscalYear":{"type":"integer","minimum":2000,"maximum":2100}},"required":["source","fiscalYear"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"compliance_opinion"}},"required":["source"],"additionalProperties":false}]},"example":{"source":"documents","dateFrom":"2026-01-01","dateTo":"2026-01-31","kind":"all"}}}},"responses":{"202":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"type":"object","properties":{"source":{"type":"string","const":"documents"},"status":{"type":"string","const":"scheduled"},"scheduled":{"type":"number"}},"required":["source","status","scheduled"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"declarations"},"status":{"type":"string","const":"completed"},"fiscalYear":{"type":"number"},"declarations":{"type":"number"},"paymentsMatched":{"type":"number"},"filesDownloaded":{"type":"number"}},"required":["source","status","fiscalYear","declarations","paymentsMatched","filesDownloaded"],"additionalProperties":false},{"type":"object","properties":{"source":{"type":"string","const":"compliance_opinion"},"status":{"type":"string","const":"scheduled"}},"required":["source","status"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false},"example":{"data":{"source":"documents","status":"scheduled","scheduled":1}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/tax/profile-extractions":{"post":{"operationId":"extractTaxProfile","tags":["SAT"],"summary":"Extract tax profile","description":"Consumes a tax_profile_pdf upload and returns structured taxpayer data. First prepare the upload, send the PDF bytes to uploadUrl, and pass its fileRef here. A successful extraction consumes and deletes the temporary file.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":200},"description":"Unique retry key for this exact operation. Reuse it only when retrying the same request."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileRef":{"type":"string","minLength":1}},"required":["fileRef"],"additionalProperties":false},"example":{"fileRef":"file:example"}}}},"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"legalName":{"type":"string"},"taxSystem":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"confidence":{"type":"number","minimum":0,"maximum":1},"method":{"type":"string","enum":["text","vision","qr-live"]},"rfc":{"type":"string"},"address":{"type":"object","properties":{"street":{"type":"string"},"exterior":{"type":"string"},"interior":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"municipality":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postalCode":{"type":"string"}},"required":["country"],"additionalProperties":false},"cfdiUse":{"type":"string"}},"required":["confidence","method"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"legalName":"EJEMPLO SA DE CV","taxSystem":"601","confidence":0.95,"method":"text","rfc":"EJE010101AAA","address":{"country":"MEX","postalCode":"82110"}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `customers:manage` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"The operation conflicts with its current state or idempotency key.\n\nPossible codes: `conflict`, `idempotency_conflict`, `operation_in_progress`, `recovery_required`.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}},"/v1/reports/cfdi":{"get":{"operationId":"getCfdiReport","tags":["Reports"],"summary":"Get CFDI report","description":"Returns recognized CFDI income, expense, and payroll aggregates for the requested month range.","security":[{"bearerAuth":[]}],"parameters":[{"name":"monthFrom","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"monthTo","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},{"name":"contributorLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","const":"cfdi_activity"},"currency":{"type":"string","const":"MXN"},"period":{"type":"object","properties":{"monthFrom":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"monthTo":{"type":"string","pattern":"^\\d{4}-\\d{2}$"}},"required":["monthFrom","monthTo"],"additionalProperties":false},"accountingBasis":{"type":"string","enum":["cash","accrual"]},"receiptSalesIncluded":{"type":"boolean","const":false},"totals":{"type":"object","properties":{"recognizedIncome":{"type":"number"},"recognizedExpenses":{"type":"number"},"payrollPaid":{"type":"number"},"payrollReceived":{"type":"number"},"balance":{"type":"number"},"payrollIncludedInBalance":{"type":"boolean","const":false}},"required":["recognizedIncome","recognizedExpenses","payrollPaid","payrollReceived","balance","payrollIncludedInBalance"],"additionalProperties":false},"contributors":{"type":"object","properties":{"source":{"type":"string","const":"cfdi_activity"},"income":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"}},"required":["name","amount","isOther"],"additionalProperties":false}},"expenses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"}},"required":["name","amount","isOther"],"additionalProperties":false}},"payroll":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"},"direction":{"type":"string","enum":["paid","received"]}},"required":["name","amount","isOther","direction"],"additionalProperties":false}}},"required":["source","income","expenses","payroll"],"additionalProperties":false}},"required":["source","currency","period","accountingBasis","receiptSalesIncluded","totals","contributors"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"examples":{"default":{"value":{"data":{"source":"cfdi_activity","currency":"MXN","period":{"monthFrom":"2026-06","monthTo":"2026-06"},"accountingBasis":"accrual","receiptSalesIncluded":false,"totals":{"recognizedIncome":125000,"recognizedExpenses":42000,"payrollPaid":18000,"payrollReceived":0,"balance":83000,"payrollIncludedInBalance":false},"contributors":{"source":"cfdi_activity","income":[{"name":"Taller Nopal","amount":50000,"isOther":false},{"name":"Estudio Jacaranda","amount":30000,"isOther":false},{"name":"Otros","amount":45000,"isOther":true}],"expenses":[{"name":"Servicios del Bosque","amount":42000,"isOther":false}],"payroll":[{"name":"Equipo Bruma","amount":18000,"isOther":true,"direction":"paid"}]}}}},"mayCustomerSummary":{"summary":"May CFDI activity with top customers","value":{"data":{"source":"cfdi_activity","currency":"MXN","period":{"monthFrom":"2026-05","monthTo":"2026-05"},"accountingBasis":"accrual","receiptSalesIncluded":false,"totals":{"recognizedIncome":125000,"recognizedExpenses":42000,"payrollPaid":18000,"payrollReceived":0,"balance":83000,"payrollIncludedInBalance":false},"contributors":{"source":"cfdi_activity","income":[{"name":"Taller Nopal","amount":50000,"isOther":false},{"name":"Estudio Jacaranda","amount":30000,"isOther":false},{"name":"Otros","amount":45000,"isOther":true}],"expenses":[{"name":"Servicios del Bosque","amount":42000,"isOther":false}],"payroll":[{"name":"Equipo Bruma","amount":18000,"isOther":true,"direction":"paid"}]}}}},"yearToDateExpenses":{"summary":"Year-to-date CFDI activity with supplier concentration","value":{"data":{"source":"cfdi_activity","currency":"MXN","period":{"monthFrom":"2026-01","monthTo":"2026-07"},"accountingBasis":"accrual","receiptSalesIncluded":false,"totals":{"recognizedIncome":825000,"recognizedExpenses":536400,"payrollPaid":126000,"payrollReceived":0,"balance":288600,"payrollIncludedInBalance":false},"contributors":{"source":"cfdi_activity","income":[{"name":"Otros","amount":825000,"isOther":true}],"expenses":[{"name":"Arrendadora del Pacífico","amount":168000,"isOther":false},{"name":"Servicios del Bosque","amount":126000,"isOther":false},{"name":"Nube Norte Software","amount":84000,"isOther":false},{"name":"Otros","amount":158400,"isOther":true}],"payroll":[{"name":"Equipo Bruma","amount":126000,"isOther":true,"direction":"paid"}]}}}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `analytics:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/reports/sales":{"get":{"operationId":"getSalesReport","tags":["Reports"],"summary":"Get sales report","description":"Returns POS sales-receipt aggregates for the requested business day, including invoiced and uninvoiced activity.","security":[{"bearerAuth":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"activityLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","const":"sales_receipts"},"currency":{"type":"string","const":"MXN"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"includesInvoicedReceipts":{"type":"boolean","const":true},"cfdiTotalsIncluded":{"type":"boolean","const":false},"totals":{"type":"object","properties":{"netSales":{"type":"number"},"receiptCount":{"type":"number"}},"required":["netSales","receiptCount"],"additionalProperties":false},"byPaymentMethod":{"type":"array","items":{"type":"object","properties":{"paymentMethod":{"type":"string","enum":["cash","card","transfer","credit","other"]},"netSales":{"type":"number"},"share":{"type":"number"}},"required":["paymentMethod","netSales","share"],"additionalProperties":false}},"top":{"type":"object","properties":{"customers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"quantity":{"type":"number"},"receiptCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","quantity","receiptCount","share"],"additionalProperties":false}},"products":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"quantity":{"type":"number"},"receiptCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","quantity","receiptCount","share"],"additionalProperties":false}},"locations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"quantity":{"type":"number"},"receiptCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","quantity","receiptCount","share"],"additionalProperties":false}}},"required":["customers","products","locations"],"additionalProperties":false}},"required":["source","currency","date","includesInvoicedReceipts","cfdiTotalsIncluded","totals","byPaymentMethod","top"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"source":"sales_receipts","currency":"MXN","date":"2026-01-31","includesInvoicedReceipts":true,"cfdiTotalsIncluded":false,"totals":{"netSales":25000,"receiptCount":32},"byPaymentMethod":[],"top":{"customers":[],"products":[],"locations":[]}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `analytics:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/reports/expenses":{"get":{"operationId":"getExpenseCashReport","tags":["Reports"],"summary":"Get expense report","description":"Summarizes manual operational cash outflows, excluding received CFDI invoices and unpaid manual expenses.","security":[{"bearerAuth":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"activityLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","const":"cash_expenses"},"currency":{"type":"string","const":"MXN"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"historicalCoverage":{"type":"string","const":"forward_only"},"accountingBasis":{"type":"string","const":"cash"},"totals":{"type":"object","properties":{"cashOutflow":{"type":"number"},"movementCount":{"type":"number"},"classified":{"type":"number"},"unclassified":{"type":"number"},"unallocated":{"type":"number"}},"required":["cashOutflow","movementCount","classified","unclassified","unallocated"],"additionalProperties":false},"bySource":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"number"},"share":{"type":"number"}},"required":["key","amount","share"],"additionalProperties":false}},"byPaymentMethod":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"number"},"share":{"type":"number"}},"required":["key","amount","share"],"additionalProperties":false}},"top":{"type":"object","properties":{"suppliers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"movementCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","movementCount","share"],"additionalProperties":false}},"categories":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"movementCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","movementCount","share"],"additionalProperties":false}},"locations":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"movementCount":{"type":"number"},"share":{"type":"number"}},"required":["name","amount","movementCount","share"],"additionalProperties":false}}},"required":["suppliers","categories","locations"],"additionalProperties":false}},"required":["source","currency","date","historicalCoverage","accountingBasis","totals","bySource","byPaymentMethod","top"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"source":"cash_expenses","currency":"MXN","date":"2026-07-18","historicalCoverage":"forward_only","accountingBasis":"cash","totals":{"cashOutflow":18500,"movementCount":8,"classified":12000,"unclassified":5000,"unallocated":1500},"bySource":[],"byPaymentMethod":[],"top":{"suppliers":[],"categories":[],"locations":[]}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `analytics:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/reports/cfdi-collections":{"get":{"operationId":"getCfdiCollectionReport","tags":["Reports"],"summary":"Get CFDI collection report","description":"Returns cash collection activity and balances for valid sent income CFDIs on the requested CFDI date.","security":[{"bearerAuth":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","const":"cfdi_collections"},"currency":{"type":"string","const":"MXN"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"historicalCoverage":{"type":"string","const":"forward_only"},"recognitionBasis":{"type":"string","const":"cash_activity"},"totals":{"type":"object","properties":{"grossCollected":{"type":"number"},"movementCount":{"type":"number"}},"required":["grossCollected","movementCount"],"additionalProperties":false},"byRecognitionSource":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"number"},"movementCount":{"type":"number"},"share":{"type":"number"}},"required":["key","amount","movementCount","share"],"additionalProperties":false}},"byPaymentMethod":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"amount":{"type":"number"},"movementCount":{"type":"number"},"share":{"type":"number"}},"required":["key","amount","movementCount","share"],"additionalProperties":false}}},"required":["source","currency","date","historicalCoverage","recognitionBasis","totals","byRecognitionSource","byPaymentMethod"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"example":{"data":{"source":"cfdi_collections","currency":"MXN","date":"2026-07-18","historicalCoverage":"forward_only","recognitionBasis":"cash_activity","totals":{"grossCollected":32500,"movementCount":11},"byRecognitionSource":[],"byPaymentMethod":[]}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `analytics:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production","sandbox"]}},"/v1/reports/taxes":{"get":{"operationId":"getTaxReport","tags":["Reports"],"summary":"Get tax report","description":"Returns authoritative declared, paid, and pending tax totals sourced from synchronized SAT declarations.","security":[{"bearerAuth":[]}],"servers":[{"url":"https://adventurous-moose-616.convex.site","description":"Current Exac production API deployment"}],"parameters":[{"name":"fiscalYear","in":"query","required":true,"schema":{"type":"integer","minimum":2000,"maximum":2100}},{"name":"period","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":12}},{"name":"contributorLimit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"Operation completed.","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"source":{"type":"string","const":"sat_declarations"},"currency":{"type":"string","const":"MXN"},"fiscalYear":{"type":"number"},"selectedPeriod":{"anyOf":[{"type":"number"},{"type":"null"}]},"declarationCoverage":{"type":"string","enum":["none","partial","complete"]},"filedPeriods":{"type":"array","items":{"type":"number"}},"missingPeriods":{"type":"array","items":{"type":"number"}},"totals":{"anyOf":[{"type":"object","properties":{"declaredTaxTotal":{"type":"number"},"paidTaxTotal":{"type":"number"},"pendingTaxTotal":{"type":"number"},"breakdown":{"type":"object","properties":{"isr":{"type":"number"},"iva":{"type":"number"},"withholdings":{"type":"number"},"unclassified":{"type":"number"}},"required":["isr","iva","withholdings","unclassified"],"additionalProperties":false}},"required":["declaredTaxTotal","paidTaxTotal","pendingTaxTotal","breakdown"],"additionalProperties":false},{"type":"null"}]},"periods":{"type":"array","items":{"type":"object","properties":{"period":{"type":"number"},"filingCount":{"type":"number"},"declaredTaxTotal":{"type":"number"},"paidTaxTotal":{"type":"number"},"pendingTaxTotal":{"type":"number"},"paymentStatus":{"type":"string","enum":["no_obligation","pending","partially_paid","paid"]},"breakdown":{"type":"object","properties":{"isr":{"type":"number"},"iva":{"type":"number"},"withholdings":{"type":"number"},"unclassified":{"type":"number"}},"required":["isr","iva","withholdings","unclassified"],"additionalProperties":false},"withholdingDetails":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"}},"required":["name","amount"],"additionalProperties":false}}},"required":["period","filingCount","declaredTaxTotal","paidTaxTotal","pendingTaxTotal","paymentStatus","breakdown","withholdingDetails"],"additionalProperties":false}},"cfdiContext":{"anyOf":[{"type":"object","properties":{"usedForTaxAmounts":{"type":"boolean","const":false},"contributors":{"type":"object","properties":{"source":{"type":"string","const":"cfdi_activity"},"income":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"}},"required":["name","amount","isOther"],"additionalProperties":false}},"expenses":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"}},"required":["name","amount","isOther"],"additionalProperties":false}},"payroll":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"amount":{"type":"number"},"isOther":{"type":"boolean"},"direction":{"type":"string","enum":["paid","received"]}},"required":["name","amount","isOther","direction"],"additionalProperties":false}}},"required":["source","income","expenses","payroll"],"additionalProperties":false}},"required":["usedForTaxAmounts","contributors"],"additionalProperties":false},{"type":"null"}]}},"required":["source","currency","fiscalYear","selectedPeriod","declarationCoverage","filedPeriods","missingPeriods","totals","periods","cfdiContext"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"examples":{"default":{"value":{"data":{"source":"sat_declarations","currency":"MXN","fiscalYear":2026,"selectedPeriod":null,"declarationCoverage":"none","filedPeriods":[],"missingPeriods":[1,2,3,4,5,6,7,8,9,10,11,12],"totals":null,"periods":[],"cfdiContext":null}}},"juneFiled":{"summary":"June declaration recorded, payment not yet recorded","value":{"data":{"source":"sat_declarations","currency":"MXN","fiscalYear":2026,"selectedPeriod":6,"declarationCoverage":"partial","filedPeriods":[6],"missingPeriods":[1,2,3,4,5,7,8,9,10,11,12],"totals":{"declaredTaxTotal":12800,"paidTaxTotal":0,"pendingTaxTotal":12800,"breakdown":{"isr":7800,"iva":5000,"withholdings":0,"unclassified":0}},"periods":[{"period":6,"filingCount":1,"declaredTaxTotal":12800,"paidTaxTotal":0,"pendingTaxTotal":12800,"paymentStatus":"pending","breakdown":{"isr":7800,"iva":5000,"withholdings":0,"unclassified":0},"withholdingDetails":[]}],"cfdiContext":{"usedForTaxAmounts":false,"contributors":{"source":"cfdi_activity","income":[{"name":"Taller Nopal","amount":50000,"isOther":false},{"name":"Estudio Jacaranda","amount":30000,"isOther":false},{"name":"Otros","amount":45000,"isOther":true}],"expenses":[{"name":"Servicios del Bosque","amount":42000,"isOther":false}],"payroll":[{"name":"Equipo Bruma","amount":18000,"isOther":true,"direction":"paid"}]}}}}}}}}},"400":{"description":"Invalid request.\n\n`validation_error`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Missing or invalid credential.\n\n`unauthenticated`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"The credential does not include the `sat:read` permission.\n\n`forbidden`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"WWW-Authenticate":{"$ref":"#/components/headers/WWWAuthenticate"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Resource not found.\n\n`not_found`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"405":{"description":"Method not allowed.\n\n`method_not_allowed`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Allow":{"$ref":"#/components/headers/Allow"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Too many requests.\n\n`rate_limited`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Internal server error.\n\n`internal`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Service temporarily unavailable.\n\n`provider_unavailable`","headers":{"Request-Id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"x-exac-environments":["production"]}}}}