# List tax retentions ## ▶️ Usage With the List Tax Retentions method, you can: 1. List tax retentions related to a specific (using the query parameter). 2. Get the details of a specific (using the query parameter). 3. List all tax retentions related to your Belvo account (without using any query parameters). ## 📖 Pagination This method returns a paginated response (default: 100 items per page). You can use the query parameter to increase the number of items returned to a maximum of 1000 items. You can use the query parameter to navigate through the results. For more details on how to navigate Belvo's paginated responses, see our Pagination Tips article. ## 🔦 Filtering Responses Please see the query list below for a list of fields that you can filter your responses by. For more information on how to use filters, see our Filtering responses article. Endpoint: GET /api/tax-retentions/ Version: 1.223.0 Security: basicAuth ## Query parameters: - `link` (string) The you want to filter by. ℹ️ We highly recommend adding the filter in order to improve your performance. Example: "8848bd0c-9c7e-4f53-a732-ec896b11d4c4" - `page_size` (integer) Indicates how many results to return per page. By default we return 100 results per page. ℹ️ The minimum number of results returned per page is 1 and the maximum is 1000. If you enter a value greater than 1000, our API will default to the maximum value (1000). Example: 100 - `page` (integer) A page number within the paginated result set. Example: 1 - `omit` (string) Omit certain fields from being returned in the response. For more information, see our Filtering responses DevPortal article. - `fields` (string) Return only the specified fields in the response. For more information, see our Filtering responses DevPortal article. - `link__in` (array) Return results only for these s. Example: ["5722d0ba-69d7-42dc-8ff5-33767b83c5d6"] - `created_at` (string) Return items that were last updated in Belvo's database on this date (in format). Example: "2022-05-05" - `created_at__gt` (string) Return items that were last updated in Belvo's database after this date (in format). Example: "2022-05-05" - `created_at__gte` (string) Return items that were last updated in Belvo's database after or on this date (in format). Example: "2022-05-04" - `created_at__lt` (string) Return items that were last updated in Belvo's database before this date (in format). Example: "2022-04-01" - `created_at__lte` (string) Return items that were last updated in Belvo's database before or on this date (in format). Example: "2022-03-30" - `created_at__range` (array) Return accounts that were last updated in Belvo's database between two dates (in format). Example: ["2022-03-03"] ## Response 200 fields (application/json): - `count` (integer) The total number of results in your Belvo account. Example: 130 - `next` (string,null) The URL to next page of results. Each page consists of up to 100 items. If there are not enough results for an additional page, the value is . In our documentation example, we use as a placeholder value. In production, this value will be replaced by the actual endpoint you are currently using (for example, or ). Example: "https://sandbox.belvo.com/api/{endpoint}/?link=1bd948f7-245d-4313-b604-34d1044cb908page=2" - `previous` (string,null) The URL to the previous page of results. If there is no previous page, the value is . - `results` (array) Array of tax retentions objects. - `results.id` (string) Belvo's unique identifier for the current item. Example: "0d3ffb69-f83b-456e-ad8e-208d0998d71d" - `results.link` (string,null) The the data belongs to. Example: "30cb4806-6e00-48a4-91c9-ca55968576c8" - `results.collected_at` (string, required) The ISO-8601 timestamp when the data point was collected. Example: "2022-02-09T08:45:50.406032Z" - `results.created_at` (string) The ISO-8601 timestamp of when the data point was created in Belvo's database. Example: "2022-02-09T08:45:50.406032Z" - `results.invoice_identification` (string,null, required) The fiscal institution's unique ID for the invoice that the tax retention relates to. Example: "def404af-5eef-4112-aa99-d1ec8493b89a" - `results.version` (string,null, required) The CFDI version of the tax retentions. Example: "1.0" - `results.code` (integer,null, required) The tax retention code. For more information, see our SAT Catalogs DevPortal article. Example: 25 - `results.issued_at` (string,null, required) The ISO-8601 timestamp of when the tax retention was issued. Example: "2019-01-03T21:10:40.000Z" - `results.certified_at` (string,null, required) The ISO-8601 timestamp of when the tax retention was certified. Example: "2019-01-03T21:10:41.000Z" - `results.cancelled_at` (string,null, required) The ISO-8601 timestamp of when the tax retention was canceled (if applicable). - `results.sender_id` (string,null, required) The fiscal ID of the invoice sender. Example: "JKUF980404P0" - `results.sender_name` (string,null, required) The name of the invoice sender. Example: "Roberto Nunez Batman" - `results.receiver_nationality` (string,null, required) Whether the invoice receiver is a Mexican national or not. If the receiver is not considered a Mexican national, the retained taxes can be calculated differently. Possible values: - - Enum: "NATIONAL", "FOREIGN" - `results.receiver_id` (string,null, required) The fiscal ID of the invoice receiver. Example: "GYGK3207809L1" - `results.receiver_name` (string,null, required) The name of the invoice receiver. Example: "ACME LTD" - `results.total_invoice_amount` (number,null, required) The total amount of the invoice that the tax retention relates to. Example: 53249.8 - `results.total_exempt_amount` (number,null, required) Total amount that is exempt from taxation. Example: 1000.8 - `results.total_retained_amount` (number,null, required) Total tax retained. Example: 1550.7 - `results.total_taxable_amount` (number,null, required) The total amount that can be taxed. Calculated as - . Example: 43249 - `results.retention_breakdown` (array,null, required) A breakdown of the retained taxes. - `results.retention_breakdown.base_amount` (number,null, required) The base amount that was used to calculate the tax retention. Example: 0.03 - `results.retention_breakdown.tax_type` (string,null, required) Optional attribute to indicate the type of tax withheld for the period or year according to the SAT catalog. Example: "01" - `results.retention_breakdown.retained_amount` (number,null, required) The amount retained. - `results.retention_breakdown.payment_status` (string,null, required) Indicates whether or not the tax has been paid or not. Can be either: - - Enum: "PAID", "PROVISIONED" - `results.xml` (string,null, required) The tax retention document in XML form. Example: "=XML-STRING=" ## Response 403 fields (application/json): - `code` (string) A unique error code () that allows you to classify and handle the error programmatically. ℹ️ Check our DevPortal for more information on how to handle 403 access_to_resource_denied. Example: "access_to_resource_denied" - `message` (string) A short description of the error. For errors, the description is: - . Example: "You don't have access to this resource." - `request_id` (string) A 32-character unique ID of the request (matching a regex pattern of: ). Provide this ID when contacting the Belvo support team to accelerate investigations. Example: "9e7b283c6efa449c9c028a16b5c249fb" ## Response 404 fields (application/json): - `code` (string) A unique error code () that allows you to classify and handle the error programmatically. Example: "not_found" - `message` (string) A short description of the error. For errors, the description is: - Example: "Not found" - `request_id` (string) A 32-character unique ID of the request (matching a regex pattern of: ). Provide this ID when contacting the Belvo support team to accelerate investigations. Example: "9e7b283c6efa449c9c028a16b5c249fb" ## Response 408 fields (application/json): - `code` (string) A unique error code () that allows you to classify and handle the error programmatically. ℹ️ Check our DevPortal for more information on how to handle 408 request_timeout errors. Example: "request_timeout" - `message` (string) A short description of the error. For errors, the description is: - . Example: "The request timed out, you can retry asking for less data by changing your query parameters" - `request_id` (string) A 32-character unique ID of the request (matching a regex pattern of: ). Provide this ID when contacting the Belvo support team to accelerate investigations. Example: "9e7b283c6efa449c9c028a16b5c249fb" ## Response 428 fields (application/json): - `code` (string) A unique error code () that allows you to classify and handle the error programmatically. ℹ️ Check our DevPortal for more information on how to handle 428 token_required errors. Example: "token_required" - `message` (string) A short description of the error. For errors, the description is: - . Example: "A MFA token is required by the institution to login" - `request_id` (string) A 32-character unique ID of the request (matching a regex pattern of: ). Provide this ID when contacting the Belvo support team to accelerate investigations. Example: "9e7b283c6efa449c9c028a16b5c249fb" - `session` (string) A 32-character unique ID of the login session (matching a regex pattern of: ). Example: "2675b703b9d4451f8d4861a3eee54449" - `expiry` (integer) Session duration time in seconds. Example: 9600 - `link` (string) Unique identifier created by Belvo, used to reference the current Link. Example: "30cb4806-6e00-48a4-91c9-ca55968576c8" - `token_generation_data` (object) Details on how to generate the token. - `token_generation_data.instructions` (string) Instructions for token generation. Example: "Use this code to generate the token" - `token_generation_data.type` (string) Type of the data to generate the token (QR code, numeric challenge). Example: "numeric" - `token_generation_data.value` (string) Value to use to generate the token. Example: "12345" - `token_generation_data.expects_user_input` (boolean) Indicates whether the user needs to provide input in order to complete the authentication. When set to , your user may need to: - confirm the login on another device - scan a QR code You will still need to make a PATCH call to complete the request. Example: true ## Response 500 fields (application/json): - `code` (string) A unique error code () that allows you to classify and handle the error programmatically. ℹ️ Check our DevPortal for more information on how to handle 500 unexpected_error errors. Example: "unexpected_error" - `message` (string) A short description of the error. For errors, the description is: - . Example: "Belvo is unable to process the request due to an internal system issue or to an unsupported response from an institution" - `request_id` (string) A 32-character unique ID of the request (matching a regex pattern of: ). Provide this ID when contacting the Belvo support team to accelerate investigations. Example: "9e7b283c6efa449c9c028a16b5c249fb"