Changelog
In progress
- New documentation (this site).
- Extended response flags (
contingency,rejected,dte_success,dte_state,dte_message,observaciones,codigo_msg). - Idempotent retries on invalidations.
- Improvement: the
customer.phonefield is now reflected on the customer record and in the recipient phone of the signed DTE. - Unified file URLs under
/api/connect/file/{id}— previously the status responses and NC/Export/SUEX endpoints pointed to different paths (/api/v2/sales-history/{id}/filefor sales and/api/v2/suex-history/{id}/filefor SUEX). Now all responses return URLs under the unified endpoint/api/connect/file/{id}?type=..., which looks up sales and SUEX automatically. - New
invoice_urlfield on/invoiceand/status/{id}responses — URL to the letter-sized PDF of the document. Complements the existingticket_url(8×21 cm thermal, Invoice 01 only) andjson_url(signed DTE). - Dual authentication on
/file/{id}— the download endpoint acceptsAuthorization: Bearer odt_xxx(recommended) or?key=odt_xxxas a deprecated fallback. The fallback is preserved for compatibility but will eventually be removed. URLs returned by the API no longer include?key=— use the header. - Documentation improvement: corrected the description of
deadlineandperiodin the Invoice (01) page and in MH catalogs.deadlineis the term unit (MH CAT-018):1=Days,2=Months,3=Years — not the number of days. The numeric amount goes inperiod. Examples updated across Invoice 01, CCF 03 and Export Invoice 11 to reflect the correct semantics ("deadline": 1, "period": 30for 30 days of credit). - New
districtfield incustomerfor/invoiceandsubjectfor/suex— district UUID obtained from/catalogs/districts/search. When sent, the API automatically resolves the MH department and municipality from the parent district. This is the recommended flow because you don't deal with MH codes. If not sent,departmentandmunicipalitywork exactly as before. - New
/catalogs/districts/searchendpoint — searches districts by name, useful for dropdowns/autocomplete in your UI. Same experience as the Ocote desktop panel. municipalityaccepts short or long format — besides the historical short format ("24"), you can now send the 4-digit code the catalog returns ("1124") directly in the payload. Both resolve to the same municipality. Integrations using the short format continue to work unchanged.- New
short_codefield in the/catalogs/departmentsresponse — the last 2 digits of the municipality code (the rawtown). Exposed alongside the 4-digitcodefor clarity. - Accent-insensitive search across all catalog endpoints (
/activities,/departments,/districts/search,/units) —programacionmatchesPROGRAMACIÓN INFORMÁTICA,berlinmatchesBerlín, etc.
Backwards compatibility
If you already consume the API, you do not need to change your code. New fields are additive:
- The
successflag still means "operation registered", which now explicitly includes contingency (previously ambiguous). - The deprecated
amountandamount_retfields in/status/{id}remain as aliases ofamount_grossandamount_retention. - Input schemas unchanged.
- Old URLs
/api/v2/sales-history/{id}/fileand/api/v2/suex-history/{id}/filecontinue to work — if your integration builds them directly, nothing breaks. The refactor only changes what the API returns in the*_urlfields; if you consumed them as-is from the response, your client will just pick up the new values. - The
?key=odt_xxxfallback on/file/{id}still works — integrations that already embed that format in emails or shareable links don't break. Migration to theAuthorizationheader is recommended for new accounts or server-to-server endpoints.
Optional migration
If you want to take advantage of the new flags to distinguish MH success from contingency in your logic, read Responses and states and Retry and idempotency.