Download OpenAPI specification:
Tatem API
This endpoint generates an access token using the resource owner password credentials grant type. If the user has 2FA enabled, a temporary token will be returned and a verification code will be sent to their WhatsApp number. The user must then submit the verification code to complete the authentication process.
| grant_type | string Value: "password" Must be set to |
| username | string The user's username. |
| password | string The user's password. |
| client_id | string The client ID issued by the OAuth server. |
| client_secret | string The client secret issued by the OAuth server. |
| device_id | string The trusted device ID. |
{- "error": "invalid_request",
- "error_description": "Missing client_id and/or client_secret parameters"
}Use a refresh token to obtain a new access token when the current one expires.
| grant_type | string Value: "refresh_token" Must be set to |
| refresh_token | string The refresh token issued during the initial authentication. |
| client_id | string The client ID issued by the authorization server. |
| client_secret | string The client secret issued by the authorization server. |
{- "access_token": "string",
- "token_type": "Bearer",
- "expires_in": 0,
- "refresh_token": "string"
}Invalidates the current access token and its associated refresh token
| device_id | string The trusted device ID. |
{- "message": "Successfully logged out"
}Requests a password reset for the user's email address
string The user's email address | |
| passwordResetPath | string The path to the password reset page. The [passwordResetCode] will be replaced with the actual password reset code. |
{- "email": "string",
- "passwordResetPath": "/reset-password/[passwordResetCode]"
}{- "success": true,
- "message": "Password reset request sent"
}Resets the user's password
| passwordResetCode | string The password reset code |
| password | string The new password |
{- "passwordResetCode": "string",
- "password": "string"
}{- "success": true,
- "message": "Password reset successfully"
}{- "id": "abcd",
- "firstName": "John",
- "lastName": "Sculley",
- "username": "johnsculley@tatem.mx",
- "email": "johnsculley@tatem.mx",
- "emailVerifiedAt": "2024-12-01T17:24:59.146Z",
- "whatsappNumber": "521234567890",
- "whatsappNumberVerifiedAt": "2024-12-01T17:24:59.146Z",
- "role": "accountant",
- "createdAt": "2024-12-01T17:24:59.146Z",
- "updatedAt": "2024-12-01T17:24:59.146Z",
- "organizations": [
- {
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "isDemoMode": false
}, - "role": "accountant"
}
], - "defaultOrganizationId": "b8c6d7f2-93a8-47a9-a281-9086316be7e8",
- "is2faEnabled": null,
- "pendingInvitations": true
}Creates a new user account with the provided information
| firstName required | string non-empty User's first name(s) |
| lastName required | string non-empty User's last name(s) |
| emailAddress required | string <email> User's email address |
| invitationCode | string Code for accepting an invitation |
| userInvitationCode | string Code for accepting an invitation to a user |
| password | string <password> >= 8 characters ^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0... Password must contain at least 8 characters, including lowercase, uppercase, number, and special character. Only required if googleIdToken isn't provided |
| googleIdToken | string Google ID token of the user |
| country | string Country of the user |
| region | string ISO_3166-2 region of the user |
| city | string City of the user |
{- "firstName": "string",
- "lastName": "string",
- "emailAddress": "user@example.com",
- "invitationCode": "string",
- "userInvitationCode": "string",
- "password": "pa$$word",
- "googleIdToken": "string",
- "country": "MX",
- "region": "MX-DF",
- "city": "Mexico City"
}{- "success": true,
- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "firstName": "string",
- "lastName": "string",
- "email": "user@example.com",
- "username": "user@example.com",
- "role": "owner",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "pendingInvitations": true
}, - "token": "string"
}Updates the authenticated user's information
| firstName | string |
| lastName | string |
| emailAddress | string |
| whatsappNumber | string |
| currentPassword | string The user's current password. Required if newPassword is provided. |
| newPassword | string |
| is2faEnabled | boolean Indicates if the user has 2FA enabled. |
| isLastLogin | boolean If set, the users' 'lastLoginAt' field will be updated with the current date. |
{- "firstName": "string",
- "lastName": "string",
- "emailAddress": "string",
- "whatsappNumber": "string",
- "currentPassword": "string",
- "newPassword": "string",
- "is2faEnabled": true,
- "isLastLogin": true
}{- "success": true,
- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "firstName": "string",
- "lastName": "string",
- "email": "user@example.com",
- "whatsappNumber": "string",
- "role": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "verifyEmail": true,
- "verifyWhatsappNumber": true
}Deletes the authenticated user
| password | string The user's password |
{- "password": "password"
}{- "success": true
}Updates the authenticated user's default organization
| defaultOrganizationId | string <uuid> |
{- "defaultOrganizationId": "b8c6d7f2-93a8-47a9-a281-9086316be7e8"
}{- "success": true,
- "message": "User default organization updated"
}Verifies the whatsapp number based on an invitation code linked to the user
| code required | string The verification code sent to the user's WhatsApp number |
{- "code": "123456"
}{- "success": true,
- "message": "Whatsapp number verified"
}Verifies the email address based on an invitation code linked to the user
| code required | string The verification code sent to the user's email address |
{- "code": "123456"
}{- "success": true,
- "message": "Email address verified"
}Retrieves a paginated list of organizations with optional filters
| provider_id required | string <uuid> ID of the provider to fetch organizations for |
| name | string Filter organizations by name (case-insensitive partial match) |
| statuses | string Example: statuses=pending,verified,not_verified Comma-separated list of organization statuses to filter by |
| bank_account_id | string Bank account Id assigned from the provider to filter the organizations for |
| include_invoice_preferences | boolean Default: false Include invoice preferences in the response |
| sort | string Default: "name" Enum: "name" "taxIdentifier" "status" Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Enum: 10 30 60 100 Number of items per page |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "status": "pending",
- "invoicePreferences": {
- "allowedInvoiceDays": [
- {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}, - {
- "from": "string",
- "to": "string"
}
], - "isPurchaseOrderMandatory": false,
- "monthEndInvoiceDays": 0,
- "isComplianceDocumentMandatory": false,
- "isEfosClearanceMandatory": false,
- "isBankingInformationMandatory": false,
- "isPdfMandatory": false
}, - "providers": [
- {
- "creditDays": 30,
- "creditPeriod": "d",
- "bankAccount": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}, - "provider": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}
]
}
], - "totalPages": 0,
- "totalCount": 0
}Creates a new organization with the provided details
| commercialName | string Commercial/trading name of the organization |
| industry | string Industry of the organization |
| role | string Enum: "owner" "accountant" Role of the user creating the organization |
{- "commercialName": "string",
- "industry": "string",
- "role": "owner"
}{- "success": true,
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "isEntity": true,
- "industry": "string",
- "status": "pending",
}
}Retrieves detailed information about a specific organization
| id required | string <uuid> ID of the organization to retrieve |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "601",
- "description": "General de Ley Personas Morales"
}
], - "cfdiUse": "G01",
- "slug": "string",
- "postalCode": "string",
- "addressStreet": "string",
- "addressNumber": "string",
- "addressNumberInterior": "string",
- "addressNeighborhood": "string",
- "addressCity": "string",
- "addressMunicipality": "string",
- "addressState": "string",
- "isEntity": true,
- "taxIdentificationDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "TAX_IDENTIFICATION_DOCUMENT",
- "filename": "string",
}, - "taxIdentificationDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "complianceDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "type": "COMPLIANCE_DOCUMENT",
- "filename": "string",
}, - "complianceDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "economicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "fielUploadedAt": "2019-08-24T14:15:22Z",
- "csdUploadedAt": "2019-08-24T14:15:22Z",
- "invoicesInbox": "string",
- "status": "verified",
- "completionStage": "none",
- "facturapiValidatedAt": "2019-08-24T14:15:22Z",
- "facturapiValidationErrors": "string",
- "industry": "string",
- "isDemoMode": true,
- "contactFirstName": "Juan",
- "contactLastName": "Pérez",
- "contactEmailAddress": "juan.perez@example.com",
- "contactPhoneNumber": "525512345678",
- "contactJobTitle": "Gerente General",
- "beneficiaryName": "Juan Pérez",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "deletionRequestedAt": "2019-08-24T14:15:22Z"
}Update organization details
| commercialName | string Commercial/trading name of the organization |
| industry | string Industry of the organization |
| invoicesInbox | string Inbox alias for deductibles |
| avatarUrl | string <uri> URL of the organization's avatar image |
| isDemoMode | boolean Default: false |
| contactFirstName | string First name of the organization contact person |
| contactLastName | string Last name of the organization contact person |
| contactEmailAddress | string <email> Email address of the organization contact person |
| contactPhoneNumber | string Phone number of the organization contact person (international format without +) |
| contactJobTitle | string Job title of the organization contact person |
{- "commercialName": "Turistica Dinamica San Luis",
- "industry": "Turistica",
- "invoicesInbox": "facturas-turistica-dinamica-san-luis",
- "isDemoMode": false,
- "contactFirstName": "Juan",
- "contactLastName": "Pérez",
- "contactEmailAddress": "juan.perez@example.com",
- "contactPhoneNumber": "525512345678",
- "contactJobTitle": "Gerente General"
}{- "success": true
}Retrieves fiscal data for a specific organization by its slug
| slug required | string Example: slug=turistica-dinamica-san-luis Slug of the organization |
| recaptcha_token required | string Example: recaptcha_token=1234567890 reCAPTCHA token |
{- "success": true,
- "organization": {
- "name": "string",
- "commercialName": "string",
- "postalCode": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "601",
- "description": "General de Ley Personas Morales"
}
], - "cfdiUse": "string",
- "addressStreet": "string",
- "addressNumber": "string",
- "addressNumberInterior": "string",
- "addressNeighborhood": "string",
- "addressCity": "string",
- "addressMunicipality": "string",
- "addressState": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "users": [
- {
- "email": "string"
}
],
}
}Updates an organization's bank information. The user must be associated with the organization and have permission to edit organization details.
| bankIdentifier required | string Bank identifier |
| beneficiaryName required | string Name of the beneficiary |
{- "bankIdentifier": "123456789012345678",
- "beneficiaryName": "Juan Pérez"
}{- "success": true,
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "Organización Ejemplo, S.A. de C.V.",
- "status": "pending"
}
}Uploads a tax identification document (PDF) for an organization. The user must be associated with the organization and have permission to edit organization details.
| id required | string <uuid> ID of the organization |
| taxIdentificationDocumentPdf required | string <binary> PDF file containing the tax identification document |
{- "success": true,
- "message": "File uploaded successfully",
- "file": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "tax_identification_document",
- "filename": "string",
}
}Generates the tax identification document for the organization from SAT using FIEL
| organizationId required | string <uuid> ID of the organization to generate the tax identification document for |
{- "success": true
}Uploads a compliance document (PDF) for an organization. The user must be associated with the organization and have permission to edit organization details.
| id required | string <uuid> ID of the organization |
| complianceDocumentPdf required | string <binary> PDF file containing the compliance document |
{- "success": true,
- "message": "File uploaded successfully",
- "file": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "tax_identification_document",
- "filename": "string",
}
}Generates the compliance document for the organization from SAT using FIEL
| organizationId required | string <uuid> ID of the organization to generate the compliance document for |
{- "success": true
}Retrieves the amount paid to the providers and the amount to pay within a specific date range. If no date range is provided, it returns the total amounts across all time.
| organizationId required | string <uuid> ID of the organization to get the account balance for |
| from | string <date> Start date for filtering invoices by payment due date (format YYYY-MM-DD) |
| to | string <date> End date for filtering invoices by payment due date (format YYYY-MM-DD) |
{- "paidAmount": 0,
- "dueAmount": 0,
- "totalAmount": 0,
- "fromDate": "2019-08-24T14:15:22Z",
- "toDate": "2019-08-24T14:15:22Z"
}Uploads the FIEL certificate and key files and the password for the organization
| organizationId required | string <uuid> ID of the organization to upload the FIEL files and password for |
| fielCertFileId | string <uuid> |
| fielKeyFileId | string <uuid> |
| fielPassword | string |
{- "fielCertFileId": "123e4567-e89b-12d3-a456-426614174000",
- "fielKeyFileId": "123e4567-e89b-12d3-a456-426614174000",
- "fielPassword": "abcd123"
}{- "success": true,
- "message": "fiel_files_uploaded",
- "error": "organization_already_exists"
}Removes the FIEL certificate and key files and the password for the organization
| organizationId required | string <uuid> ID of the organization to remove the FIEL files and password for |
{- "success": true,
- "message": "fiel_files_removed"
}Uploads the CSD certificate and key files and the password for the organization
| organizationId required | string <uuid> ID of the organization to upload the CSD files and password for |
| csdCertFileId | string <uuid> |
| csdKeyFileId | string <uuid> |
| csdPassword | string |
{- "csdCertFileId": "123e4567-e89b-12d3-a456-426614174000",
- "csdKeyFileId": "123e4567-e89b-12d3-a456-426614174000",
- "csdPassword": "abcd123"
}{- "success": true,
- "message": "csd_files_uploaded"
}Removes the CSD certificate and key files and the password for the organization
| organizationId required | string <uuid> ID of the organization to remove the CSD files and password for |
{- "success": true,
- "message": "csd_files_removed"
}Retrieves the invoice preferences for a specific organization. The user must have permission to access invoice preferences and be associated with the organization.
| organizationId required | string <uuid> The ID of the organization |
{- "invoicePreferences": {
- "paymentMethods": [
- "string"
], - "cfdiUses": [
- "string"
], - "paymentForms": [
- "string"
], - "currencyCodes": [
- "string"
], - "paymentDay": 6,
- "allowedInvoiceDays": [
- {
- "from": "14:15:22Z",
- "to": "14:15:22Z"
}
], - "monthEndInvoiceDays": 3,
- "isEfosClearanceMandatory": true,
- "isComplianceDocumentMandatory": true,
- "numberOfMissingPendingInvoicePaymentsAllowed": 0,
- "isBankingInformationMandatory": true,
- "isPurchaseOrderMandatory": true,
- "isStampedAtCurrentMonthMandatory": true,
- "archivePaidInvoices": true,
- "archiveCompletedInvoices": true,
- "archiveReceivableCompletedInvoices": true,
- "archiveReceivablePaidGenericInvoices": true,
- "archiveReceivablePaidGenericForeignInvoices": true,
- "paymentDueAtAnchor": "createdAt",
- "updateInvoicesOnCreditDaysChange": true,
- "isPdfMandatory": false
}
}Updates the invoice preferences for a specific organization. The user must have permission to update invoice preferences and be associated with the organization.
| organizationId required | string <uuid> The ID of the organization |
| paymentMethods | Array of strings or null Payment method codes |
| cfdiUses | Array of strings or null CFDI use codes |
| paymentForms | Array of strings or null Payment form codes |
| currencyCodes | Array of strings or null Currency codes |
| paymentDay | integer or null [ 0 .. 6 ] Day of the week for payment (0-6, where 0 is Sunday) |
Array of objects or null Allowed time periods for each day of the week to submit invoices | |
| monthEndInvoiceDays | integer or null [ 0 .. 3 ] Number of days before the end of the month to allow invoice uploads |
| isEfosClearanceMandatory | boolean or null Whether the clearance is mandatory for the provider to upload invoices |
| isComplianceDocumentMandatory | boolean or null Whether the compliance document is mandatory for the provider to upload invoices |
| numberOfMissingPendingInvoicePaymentsAllowed | integer or null Number of missing pending invoice payments allowed for the provider to upload invoices |
| isBankingInformationMandatory | boolean or null Whether the banking information is mandatory for the provider to upload invoices |
| isPurchaseOrderMandatory | boolean or null Whether the purchase order is mandatory for the provider to upload invoices |
| isStampedAtCurrentMonthMandatory | boolean or null Whether the provider can only upload invoices stamped at the current month |
| archivePaidInvoices | boolean or null Whether to archive paid PUE invoices |
| archiveCompletedInvoices | boolean or null Whether to archive completed PPD invoices |
| archiveReceivableCompletedInvoices | boolean or null When an invoice is completed, archive the invoice for the provider |
| archiveReceivablePaidGenericInvoices | boolean or null When an invoice is generic and is paid, archive the invoice for the provider |
| archiveReceivablePaidGenericForeignInvoices | boolean or null When an invoice is generic and foreign, and is paid, archive the invoice for the provider |
| paymentDueAtAnchor | string or null Enum: "createdAt" "stampedAt" "acceptedAt" The anchor date for the payment due at |
| updateInvoicesOnCreditDaysChange | boolean or null Whether to update credit days for all non paid invoices already sent to the organization. If set to false this change will apply to all future incoming invoices only. |
| isPdfMandatory | boolean or null When true, the organization requires the provider to upload an invoice PDF along with the XML when submitting an invoice. If the provider does not send a PDF, the API returns error |
{- "paymentMethods": [
- "string"
], - "cfdiUses": [
- "string"
], - "paymentForms": [
- "string"
], - "currencyCodes": [
- "string"
], - "paymentDay": 6,
- "allowedInvoiceDays": [
- {
- "from": "14:15:22Z",
- "to": "14:15:22Z"
}
], - "monthEndInvoiceDays": 3,
- "isEfosClearanceMandatory": true,
- "isComplianceDocumentMandatory": true,
- "numberOfMissingPendingInvoicePaymentsAllowed": 0,
- "isBankingInformationMandatory": true,
- "isPurchaseOrderMandatory": true,
- "isStampedAtCurrentMonthMandatory": true,
- "archivePaidInvoices": true,
- "archiveCompletedInvoices": true,
- "archiveReceivableCompletedInvoices": true,
- "archiveReceivablePaidGenericInvoices": true,
- "archiveReceivablePaidGenericForeignInvoices": true,
- "paymentDueAtAnchor": "createdAt",
- "updateInvoicesOnCreditDaysChange": true,
- "isPdfMandatory": true
}{- "success": true
}Retrieves the deductible preferences for a specific organization. The user must have permission to access deductible preferences and be associated with the organization.
| organizationId required | string <uuid> The ID of the organization |
| expand | boolean If set to true, the expanded preferences are returned |
{- "deductiblePreferences": {
- "paymentMethods": [
- "string"
], - "cfdiUses": [
- "string"
], - "paymentForms": [
- "string"
], - "currencyCodes": [
- "string"
], - "archiveNotDeductibles": true,
- "archivePastDeductibles": true,
- "autoApplyReasoning": true,
- "autoAcceptReasoning": true,
- "organization": {
- "name": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "601",
- "description": "General de Ley Personas Morales"
}
], - "postalCode": "string",
- "economicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
]
}, - "deductibleRules": {
- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "isEnabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}
}Updates the deductible preferences for a specific organization. The user must have permission to update deductible preferences and be associated with the organization.
| organizationId required | string <uuid> The ID of the organization |
| paymentMethods | Array of strings or null Payment method codes |
| cfdiUses | Array of strings or null CFDI use codes |
| paymentForms | Array of strings or null Payment form codes |
| currencyCodes | Array of strings or null Currency codes |
| archiveNotDeductibles | boolean or null Whether to archive not deductible deductibles |
| archivePastDeductibles | boolean or null Whether to archive past deductibles |
| autoApplyReasoning | boolean or null Whether to auto apply reasoning |
| autoAcceptReasoning | boolean or null Whether to auto accept reasoning |
{- "paymentMethods": [
- "string"
], - "cfdiUses": [
- "string"
], - "paymentForms": [
- "string"
], - "currencyCodes": [
- "string"
], - "archiveNotDeductibles": true,
- "archivePastDeductibles": true,
- "autoApplyReasoning": true,
- "autoAcceptReasoning": true
}{- "success": true
}Get users on organizations
| id | string <uuid> ID of the organization. If not provided, the authenticated user's organizations will be returned. |
| name | string Name of the organization to filter |
| commercial_name | string Commercial name of the organization to filter |
| tax_identifier | string Tax identifier of the organization to filter |
| is_entity | boolean Whether the organization is an entity |
| sort | string Enum: "name" "commercialName" "taxIdentifier" "isEntity" Sort the organizations by a field |
| order | string Enum: "asc" "desc" Order the organizations by a field |
| page | integer Page number |
| limit | integer Page size |
[- {
- "user": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "firstName": "string",
- "lastName": "string",
- "username": "string",
- "lastLoginAt": "2019-08-24T14:15:22Z"
}, - "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "postalCode": "string",
- "taxIdentifier": "string",
- "isEntity": true,
- "industry": "string",
- "status": "verified",
- "deductibleSyncStatus": "not_configured",
- "deductibleSyncs": [
- {
- "tasks": [
- {
- "finishedAt": "2019-08-24T14:15:22Z"
}
]
}
]
}, - "role": "collaborator",
- "readAt": "2019-08-24T14:15:22Z",
- "lastDeductibleReadAt": "2019-08-24T14:15:22Z",
- "favoritedAt": "2019-08-24T14:15:22Z",
- "disabledAt": "2019-08-24T14:15:22Z"
}
]Update a user on an organization
| id required | string <uuid> ID of the organization |
| user_id | string <uuid> ID of the user on the organization |
| isRead | boolean |
| isFavorite | boolean |
| role | string Enum: "owner" "accountant" "collaborator" "assistant" "client" "readonly" Role of the user on the organization. Accepted only if user_id is provided. |
| isDisabled | boolean |
{- "isRead": true,
- "isFavorite": true,
- "role": "owner",
- "isDisabled": true
}{- "success": true
}Delete a user on an organization
| id required | string <uuid> ID of the organization |
| user_id required | string <uuid> ID of the user on the organization |
{- "success": true
}Updates the credit days setting or providers' bank account for a specific provider-organization relationship. The user must be associated with both the provider and organization. Only a user managing the organization side of the relationship can update credit days and period. Only a user managing the provider side of the relationship can update the bank account, except the provider is being managed by the user's organization.
| update_invoices | boolean Default: false If set to 'true', all invoices that haven't been paid will have its paymentDueAt value recalculated according to the new setting for the provider |
| organizationId required | string <uuid> ID of the organization |
| providerId required | string <uuid> ID of the provider |
| creditDays | integer [ 1 .. 365 ] Number of credit days for the provider-organization relationship |
| creditPeriod | string Enum: "d" "m" "y" Credit period for the provider-organization relationship |
| bankAccountId | string or null <uuid> Id of the provider's bank account to assign to this relationship |
| referenceNumber | string or null Reference number for this client when doing payments to this provider |
| bankAccountInstructionsFileId | string or null Bank account instructions PDF file id |
{- "providerOrganizations": [
- {
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24"
}
], - "creditDays": 30,
- "creditPeriod": "d",
- "bankAccountId": "5b26b598-a880-4e32-8c41-126aa0206857",
- "referenceNumber": "string",
- "bankAccountInstructionsFileId": "string"
}{- "success": true
}Get the credit days setting and provider's bank account for a specific provider-organization relationship. The user must be associated with both the provider and organization.
| organization_id required | any Organization Id of the provider-organization relationship |
| provider_id required | any Provider Id of the provider-organization relationship |
{- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",
- "creditDays": 30,
- "creditPeriod": "d",
- "bankAccount": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true
}, - "referenceNumber": "string",
- "bankAccountInstructionsFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}Returns a list of all available geo data
| postal_code required | string The postal code to get geo data for |
{- "success": true,
- "data": [
- {
- "neighborhood": "Colonia 1",
- "city": "Ciudad de México",
- "municipality": "Álvaro Obregón",
- "state": "CDMX"
}
]
}Checks if a tax identifier is in the EFOS list
| tax_identifier required | string Tax identifiers to check, comma separated |
| organization_id required | string <uuid> |
{- "success": true,
- "data": [
- {
- "taxIdentifier": "string",
- "isInEfos": true
}
]
}Uploads a file to the system. The file type must be specified in the query parameters. Different file types have different allowed MIME types:
| type required | string Enum: "payment_proof" "invoice_xml" "invoice_pdf" "tax_identification_document" "purchase_order_pdf" "good_standing_document" "sales_receipt" "other" "payment_proof_deductible" "payment_receipt" "invoice_payment_xml" "invoice_payment_pdf" "zip" "xls" "fiel_cert_file" "fiel_key_file" "csd_cert_file" "csd_key_file" "deductibles_upload_zip" "deductible_xml" "deductible_pdf" "deductible_zip" "deductible_xls" "subscription_invoice_zip" "compliance_document" "expense" "expenses_zip" "expenses_xls" "expenses_upload_zip" "invoices_upload_zip" "billing_invoice_xml" "billing_invoice_pdf" "billing_invoice_zip" "bank_account_instructions_pdf" "provider_prospects_xls" "employee_contract_pdf" "payroll_xml" "payroll_report_pdf" "payroll_payment_proof" Type of file being uploaded |
| file required | string <binary> The file to upload |
{- "success": true,
- "message": "File uploaded successfully",
- "file": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}Retrieves details for a specific file by ID. The user must have appropriate access permissions to view the file.
| id required | string ID of the file to retrieve |
{- "file": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}| organizationIds required | Array of strings <uuid> [ items <uuid > ] |
| role required | string Enum: "accountant" "collaborator" "client" Role of the user in the organization |
| whatsappNumbers | Array of strings[ items non-empty ^[0-9]{12}$ ] |
| emailAddresses | Array of strings <email> [ items <email > ] |
| invitePath required | string non-empty Path for the invitation URL |
{- "organizationIds": [
- "123e4567-e89b-12d3-a456-426614174000"
], - "role": "collaborator",
- "whatsappNumbers": [
- "string"
], - "emailAddresses": [
- "user@example.com"
], - "invitePath": "string"
}{- "success": true,
- "invitesSent": 5,
- "failedInvites": [
- "usuario@tatem.mx"
]
}Retrieves information associated with an invitation sent to a user.
| user_invitation_code required | string The invitation code to lookup the information |
[- {
- "emailAddress": "user@example.com",
- "whatsappNumber": "string",
- "role": "collaborator",
- "createdAt": "2019-08-24T14:15:22Z",
- "organizations": [
- {
- "commercialName": "string",
- "taxIdentifier": "string"
}
]
}
]Links the user to the organization or organizations (provided a valid invitation code)
| user_invitation_code required | string Invitation code to validate the organization creation |
{- "success": true
}| provider_id required | string ID of the provider sending the invitation |
| whatsappNumber | string non-empty ^[0-9]{12}$ Organization's WhatsApp number |
| emailAddress | string <email> Organization's email address |
| invitePath required | string non-empty Path for the invitation URL |
[- {
- "whatsappNumber": "string",
- "emailAddress": "user@example.com",
- "invitePath": "string"
}
]{- "success": true,
- "invitesSent": 5
}Retrieves information associated with invitations sent to an organization. If invitation_code is provided, it retrieves information associated with a specific invitation. If provider_id is provided, it retrieves all invitations sent to the organization by the provider.
| invitation_code | string The invitation code to lookup the information |
| provider_id | string The ID of the provider that sent the invitations |
[- {
- "emailAddress": "user@example.com",
- "whatsappNumber": "string",
- "invitationCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "provider": {
- "commercialName": "string",
- "taxIdentifier": "string"
}
}
]Updates an invitation's contact information using its invitation code
| invitation_code required | string The invitation code to update |
| emailAddress | string <email> Updated email address |
| whatsappNumber | string^[0-9]{12}$ Updated WhatsApp number |
| invitePath | string non-empty Path for the invitation URL |
{- "emailAddress": "user@example.com",
- "whatsappNumber": "string",
- "invitePath": "string"
}{- "success": true
}Resends an invitation to the same email and WhatsApp number using the existing invitation code
| invitation_code required | string The invitation code to resend |
| invitePath | string non-empty Path for the invitation URL |
{- "invitePath": "string"
}{- "success": true
}Links an invited organization to a provider using an invitation code
| invitation_code required | string The invitation code for linking the organization to the provider |
| organization_id required | string The ID of the organization to link to the provider |
{- "success": true
}| organization_id required | string ID of the organization sending the invitation |
| whatsappNumber | string non-empty ^[0-9]{12}$ Provider's WhatsApp number |
| emailAddress | string <email> Provider's email address |
| invitePath required | string non-empty Path for the invitation URL |
[- {
- "whatsappNumber": "string",
- "emailAddress": "user@example.com",
- "invitePath": "string"
}
]{- "success": true,
- "invitesSent": 5
}Retrieves information associated with invitations sent to a provider. If invitation_code is provided, it retrieves information associated with a specific invitation. If organization_id is provided, it retrieves all invitations sent to the provider by the organization.
| invitation_code | string The invitation code to lookup the information |
| organization_id | string The ID of the organization that sent the invitations |
[- {
- "emailAddress": "user@example.com",
- "whatsappNumber": "string",
- "invitationCode": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "organization": {
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "invoicePreferences": {
- "paymentMethods": [
- "string"
], - "cfdiUses": [
- "string"
], - "paymentForms": [
- "string"
], - "currencyCodes": [
- "string"
], - "paymentDay": 6,
- "allowedInvoiceDays": [
- {
- "from": "14:15:22Z",
- "to": "14:15:22Z"
}
], - "monthEndInvoiceDays": 3,
- "isEfosClearanceMandatory": true,
- "isComplianceDocumentMandatory": true,
- "numberOfMissingPendingInvoicePaymentsAllowed": 0,
- "isBankingInformationMandatory": true,
- "isPurchaseOrderMandatory": true,
- "isStampedAtCurrentMonthMandatory": true,
- "archivePaidInvoices": true,
- "archiveCompletedInvoices": true,
- "archiveReceivableCompletedInvoices": true,
- "archiveReceivablePaidGenericInvoices": true,
- "archiveReceivablePaidGenericForeignInvoices": true,
- "paymentDueAtAnchor": "createdAt"
}
}
]Updates an existing provider invitation's email address or WhatsApp number
| invitation_code required | string The invitation code to update |
| emailAddress | string <email> New email address for the invitation |
| whatsappNumber | string^[0-9]{12}$ New WhatsApp number for the invitation |
| invitePath | string non-empty Path for the invitation URL |
{- "emailAddress": "user@example.com",
- "whatsappNumber": "string",
- "invitePath": "string"
}{- "success": true
}Resends an invitation to a provider using an existing invitation code. The user must have access to the organization that sent the original invitation.
| invitation_code required | string The invitation code to resend |
| invitePath | string non-empty Path for the invitation URL |
{- "invitePath": "string"
}{- "success": true
}Links an invited provider to an organization using an invitation code
| invitation_code required | string The invitation code for linking the provider to the organization |
| provider_id required | string The ID of the provider to link to the organization |
{- "success": true
}Creates a Stripe checkout session for subscription. This endpoint is intended to be used with Stripe embedded elements. The user must have permission to access subscriptions. If the user doesn't have a Stripe customer ID, one will be created.
| success_path required | string Path to redirect to after successful payment |
| organization_id required | string Organization ID |
| promotion_code | string The promotion code to apply to the subscription |
{- "clientSecret": "string"
}Creates a Stripe checkout session for one-time payment. This endpoint is intended to be used with Stripe embedded elements. The user must have permission to access balance. If the user doesn't have a Stripe customer ID, one will be created.
| success_path required | string Path to redirect to after successful payment |
| organization_id required | string Organization ID |
| amount required | number >= 100 Amount to pay |
{- "clientSecret": "string"
}Retrieves the status of a Stripe checkout session. The user must have permission to access subscriptions.
| session_id required | string Stripe checkout session ID |
{- "isPaymentSuccessful": true,
- "status": "complete",
- "amountTotal": 0,
- "currency": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z",
- "paymentMethod": {
- "id": "string",
- "type": "string",
- "brand": "string",
- "last4": "string"
}, - "isSubscription": true
}Creates a Stripe checkout session to update payment method in Stripe. The user must have permission to access billing. If the user doesn't have a Stripe customer ID, one will be created.
| success_path required | string Path to redirect to after successful payment |
| organization_id required | string Organization ID |
{- "clientSecret": "string"
}Calculates taxes for a checkout session based on the amount and organization type. The taxes calculation depends on whether the organization is an entity or not. For entities, additional withholding taxes (ISR and VAT withholding) are applied. The user must have permission to access the organization.
| organization_id required | string Organization ID |
| amount required | number >= 0.01 Amount to calculate taxes for (must be greater than 0) |
| percent_off | number [ 1 .. 100 ] Discount % of the amount |
{- "taxes": {
- "baseAmount": 1000,
- "taxesAmount": 100,
- "discountAmount": 550,
- "taxes": [
- {
- "taxId": "string",
- "name": "string",
- "code": "string",
- "isWithholding": true,
- "rate": 0.1,
- "amount": 100
}
]
}
}Retrieve the billing account details for the authenticated user
| organization_id required | string Organization ID |
{- "success": true,
- "billingAccount": {
- "id": "cl1234567890",
- "name": "Tatem",
- "commercialName": "Tatem",
- "taxIdentifier": "XAXX010101000",
- "taxRegime": "601",
- "postalCode": "12345",
- "cfdiUse": "G03",
- "createdAt": "2024-03-20T12:00:00Z",
- "updatedAt": "2024-03-20T12:00:00Z"
}
}Create a new billing account or update an existing one for the authenticated user
| organization_id required | string Organization ID |
| name required | string Legal name of the company |
| commercialName required | string Commercial name of the company |
| taxIdentifier required | string RFC of the company |
| taxRegime required | string Tax regime code |
| postalCode required | string Postal code (must be 5 digits) |
| cfdiUse required | string CFDI use code |
{- "name": "Razón Social",
- "commercialName": "Nombre Comercial",
- "taxIdentifier": "XAXX010101000",
- "taxRegime": "601",
- "postalCode": "12345",
- "cfdiUse": "G03"
}{- "success": true,
- "billingAccount": {
- "id": "cl1234567890",
- "name": "Tatem",
- "commercialName": "Tatem",
- "taxIdentifier": "XAXX010101000",
- "taxRegime": "601",
- "postalCode": "12345",
- "cfdiUse": "G03",
- "createdAt": "2024-03-20T12:00:00Z",
- "updatedAt": "2024-03-20T12:00:00Z"
}
}Retrieve all subscriptions for the organization
| organization_id required | string Organization ID |
{- "didHaveSubscription": true,
- "subscriptions": [
- {
- "id": "sub_1234567890",
- "status": "active",
- "createdAt": "2023-01-01",
- "updatedAt": "2023-01-01",
- "cancellationScheduledAt": "2023-01-01",
- "trialExpiresAt": "2023-01-01",
- "currentPeriodEnd": "2023-01-01",
- "billingPeriod": "monthly",
- "amount": 1250,
- "amountNoDiscount": 2500,
- "discountPercentOff": 50,
- "discountEndDate": "2026-07-01T00:00:00Z"
}
]
}Cancels a subscription for the organization
| organization_id required | string Organization ID |
| password required | string non-empty User's password |
{- "password": "string"
}{- "success": true,
- "message": "subscription_scheduled_for_cancellation"
}Create a trial subscription or a paid subscription for the organization
| organization_id required | string <uuid> The ID of the organization |
| payment_method_id | string <uuid> The ID of the payment method to use for the subscription. If not payment method is provided, the default payment method will be used. |
| promotion_code | string The promotion code to apply to the subscription |
{- "error": "invalid_request_body"
}Update an existing subscription with a new promotion code
| organization_id required | string <uuid> The ID of the organization |
| promotion_code required | string The promotion code to apply to the subscription |
{- "error": "invalid_request_body"
}Submit a survey answer for the organization
| answer required | string [ 1 .. 1000 ] characters The survey answer text |
| organizationId required | string <uuid> The ID of the organization |
{- "answer": "string",
- "organizationId": "cmgy9k6u1000l1n3sx22aw62r"
}{- "success": true
}Retrieve all invoices for the authenticated user
| created_at_from | string <date-time> Filter billing invoices created after this date |
| created_at_to | string <date-time> Filter billing invoices created before this date |
| is_subscription | any |
| page | integer Default: 1 Page number |
| limit | any Number of invoices per page |
{- "success": true,
- "invoices": [
- {
- "id": "1234567890",
- "createdAt": "2023-01-01",
- "updatedAt": "2023-01-01",
- "subscriptionId": "1234567890",
- "paymentMethod": {
- "last4": "string"
}, - "pdfFile": {
- "url": "string"
}, - "status": "paid",
- "total": 1000,
- "currency": "MXN"
}
]
}Download multiple billing invoices as a ZIP file containing their PDF files
| billingInvoiceIds required | Array of strings [ 1 .. 100 ] items Array of billing invoice IDs to download |
{- "billingInvoiceIds": [
- "invoice_123",
- "invoice_456",
- "invoice_789"
]
}{- "id": "file_1234567890",
- "filename": "Facturas Tátem - 25 oct 25 - ABC123456789.zip",
- "type": "billing_invoice_zip",
- "status": "processing",
- "createdAt": "2023-10-25T10:30:00Z"
}Get the payment methods for an organization
| organization_id required | string <uuid> The ID of the organization |
[- {
- "id": "string",
- "type": "card",
- "brand": "visa",
- "last4": "1234",
- "expirationMonth": 0,
- "expirationYear": 0,
- "isDefault": true,
- "isExpired": true,
- "organizationId": "string",
- "stripePaymentMethodId": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Validate a Stripe promotion code and retrieve the discount percentage
| promotion_code required | string The promotion code to validate |
{- "percent_off": 20,
- "duration": "forever",
- "duration_in_months": 6
}Retrieves billing settings for an organization. The user must belong to the organization and have permission to view billing settings. Returns null if no billing settings exist for the organization.
| organization_id required | string <uuid> Organization ID |
{- "organizationId": "cl1234567890",
- "autorechargeBalanceEnabled": false,
- "autorechargeBalanceBelowThreshold": "string",
- "autorechargeBalanceValue": "string",
- "autorechargePrimaryPaymentMethodId": "string",
- "autorechargeSecondaryPaymentMethodId": "string",
- "autorechargePrimaryPaymentMethod": {
- "id": "string",
- "type": "string",
- "brand": "string",
- "last4": "string",
- "isDefault": true
}, - "autorechargeSecondaryPaymentMethod": {
- "id": "string",
- "type": "string",
- "brand": "string",
- "last4": "string",
- "isDefault": true
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Creates or updates billing settings for an organization. The user must belong to the organization and have permission to update billing settings (readonly users cannot update). Payment method IDs must belong to the organization.
| organizationId required | string <uuid> Organization ID |
| autorechargeBalanceEnabled | boolean Whether to enable balance autorecharge |
(number or null) or (string or null) Balance threshold below which autorecharge is triggered | |
(number or null) or (string or null) Target balance to raise to when autorecharge is triggered. | |
| autorechargePrimaryPaymentMethodId | string or null ID of the primary payment method for autorecharge |
| autorechargeSecondaryPaymentMethodId | string or null ID of the secondary payment method for autorecharge |
{- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "autorechargeBalanceEnabled": true,
- "autorechargeBalanceBelowThreshold": 0,
- "autorechargeBalanceValue": 0,
- "autorechargePrimaryPaymentMethodId": "string",
- "autorechargeSecondaryPaymentMethodId": "string"
}{- "organizationId": "cl1234567890",
- "autorechargeBalanceEnabled": false,
- "autorechargeBalanceBelowThreshold": "string",
- "autorechargeBalanceValue": "string",
- "autorechargePrimaryPaymentMethodId": "string",
- "autorechargeSecondaryPaymentMethodId": "string",
- "autorechargePrimaryPaymentMethod": {
- "id": "string",
- "type": "string",
- "brand": "string",
- "last4": "string",
- "isDefault": true
}, - "autorechargeSecondaryPaymentMethod": {
- "id": "string",
- "type": "string",
- "brand": "string",
- "last4": "string",
- "isDefault": true
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves a paginated list of deductibles with optional filters
| organization_id | string <uuid> ID of the organization to fetch deductibles for |
| uuid | string <uuid> Filter by deductible UUID |
| folio_number | string Example: folio_number=1234567890,1234567891 Comma separated list of folio numbers to filter by |
| statuses | string Example: statuses=deductible,not_deductible,not_valid Comma-separated list of deductible statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter deductibles created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter deductibles issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter deductibles stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter deductibles created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter deductibles issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter deductibles stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| sort | string Default: "uuid" Enum: "uuid" "grossPriceAmount" "status" "createdAt" "updatedAt" "issuerName" "issuedAt" "stampedAt" Comma-separated list of fields to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Comma-separated list of sort orders to sort by. The number of values in this parameter must match exactly the number of values in the 'order' parameter. |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 30 Enum: 10 30 60 100 Number of items per page |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| is_entity | boolean Default: false Filter by entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
- "folioNumber": "1234567890",
- "series": "S",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "commercialName": "string"
}, - "paymentMethod": "PPD",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "status": "processing",
- "createdAt": "2024-12-01T17:24:59.146Z",
- "updatedAt": "2024-12-01T17:24:59.146Z",
- "issuedAt": "2024-12-01T17:24:59.146Z",
- "stampedAt": "2024-12-01T17:24:59.146Z",
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0,
- "isCancelled": false,
- "readAt": "2024-12-01T17:24:59.146Z",
- "items": [
- {
- "description": "Factura por pagar",
- "quantity": 1,
- "unitKey": "unit",
- "unitDescription": "Unidad",
- "itemKey": "item",
- "discount": 10
}
], - "taxes": [
- {
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0
}
], - "notes": "Notas de la factura",
- "paymentProofFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "reasoning": {
- "status": "processing"
}, - "isDemo": true,
- "invoice": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "payments": [
- {
- "payment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "processing",
- "paidAt": "2019-08-24T14:15:22Z",
- "paymentProofFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "paymentReceipt": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentReceiptFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}
}
}
]
}
}
], - "grossPriceAmount": 0,
- "taxesAmount": [
- {
- "code": "string",
- "value": 100,
- "isWithholding": false
}
], - "unreadCount": 0,
- "totalPages": 0,
- "totalCount": 0,
- "itemCount": 0,
- "itemsWithChartCount": 0
}Updates a list of deductibles
| organization_id | string <uuid> ID of the organization to fetch deductibles for |
| uuid | string <uuid> Filter by deductible UUID |
| statuses | string Example: statuses=deductible,not_deductible,not_valid Comma-separated list of deductible statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter deductibles created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter deductibles issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter deductibles stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter deductibles created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter deductibles issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter deductibles stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| is_entity | boolean Default: false Filter by entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| deductibleIds | Array of strings <uuid> <= 100 items [ items <uuid > ] |
| archive | boolean Whether to archive (true) or unarchive (false) the deductible |
| status | string Enum: "deductible" "review" "semi_deductible" "not_deductible" |
| isRead | boolean |
{- "deductibleIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "archive": false,
- "status": "deductible",
- "isRead": true
}{- "success": true,
- "archivedDeductibles": [
- "123e4567-e89b-12d3-a456-426614174000"
]
}Creates a new deductible by uploading XML and PDF files
| organization_id required | string <uuid> ID of the organization the deductible is for |
| invoiceXml required | string <binary> XML file containing the CFDI invoice data |
| invoicePdf | string <binary> PDF version of the invoice |
{- "success": true,
- "deductible": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "message": "File uploaded successfully"
}Upload deductibles as zip
| deductiblesUploadZipId required | string <uuid> |
{- "deductiblesUploadZipId": "bcd5f9d8-7a58-4133-b91e-ea57672ab67c"
}{- "success": true
}Deletes multiple deductibles
| deductibleIds required | Array of strings <uuid> non-empty [ items <uuid > ] |
| convertToInvoice | boolean Default: false |
{- "deductibleIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "convertToInvoice": false
}{- "success": true
}Retrieves the balance of deductibles for an organization
| organization_id | string <uuid> ID of the organization to fetch deductibles for |
| uuid | string <uuid> Filter by deductible UUID |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter deductibles created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter deductibles issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter deductibles stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| is_entity | boolean Default: false Filter by entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
{- "grossPriceAmount": 0,
- "taxesAmount": [
- {
- "code": "string",
- "value": 100,
- "isWithholding": false
}
]
}Retrieves the top charts for deductibles
| organization_id | string <uuid> ID of the organization to fetch deductibles for |
{- "data": [
- {
- "code": "string",
- "description": "string",
- "totalAmount": 0,
- "deductibleCount": 0
}
]
}Creates a new deductible batch
| organization_id required | string <uuid> ID of the organization to delete the deductible sync for |
| fromDate | string <date> Start date of the batch |
| toDate | string <date> End date of the batch |
| paymentForm | string Enum: "PUE" "PPD" Payment form to filter the batch |
| taxIdentifier | string Tax identifier to filter the batch |
| taskType | string Default: "deductibles" Enum: "deductibles" "invoices" The task type for the batch |
{- "fromDate": "2019-08-24",
- "toDate": "2019-08-24",
- "paymentForm": "PUE",
- "taxIdentifier": "string",
- "taskType": "deductibles"
}{- "success": true,
- "taskId": "123e4567-e89b-12d3-a456-426614174000"
}Retrieves a list of deductibles syncs
| organization_id required | string <uuid> ID of the organization to fetch deductibles syncs for |
{- "fromDateAt": "2019-08-24",
- "paymentForm": "PUE",
- "taxIdentifier": "string",
- "scheduledDays": [
- 0
], - "taskType": "deductibles",
- "mode": "every"
}Creates a new deductible sync
| organization_id required | string <uuid> ID of the organization to delete the deductible sync for |
| fromDate | string <date> Start date of the sync |
| scheduledDays | Array of numbers If mode is "on": schedule sync on the days specified in scheduledDays (only values 1, 7, 15, 20, 0 are allowed, 0 representing last day of the month) If mode is "every": schedule sync every X days specified in scheduledDays (only one value between 1 and 30 is allowed) |
| mode | string Enum: "every" "on" If mode is "on": schedule sync on the days specified in scheduledDays If mode is "every": schedule sync every X days specified in scheduledDays |
| paymentForm | string Enum: "PUE" "PPD" Payment form to filter the sync |
| taxIdentifier | string Tax identifier to filter the sync |
| taskType | string Default: "deductibles" Enum: "deductibles" "invoices" The type of the task the sync will create |
{- "fromDate": "2019-08-24",
- "scheduledDays": [
- 0
], - "mode": "every",
- "paymentForm": "PUE",
- "taxIdentifier": "string",
- "taskType": "deductibles"
}{- "type": null,
- "properties": null
}Deletes the configured deductible sync for the organization
| organization_id required | string <uuid> ID of the organization to delete the deductible sync for |
| task_type required | any The task type to delete |
{- "success": true
}Retrieves detailed information about a specific deductible
| id required | string <uuid> ID of the deductible to retrieve |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "processing",
- "statusMode": "manual",
- "uuid": "string",
- "series": "string",
- "folioNumber": 0,
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0,
- "cfdiUse": "string",
- "paymentMethod": "string",
- "paymentForm": "string",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "issuerTaxRegime": "string",
- "issuerPostalCode": "string",
- "isEntity": true,
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "recipientTaxRegime": "string",
- "recipientPostalCode": "string",
- "recipientTaxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "recipientEconomicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "currencyCode": "string",
- "isCancelled": true,
- "readAt": "2019-08-24T14:15:22Z",
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/xml",
- "contentDisposition": "string",
- "type": "deductible_xml",
- "filename": "string"
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "deductible_pdf",
- "filename": "string"
}, - "pdfFileVerifiedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "stampedAt": "2019-08-24T14:15:22Z",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "601",
- "description": "General de Ley Personas Morales"
}
], - "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "isDemoMode": false
}, - "reasoning": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "processing",
- "veredict": "deductible",
- "justification": "string",
- "confidenceScore": 0,
- "ratings": [
- {
- "rating": "positive"
}
], - "acceptedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z"
}, - "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "itemKey": "string",
- "itemKeyDescription": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "description": "string",
- "quantity": 0,
- "netUnitPriceAmount": 0,
- "netPriceAmount": 0,
- "discount": 0,
- "status": "deductible",
- "statusMode": "manual",
- "taxes": [
- {
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0
}
], - "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "reasoning": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "veredict": "deductible",
- "justification": "string",
- "legalJustification": "string",
- "ratings": [
- {
- "rating": "positive"
}
], - "acceptedAt": "2019-08-24T14:15:22Z",
- "rejectedAt": "2019-08-24T14:15:22Z"
}
}
], - "taxes": [
- {
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0
}
]
}Updates a deductible
| id required | string <uuid> ID of the deductible to update |
| notes | string |
| status | string Enum: "deductible" "review" "not_deductible" |
| paymentProofFileId | string <uuid> |
| invoicePdfFileId | string <uuid> |
| isRead | boolean |
| chartId | string <uuid> |
{- "notes": "Notas del deducible",
- "status": "deductible",
- "paymentProofFileId": "123e4567-e89b-12d3-a456-426614174000",
- "invoicePdfFileId": "123e4567-e89b-12d3-a456-426614174000",
- "isRead": true,
- "chartId": "123e4567-e89b-12d3-a456-426614174000"
}{- "success": true,
- "archived": true
}Deletes a deductible
| id required | string <uuid> ID of the deductible to delete |
| convert_to_invoice | boolean Default: false If set to 'true', the deductible will be converted to an Invoice and a new entry for a Provider prospect will be created (if it didn't exist yet) for this organization |
{- "success": true
}Generates a PDF for a deductible
| id required | string <uuid> ID of the deductible to generate PDF for |
{- "success": true,
- "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}Retrieves a list of providers from all deductibles of the organization
| organization_id required | string <uuid> ID of the organization to fetch providers for |
[- {
- "issuerName": "string",
- "issuerTaxIdentifier": "string"
}
]Retrieves a list of product keys from all deductibles of the organization
| organization_id required | string <uuid> ID of the organization to fetch product keys for |
[- {
- "productKey": "string",
- "productKeyDescription": "string"
}
]Retrieves a list of payment forms from all deductibles of the organization
| organization_id required | string <uuid> ID of the organization to fetch payment forms for |
[- {
- "code": "string",
- "description": "string",
- "priority": 0
}
]Retrieves a list of payment methods from all deductibles of the organization
| organization_id required | string <uuid> ID of the organization to fetch payment methods for |
[- {
- "code": "string",
- "description": "string"
}
]Retrieves a list of CFDI uses from all deductibles of the organization
| organization_id required | string <uuid> ID of the organization to fetch CFDI usees for |
[- {
- "code": "string",
- "description": "string",
- "priority": 0
}
]Downloads a zip or xls file containing all selected deductibles
| format required | string Enum: "zip" "xls" Format of the file to download |
| deductible_ids | string Comma separated list of IDs of the deductibles to download. If this parameter is specified, all other query filters (except 'format') will be ignored. |
| organization_id | string <uuid> ID of the organization to fetch deductibles for |
| uuid | string <uuid> Filter by deductible UUID |
| statuses | string Example: statuses=deductible,not_deductible,not_valid Comma-separated list of deductible statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter deductibles created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter deductibles issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter deductibles stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter deductibles created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter deductibles issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter deductibles stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| is_entity | boolean Default: false Filter by entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Updates a deductible item
| id required | string <uuid> ID of the deductible item to update |
| status | string Enum: "deductible" "review" "not_deductible" |
| chartId | string or null <uuid> ID of the chart to assign to the deductible item. |
| chartReasoningConfirmed | boolean Used to mark when a human has confirmed the chart reasoning. |
{- "status": "deductible",
- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "chartReasoningConfirmed": true
}{- "success": true,
- "message": "Deductible item updated successfully"
}Get deductible rules
| organization_id required | string <uuid> ID of the organization to fetch deductible rules for |
| sort | string Default: "priority" Enum: "description" "priority" "createdAt" "updatedAt" Field to sort by |
| order | string Default: "asc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Enum: 10 30 60 100 Number of items per page |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "isEnabled": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "page": 0,
- "pageSize": 0,
- "total": 0
}Enable or disable a deductible rule
| id required | string <uuid> ID of the deductible rule to enable or disable |
| organization_id required | string <uuid> ID of the organization to fetch deductible rules for |
| isEnabled | boolean |
{- "isEnabled": true
}{- "success": true
}Create a new deductible reason
| deductibleId | string <uuid> ID of the deductible |
[- {
- "deductibleId": "fd8f0c3d-b38b-4018-a0a8-4def4cac471b"
}
]{- "success": true
}Accept or reject a deductible reason
| id required | string <uuid> ID of the deductible reason to accept or reject |
| status | string Enum: "deductible" "not_deductible" |
| notes | string |
{- "status": "deductible",
- "notes": "string"
}{- "success": true
}Accept or reject a deductible item reason
| id required | string <uuid> ID of the deductible item reason to accept or reject |
| status | string Enum: "deductible" "not_deductible" |
| notes | string |
{- "status": "deductible",
- "notes": "string"
}{- "success": true
}Rate a deductible item reason
| id required | string <uuid> ID of the deductible item reason to rate |
| rating | string Enum: "positive" "negative" "neutral" Rating of the deductible item reason |
{- "rating": "positive"
}{- "success": true
}Rate a deductible reason
| id required | string <uuid> ID of the deductible reason to rate |
| rating | string Enum: "positive" "negative" "neutral" Rating of the deductible reason |
{- "rating": "positive"
}{- "success": true
}Get consumables of the organization for the period
| organization_id required | string <uuid> ID of the organization to fetch consumables for |
| period | string Period to query the consumables. If not provided, the consumables for the current period are returned. |
[- {
- "consumableKey": "stamp",
- "count": 0,
- "limit": 0,
- "period": "monthly",
- "pricePerUnit": 0
}
]Get consumable consumptions of the organization with filtering capabilities.
Default mode: Returns a paginated list of consumable consumptions with sorting.
Aggregate mode (when aggregate=true): Returns aggregated totals (count, amount) and a breakdown by consumable key (byConsumableKey). Pagination and sorting parameters are ignored.
| organization_id required | string <uuid> ID of the organization to fetch consumable consumptions for |
| aggregate | boolean Default: false When true, returns aggregated totals (count, amount) and byConsumableKey breakdown instead of a paginated list. Pagination and sorting parameters are ignored. |
| page | integer >= 1 Default: 1 Page number for pagination (default is 1). Ignored when aggregate=true. |
| limit | integer [ 1 .. 100 ] Default: 30 Number of items per page (default is 30). Ignored when aggregate=true. |
| sort | string Default: "createdAt" Enum: "createdAt" "count" "unitPrice" "consumableKey" Field to sort by. Ignored when aggregate=true. |
| order | string Default: "desc" Enum: "asc" "desc" Sort order. Ignored when aggregate=true. |
| created_at_from | string <date-time> Filter consumable consumptions created from this date (ISO 8601 format) |
| created_at_to | string <date-time> Filter consumable consumptions created up to this date (ISO 8601 format) |
| consumable_key | string Filter by consumable key (case-insensitive partial match) |
| mode | string Enum: "balance" "included" "lowConfidenceScore" Filter by consumption mode |
| q | string Filter by folioNumber |
{- "count": 0,
- "amount": 0,
- "byConsumableKey": [
- {
- "consumableKey": "string",
- "count": 0,
- "amount": 0
}
]
}Get charts of the organization
| organization_id required | string <uuid> ID of the organization to fetch charts for |
{- "charts": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string",
- "children": [
- { }
]
}
], - "lastUpdatedAt": "2019-08-24T14:15:22Z"
}Uploads and processes a XLS file to update the charts of the organization. The file must have the following structure:
| organization_id required | any ID of the organization to update the charts for |
| mode | string Default: "update" Enum: "update" "replace" Mode of the operation |
| file required | string <binary> The file to upload |
{- "success": true,
- "updatedCharts": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string",
- "children": [
- { }
]
}
], - "updateCount": 10
}Returns items (invoice items, deductible items, expense items) that need chart classification.
By default, returns items that have no chart assigned. When max_confidence_score is provided,
also includes items that have a chart assigned with 'reasoning' mode but with a confidence score
at or below the threshold (indicating they may need reclassification).
Items with 'reasoning' mode that have already been confirmed by a human (chartReasoningConfirmedAt or chartAsPayableReasoningConfirmedAt is not null) are excluded from the results, as they no longer need classification.
This endpoint is useful for building a queue of items that need human review for chart assignment.
| organization_id required | string <uuid> ID of the organization to fetch items for |
| page | integer >= 1 Default: 1 Page number for pagination (1-based) |
| limit | integer [ 1 .. 100 ] Default: 10 Number of items per page |
| type | string Enum: "invoice" "invoice_as_provider" "deductible" "expense" Filter by item type |
| max_confidence_score | number <float> [ 0 .. 1 ] Example: max_confidence_score=0.5 Maximum confidence score threshold. When provided, also returns items that have a chart assigned with 'reasoning' mode but with confidence score at or below this value. Items with 'manual' or 'reinforcement' mode are excluded from this filter. |
| min_confidence_score | number <float> [ 0 .. 1 ] Example: min_confidence_score=0.8 Minimum confidence score threshold. When provided, only returns items that have a chart assigned with confidence score at or above this value. Uses the higher of chartConfidenceScore or chartAsPayableConfidenceScore for comparison. |
| include_assigned | boolean Default: false Example: include_assigned=true If true, includes all items regardless of chart assignment status. When false (default), only returns items that need classification (no chart assigned or low confidence reasoning charts). |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "invoice",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",
- "issuerName": "string",
- "recipientName": "string",
- "description": "string",
- "grossPriceAmount": 0,
- "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}, - "chartMode": "manual",
- "chartConfidenceScore": 0,
- "chartReasoningConfirmedAt": "2019-08-24T14:15:22Z",
- "chartAsPayable": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}, - "chartAsPayableMode": "manual",
- "chartAsPayableConfidenceScore": 0,
- "chartAsPayableReasoningConfirmedAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "page": 0,
- "pageSize": 0,
- "total": 0,
- "totalPages": 0
}
}Returns concepts that need chart classification. Concepts are templates that store item attributes (description, itemKey, issuerName, recipientName) along with their embeddings and chart assignments.
By default, returns concepts that have no chart assigned. When max_confidence_score is provided,
also includes concepts that have a chart assigned with 'reasoning' mode but with a confidence score
at or below the threshold (indicating they may need reclassification).
When include_assigned is true, returns all concepts regardless of chart assignment status.
This endpoint is useful for building a queue of concepts that need human review for chart assignment.
| organization_id required | string <uuid> ID of the organization to fetch concepts for |
| page | integer >= 1 Default: 1 Page number for pagination (1-based) |
| limit | integer [ 1 .. 100 ] Default: 10 Number of concepts per page |
| max_confidence_score | number <float> [ 0 .. 1 ] Example: max_confidence_score=0.5 Maximum confidence score threshold. When provided, also returns concepts that have a chart assigned with 'reasoning' mode but with confidence score at or below this value. Concepts with 'manual' or 'reinforcement' mode are excluded from this filter. |
| min_confidence_score | number <float> [ 0 .. 1 ] Example: min_confidence_score=0.8 Minimum confidence score threshold. When provided, only returns concepts that have a chart assigned with confidence score at or above this value. Uses the higher of chartConfidenceScore or chartAsPayableConfidenceScore for comparison. |
| include_assigned | boolean Default: false Example: include_assigned=true If true, includes all concepts regardless of chart assignment status. When false (default), only returns concepts that need classification (no chart assigned or low confidence reasoning charts). |
| chart_mode_filter | string Enum: "none" "manual" "reasoning" Example: chart_mode_filter=none Filter concepts by chart assignment mode. Valid values:
|
| type | string Enum: "invoice" "invoice_as_provider" "deductible" "expense" Example: type=invoice Filter concepts by type. Valid values:
Note: In the database, concepts only have "invoice" as type, but when provider_id matches organization_id, they are returned as "invoice_as_provider" in the response. |
| category | string Enum: "sat" "foreign" "government" "payment_notice" Example: category=sat Filter invoice concepts by category. Only applies to invoice concepts (type = 'invoice' or 'invoice_as_provider'). Non-invoice concepts (deductible, expense) are not affected by this filter. |
| description | string Example: description=servicio Filter concepts by description. Performs a case-insensitive partial match search on the concept description. If provided, only concepts whose description contains the specified text (case-insensitive) will be returned. |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "type": "invoice",
- "description": "string",
- "itemKey": "string",
- "issuerName": "string",
- "recipientName": "string",
- "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}, - "chartMode": "manual",
- "chartConfidenceScore": 0,
- "chartReasoningAt": "2019-08-24T14:15:22Z",
- "chartAsPayable": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}, - "chartAsPayableMode": "manual",
- "chartAsPayableConfidenceScore": 0,
- "chartAsPayableReasoningAt": "2019-08-24T14:15:22Z",
- "itemCount": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "pagination": {
- "page": 0,
- "pageSize": 0,
- "total": 0,
- "totalPages": 0,
- "totalItems": 0
}
}Returns the count of items that match this concept and can be reclassified when a chart is manually assigned to the concept. This includes:
The response also provides a breakdown by confidence score threshold (0.8):
This endpoint is useful for showing users how many items would be affected if they manually assign a chart to a concept, and which items were previously below or above the confidence threshold.
| id required | string <uuid> ID of the concept |
{- "chartCount": 0,
- "chartAsPayableCount": 0,
- "totalCount": 0,
- "chartCountBelowThreshold": 0,
- "chartCountAboveThreshold": 0,
- "chartAsPayableCountBelowThreshold": 0,
- "chartAsPayableCountAboveThreshold": 0,
- "hasEnoughBalance": true,
- "consumablesToConsume": 0,
- "actualUnitsToDebit": 0,
- "amountToDebit": 0
}Updates chart assignments for a concept. Can assign or update charts, and can confirm reasoning for charts assigned with 'reasoning' mode.
When assigning a chart:
When a chart (or chartAsPayable) is assigned to a concept, all matching items that can be reclassified are automatically updated:
For invoice concepts:
For deductible/expense concepts:
| id required | string <uuid> ID of the concept to update |
| chartId | string or null <uuid> Chart ID to assign. Set to null to remove the chart assignment. |
| chartAsPayableId | string or null <uuid> Chart as payable ID to assign (only for invoice concepts). Set to null to remove the assignment. |
| chartReasoningConfirmed | boolean Set to true to confirm the reasoning for the chart. Can only be set when chartMode is 'reasoning' and chartId is not null. Cannot be set when chartId is being updated simultaneously. |
| chartAsPayableReasoningConfirmed | boolean Set to true to confirm the reasoning for the chart as payable. Can only be set when chartAsPayableMode is 'reasoning' and chartAsPayableId is not null. Cannot be set when chartAsPayableId is being updated simultaneously. |
{- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "chartAsPayableId": "e5cbc150-426d-4c07-8f16-2678e9338d6e",
- "chartReasoningConfirmed": true,
- "chartAsPayableReasoningConfirmed": true
}{- "success": true,
- "itemsUpdated": 8,
- "chartItemsUpdated": 5,
- "chartAsPayableItemsUpdated": 3
}Sends feedback from an authenticated user to the Tatem contact address. Requires the user to belong to the given organization. The contact email receives the feature, organization name, user name, comments, and date/time. The user receives a "Gracias por contactarnos" confirmation email on success.
| organization_id required | string <uuid> ID of the organization context for this feedback (user must have access) |
| feature required | string Open text describing the feature or area (e.g. Facturación, Reportes). Filled in by the frontend. |
| comments required | string User's feedback or comments. |
{- "feature": "Facturación",
- "comments": "Sería útil poder filtrar por fecha de emisión."
}{- "ok": true
}Retrieves the authenticated user's notifications token
| organization_id required | string <uuid> |
{- "keyName": "kQII_Q._NT4GA",
- "clientId": "cm8s41v8g000xyybohttlxeu2",
- "capability": "{\"org:a4897663-13e8-4e60-94ad-b97bfc29fdcc:notifications\":[\"subscribe\"]}",
- "timestamp": 1744874357402,
- "nonce": "8850976877819143",
- "mac": "cRVhv3/+a2BucuMHBQlVLQyJvGYVQlORDoP8gQ/93CQ="
}Retrieves the authenticated user's notifications
[- {
- "id": "abcd",
- "event": "organization_basic_data_verification_success",
- "payload": {
- "id": "abcd",
- "status": "valid"
}, - "createdAt": "2024-12-01T17:24:59.146Z",
- "organization": {
- "id": "abcd",
- "name": "Organization Name",
- "commercialName": "Organization Commercial Name",
- "taxIdentifier": "1234567890"
}, - "users": [
- {
- "createdAt": "2024-12-01T17:24:59.146Z"
}
]
}
]Marks the specified notifications as read
| notificationId required | string |
[- {
- "notificationId": "abcd"
}
]{- "success": true,
- "count": 1
}Clear the specifiednotifications
| notificationId required | string |
[- {
- "notificationId": "abcd"
}
]{- "success": true,
- "count": 1
}Retrieves basic statistics including counts of providers, expenses, invoices, foreign invoices, reasoned items, and government invoices.
{- "stats": {
- "numberOfProviders": 150,
- "numberOfExpenses": 1250,
- "numberOfForeignInvoices": 45,
- "numberOfReasonedItems": 320,
- "numberOfGovernmentInvoices": 0,
- "numberOfInvoices": 2100
}
}Retrieves a list of provider prospects for the specified organization
| organization_id required | string <uuid> ID of the organization to fetch provider prospects for |
| q | string Filter by name, commercialName or taxIdentifier |
| name | string Name of the provider prospect |
| taxIdentifier | string Tax identifier of the provider prospect |
| commercialName | string Commercial name of the provider prospect |
| isInEfos | boolean Default: null Whether the provider prospect is in Efos |
| incomplete | boolean Default: null Filter by incomplete provider prospects according to the organization's invoice preferences |
| duplicates | boolean Filter by duplicate provider prospects. If true, only prospects with isDuplicateOfId set are returned. If false, only prospects without isDuplicateOfId are returned. Omit for no filter. |
| sort | string Default: "name" Enum: "name" "taxIdentifier" "organization.status" "createdAt" "organizations.isMain" Field(s) to sort by, comma separated |
| order | string Default: "asc" Enum: "asc" "desc" Sort order for each field specified in 'sort', comma separated. Must be the same number of values as 'sort', otherwise an HTTP 400 'mismatched_sort_order_length' will be returned. |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Enum: 10 30 60 100 Number of items per page |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "isDuplicateOfId": "b119a866-febc-4274-8f9c-6700fb133535",
- "invoicesCount": 0,
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "status": "verified",
- "managedByOrganization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "bankAccounts": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "organizationsAsProviders": {
- "creditDays": 30,
- "creditPeriod": "d",
- "bankAccount": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "referenceNumber": "string",
- "bankAccountInstructionsFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}, - "taxIdentificationDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "taxIdentificationDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "complianceDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "complianceDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}, - "organizations": [
- {
- "isMain": true
}
]
}
], - "notVerifiedCount": 0,
- "incompleteCount": 0,
- "mainCount": 0,
- "duplicateCount": 0,
- "grossPriceAmount": 0,
- "numberOfInvoices": 0,
- "totalPages": 0,
- "totalCount": 0
}Updates the main provider prospects list for an organization
| organization_id required | string <uuid> ID of the organization to update provider prospects for |
| providerProspectIds | Array of strings <uuid> [ items <uuid > ] |
| isMain | boolean Whether to set the provider prospects as main or not |
| allowDisable | boolean When the number of main provider prospects is exceeded for the organization, setting this value to true will allow to automatically disable other provider prospects with the less amount of existing invoices. |
{- "providerProspectIds": [
- [
- "123e4567-e89b-12d3-a456-426614174000",
- "987fcdeb-51a2-43d1-b789-123456789abc"
]
], - "isMain": true,
- "allowDisable": true
}{- "success": true,
- "providerProspectsToDisable": [
- {
- "name": "string",
- "taxIdentifier": "string",
- "organization": {
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}
}
], - "providerProspectsToEnable": [
- {
- "name": "string",
- "taxIdentifier": "string",
- "organization": {
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}
}
]
}Downloads a list of provider prospects for the specified organization as an Excel file.
| organization_id required | string <uuid> ID of the organization to download provider prospects for |
| provider_prospect_ids | string Comma separated list of provider prospect ids to include in the downloaded Excel file. If no ids are provided, all providers are included. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Retrieves a provider prospect by ID
| id required | string <uuid> ID of the provider prospect to fetch |
| organization_id required | string <uuid> ID of the organization to fetch provider prospect for |
{- "providerProspect": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "isDuplicateOfId": "b119a866-febc-4274-8f9c-6700fb133535",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "addressStreet": "string",
- "addressNumber": "string",
- "addressNumberInterior": "string",
- "addressNeighborhood": "string",
- "addressCity": "string",
- "addressMunicipality": "string",
- "addressState": "string",
- "postalCode": "string",
- "status": "verified",
- "bankId": "string",
- "bankIdentifier": "string",
- "facturapiValidatedAt": "2019-08-24T14:15:22Z",
- "facturapiValidationErrors": "string",
- "taxIdentificationDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "taxIdentificationDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "complianceDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "complianceDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "contactFirstName": "Juan",
- "contactLastName": "Pérez",
- "contactEmailAddress": "juan.perez@example.com",
- "contactPhoneNumber": "525512345678",
- "contactJobTitle": "Gerente General",
- "beneficiaryName": "Juan Pérez",
- "managedByOrganization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}
}, - "organizations": [
- {
- "isMain": true
}
]
}, - "amountPaid": 0,
- "numberOfInvoicesPaid": 0,
- "numberOfInvoicesPending": 0
}Creates a new organization for a provider prospect
| id required | string <uuid> ID of the provider prospect |
| organization_id required | string <uuid> ID of the organization creating the new organization for the provider prospect |
| commercialName | string Commercial/trading name of the organization |
| industry | string Industry of the organization |
{- "commercialName": "string",
- "industry": "string"
}{- "success": true,
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "isEntity": true,
- "industry": "string",
- "status": "pending",
}
}Retrieves a list of organization prospects for the specified provider
| organization_id required | string <uuid> ID of the organization to fetch provider prospects for |
| q | string Filter by name, commercialName or taxIdentifier |
| sort | string Default: "name" Enum: "name" "taxIdentifier" "organization.status" "createdAt" Field to sort by |
| order | string Default: "asc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Enum: 10 30 60 100 Number of items per page |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "commercialName": "string",
- "status": "verified",
- "taxIdentificationDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "taxIdentificationDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "complianceDocumentVerifiedAt": "2019-08-24T14:15:22Z",
- "complianceDocumentFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
}, - "organizationsAsOrganizations": [
- {
- "creditDays": 30,
- "creditPeriod": "d",
- "bankAccount": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}, - "referenceNumber": "string",
- "bankAccountInstructionsFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "provider": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "bankAccounts": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
}
]
}
}
], - "totalPages": 0,
- "totalCount": 0
}Retrieves a paginated list of invoices with optional filters
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890,1234567891 Comma separated list of folio numbers to filter by |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| paid_at_from | string <date-time> Filter invoices by the paid date of their related Payment (inclusive start) |
| paid_at_to | string <date-time> Filter invoices by the paid date of their related Payment (inclusive end) |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| sort | string Default: "statusCode" Enum: "uuid" "grossPriceAmount" "organization.taxIdentifier" "organization.name" "issuerName" "recipientName" "status" "statusCode" "sentAt" "createdAt" "updatedAt" "paymentDueAt" "stampedAt" "folioNumber" "series" Comma-separated list of fields to sort by |
| order | string Default: "asc" Enum: "asc" "desc" Comma-separated list of sort orders to sort by. The number of values in this parameter must match exactly the number of values in the 'order' parameter. |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 30 Enum: 10 30 60 100 Number of items per page |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD,PUE Filter by payment methods, comma separated |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Filter by cancelled status |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
- "folioNumber": "1234567890",
- "series": "S",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "commercialName": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "provider": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "category": "sat",
- "paymentMethod": "PPD",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "status": "draft",
- "sentAt": "2024-12-01T17:24:59.146Z",
- "createdAt": "2024-12-01T17:24:59.146Z",
- "updatedAt": "2024-12-01T17:24:59.146Z",
- "issuedAt": "2024-12-01T17:24:59.146Z",
- "stampedAt": "2024-12-01T17:24:59.146Z",
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "isCancelled": false,
- "isPending": false,
- "readAt": "2024-12-01T17:24:59.146Z",
- "items": [
- {
- "description": "Factura por pagar",
- "quantity": 1,
- "unitKey": "unit",
- "unitDescription": "Unidad",
- "itemKey": "item",
- "discount": 10
}
], - "paymentDueAt": "2024-12-01T17:24:59.146Z",
- "isDemo": true,
- "paymentProof": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}, - "payments": [
- {
- "payment": {
- "status": "pending",
- "paidAt": "2024-12-01T17:24:59.146Z",
- "paymentProofFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "paymentReceipt": {
- "paymentReceiptFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}
}
}
], - "invoicePayments": [
- {
- "invoicePayment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}
}
], - "isGeneric": true,
- "annotationsProvider": "string",
- "annotationsOrganization": "string",
- "originalCurrencyCode": "string",
- "itemCount": 0,
- "itemsWithChartCount": 0,
- "itemsWithChartAsPayableCount": 0
}
], - "totalPages": 0,
- "totalCount": 0,
- "unreadCount": 0,
- "amountDue": 0,
- "amountPastDue": 0,
- "amountPaid": 0,
- "countDue": 0,
- "countPastDue": 0,
- "countPaid": 0
}Creates a new invoice by uploading XML and PDF files
| provider_id | string <uuid> ID of the provider creating the invoice |
| organization_id | string <uuid> ID of the organization the invoice is for |
| invoiceXml required | string <binary> XML file containing the CFDI invoice data |
| invoicePdf | string <binary> PDF version of the invoice |
| purchaseOrderPdf | string <binary> Optional PDF or image file of the purchase order |
{- "success": false,
- "invitationCode": "string",
- "organization": {
- "id": "string",
- "taxIdentifier": "string",
- "name": "string",
- "commercialName": "string"
}
}Updates a list of invoices
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Default: false Filter by cancelled status |
| invoiceIds | Array of strings <uuid> <= 100 items [ items <uuid > ] IDs of the invoices to update. If this parameter is specified, query filters will be ignored. |
| archive | boolean Whether to archive (true) or unarchive (false) the invoice. All the invoices must be in 'rejected' or 'completed' status, otherwise the service will return an HTTP 400 with error: 'invalid_invoice_status' |
| paymentDay | number Enum: 1 2 3 If set, the updated invoices will change its paymentDueAt date to the next weekday specified in the invoice preferences of the organization. All the invoices must be in 'accepted' status, otherwise the service will return an HTTP 400 with error: 'invalid_invoice_status'. Also, the invoice must belong to an organization, otherwise the service will return an HTTP 400 with error: 'invoice_doesnt_belong_to_an_organization' The organization must had set its invoice preferences, otherwise the service will return an HTTP 400 with error: 'invoice_preferences_not_found' The invoice preferences must have had set the value 'paymentDay' previously, otherwise the service will return an HTTP 400 with error: 'payment_day_not_set' |
| paymentDueAt | string <date> When payment is due, in Mexico timezone. All the invoices must be in 'accepted' status, otherwise the service will return an HTTP 400 with error : 'invalid_invoice_status' |
| paymentDueAtUpdateReason | string Enum: "manual" "payment_proof" "payment_proof_reason" Reason for updating the payment due date. Can only be provided if paymentDueAt is also provided, otherwise it will return a 400 error (payment_due_at_update_reason_requires_payment_due_at). Must be a valid update reason value, otherwise it will return a 400 error (invalid_update_reason). |
| isRead | boolean |
{- "invoiceIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "archive": true,
- "paymentDay": 1,
- "paymentDueAt": "2025-01-01",
- "paymentDueAtUpdateReason": "manual",
- "isRead": true
}{- "success": true
}Uploads a zip file containing invoices. The zip file must contain XML files.
| provider_id required | string <uuid> ID of the provider to upload invoices for |
| organization_id | string <uuid> ID of the organization to upload invoices for |
| invoicesUploadZipId required | string <uuid> |
| createOrganizationProspects | boolean Default: false |
| createProducts | boolean Default: false |
{- "invoicesUploadZipId": "bbcf8dbf-9e11-41cf-a06b-8a7388f2d310",
- "createOrganizationProspects": false,
- "createProducts": false
}{- "success": true,
- "message": "File uploaded successfully"
}Applies a credit note to an invoice. Reduces the invoice's grossPriceAmount by the credit note amount and sets the credit note status to APPLIED. Constraints:
| invoiceId required | string Invoice ID |
| creditNoteId required | string Credit note ID to apply |
{- "creditNoteId": "string"
}{- "success": true,
- "invoice": {
- "id": "string"
}, - "creditNote": {
- "id": "string"
}
}Retrieves the balance of invoices with optional filters
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Default: false Filter by cancelled status |
{- "grossPriceAmount": 1000,
- "count": 100
}Stamps an invoice with the provided data using FacturaAPI. Requires provider_id query parameter and valid authentication.
| provider_id required | string ID of the provider organization that will stamp the invoice |
required | object |
required | Array of objects [ 1 .. 5000 ] items |
| paymentForm required | string Payment form code |
| cfdiUse required | string CFDI use code |
| paymentMethod required | string Payment method code |
| folioNumber | string <= 25 characters Invoice folio number (optional) |
| series | string Invoice series (optional) |
{- "recipient": {
- "name": "string",
- "taxIdentifier": "stringstring",
- "taxRegime": "string",
- "postalCode": "strin",
- "addressStreet": "string",
- "addressNumber": "string",
- "addressNumberInterior": "string",
- "addressCity": "string",
- "addressMunicipality": "string",
- "addressState": "string"
}, - "items": [
- {
- "description": "string",
- "productKey": "string",
- "unitKey": "string",
- "unitKeyDescription": "string",
- "netUnitPriceAmount": 0,
- "taxes": [
- {
- "taxId": "string",
- "rate": 0
}
], - "quantity": 0,
- "discount": 0
}
], - "paymentForm": "string",
- "cfdiUse": "string",
- "paymentMethod": "string",
- "folioNumber": "string",
- "series": "string"
}{- "success": true,
- "invoice": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "draft",
- "uuid": "string",
- "series": "string",
- "folioNumber": 0,
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "grossPriceAmountUpdateReason": "manual",
- "grossPriceAmountUpdatedAt": "2019-08-24T14:15:22Z",
- "originalNetPriceAmount": 0,
- "originalGrossPriceAmount": 0,
- "originalGrossPriceAmountUpdatedAt": "2019-08-24T14:15:22Z",
- "originalGrossPriceAmountUpdateReason": "manual",
- "originalCurrencyCode": "string",
- "discount": 0,
- "cfdiUse": "string",
- "category": "sat",
- "processingMode": "xml",
- "paymentMethod": "string",
- "paymentForm": "string",
- "paymentCode": "string",
- "paymentProof": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pdfProcessingPrice": 0
}, - "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "issuerTaxRegime": "string",
- "issuerTaxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "issuerEconomicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "issuerPostalCode": "string",
- "issuerCountry": "string",
- "issuerAddressStreet": "string",
- "issuerAddressNumber": "string",
- "issuerAddressNumberInterior": "string",
- "issuerAddressNeighborhood": "string",
- "issuerAddressCity": "string",
- "issuerAddressMunicipality": "string",
- "issuerAddressState": "string",
- "issuerIsEntity": true,
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "recipientTaxRegime": "string",
- "recipientTaxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "recipientEconomicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "recipientPostalCode": "string",
- "recipientIsEntity": true,
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/xml",
- "contentDisposition": "string",
- "type": "invoice_xml",
- "filename": "string",
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "invoice_pdf",
- "filename": "string",
}, - "pdfFileVerifiedAt": "2019-08-24T14:15:22Z",
- "purchaseOrderFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "purchase_order_pdf",
- "filename": "string",
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "stampedAt": "2019-08-24T14:15:22Z",
- "paymentDueAt": "2019-08-24T14:15:22Z",
- "paymentDueAtUpdateReason": "manual",
- "paymentDueAtUpdatedAt": "2019-08-24T14:15:22Z",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "isEntity": true,
- "isDemoMode": true,
- "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "provider": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "isEntity": true,
- "isDemoMode": true,
- "bankId": "string",
- "bankIdentifier": "string"
}, - "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "itemKey": "string",
- "itemKeyDescription": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "description": "string",
- "quantity": 0,
- "netUnitPriceAmount": 0,
- "originalNetUnitPriceAmount": 0,
- "netPriceAmount": 0,
- "originalNetPriceAmount": 0,
- "originalGrossPriceAmount": 0,
- "taxes": [
- {
- "id": "string",
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0,
- "originalValue": 0
}
], - "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "chartMode": "manual",
- "chartConfidenceScore": 0,
- "chartAsPayable": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "chartAsPayableMode": "manual",
- "chartAsPayableConfidenceScore": 0,
- "discount": 0
}
], - "taxes": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0,
- "originalValue": 0
}
], - "localTaxes": [
- {
- "name": "string",
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
], - "payments": [
- {
- "payment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "valid",
- "paymentProofFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "paymentReceipt": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentReceiptFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}, - "paymentTrackingNumber": "string",
- "paymentReferenceNumber": "string",
- "paymentIssuerBankId": "string",
- "paymentRecipientBankId": "string",
- "paymentRecipientBankIdentifier": "string",
- "paymentIsOrderingBank": true,
- "paidAt": "2019-08-24T14:15:22Z"
}
}
], - "invoicePayments": [
- {
- "invoicePayment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "string",
- "status": "processing",
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
], - "providerProspectId": "string",
- "isGeneric": true,
- "confidenceScore": 0,
- "pdfProcessingPrice": 0,
- "validationErrors": "string",
- "archivedByOrganizationAt": "2019-08-24T14:15:22Z",
- "archivedByProviderAt": "2019-08-24T14:15:22Z",
- "currencyCode": "string",
- "isCancelled": true,
- "isPending": false,
- "isDemo": true
}, - "isValid": true,
- "message": "Invoice created successfully"
}Retrieves a list of top charts for a provider
| provider_id required | string <uuid> ID of the provider to fetch top charts for |
[- {
- "code": "string",
- "description": "string",
- "totalAmount": 0,
- "invoiceCount": 0
}
]Retrieves a list of top 5 organizations for a provider, or top 5 providers for an organization
| provider_id required | string <uuid> ID of the provider to fetch top organizations for |
| organization_id required | string <uuid> ID of the organization to fetch top providers for |
[- {
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "totalAmount": 0,
- "invoiceCount": 0
}
]Retrieves a list of distinct providers (issuers) from invoices for a given organization. Returns the provider name, tax identifier, and associated organization commercial name if available.
| organization_id required | string <uuid> ID of the organization to fetch providers for |
| q | string Optional search query to filter providers by name, tax identifier, or commercial name (case-insensitive) |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "taxIdentifier": "string",
- "organization": {
- "commercialName": "string"
}
}
]
}Imports a batch of invoices
| organization_id required | string <uuid> ID of the organization to import invoices for |
| fromDate | string <date> |
| toDate | string <date> |
| createOrganizationProspects | boolean |
| createProducts | boolean |
{- "fromDate": "2025-01-01",
- "toDate": "2025-01-31",
- "createOrganizationProspects": true,
- "createProducts": true
}{- "success": true,
- "taskId": "123e4567-e89b-12d3-a456-426614174000"
}Retrieves detailed information about a specific invoice
| id required | string <uuid> ID of the invoice to retrieve |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "status": "draft",
- "uuid": "string",
- "series": "string",
- "folioNumber": 0,
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "grossPriceAmountUpdateReason": "manual",
- "grossPriceAmountUpdatedAt": "2019-08-24T14:15:22Z",
- "originalNetPriceAmount": 0,
- "originalGrossPriceAmount": 0,
- "originalGrossPriceAmountUpdatedAt": "2019-08-24T14:15:22Z",
- "originalGrossPriceAmountUpdateReason": "manual",
- "originalCurrencyCode": "string",
- "discount": 0,
- "cfdiUse": "string",
- "category": "sat",
- "processingMode": "xml",
- "paymentMethod": "string",
- "paymentForm": "string",
- "paymentCode": "string",
- "paymentProof": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pdfProcessingPrice": 0
}, - "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "issuerTaxRegime": "string",
- "issuerTaxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "issuerEconomicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "issuerPostalCode": "string",
- "issuerCountry": "string",
- "issuerAddressStreet": "string",
- "issuerAddressNumber": "string",
- "issuerAddressNumberInterior": "string",
- "issuerAddressNeighborhood": "string",
- "issuerAddressCity": "string",
- "issuerAddressMunicipality": "string",
- "issuerAddressState": "string",
- "issuerIsEntity": true,
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "recipientTaxRegime": "string",
- "recipientTaxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "recipientEconomicActivities": [
- {
- "economicActivity": "string",
- "percentage": 0
}
], - "recipientPostalCode": "string",
- "recipientIsEntity": true,
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/xml",
- "contentDisposition": "string",
- "type": "invoice_xml",
- "filename": "string",
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "invoice_pdf",
- "filename": "string",
}, - "pdfFileVerifiedAt": "2019-08-24T14:15:22Z",
- "purchaseOrderFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "purchase_order_pdf",
- "filename": "string",
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "sentAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "acceptedAt": "2019-08-24T14:15:22Z",
- "stampedAt": "2019-08-24T14:15:22Z",
- "paymentDueAt": "2019-08-24T14:15:22Z",
- "paymentDueAtUpdateReason": "manual",
- "paymentDueAtUpdatedAt": "2019-08-24T14:15:22Z",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "isEntity": true,
- "isDemoMode": true,
- "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "provider": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "isEntity": true,
- "isDemoMode": true,
- "bankId": "string",
- "bankIdentifier": "string"
}, - "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "itemKey": "string",
- "itemKeyDescription": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "description": "string",
- "quantity": 0,
- "netUnitPriceAmount": 0,
- "originalNetUnitPriceAmount": 0,
- "netPriceAmount": 0,
- "originalNetPriceAmount": 0,
- "originalGrossPriceAmount": 0,
- "taxes": [
- {
- "id": "string",
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0,
- "originalValue": 0
}
], - "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "chartMode": "manual",
- "chartConfidenceScore": 0,
- "chartAsPayable": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "chartAsPayableMode": "manual",
- "chartAsPayableConfidenceScore": 0,
- "discount": 0
}
], - "taxes": [
- {
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "tax": {
- "code": "string",
- "description": "string",
- "isWithholding": true
}, - "baseAmount": 0,
- "rate": 0,
- "value": 0,
- "originalValue": 0
}
], - "localTaxes": [
- {
- "name": "string",
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
], - "payments": [
- {
- "payment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "valid",
- "paymentProofFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "paymentReceipt": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "paymentReceiptFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}, - "paymentTrackingNumber": "string",
- "paymentReferenceNumber": "string",
- "paymentIssuerBankId": "string",
- "paymentRecipientBankId": "string",
- "paymentRecipientBankIdentifier": "string",
- "paymentIsOrderingBank": true,
- "paidAt": "2019-08-24T14:15:22Z"
}
}
], - "invoicePayments": [
- {
- "invoicePayment": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "string",
- "status": "processing",
- "xmlFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
}
], - "providerProspectId": "string",
- "isGeneric": true,
- "confidenceScore": 0,
- "pdfProcessingPrice": 0,
- "validationErrors": "string",
- "archivedByOrganizationAt": "2019-08-24T14:15:22Z",
- "archivedByProviderAt": "2019-08-24T14:15:22Z",
- "currencyCode": "string",
- "isCancelled": true,
- "isPending": false,
- "isDemo": true
}Updates an invoice
| id required | string <uuid> ID of the invoice to update |
| notes | string |
| annotationsProvider | string or null Annotations added by the provider. Can only be updated by users belonging to the provider that issued the invoice. |
| annotationsOrganization | string or null Annotations added by the organization. Can only be updated by users belonging to the organization that owns the invoice. |
| isRead | boolean |
| chartId | string <uuid> |
| category | string Enum: "sat" "foreign" "government" "payment_notice" Invoice category. Can only be updated if the original category is not 'sat', otherwise it will return a 400 error (cannot_change_category). Must be a valid category value, otherwise it will return a 400 error (invalid_category). |
| paymentDueAt | string <date> When payment is due, in Mexico timezone. This value can be updated only if the invoice is in 'accepted' status, otherwise it will return a 400 error (invalid_status) |
| paymentDueAtUpdateReason | string Enum: "manual" "payment_proof" "payment_proof_reason" Reason for updating the payment due date. Can only be provided if paymentDueAt is also provided, otherwise it will return a 400 error (payment_due_at_update_reason_requires_payment_due_at). Must be a valid update reason value, otherwise it will return a 400 error (invalid_update_reason). |
| cfdiUse | string non-empty CFDI use code. Must be a valid CFDI use. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| paymentForm | string Payment form code. Must be a valid payment form. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| stampedAt | string <date-time> Date and time when the invoice was stamped. Can only be updated if the invoice category is 'not sat', otherwise it will return a 400 error (invalid_payment_method). |
| folioNumber | string non-empty Folio number of the invoice. Must be at least 1 character long. Can only be updated if the invoice category is 'foreign', otherwise it will return a 400 error (invalid_payment_method). |
| series | string non-empty Series of the invoice. Must be at least 1 character long. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| paymentCode | string or null Payment code of the invoice. Can be updated for any invoice category. |
| issuerName | string non-empty Name of the invoice issuer. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerTaxIdentifier | string non-empty Tax identifier (RFC) of the invoice issuer. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerPostalCode | string non-empty Postal code of the invoice issuer. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerCountry | string Country code of the invoice issuer. Must be a valid country code. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressStreet | string non-empty Street name of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressNumber | string non-empty Street number of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressNumberInterior | string non-empty Interior number of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressNeighborhood | string non-empty Neighborhood of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressCity | string non-empty City of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressMunicipality | string non-empty Municipality of the invoice issuer's address. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerAddressState | string State code of the invoice issuer's address. Must be a valid Mexican state code. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| issuerTaxRegimes | Array of strings Array of tax regime IDs for the invoice issuer. Each ID must be a valid tax regime ID. Descriptions are automatically filled in from the tax regime data. Can only be updated if the invoice category is not 'sat', otherwise it will return a 400 error (invalid_payment_method). |
| grossPriceAmount | number > 0 Gross price amount for the invoice. Can only be updated if the invoice category is not 'sat', and status is ACCEPTED, otherwise it will return a 400 error (invalid_payment_method, invalid_currency, or invalid_status). |
| grossPriceAmountUpdateReason | string Enum: "manual" "payment_proof" "payment_proof_reason" Reason for updating the gross price amount. Can only be provided if grossPriceAmount is also provided, otherwise it will return a 400 error (gross_price_amount_update_reason_requires_gross_price_amount). Must be a valid update reason value, otherwise it will return a 400 error (invalid_update_reason). |
| originalGrossPriceAmount | number > 0 Original gross price amount in the original currency. Can only be updated if the invoice's originalCurrencyCode is different from currencyCode, the invoice has an exchangeRate, and the status is ACCEPTED, otherwise it will return a 400 error (original_currency_code_must_differ, exchange_rate_required, or invalid_status). When updated, the grossPriceAmount will be automatically recalculated using the exchange rate (grossPriceAmount = originalGrossPriceAmount * exchangeRate), and all original values (originalNetPriceAmount, original taxes, original items, and their taxes) will be recalculated from the converted values. Cannot be provided together with grossPriceAmount, otherwise it will return a 400 error (cannot_provide_both_original_gross_price_amount_and_gross_price_amount). |
| originalGrossPriceAmountUpdateReason | string Enum: "manual" "payment_proof" "payment_proof_reason" Reason for updating the original gross price amount. Can only be provided if originalGrossPriceAmount is also provided, otherwise it will return a 400 error (original_gross_price_amount_update_reason_requires_original_gross_price_amount). Must be a valid update reason value, otherwise it will return a 400 error (invalid_update_reason). This reason will also be applied to the automatically updated grossPriceAmount. |
{- "notes": "Notas de la factura",
- "annotationsProvider": "Provider annotation text",
- "annotationsOrganization": "Organization annotation text",
- "isRead": true,
- "chartId": "123e4567-e89b-12d3-a456-426614174000",
- "category": "foreign",
- "paymentDueAt": "2025-01-01",
- "paymentDueAtUpdateReason": "manual",
- "cfdiUse": "G01",
- "paymentForm": "03",
- "stampedAt": "2025-01-01T12:00:00Z",
- "folioNumber": "12345",
- "series": "A",
- "paymentCode": "PAY123456",
- "issuerName": "Empresa Ejemplo S.A. de C.V.",
- "issuerTaxIdentifier": "ABC123456XYZ",
- "issuerPostalCode": "01234",
- "issuerCountry": "MX",
- "issuerAddressStreet": "Av. Reforma",
- "issuerAddressNumber": "123",
- "issuerAddressNumberInterior": "A",
- "issuerAddressNeighborhood": "Centro",
- "issuerAddressCity": "Ciudad de México",
- "issuerAddressMunicipality": "Miguel Hidalgo",
- "issuerAddressState": "DF",
- "issuerTaxRegimes": [
- "601",
- "603"
], - "grossPriceAmount": 15000.5,
- "grossPriceAmountUpdateReason": "manual",
- "originalGrossPriceAmount": 1000,
- "originalGrossPriceAmountUpdateReason": "manual"
}{- "success": true
}Deletes an invoice. Only invoices with status 'draft', 'sent', 'accepted', 'rejected', 'processing', 'not_valid', or 'paid' can be deleted.
Convert to expense: When convertToExpense is true, the invoice is converted into an expense before deletion. A new expense is created from the invoice (issuer, items, amounts, PDF if present, and organization annotations copied to expense notes). Only users who belong to the invoice's organization can use convertToExpense; otherwise the API returns HTTP 403 error. When converting to expense, deleteReason is not required. The response includes expenseId with the created expense ID.
| id required | string <uuid> ID of the invoice to delete |
| deleteReason | string non-empty Reason for deleting the invoice. Required when |
| convertToExpense | boolean When true, create an expense from the invoice details before deleting the invoice. Only allowed if the user belongs to the invoice's organization. When true, |
{- "deleteReason": "Invoice was created by mistake"
}{- "success": true,
- "expenseId": "a2142719-090a-410b-ad70-ea5efeb1c9dc"
}Downloads a completed invoice. The invoice must be in 'completed' status
| id required | string <uuid> ID of the invoice to download |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Cancel an invoice. The invoice must be in 'sent' or 'accepted' status and its payment method must be either 'PPD' or 'PUE'. The cancellation reason is stored on the invoice.
| id required | string <uuid> ID of the invoice to cancel |
| force | boolean Example: force=true If set to true, SAT status won't be checked before setting the invoice as cancelled. |
{- "success": true
}Retrieves a list of product keys from all invoices of the organization
| organization_id | string <uuid> ID of the organization to fetch product keys for |
| provider_id | string <uuid> ID of the provider to fetch product keys for |
[- {
- "productKey": "string",
- "productKeyDescription": "string"
}
]Retrieves a list of payment forms from all invoices of the organization
| organization_id | string <uuid> ID of the organization to fetch payment forms for |
| provider_id | string <uuid> ID of the provider to fetch payment forms for |
[- {
- "code": "string",
- "description": "string",
- "priority": 0
}
]Retrieves a list of payment methods from all invoices of the organization
| organization_id | string <uuid> ID of the organization to fetch payment methods for |
| provider_id | string <uuid> ID of the provider to fetch payment methods for |
[- {
- "code": "string",
- "description": "string"
}
]Retrieves a list of CFDI uses from all invoices of the organization
| organization_id | string <uuid> ID of the organization to fetch CFDI usees for |
| provider_id | string <uuid> ID of the provider to fetch CFDI uses for |
[- {
- "code": "string",
- "description": "string",
- "priority": 0
}
]Retrieves a list of entity types from all invoices of the organization
| organization_id | string <uuid> ID of the organization to fetch entity types for |
| provider_id | string <uuid> ID of the provider to fetch entity types for |
[- {
- "isEntity": true
}
]Downloads a zip or xls file containing all selected invoices
| format required | string Enum: "zip" "xls" Format of the file to download |
| invoice_ids | string Comma separated list of IDs of the invoices to download. If this parameter is specified, all other query filters (except 'format') will be ignored. |
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Default: false Filter by cancelled status |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Creates a new global tax for an invoice. Can only be created if the invoice category is not 'sat' and status is 'ACCEPTED'.
| invoiceId required | string <uuid> ID of the invoice to add the tax to |
| taxId required | string <uuid> ID of the tax. Must be a valid tax ID. |
| rate required | number >= 0 Tax rate (e.g., 0.16 for 16%). Used to calculate the tax value based on the invoice's netPriceAmount. |
{- "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
- "taxId": "123e4567-e89b-12d3-a456-426614174001",
- "rate": 0.16
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
- "taxId": "ec2f3321-4009-45bd-9423-63aa80044823",
- "code": "string",
- "isWithholding": true,
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
}Updates an invoice tax. Can only be updated if the invoice category is not 'sat' and status is 'ACCEPTED'.
| id required | string <uuid> ID of the invoice tax to update |
| taxId | string <uuid> ID of the tax. Must be a valid tax ID. |
| rate | number >= 0 Tax rate (e.g., 0.16 for 16%). Used to calculate the tax value based on the invoice's netPriceAmount. |
{- "taxId": "123e4567-e89b-12d3-a456-426614174001",
- "rate": 0.16
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
- "taxId": "ec2f3321-4009-45bd-9423-63aa80044823",
- "code": "string",
- "isWithholding": true,
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
}Deletes an invoice tax. Can only be deleted if the invoice category is not 'sat' and status is 'ACCEPTED'.
| id required | string <uuid> ID of the invoice tax to delete |
{- "success": true
}Updates the status of multiple invoices in a single request. The user must have permission to update invoice statuses and be associated with both the provider and organization for each invoice.
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Default: false Filter by cancelled status |
| invoiceIds | Array of strings <uuid> [ 1 .. 100 ] items [ items <uuid > ] IDs of the invoices to update. If this parameter is specified, query filters will be ignored. |
| status required | string Enum: "draft" "sent" "accepted" "paid" "completed" "rejected" "processing" "not_valid" New status for the invoice |
| invoicePaymentId | string <uuid> ID of the invoice payment (required when status is "completed") |
| rejectionReason | string non-empty Reason for rejection (required when status is "rejected"). |
{- "invoiceIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "status": "draft",
- "invoicePaymentId": "6bd8b670-9f7a-4e56-85e1-a4ae4bb96850",
- "rejectionReason": "string"
}{- "status": [
- {
- "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
- "status": "draft"
}
]
}Creates an invoice payment record for previously paid invoices. This endpoint supports two modes:
Upload Mode: When invoicePaymentXml is provided, uploads and processes an existing payment complement XML file.
The endpoint validates the uploaded files and creates an invoice payment record.
Stamp Mode: When no invoicePaymentXml or invoicePaymentPdf is provided, automatically stamps a new
payment complement (type "P") using the Facturapi API. The payment complement is created based on the specified
invoices and their associated payment information.
Common Validations (both modes):
| invoice_ids required | string <uuid> Comma separated list of IDs of the invoices to create payment complement for |
| invoicePaymentXml | string <binary> XML file with payment complement (complemento de pago). Required for upload mode. If provided, the endpoint will process the uploaded XML file. |
| invoicePaymentPdf | string <binary> PDF file of the payment receipt. Optional. If not provided in upload mode, a PDF will be generated automatically. |
{- "success": false,
- "invoices": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "series": "string",
- "folioNumber": "string",
- "grossPriceAmount": 0
}
], - "message": "Some invoices referenced in the invoice payment were not specified in the request"
}Initiates an async download of a zip file containing the XML and PDF (if it exists) of the specified invoice payment.
Returns a File object immediately with status processing. The zip is built asynchronously, uploaded to blob storage,
and a realtime notification (invoice_payment_download_ready or invoice_payment_download_failed) is sent when done.
The user must have access to the invoice payment through a linked invoice (as organization or provider).
| id required | string <uuid> ID of the invoice payment to download |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Retrieves a paginated list of credit notes. User must belong to either the organization or the provider and have LIST permission on invoices.
| organization_id required | string <uuid> ID of the organization |
| provider_id required | string <uuid> ID of the provider |
| uuid | string Filter by credit note UUID |
| statuses | string Example: statuses=processing,valid,applied,not_valid Comma-separated list of statuses to filter by |
| created_at_from | string <date-time> |
| created_at_to | string <date-time> |
| issued_at_from | string <date-time> |
| issued_at_to | string <date-time> |
| stamped_at_from | string <date-time> |
| stamped_at_to | string <date-time> |
| issuer_name | string |
| recipient_name | string |
| issuer_tax_identifier | string |
| recipient_tax_identifier | string |
| page | integer Default: 1 |
| limit | integer Default: 10 |
| sort | string Comma-separated sort fields (e.g. createdAt,issuedAt,grossPriceAmount) |
| order | string Enum: "asc" "desc" Comma-separated sort orders (asc, desc). Must match sort fields count. |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "string",
- "status": "processing",
- "statusCode": 0,
- "folioNumber": "string",
- "series": "string",
- "currencyCode": "string",
- "cfdiUse": "string",
- "paymentMethod": "string",
- "paymentForm": "string",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "issuedAt": "2019-08-24T14:15:22Z",
- "stampedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0,
- "isCancelled": true,
- "type": "string",
- "relationType": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",
- "organization": {
- "id": "string",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "provider": {
- "id": "string",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "items": [ ],
- "relatedInvoices": [
- {
- "invoiceId": "string",
- "invoice": {
- "id": "string",
- "uuid": "string",
- "folioNumber": "string",
- "series": "string"
}
}
]
}
], - "totalCount": 0,
- "totalPages": 0
}Uploads a credit note XML (and optional PDF). The credit note must reference existing invoices (CfdiRelacionados). All related invoices must exist, belong to the organization, and be in ACCEPTED or PAID status. When created, related invoices are automatically set to ANNULLED status.
| organization_id | string <uuid> ID of the organization (required if not using provider_id) |
| provider_id | string <uuid> ID of the provider |
| creditNoteXml required | string <binary> XML file containing the CFDI credit note (TipoDeComprobante E) |
| creditNotePdf | string <binary> Optional PDF version of the credit note |
{- "success": true,
- "creditNote": { },
- "message": "string"
}Retrieves a single credit note by ID or UUID. User must belong to the organization or provider.
| id required | string Credit note ID or UUID |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "string",
- "status": "processing",
- "statusCode": 0,
- "folioNumber": "string",
- "series": "string",
- "currencyCode": "string",
- "cfdiUse": "string",
- "paymentMethod": "string",
- "paymentForm": "string",
- "issuerName": "string",
- "issuerTaxIdentifier": "string",
- "recipientName": "string",
- "recipientTaxIdentifier": "string",
- "issuedAt": "2019-08-24T14:15:22Z",
- "stampedAt": "2019-08-24T14:15:22Z",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0,
- "isCancelled": true,
- "type": "string",
- "relationType": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "providerId": "4834bcdc-4a64-444d-966b-1a6fe381da24",
- "organization": {
- "id": "string",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "provider": {
- "id": "string",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string"
}, - "items": [
- {
- "id": "string",
- "description": "string",
- "quantity": 0,
- "unitKey": "string",
- "itemKey": "string",
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0,
- "taxes": [ ]
}
], - "relatedInvoices": [
- {
- "invoiceId": "string",
- "invoice": {
- "id": "string",
- "uuid": "string",
- "folioNumber": "string",
- "series": "string"
}
}
], - "taxes": [ ],
- "xmlFile": {
- "id": "string",
- "downloadUrl": "string",
- "filename": "string"
}, - "pdfFile": {
- "id": "string",
- "downloadUrl": "string",
- "filename": "string"
}, - "validationErrors": "string"
}Applies a credit note to an invoice. Reduces the invoice's grossPriceAmount by the credit note amount and sets the credit note status to APPLIED. Constraints:
| invoiceId required | string Invoice ID |
| creditNoteId required | string Credit note ID to apply |
{- "creditNoteId": "string"
}{- "success": true,
- "invoice": {
- "id": "string"
}, - "creditNote": {
- "id": "string"
}
}Creates a new invoice item for an existing invoice. Can only be created if the invoice status is 'sent' or 'accepted' and category is not 'sat'.
| invoiceId required | string <uuid> ID of the invoice to create the item for |
| description required | string non-empty Description of the invoice item |
| quantity required | integer >= 1 Quantity of the invoice item |
| netPriceAmount | number >= 0 Net price amount for the invoice item (in MXN). Either this or |
| originalNetPriceAmount | number >= 0 Net price amount in the original currency. Can only be specified for invoices with category 'foreign' and a non-MXN |
| discount | number >= 0 Default: 0 Discount amount for the invoice item |
| chartId | string or null <uuid> ID of the chart to assign to the invoice item as receivable invoice. Can only be set by users belonging to the provider organization. The chart must belong to the provider organization and cannot be a parent chart. When provided, chartMode is automatically set to 'manual'. Set to null to explicitly not assign a chart. |
| chartAsPayableId | string or null <uuid> ID of the chart to assign to the invoice item as payable invoice. Can only be set by users belonging to the organization. The chart must belong to the organization and cannot be a parent chart. When provided, chartAsPayableMode is automatically set to 'manual'. Set to null to explicitly not assign a chart. |
{- "invoiceId": "123e4567-e89b-12d3-a456-426614174000",
- "description": "Product description",
- "quantity": 5,
- "netPriceAmount": 1000.5,
- "originalNetPriceAmount": 50,
- "discount": 0,
- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "chartAsPayableId": "e5cbc150-426d-4c07-8f16-2678e9338d6e"
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec",
- "description": "string",
- "quantity": 0,
- "netUnitPriceAmount": 0,
- "netPriceAmount": 0,
- "grossPriceAmount": 0,
- "discount": 0
}
}Updates a invoice item
| id required | string <uuid> ID of the invoice item to update |
| chartId | string or null <uuid> ID of the chart to assign to the invoice item as receivable invoice. When updating chartId, the chartMode is automatically set: if the previous chartMode was 'reasoning', it will be set to 'reinforcement'; otherwise, it will be set to 'manual'. Set to null to remove the chart assignment. |
| chartAsPayableId | string or null <uuid> ID of the chart to assign to the invoice item as payable invoice. When updating chartAsPayableId, the chartAsPayableMode is automatically set: if the previous chartAsPayableMode was 'reasoning', it will be set to 'reinforcement'; otherwise, it will be set to 'manual'. Set to null to remove the chart assignment. |
| netPriceAmount | number >= 0 Net price amount for the invoice item (in MXN). Can only be updated if the invoice category is not 'sat' and status is 'ACCEPTED', otherwise it will return a 400 error (invalid_payment_method or invalid_status). When updated, automatically recalculates netUnitPriceAmount, grossPriceAmount, item taxes, invoice taxes, and invoice totals. |
| originalNetPriceAmount | number >= 0 Net price amount in the original currency. Can only be specified for invoices with category 'foreign' and a non-MXN |
| quantity | integer >= 1 Quantity for the invoice item. Can only be updated if the invoice category is not 'sat' and status is 'ACCEPTED', otherwise it will return a 400 error (invalid_payment_method or invalid_status). When updated, automatically recalculates netUnitPriceAmount, grossPriceAmount, item taxes, invoice taxes, and invoice totals. |
| description | string non-empty Description of the invoice item. Must be at least 1 character long if provided. Can only be updated if the invoice category is not 'sat' and status is 'ACCEPTED', otherwise it will return a 400 error (invalid_payment_method or invalid_status). |
| chartReasoningConfirmed | boolean Used to mark when a human has confirmed the chart reasoning for the receivable chart. |
| chartAsPayableReasoningConfirmed | boolean Used to mark when a human has confirmed the chart reasoning for the payable chart. |
{- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "chartAsPayableId": "e5cbc150-426d-4c07-8f16-2678e9338d6e",
- "netPriceAmount": 1000.5,
- "originalNetPriceAmount": 50,
- "quantity": 5,
- "description": "Product description",
- "chartReasoningConfirmed": true,
- "chartAsPayableReasoningConfirmed": true
}{- "success": true,
- "message": "Invoice item updated successfully"
}Deletes an invoice item. Can only be deleted if the invoice status is 'sent' or 'accepted', category is not 'sat', and the invoice has more than one item (cannot delete the last item).
| id required | string <uuid> ID of the invoice item to delete |
{- "success": true
}Creates a new tax for an invoice item. Can only be created if the invoice category is not 'sat' and status is 'ACCEPTED'. Automatically recalculates item grossPriceAmount, invoice totals, and invoice-level taxes.
| invoiceItemId required | string <uuid> ID of the invoice item to add the tax to |
| taxId required | string <uuid> ID of the tax. Must be a valid tax ID. |
| rate required | number >= 0 Tax rate (e.g., 0.16 for 16%). Used to calculate the tax value based on the item's netPriceAmount. |
{- "invoiceItemId": "123e4567-e89b-12d3-a456-426614174000",
- "taxId": "123e4567-e89b-12d3-a456-426614174001",
- "rate": 0.16
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "invoiceItemId": "f67649b2-10bf-48d7-88da-9e916e62d319",
- "taxId": "ec2f3321-4009-45bd-9423-63aa80044823",
- "code": "string",
- "isWithholding": true,
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
}Updates an invoice item tax. Can only be updated if the invoice category is not 'sat' and status is 'ACCEPTED'. When rate is updated, automatically recalculates baseAmount and value. When taxId is updated, automatically populates code and isWithholding. Automatically recalculates item grossPriceAmount, invoice totals, and invoice-level taxes.
| id required | string <uuid> ID of the invoice item tax to update |
| taxId | string <uuid> ID of the tax. Must be a valid tax ID. |
| rate | number >= 0 Tax rate (e.g., 0.16 for 16%). Used to calculate the tax value based on the item's netPriceAmount. |
{- "taxId": "123e4567-e89b-12d3-a456-426614174001",
- "rate": 0.16
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "invoiceItemId": "f67649b2-10bf-48d7-88da-9e916e62d319",
- "taxId": "ec2f3321-4009-45bd-9423-63aa80044823",
- "code": "string",
- "isWithholding": true,
- "baseAmount": 0,
- "rate": 0,
- "value": 0
}
}Deletes an invoice item tax. Can only be deleted if the invoice category is not 'sat' and status is 'ACCEPTED'. Automatically recalculates item grossPriceAmount, invoice totals, and invoice-level taxes.
| id required | string <uuid> ID of the invoice item tax to delete |
{- "success": true
}Adds balance to an organization. The amount must be at least the minimum balance amount. Requires an organization to have a verified status. If no payment method is specified, the default payment method will be used.
| organization_id required | string <uuid> ID of the organization to add balance to |
| amount required | number <decimal> Amount to add (in MXN). Minimum balance amount required. |
| payment_method_id | string <uuid> ID of the payment method to use. If not provided, the default payment method will be used. |
{- "success": true
}Retrieves a list of bank accounts for a specific organization
| organization_id required | string Organization ID to filter bank accounts |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "organizationsOnOrganizations": [
- {
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "avatarUrl": "string",
- "name": "string",
- "commercialName": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Creates a new bank account for an organization
| organization_id required | string Organization ID to create the bank account for |
| description required | string Bank account description |
| bankIdentifier required | string Bank identifier |
| beneficiaryName required | string Beneficiary name |
| contactFirstName required | string Contact first name |
| contactLastName required | string Contact last name |
| contactEmailAddress required | string Contact email address |
| contactPhoneNumber required | string Contact phone number |
| contactJobTitle required | string Contact job title |
| isDefault | boolean Default: false Whether the bank account is the default bank account |
{- "description": "string",
- "bankIdentifier": "string",
- "beneficiaryName": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "contactJobTitle": "string",
- "isDefault": false
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves a specific bank account by ID
| id required | string Bank account ID |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "organizationsOnOrganizations": [
- {
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "avatarUrl": "string",
- "name": "string",
- "commercialName": "string"
}
}
], - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Updates an existing bank account
| id required | string Bank account ID |
| description required | string Bank account description |
| bankIdentifier required | string Bank identifier |
| beneficiaryName required | string Beneficiary name |
| contactFirstName required | string Contact first name |
| contactLastName required | string Contact last name |
| contactEmailAddress required | string Contact email address |
| contactPhoneNumber required | string Contact phone number |
| contactJobTitle required | string Contact job title |
| isDefault | boolean Default: false Whether the bank account is the default bank account |
{- "description": "string",
- "bankIdentifier": "string",
- "beneficiaryName": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "contactJobTitle": "string",
- "isDefault": false
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "bankId": "string",
- "bankIdentifier": "string",
- "contactFirstName": "string",
- "contactLastName": "string",
- "contactEmailAddress": "string",
- "contactPhoneNumber": "string",
- "beneficiaryName": "string",
- "isDefault": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves payment cards for an organization. Requires organization_id. Last 4 digits are unique per organization.
| organization_id required | string Organization ID |
[- {
- "id": "string",
- "organizationId": "string",
- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]Creates a payment card for an organization. Last 4 digits must be unique within the organization; returns 400 (payment_card_last4_exists) if a card with the same last4 already exists.
| organization_id required | string Organization ID |
| description required | string non-empty |
| type required | string Enum: "debit" "credit" "prepaid" |
| brand required | string Enum: "VISA" "Mastercard" "AMEX" |
| last4 required | string = 4 characters ^[0-9]{4}$ |
| notes | string or null |
| cardManagerName required | string non-empty |
{- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string"
}{- "id": "string",
- "organizationId": "string",
- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves a payment card by ID.
| id required | string Payment card ID |
{- "id": "string",
- "organizationId": "string",
- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Updates a payment card. All body fields optional. Returns 400 (payment_card_last4_exists) if last4 is changed to a value already used by another card in the organization.
| id required | string Payment card ID |
| description | string non-empty |
| type | string Enum: "debit" "credit" "prepaid" |
| brand | string Enum: "VISA" "Mastercard" "AMEX" |
| last4 | string = 4 characters ^[0-9]{4}$ |
| notes | string or null |
| cardManagerName | string non-empty |
{- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string"
}{- "id": "string",
- "organizationId": "string",
- "description": "string",
- "type": "debit",
- "brand": "VISA",
- "last4": "stri",
- "notes": "string",
- "cardManagerName": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves the organization cash balance (separate from billing balance). Returns balanceAmount 0 if no record exists.
| organization_id required | string Organization ID |
{- "organizationId": "string",
- "balanceAmount": 0,
- "updatedAt": "2019-08-24T14:15:22Z"
}Adds amount to the organization cash balance. Creates an OrganizationCash record if none exists; otherwise increments balanceAmount. Each top-up is recorded as an OrganizationCashTransaction (transactionType top_up).
| organization_id | string Organization ID (can also be sent in body as organization_id) |
| amount required | number > 0 Positive amount to add |
| organization_id | string Organization ID (optional if provided in query) |
{- "amount": 0,
- "organization_id": "string"
}{- "organizationId": "string",
- "balanceAmount": 0,
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves a paginated list of expenses with optional filters
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| issuer_tax_identifier | string Filter by issuer tax identifier |
| issuer_name | string Filter by issuer name |
| sort | string Default: "createdAt" Enum: "priceAmount" "createdAt" "issuedAt" Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 30 Enum: 10 30 60 100 Number of items per page |
| minimun_price_amount | number Example: minimun_price_amount=1000 Filter by minimum price amount |
| maximun_price_amount | number Example: maximun_price_amount=2000 Filter by maximum price amount |
| payment_form | string Example: payment_form=02,03 Filter by payment form, comma separated |
| item_description | string Example: item_description=item description Filter by item description |
| archived | string Default: "false" Enum: "true" "false" Filter by archive status. When "true", returns only archived expenses; when "false" (default), returns only non-archived expenses. |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "taxIdentifier": "string",
- "commercialName": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "createdAt": "2024-12-01T17:24:59.146Z",
- "updatedAt": "2024-12-01T17:24:59.146Z",
- "issuedAt": "2024-12-01T17:24:59.146Z",
- "priceAmount": 0,
- "readAt": "2019-08-24T14:15:22Z",
- "archivedAt": "2019-08-24T14:15:22Z",
- "items": [
- {
- "description": "Factura por pagar",
- "quantity": 1,
- "priceAmount": 1000,
- "discount": 100
}
], - "issuerTaxIdentifier": "string",
- "issuerName": "string",
- "paymentForm": "string",
- "paymentFormDescription": "string",
- "isDemo": true,
- "isDuplicateOf": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "folioNumber": "string",
- "barCodeNumber": "string",
- "issuedAt": "2019-08-24T14:15:22Z",
- "priceAmount": 0
}, - "isVerbatim": true,
- "confidenceScore": 0,
- "classification": "receipt",
- "isPending": false,
- "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}
}
], - "totalPages": 0,
- "totalCount": 0,
- "amount": 0,
- "unreadCount": 0,
- "duplicatesCount": 0,
- "itemCount": 0,
- "itemsWithChartCount": 0
}Creates a new expense by uploading a PDF or image file
| organization_id | string <uuid> ID of the organization the expense is for |
| force_fail | boolean Force failure analysis of the expense image. If the value is 'true', an empty expense will be created and a failure notification will be sent to the organization. |
| expensePdf required | string <binary> PDF version of the expense |
{- "success": true,
- "message": "File uploaded successfully"
}Deletes multiple expenses in a single request. Requires an array of expense IDs in the request body.
| organization_id | string <uuid> ID of the organization to delete expenses for. Only required when 'duplicates' in request body is true. |
| expenseIds | Array of strings <uuid> [ 1 .. 100 ] items [ items <uuid > ] Array of expense IDs to delete |
| duplicates | boolean Whether to delete duplicates |
{- "expenseIds": [
- "550e8400-e29b-41d4-a716-446655440000",
- "550e8400-e29b-41d4-a716-446655440001"
], - "duplicates": true
}{- "success": true
}Updates a list of expenses
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| issuer_tax_identifier | string Filter by issuer tax identifier |
| issuer_name | string Filter by issuer name |
| sort | string Default: "createdAt" Enum: "priceAmount" "createdAt" "issuedAt" Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| minimun_price_amount | number Example: minimun_price_amount=1000 Filter by minimum price amount |
| maximun_price_amount | number Example: maximun_price_amount=2000 Filter by maximum price amount |
| payment_form | string Example: payment_form=02,03 Filter by payment form, comma separated |
| item_description | string Example: item_description=item description Filter by item description |
| expenseIds | Array of strings <uuid> <= 100 items [ items <uuid > ] IDs of the epxenses to update. If this parameter is specified, query filters will be ignored. |
| isRead | boolean Mark expenses as read (true) or unread (false). Use this for bulk read/unread updates; do not send together with archive. |
| archive | boolean Archive (true) or unarchive (false) the given expenses. When true, expenses are archived; when false, they are restored from archive. Do not send together with isRead. |
{- "expenseIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "isRead": true,
- "archive": true
}{- "success": true
}Retrieves the balance of expenses for an organization
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| issuer_tax_identifier | string Filter by issuer tax identifier |
| issuer_name | string Filter by issuer name |
| minimun_price_amount | number Example: minimun_price_amount=1000 Filter by minimum price amount |
| maximun_price_amount | number Example: maximun_price_amount=2000 Filter by maximum price amount |
| payment_form | string Example: payment_form=02,03 Filter by payment form, comma separated |
| item_description | string Example: item_description=item description Filter by item description |
{- "priceAmount": 1000
}Downloads a zip or xls file containing all selected expenses
| format required | string Enum: "zip" "xls" Format of the file to download |
| expense_ids required | string Comma separated list of IDs of the expenses to download. If this parameter is specified, all other query filters (except 'format') will be ignored. |
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| issuer_tax_identifier | string Filter by issuer tax identifier |
| issuer_name | string Filter by issuer name |
| sort | string Default: "createdAt" Enum: "priceAmount" "createdAt" "issuedAt" Field to sort by |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| minimun_price_amount | number Example: minimun_price_amount=1000 Filter by minimum price amount |
| maximun_price_amount | number Example: maximun_price_amount=2000 Filter by maximum price amount |
| payment_form | string Example: payment_form=02,03 Filter by payment form, comma separated |
| item_description | string Example: item_description=item description Filter by item description |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "type": "string",
- "filename": "string",
- "url": "string",
- "status": "processing"
}Uploads a zip file containing expenses
| organization_id required | string <uuid> |
| expensesUploadZipId | string <uuid> |
{- "success": true,
- "message": "File uploaded successfully"
}Retrieves detailed information about a specific expense
| id required | string <uuid> ID of the expense to retrieve |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "folioNumber": "string",
- "barCodeNumber": "string",
- "priceAmount": 0,
- "pdfFile": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pathname": "string",
- "contentType": "application/pdf",
- "contentDisposition": "string",
- "type": "expense",
- "filename": "string",
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "issuedAt": "2019-08-24T14:15:22Z",
- "organization": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "name": "string",
- "commercialName": "string",
- "taxIdentifier": "string",
- "taxRegimes": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string"
}
], - "isEntity": true,
- "isDemoMode": true,
- "postalCode": "string",
- "status": "pending",
- "facturapiValidationErrors": "string",
- "bankId": "string",
- "bankIdentifier": "string"
}, - "items": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "quantity": 0,
- "priceAmount": 0,
- "unitPriceAmount": 0,
- "discount": 0,
- "chart": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "description": "string"
}, - "isVerbatim": true
}
], - "issuerTaxIdentifier": "string",
- "issuerName": "string",
- "addressCity": "string",
- "addressState": "string",
- "isDemo": true,
- "isDuplicateOf": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "folioNumber": "string",
- "barCodeNumber": "string",
- "issuedAt": "2019-08-24T14:15:22Z",
- "priceAmount": 0
}, - "notes": "string",
- "confidenceScore": 0,
- "confidenceScoreDescription": "string",
- "paymentForm": "string",
- "paymentFormDescription": "string",
- "isVerbatim": true,
- "ratings": [
- {
- "rating": "positive"
}
], - "classification": "receipt",
- "isPending": false,
- "annotations": "string"
}Updates an expense
| id required | string <uuid> ID of the expense to update |
| folioNumber | string |
| barCodeNumber | string |
| issuedAt | string <date-time> |
| issuerName | string |
| issuerTaxIdentifier | string |
| addressCity | string |
| addressState | string |
| notes | string |
| paymentForm | string Payment form code of the expense |
| priceAmount | number <decimal> Price amount of the expense |
| isRead | boolean |
| isDuplicateOf | string or null 'null' is the only valid value. |
| annotations | string or null User-defined annotations for the expense |
{- "folioNumber": "1234567890",
- "barCodeNumber": "09876543211234567890",
- "issuedAt": "2019-08-24T14:15:22Z",
- "issuerName": "Establecimiento",
- "issuerTaxIdentifier": "RFC12345678XA",
- "addressCity": "Ciudad de México",
- "addressState": "México",
- "notes": "Notas de la factura",
- "paymentForm": "string",
- "priceAmount": 0,
- "isRead": true,
- "isDuplicateOf": "string",
- "annotations": "string"
}{- "success": true
}Deletes an expense. The request body must include a non-empty deleteReason.
| id required | string <uuid> ID of the expense to delete |
| deleteReason required | string non-empty Reason for deleting the expense. Stored with the expense snapshot in DeletedItem for audit. |
{- "deleteReason": "Expense was created by mistake"
}{- "success": true
}Rates the expense details generated by the AI
| id required | string <uuid> ID of the expense to rate |
| rating | string Enum: "positive" "negative" "neutral" User rating of the expense details generated by the AI |
{- "rating": "positive"
}{- "success": true
}Creates a new expense item
| expenseId | string <uuid> ID of the expense to create the item for |
| description | string Description of the expense item |
| quantity | number <decimal> Quantity of the expense item |
| unitPriceAmount | number <decimal> Unit price amount of the expense item |
| priceAmount | number <decimal> Price amount of the expense item |
| discount | number <decimal> Discount amount of the expense item |
| chartId | string <uuid> ID of the chart to assign to the expense item |
{- "expenseId": "a2142719-090a-410b-ad70-ea5efeb1c9dc",
- "description": "string",
- "quantity": 0,
- "unitPriceAmount": 0,
- "priceAmount": 0,
- "discount": 0,
- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d"
}{- "success": true,
- "data": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "expenseId": "a2142719-090a-410b-ad70-ea5efeb1c9dc",
- "description": "string",
- "quantity": 0,
- "priceAmount": 0,
- "discount": 0,
- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "createdById": "e13e432a-5323-4484-a91d-b5969bc564d9",
- "updatedById": "d8bc6076-4141-4a88-80b9-0eb31643066f"
}
}Updates a expense item
| id required | string <uuid> ID of the expense item to update |
| description | string Description of the expense item |
| quantity | number <decimal> Quantity of the expense item |
| priceAmount | number <decimal> Price amount of the expense item |
| discount | number <decimal> Discount amount of the expense item |
| chartId | string or null <uuid> ID of the chart to assign to the expense item. |
| chartReasoningConfirmed | boolean Used to mark when a human has confirmed the chart reasoning. |
{- "description": "string",
- "quantity": 0,
- "priceAmount": 0,
- "discount": 0,
- "chartId": "54f93a91-b046-4439-9ec5-17949db5a60d",
- "chartReasoningConfirmed": true
}{- "success": true,
- "message": "Expense item updated successfully"
}Lists all items
| organization_id required | any |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "netUnitPriceAmount": 0
}
]Creates an item
| description | string Description of the item |
| itemKey | string Item key |
| unitKey | string Unit key |
| netUnitPriceAmount | number <decimal> Unit price |
{- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "netUnitPriceAmount": 0
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "netUnitPriceAmount": 0
}Gets an item
| id required | string <uuid> ID of the item to get |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "netUnitPriceAmount": 0
}Updates an item
| id required | string <uuid> ID of the item to update |
| description | string Description of the item |
| itemKey | string Item key |
| unitKey | string Unit key |
| netUnitPriceAmount | number <decimal> Unit price |
{- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "netUnitPriceAmount": 0
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "itemKey": "string",
- "unitKey": "string",
- "unitDescription": "string",
- "netUnitPriceAmount": 0
}Creates a payment for an invoice. When creating a payment by requesting the CEP, the following information is required:
When creating a payment by adding a payment proof file, a payment proof file must be attached
| organization_id | string <uuid> ID of the organization to fetch invoices for |
| provider_id | string <uuid> ID of the provider to fetch invoices for |
| uuid | string <uuid> Filter by invoice UUID |
| folio_number | string Example: folio_number=1234567890 Filter by invoice folio number |
| series | string Example: series=S Filter by invoice series |
| statuses | string Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| created_at_from | string <date-time> Filter deductibles created after this date |
| created_at_to | string <date-time> Filter deductibles created before this date |
| issued_at_from | string <date-time> Filter deductibles issued after this date |
| issued_at_to | string <date-time> Filter deductibles issued before this date |
| stamped_at_from | string <date-time> Filter deductibles stamped after this date |
| stamped_at_to | string <date-time> Filter deductibles stamped before this date |
| payment_due_at_from | string <date-time> Filter invoices payment due after this date |
| payment_due_at_to | string <date-time> Filter invoices payment due before this date |
| sent_at_from | string <date-time> Filter invoices sent after this date |
| sent_at_to | string <date-time> Filter invoices sent before this date |
| created_at_period | string Example: created_at_period=2025-01 Filter invoices created in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_period | string Example: issued_at_period=2025-01 Filter invoices issued in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_period | string Example: stamped_at_period=2025-01 Filter invoices stamped in this period. Format: YYYY-MM. If a date range filter is provided, the service returns a HTTP 400 error. |
| created_at_current_period | boolean Default: false Filter invoices created in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| issued_at_current_period | boolean Default: false Filter invoices issued in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| stamped_at_current_period | boolean Default: false Filter invoices stamped in the current period. If a date range filter is provided, the service returns a HTTP 400 error. |
| archived | boolean Default: false Filter by archived status |
| issuer_name | string Example: issuer_name=test Filter by issuer name |
| recipient_name | string Example: recipient_name=test Filter by recipient name |
| issuer_tax_identifier | string Example: issuer_tax_identifier=1234567890 Filter by issuer tax identifier |
| recipient_tax_identifier | string Example: recipient_tax_identifier=1234567890 Filter by recipient tax identifier |
| issuer_is_entity | boolean Default: false Filter by issuer entity status |
| recipient_is_entity | boolean Default: false Filter by recipient entity status |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD Filter by payment method |
| payment_form | string Example: payment_form=99 Filter by payment form |
| tax_ids | string Example: tax_ids=cma92gmsa0000ji041o9vcovz,cma92gmsa0000ji041o9vcovz Filter by tax ids, comma separated |
| tax_rates | string Example: tax_rates=0.16 Filter by tax rates, comma separated. If provided, must be the same length as tax_ids. |
| cfdi_uses | string Example: cfdi_uses=G03,G04 Filter by cfdi uses, comma separated |
| minimun_gross_price_amount | number Example: minimun_gross_price_amount=1000 Filter by minimum gross price amount |
| maximun_gross_price_amount | number Example: maximun_gross_price_amount=2000 Filter by maximum gross price amount |
| item_key | string Example: item_key=50202310 Filter by item key |
| item_description | string Example: item_description=item description Filter by item description |
| category | string Enum: "sat" "foreign" "government" "pament_notice" Filter by invoice category |
| is_cancelled | boolean Default: false Filter by cancelled status |
| invoiceIds | Array of strings <uuid> [ items <uuid > ] |
| paymentProofFileId | string <uuid> ID of the payment proof file (only when status is "paid", optional) |
| paymentTrackingNumber | string Payment tracking number (either this or paymentReferenceNumber is required when status is "paid") |
| paymentReferenceNumber | string Payment reference number (either this or paymentTrackingNumber is required when status is "paid") |
| paymentIssuerBankId | string Bank code of the issuing bank (required when status is "paid") |
| paymentRecipientBankIdentifier | string = 18 characters CLABE of the receiving bank account (required when status is "paid") |
| paymentIsOrderingBank | boolean Whether this is an ordering bank payment (required when status is "paid") |
| paidAt | string <date> Date when the payment was made, in Mexico timezone (required when status is "paid", must be in YYYY-MM-DD format and not in the future) |
{- "invoiceIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "paymentProofFileId": "1c3bfd57-07b6-4dab-8d12-b28ae346ad5e",
- "paymentTrackingNumber": "string",
- "paymentReferenceNumber": "string",
- "paymentIssuerBankId": "012",
- "paymentRecipientBankIdentifier": "012180001234567890",
- "paymentIsOrderingBank": true,
- "paidAt": "2024-03-20"
}{- "success": true
}Updates the paidAt (and optionally paidAtUpdateReason) of a payment by ID. Only these fields can be updated. The user must belong to the invoice's organization and have permission to update payments according to their role. The payment must not be rolled back. paidAt must be a valid ISO 8601 date or datetime and cannot be in the future.
| id required | string <uuid> ID of the payment to update |
| paidAt required | string When the payment was made. ISO 8601 date (YYYY-MM-DD) or datetime (e.g. YYYY-MM-DDTHH:mm:ssZ). Cannot be in the future. |
| paidAtUpdateReason | string Enum: "manual" "payment_proof" "payment_proof_reason" Reason for updating the paidAt value (InvoiceFieldUpdateReason). Optional. |
{- "paidAt": "2025-01-20T14:30:00Z",
- "paidAtUpdateReason": "manual"
}{- "success": true
}Deletes a payment. All invoices associated with the payment will rollback to status 'accepted'. All invoices associated with the payment must be in 'paid' status, otherwise the service will return HTTP 400 with error 'invalid_invoice_status'
| id required | string <uuid> ID of the payment to delete |
| force | boolean Default: false Whether to force delete the payment |
{- "success": true,
- "invoices": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
- "commercialName": "string",
- "grossPriceAmount": 0
}
]
}Starts AI analysis of the payroll payment proof file associated with the given payroll payment. Accepts payrollPaymentId. The endpoint returns immediately with the created PayrollPaymentProof id (status processing). Analysis runs in the background; on completion a real-time notification is emitted (payroll_payment_proof_created or payroll_payment_proof_failed).
| payrollPaymentId required | string ID of the payroll payment whose proof file will be analyzed |
{- "payrollPaymentId": "string"
}{- "success": true,
- "payrollPaymentProof": {
- "id": "string"
}
}Returns the PayrollPaymentProof entity with status, source fields used for comparison, extracted fields and confidence scores from the AI analysis. User must have DETAIL access to payroll for the proof's organization and belong to that organization.
| id required | string Payroll payment proof ID |
{- "id": "string",
- "payrollPaymentId": "string",
- "status": "processing",
- "sourceIssuerName": "string",
- "sourcePaidAt": "2019-08-24T14:15:22Z",
- "sourceEmployeesCount": 0,
- "sourceAmount": 0,
- "issuerName": "string",
- "paidAt": "2019-08-24T14:15:22Z",
- "employeesCount": 0,
- "amount": 0,
- "issuerNameConfidenceScore": 0,
- "paidAtConfidenceScore": 0,
- "employeesCountConfidenceScore": 0,
- "amountConfidenceScore": 0,
- "tokenCount": 0,
- "pdfProcessingPrice": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Returns the payroll configuration for an organization (schedule: weekly, biweekly, or monthly). Requires authentication. User must have DETAIL access to the organization's payroll configuration and belong to the organization.
| organization_id required | string <uuid> Organization identifier |
{- "payrollConfiguration": {
- "id": "string",
- "organizationId": "string",
- "schedule": "weekly"
}
}Creates or updates the payroll configuration for an organization (upsert). Requires authentication. User must have UPDATE access to the organization's payroll configuration and belong to the organization.
| organization_id required | string <uuid> Organization identifier |
| schedule | string or null Enum: "weekly" "biweekly" "monthly" Payroll schedule (weekly, biweekly, or monthly). |
{- "schedule": "weekly"
}{- "success": true,
- "payrollConfiguration": {
- "id": "string",
- "organizationId": "string",
- "schedule": "weekly"
}
}Returns the payroll for an organization and period (YYYY-MM), including all periods for that month. If no Payroll record exists for the period, the schedule is taken from PayrollConfiguration and periods are computed on-the-fly (existing DB periods are merged with generated ones so the list is always complete). If no periods exist and no schedule is configured, returns 400 payroll_configuration_missing. Requires authentication. User must have DETAIL access to payroll for the organization and belong to the organization.
| organization_id required | string Organization ID |
| period required | string^\d{4}-\d{2}$ Example: period=2026-02 Period in YYYY-MM format (e.g. 2026-02) |
{- "payroll": {
- "organizationId": "string",
- "periodDate": "2026-02",
- "schedule": "weekly",
- "employeesCount": 0,
- "payrollPeriodCount": 0,
- "payrollPeriodEmployeeAmount": "string",
- "periods": [
- {
- "id": "string",
- "organizationId": "string",
- "status": "string",
- "periodNumber": 0,
- "periodNumberInYear": 0,
- "periodStartAt": "2019-08-24",
- "periodEndAt": "2019-08-24",
- "totalAmount": "string",
- "employeesCount": 0,
- "obligationsAmount": "string"
}
]
}
}Uploads one or more SAT nómina CFDI XMLs (TipoDeComprobante N) for the given organization. Maximum 10 XML files per request; for larger batches use POST /api/payroll/upload-zip. Query params period (YYYY-MM) and period_number are optional. When both provided, they must be valid; when both omitted, period and period_number are derived from each XML's FechaInicialPago using the organization's payroll schedule. They must be both provided or both omitted (returns 400 if only one is sent). Send multiple files using the same multipart field name "file". Each file is validated (TipoComprobante, Emisor RFC vs organization, period dates, SAT status, duplicate) and processed independently; failures are reported per file. Returns successCount, failureCount, and errors (filename + errorCode) like upload-zip. Creates Payroll and PayrollPeriod if needed, then Employee or PayrollPeriodEmployee and related data for each successful XML. Requires authentication. User must have DETAIL access to payroll and belong to the organization.
| organization_id required | string Organization ID |
| period | string^\d{4}-\d{2}$ Example: period=2026-01 Period in YYYY-MM format (e.g. 2026-01). Optional; when omitted (together with period_number), derived from each XML's FechaInicialPago. |
| period_number | integer >= 1 Example: period_number=1 Period number within the month (1-based integer). Optional; when omitted (together with period), derived from each XML's FechaInicialPago. |
| file required | Array of strings <binary> [ items <binary > ] One or more payroll (nómina) CFDI XML files (same field name for multiple) |
{- "successCount": 0,
- "failureCount": 0,
- "errors": [
- {
- "filename": "string",
- "errorCode": "invoice_type_not_valid"
}
]
}Uploads a ZIP file containing one or more SAT nómina CFDI XMLs. Each XML is validated and processed like the single-upload endpoint. Query params period (YYYY-MM) and period_number are optional. When both provided, they must be valid; when both omitted, period and period_number are derived from each XML's FechaInicialPago using the organization's payroll schedule. They must be both provided or both omitted (returns 400 if only one is sent). Returns successCount, failureCount, and a list of errors (filename + errorCode) for each failed file. Does not fail the whole request on single-file errors. Requires authentication. User must have DETAIL access to payroll and belong to the organization.
| organization_id required | string Organization ID |
| period | string^\d{4}-\d{2}$ Period in YYYY-MM format. Optional; when omitted (together with period_number), derived from each XML's FechaInicialPago. |
| period_number | integer >= 1 Period number (1-based integer). Optional; when omitted (together with period), derived from each XML's FechaInicialPago. |
| file required | string <binary> ZIP file containing .xml files |
{- "successCount": 0,
- "failureCount": 0,
- "errors": [
- {
- "filename": "string",
- "errorCode": "invoice_type_not_valid"
}
]
}Returns a paginated list of payroll period employees for a given payroll period. Response includes data, totalCount, totalPages, and pendingCount (number of employees in the period with isPending=true). Each item includes id, name, role, department, amount, and isPending. Requires authentication. User must have DETAIL access to payroll for the period's organization and belong to that organization.
| payroll_period_id required | string Payroll period ID |
| page | integer >= 1 Default: 1 Page number (1-based). Default 1. |
| limit | integer Default: 10 Page size (alias pageSize). Default 10. |
| pageSize | integer Page size (alias for limit). |
| sort | string Default: "name" Enum: "name" "role" "department" "amount" Sort field. One of name, role, department, amount. Default name. |
| order | string Default: "asc" Enum: "asc" "desc" Sort order. asc or desc. Default asc. |
| q | string Search by name or tax identifier (partial match, case-insensitive). |
| role | string Filter by role (exact match). Multiple comma-separated values (e.g. "Developer,Designer"). |
| department | string Filter by department (exact match). Multiple comma-separated values (e.g. "Engineering,Product"). |
{- "data": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "department": "string",
- "amount": "string",
- "isPending": true
}
], - "totalCount": 0,
- "totalPages": 0,
- "pendingCount": 0
}Returns detail for a single payroll period employee by ID (employeeId, name, role, department, daysPaid, payrollPeriod dates, perceptions, deductions, amount). Requires authentication. User must have DETAIL access to payroll for the employee's period organization and belong to that organization.
| id required | string Payroll period employee ID |
{- "employeeId": "string",
- "name": "string",
- "role": "string",
- "department": "string",
- "daysPaid": 0,
- "amount": "string",
- "isPending": true,
- "payrollPeriod": {
- "periodStartAt": "2019-08-24",
- "periodEndAt": "2019-08-24"
}, - "perceptions": [
- {
- "description": "string",
- "taxableAmount": "string",
- "exemptAmount": "string"
}
], - "deductions": [
- {
- "description": "string",
- "amount": "string"
}
]
}Returns a unique list of department values from payroll period employees for the given payroll period ID, sorted alphabetically by department name. Requires authentication. User must have DETAIL access to payroll for the period's organization and belong to that organization.
| id required | string Payroll period ID |
{- "departments": [
- "string"
]
}Returns a unique list of role values from payroll period employees for the given payroll period ID, sorted alphabetically by role name. Requires authentication. User must have DETAIL access to payroll for the period's organization and belong to that organization.
| id required | string Payroll period ID |
{- "roles": [
- "string"
]
}Returns a single payroll period by ID with its global perceptions, deductions, and obligations. No pagination. Requires authentication. User must have DETAIL access to payroll for the period's organization and belong to that organization.
| id required | string Payroll period ID |
{- "payrollPeriod": {
- "id": "string",
- "payrollId": "string",
- "organizationId": "string",
- "schedule": "weekly",
- "status": "string",
- "periodNumber": 0,
- "periodStartAt": "2019-08-24",
- "periodEndAt": "2019-08-24",
- "totalAmount": "string",
- "perceptionsAmount": "string",
- "deductionsAmount": "string",
- "obligationsAmount": "string",
- "payrollPeriodEmployeesCount": 0,
- "reportPdfFile": {
- "id": "string",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "filename": "string",
- "type": "string"
}, - "payrollPayment": {
- "id": "string",
- "paidAt": "2019-08-24T14:15:22Z",
- "payrollPaymentProofFile": {
- "id": "string",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "filename": "string",
- "type": "string"
}, - "payrollPaymentProof": {
- "id": "string",
- "status": "processing",
- "pdfProcessingPrice": "string"
}
}, - "perceptions": [
- {
- "id": "string",
- "description": "string",
- "chartId": "string",
- "chartMode": "string",
- "chartConfidenceScore": "string",
- "taxableAmount": "string",
- "exemptAmount": "string"
}
], - "deductions": [
- {
- "id": "string",
- "description": "string",
- "chartId": "string",
- "chartMode": "string",
- "chartConfidenceScore": "string",
- "amount": "string"
}
], - "obligations": [
- {
- "id": "string",
- "key": "string",
- "description": "string",
- "chartId": "string",
- "chartMode": "string",
- "chartConfidenceScore": "string",
- "amount": "string"
}
], - "payrollReport": {
- "id": "string",
- "status": "string",
- "reportPdfFile": {
- "id": "string",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "filename": "string",
- "type": "string"
}
}
}
}Uploads a payroll report PDF for the period. Creates a PayrollReport (status processing) and runs AI analysis in the background. When analysis finishes, the report status becomes pending (missing employees), applied (no missing employees), or error. Returns 400 if no payroll period employees (XMLs) have been uploaded for this period. Returns 402 if any PayrollPeriodEmployee has isPending status. Returns 400 if a report is already processing, pending, or applied for this period. Requires authentication. User must have EDIT access to payroll for the period's organization and belong to that organization.
| id required | string Payroll period ID |
| file required | string <binary> Payroll report PDF file |
{- "success": true,
- "payrollReportId": "string"
}Removes the report PDF file for the payroll period (sets reportPdfFileId to null), deletes all obligations for the period, and sets obligationsAmount to null. Only allowed when the period status is not "paid". Requires authentication. User must have EDIT access to payroll for the period's organization and belong to that organization.
| id required | string Payroll period ID |
{- "success": true
}Returns the status of a payroll report by ID. Status is one of processing, pending, applied, or error. Requires authentication. User must have DETAIL access to payroll for the report's organization and belong to that organization.
| id required | string Payroll report ID |
{- "status": "processing"
}Updates the payroll report status. The only allowed transition is pending -> applied. Request body must include status "applied". If the report is not in pending status, returns 400. Only status=applied is accepted in the body. Requires authentication. User must have EDIT access to payroll for the report's organization and belong to that organization.
| id required | string Payroll report ID |
| status required | string Value: "applied" Only "applied" is accepted |
{- "status": "applied"
}{- "status": "applied"
}Registers a payment for a payroll period using a previously uploaded payment proof file. The file must have been uploaded with type PAYROLL_PAYMENT_PROOF. Creates a PayrollPayment and sets the period status to paid. Payroll period must be in status "pending"; otherwise returns 400. Only one payment per period is allowed. Requires authentication. User must have EDIT access to payroll for the period's organization and belong to that organization.
| payrollPeriodId required | string Payroll period ID |
| payrollPaymentProofFileId required | string ID of the previously uploaded payment proof file (type PAYROLL_PAYMENT_PROOF) |
{- "payrollPeriodId": "string",
- "payrollPaymentProofFileId": "string"
}{- "success": true,
- "payrollPayment": {
- "id": "string",
- "payrollPeriodId": "string",
- "payrollPaymentProofFileId": "string",
- "paidAt": "2019-08-24T14:15:22Z",
- "paidAtUpdateReason": "manual",
- "createdAt": "2019-08-24T14:15:22Z"
}
}Deletes a payroll payment by ID. The associated PayrollPaymentProof (if any) is removed by cascade. The payroll period status is reverted from "paid" to "created". Requires authentication. User must have EDIT access to payroll for the payment's organization and belong to that organization.
| id required | string Payroll payment ID |
{- "error": "payroll_payment_not_found"
}Updates the chartId for a payroll period perception (global perception line). Same logic as expense item PATCH chartId; chart must belong to the period's organization and must not be a parent chart. When setting a chart, chartMode is set to reinforcement if the previous mode was reasoning, otherwise manual; when clearing (chartId null), chartMode is set to manual.
| id required | string Payroll period perception ID |
| chartId | string or null Chart ID to assign, or null to clear. |
{- "chartId": "string"
}{- "success": true
}Updates the chartId for a payroll period deduction (global deduction line). Same logic as expense item PATCH chartId; chart must belong to the period's organization and must not be a parent chart. When setting a chart, chartMode is set to reinforcement if the previous mode was reasoning, otherwise manual; when clearing (chartId null), chartMode is set to manual.
| id required | string Payroll period deduction ID |
| chartId | string or null Chart ID to assign, or null to clear. |
{- "chartId": "string"
}{- "success": true
}Updates the chartId for a payroll period obligation (global obligation line). Same logic as expense item PATCH chartId; chart must belong to the period's organization and must not be a parent chart. When setting a chart, chartMode is set to reinforcement if the previous mode was reasoning, otherwise manual; when clearing (chartId null), chartMode is set to manual.
| id required | string Payroll period obligation ID |
| chartId | string or null Chart ID to assign, or null to clear. |
{- "chartId": "string"
}{- "success": true
}Returns paginated list of employees for the given organization_id. Each item has id, name, role, department, payrollPeriodEmployeesCount (number of payroll period records for that employee), totalAmount (sum of amount across all periods for that employee). Response includes totalCount (total employees), totalAmount (sum of amount across all payroll period employees in the org), totalPayrollPeriodEmployeesCount, totalPages. Sort by name (default asc), payrollPeriodEmployeesCount, role, department, totalAmount. Requires authentication. User must have DETAIL access to payroll for the organization and belong to that organization.
| organization_id required | string Organization ID |
| page | integer >= 1 Default: 1 |
| limit | integer Default: 10 Page size (alias pageSize) |
| pageSize | integer |
| sort | string Default: "name" Enum: "name" "payrollPeriodEmployeesCount" "role" "department" "totalAmount" Sort field. One of name, payrollPeriodEmployeesCount, role, department, totalAmount. Default name. |
| order | string Default: "asc" Enum: "asc" "desc" |
| q | string Search/filter by text (matches against employee name, role, department, or similar) |
| role | string Example: role=Developer,Designer Filter by role(s). Comma-separated list; employee role must match one of the values. |
| department | string Example: department=Engineering,Product Filter by department(s). Comma-separated list; employee department must match one of the values. |
{- "totalCount": 0,
- "totalAmount": "string",
- "totalPayrollPeriodEmployeesCount": 0,
- "totalPages": 0,
- "data": [
- {
- "id": "string",
- "name": "string",
- "role": "string",
- "department": "string",
- "payrollPeriodEmployeesCount": 0,
- "totalAmount": "string"
}
]
}Returns all unique department values for employees in the organization, sorted alphabetically. Requires authentication. User must have DETAIL access to payroll for the organization and belong to that organization.
| organization_id required | string Organization ID |
{- "data": [
- "string"
]
}Returns all unique role values for employees in the organization, sorted alphabetically. Requires authentication. User must have DETAIL access to payroll for the organization and belong to that organization.
| organization_id required | string Organization ID |
{- "data": [
- "string"
]
}Returns employee detail by ID (id, taxIdentifier, identificationNumber, socialSecurityNumber, employmentStartAt, contractPdfFile). Requires authentication. User must have DETAIL access to payroll for an organization that has this employee in at least one payroll period, and belong to that organization.
| id required | string Employee ID |
{- "id": "string",
- "taxIdentifier": "string",
- "identificationNumber": "string",
- "socialSecurityNumber": "string",
- "employmentStartAt": "2019-08-24",
- "contractPdfFile": {
- "id": "string",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "filename": "string",
- "type": "string"
}
}Uploads and sets the contract PDF file for the employee. Request body must be multipart/form-data with a field "contractPdf" (file). Accepts application/pdf or application/x-pdf. Requires authentication. User must have EDIT access to payroll for an organization that has this employee in at least one payroll period, and belong to that organization.
| id required | string Employee ID |
| contractPdf required | string <binary> Contract PDF file |
{- "success": true
}Removes the contract PDF from the employee Returns 404 if the employee has no contract PDF. Requires authentication. User must have EDIT access to payroll for an organization that has this employee, and belong to that organization.
| id required | string Employee ID |
{- "success": true
}Returns paginated list of payroll period employees for the given employee (payroll history). Each item has payrollPeriod (periodStartAt, periodEndAt, status), amount, and xmlFile. Sorted by periodStartAt descending by default. Sortable by amount, payrollPeriod.periodStartAt, payrollPeriod.status. Requires authentication. User must have DETAIL access to payroll for an organization that has this employee in at least one payroll period.
| id required | string Employee ID |
| page | integer >= 1 Default: 1 |
| limit | integer Default: 10 Page size (alias pageSize) |
| pageSize | integer |
| sort | string Default: "payrollPeriod.periodStartAt" Enum: "amount" "payrollPeriod.periodStartAt" "payrollPeriod.status" Sort field. One of amount, payrollPeriod.periodStartAt, payrollPeriod.status. Default payrollPeriod.periodStartAt. |
| order | string Default: "desc" Enum: "asc" "desc" |
{- "data": [
- {
- "payrollPeriod": {
- "periodStartAt": "2019-08-24",
- "periodEndAt": "2019-08-24",
- "status": "string"
}, - "amount": "string",
- "xmlFile": {
- "id": "string",
- "pathname": "string",
- "contentType": "string",
- "contentDisposition": "string",
- "downloadUrl": "string",
- "filename": "string",
- "type": "string"
}
}
], - "totalCount": 0,
- "totalPages": 0
}Returns a list of taxes. By default, returns only global taxes (organization_id = null). If organization_id is provided, returns taxes for that organization plus global taxes. If invoice_category is provided, filters taxes to only those that support the specified category (taxes with null invoiceCategories are included as they support all categories). Requires authentication and user must belong to the organization if organization_id is specified.
| organization_id | string <uuid> Organization ID to filter taxes. If provided, returns organization-specific taxes plus global taxes. |
| invoice_category | string Example: invoice_category=expense Filter taxes by invoice category. Returns only taxes that support this category (taxes with null invoiceCategories support all categories). |
[- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "name": "string",
- "description": "string",
- "isWithholding": true
}
]Creates a new tax for a specific organization. Requires authentication and user must belong to the organization.
| organization_id required | string <uuid> Organization ID to create the tax for |
| name required | string Tax name |
| description required | string Tax description |
| code | string Tax code |
| isWithholding | boolean Default: false Whether this is a withholding tax |
| invoiceCategories | Array of strings List of invoice categories that this tax supports or is intended for. If not provided or null, the tax supports all categories. |
{- "name": "IVA",
- "description": "Impuesto al Valor Agregado",
- "code": "002",
- "isWithholding": false,
- "invoiceCategories": [
- "sat",
- "foreign",
- "government"
]
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "code": "string",
- "name": "string",
- "description": "string",
- "isWithholding": true,
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Creates a payment proof by analyzing a payment proof file and associating it with one or more invoices. The payment proof file will be processed asynchronously using AI to extract payment information. All invoices must be in 'paid' status, belong to the same organization and provider (if applicable), and must not already be associated with another payment proof. The maximum number of invoices per payment proof is 100.
| paymentProofFileId required | string <uuid> ID of the payment proof file to analyze |
| invoiceIds required | Array of strings <uuid> [ 1 .. 100 ] items [ items <uuid > ] Array of invoice IDs to associate with this payment proof. All invoices must be in 'paid' status, belong to the same organization and provider, and must not already be associated with another payment proof. |
{- "paymentProofFileId": "1c3bfd57-07b6-4dab-8d12-b28ae346ad5e",
- "invoiceIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}{- "success": true,
- "paymentProof": {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}
}Retrieves detailed information about a specific payment proof
| id required | string <uuid> ID of the payment proof to retrieve |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "issuerBankIdentifier": "string",
- "recipientBankIdentifier": "string",
- "issuerName": "string",
- "beneficiaryName": "string",
- "paidAt": "2019-08-24",
- "description": "string",
- "grossPriceAmount": 0,
- "issuerBankIdentifierConfidenceScore": 0,
- "recipientBankIdentifierConfidenceScore": 0,
- "beneficiaryNameConfidenceScore": 0,
- "descriptionConfidenceScore": 0,
- "grossPriceAmountConfidenceScore": 0,
- "paidAtConfidenceScore": 0,
- "referenceNumberConfidenceScore": 0,
- "status": "processing",
- "sourcePaidAt": "string",
- "sourceIssuerBankIdentifier": "string",
- "sourceRecipientBankIdentifier": "string",
- "sourceIssuerName": "string",
- "sourceBeneficiaryName": "string",
- "sourceDescription": "string",
- "sourceGrossPriceAmount": 0,
- "sourceOriginalGrossPriceAmount": 0,
- "sourceReferenceNumber": "string",
- "pdfProcessingPrice": 0,
- "paidInOriginalCurrency": true
}Retrieves income and outcome stats for the organization
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD,PUE Comma-separated list of payment methods to filter by |
| payment_form | any Payment form code to filter by |
| issuer_name | any Issuer name to filter by |
| recipient_name | any Recipient name to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
{- "totalIncomeGrossPriceAmount": 0,
- "invoicesReceivableTotalGrossPriceAmountNotGeneric": null,
- "invoicesReceivableTotalGrossPriceAmountGeneric": null,
- "invoicesReceivableTotalGrossPriceAmountGenericForeign": null,
- "totalOutcomeGrossPriceAmount": 0,
- "invoicesPayableTotalGrossPriceAmount": 0,
- "deductiblesTotalGrossPriceAmount": 0,
- "expensesTotalPriceAmount": 0,
- "payrollPaidTotalGrossPriceAmount": 0
}Retrieves top employees by amount paid from paid payroll periods whose period (periodStartAt to periodEndAt) falls within or overlaps the requested date range.
| organization_id required | string <uuid> ID of the organization to filter statistics for |
| date_from required | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to required | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| employee_name | string Filter employees by name (partial match, case-insensitive) |
| include_totals | boolean Default: false When true, includes totalGrossPriceAmount and totalEmployeesCount in the response |
| order | string Default: "desc" Enum: "asc" "desc" Sort order for top employees by amount |
| page | integer Default: 1 Page number for pagination |
| limit | integer Default: 5 Maximum number of employees to return per page |
{- "topEmployees": [
- {
- "name": "string",
- "amount": 0
}
], - "totalGrossPriceAmount": 0,
- "totalEmployeesCount": 0,
- "totalPages": 0
}Retrieves top organizations from invoices for the organization
| provider_id | string <uuid> ID of the provider to filter statistics for |
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD,PUE Comma-separated list of payment methods to filter by |
| payment_form | any Payment form code to filter by |
| statuses | string Default: "paid,completed" Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| issuer_name | any Issuer name to filter by |
| recipient_name | any Recipient name to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| payment_due_at_from | string <date> Example: payment_due_at_from=2024-01-01 Start payment due date for the statistics period (ISO 8601 format) |
| payment_due_at_to | string <date> Example: payment_due_at_to=2024-01-31 End payment due date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "grossPriceAmount": 0,
- "invoiceCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top items from invoices for the organization
| provider_id | string <uuid> ID of the provider to filter statistics for |
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD,PUE Comma-separated list of payment methods to filter by |
| payment_form | any Payment form code to filter by |
| statuses | string Default: "paid,completed" Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| description | any Item description to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| payment_due_at_from | string <date> Example: payment_due_at_from=2024-01-01 Start payment due date for the statistics period (ISO 8601 format) |
| payment_due_at_to | string <date> Example: payment_due_at_to=2024-01-31 End payment due date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "grossPriceAmount": 0,
- "quantity": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalQuantity": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top payment forms from invoices for the organization
| provider_id | string <uuid> ID of the provider to filter statistics for |
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_method | string Enum: "PPD" "PUE" Example: payment_method=PPD,PUE Comma-separated list of payment methods to filter by |
| payment_form | any Payment form code to filter by |
| statuses | string Default: "paid,completed" Example: statuses=draft,sent,accepted,paid,completed,rejected,processing,not_valid,annulled Comma-separated list of invoice statuses to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| payment_due_at_from | string <date> Example: payment_due_at_from=2024-01-01 Start payment due date for the statistics period (ISO 8601 format) |
| payment_due_at_to | string <date> Example: payment_due_at_to=2024-01-31 End payment due date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "paymentForm": "string",
- "grossPriceAmount": 0,
- "invoiceCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top organizations from deductibles for the organization
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| issuer_name | any Issuer name to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "grossPriceAmount": 0,
- "invoiceCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top items from deductibles for the organization
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| description | any Item description to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "grossPriceAmount": 0,
- "quantity": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalQuantity": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top payment forms from deductibles for the organization
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| date_from | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "paymentForm": "string",
- "grossPriceAmount": 0,
- "invoiceCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalGrossPriceAmount": 0,
- "totalInvoicesCount": 0
}Retrieves top organizations from expenses for the organization
| organization_id required | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| issuer_name | any Issuer name to filter by |
| date_from required | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to required | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "priceAmount": 0,
- "expenseCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalPriceAmount": 0,
- "totalExpensesCount": 0
}Retrieves top items from expenses for the organization
| organization_id | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| description | any Item description to filter by |
| date_from required | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to required | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "name": "string",
- "priceAmount": 0,
- "quantity": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalQuantity": 0,
- "totalPriceAmount": 0,
- "totalExpensesCount": 0
}Retrieves top payment forms from expenses for the organization
| organization_id required | string <uuid> ID of the organization to filter statistics for |
| payment_form | any Payment form code to filter by |
| date_from required | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to required | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
| order | string Default: "desc" Enum: "asc" "desc" Sort order |
| page | integer >= 1 Default: 1 Page number for pagination |
| limit | integer Default: 5 Enum: 5 10 30 60 100 Number of items per page |
| include_totals | any Whether to include summarized values and page count in the response |
{- "data": [
- {
- "paymentForm": "string",
- "priceAmount": 0,
- "expenseCount": 0
}
], - "totalCount": 0,
- "totalPages": 0,
- "totalPriceAmount": 0,
- "totalExpensesCount": 0
}Retrieves invoice preferences requirements for an organization
| organization_id required | string <uuid> ID of the organization |
{- "status": "verified",
- "isBankingInformationRequired": true,
- "isComplianceDocumentRequired": true
}Retrieves charts with amounts for the organization
| organization_id required | string <uuid> ID of the organization to filter statistics for |
| parent_code | any Example: parent_code=109-02-001 Parent code to filter by |
| date_from required | string <date> Example: date_from=2024-01-01 Start date for the statistics period (ISO 8601 format) |
| date_to required | string <date> Example: date_to=2024-01-31 End date for the statistics period (ISO 8601 format) |
[- {
- "code": "string",
- "description": "string",
- "totalAmount": 0,
- "itemCount": 0,
- "childrenCount": 0
}
]Retrieves dashboard alerts for an organization
| organization_id required | string <uuid> ID of the organization |
{- "pastDuePayableInvoicesCount": 0,
- "pastDueReceivableInvoicesCount": 0,
- "sentPayableInvoicesCount": 0,
- "createdExpensesCount": 0,
- "createdDeductiblesCount": 0,
- "paidReceivableInvoicesCount": 0,
- "completedPayableInvoicesCount": 0,
- "createdProvidersCount": 0
}Retrieves a paginated list of channels for a specific organization
| organization_id required | string Organization ID to filter channels |
| page | integer Default: 1 Page number for pagination |
| limit | integer Default: 30 Number of items per page |
| sort | string Default: "createdAt" Enum: "description" "whatsappNumber" "createdAt" Field to sort by |
| order | string Default: "asc" Enum: "asc" "desc" Sort order |
{- "data": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "whatsappNumber": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
], - "totalPages": 0,
- "totalCount": 0
}Creates a new channel for an organization
| organization_id required | string Organization ID to create the channel for |
| description required | string Channel description |
| whatsappNumber required | string WhatsApp phone number |
{- "description": "string",
- "whatsappNumber": "1234567890"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "whatsappNumber": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Retrieves a specific channel by ID
| id required | string Channel ID |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "whatsappNumber": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}Updates an existing channel
| id required | string Channel ID |
| description required | string Channel description |
| whatsappNumber required | string WhatsApp phone number (without + prefix) |
{- "description": "string",
- "whatsappNumber": "1234567890"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "description": "string",
- "whatsappNumber": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}