# Invoice installments

## List invoice installments using invoice details

> Query invoice installments using invoice details such as number, series, installment, and either a specific issue date or a range of issue dates.

```json
{"openapi":"3.0.0","info":{"title":"Financing API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"paths":{"/financing/invoice_installments":{"get":{"summary":"List invoice installments using invoice details","description":"Query invoice installments using invoice details such as number, series, installment, and either a specific issue date or a range of issue dates.","parameters":[{"in":"query","name":"invoice_number","schema":{"type":"string"}},{"in":"query","name":"invoice_series","schema":{"type":"string"}},{"in":"query","name":"installment","schema":{"type":"string"}},{"in":"query","name":"issue_date","schema":{"type":"string","format":"date"}},{"in":"query","name":"issue_date_from","schema":{"type":"string","format":"date"}},{"in":"query","name":"issue_date_to","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of matching invoice installments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installments_update_response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}}}},"tags":["invoice installments"]}}},"components":{"schemas":{"401":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"500":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"invoice_installments_update_response":{"type":"object","required":["invoice_installments"],"properties":{"invoice_installments":{"type":"array","items":{"$ref":"#/components/schemas/invoice_installment"}}}},"invoice_installment":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"},"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"id":{"type":"string","format":"uuid"},"factoring_payable_id":{"type":"string","format":"uuid"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/stage"}}}},"stage":{"type":"object","required":["anticipation_status","timestamp","error_message","error_code"],"properties":{"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"timestamp":{"type":"string","format":"date"},"error_message":{"type":"string"},"error_code":{"type":"string"}}}}}}
```

## Create invoice installments that are able to receive anticipation

> Submits one or more invoice installments to the platform to receive anticipation.

```json
{"openapi":"3.0.0","info":{"title":"Financing API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"paths":{"/financing/invoice_installments":{"post":{"summary":"Create invoice installments that are able to receive anticipation","description":"Submits one or more invoice installments to the platform to receive anticipation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invoice_installments"],"properties":{"invoice_installments":{"type":"array","items":{"$ref":"#/components/schemas/invoice_installment_create_batch_request"}}}}}}},"responses":{"200":{"description":"Successfully created invoice installments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installments_response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}}}},"tags":["invoice installments"]}}},"components":{"schemas":{"401":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"500":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"invoice_installment_create_batch_request":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"}}},"invoice_installments_response":{"type":"object","required":["invoice_installments"],"properties":{"invoice_installments":{"type":"array","items":{"$ref":"#/components/schemas/invoice_installment"}}}},"invoice_installment":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"},"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"id":{"type":"string","format":"uuid"},"factoring_payable_id":{"type":"string","format":"uuid"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/stage"}}}},"stage":{"type":"object","required":["anticipation_status","timestamp","error_message","error_code"],"properties":{"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"timestamp":{"type":"string","format":"date"},"error_message":{"type":"string"},"error_code":{"type":"string"}}}}}}
```

## Update of invoice installments

> The only fields that can be updated are the status (only to 'Deleted'), the due date, and the amount. The other fields are used solely to identify the invoice installments.

```json
{"openapi":"3.0.0","info":{"title":"Financing API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"paths":{"/financing/invoice_installments":{"put":{"summary":"Update of invoice installments","description":"The only fields that can be updated are the status (only to 'Deleted'), the due date, and the amount. The other fields are used solely to identify the invoice installments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installments_batch_request"}}}},"responses":{"200":{"description":"Invoice installments updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installments_response"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}}}},"tags":["invoice installments"]}}},"components":{"schemas":{"401":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"500":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"invoice_installments_batch_request":{"type":"object","required":["invoice_installments"],"properties":{"invoice_installments":{"type":"array","items":{"$ref":"#/components/schemas/invoice_installment"}}}},"invoice_installment":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"},"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"id":{"type":"string","format":"uuid"},"factoring_payable_id":{"type":"string","format":"uuid"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/stage"}}}},"stage":{"type":"object","required":["anticipation_status","timestamp","error_message","error_code"],"properties":{"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"timestamp":{"type":"string","format":"date"},"error_message":{"type":"string"},"error_code":{"type":"string"}}},"invoice_installments_response":{"type":"object","required":["invoice_installments"],"properties":{"invoice_installments":{"type":"array","items":{"$ref":"#/components/schemas/invoice_installment"}}}}}}}
```

## Get invoice installment

> Get invoice installment by ID

```json
{"openapi":"3.0.0","info":{"title":"Financing API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"paths":{"/financing/invoice_installments/{id}":{"get":{"summary":"Get invoice installment","description":"Get invoice installment by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Invoice installment found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installment"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}}}},"tags":["invoice installments"]}}},"components":{"schemas":{"401":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"500":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"invoice_installment":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"},"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"id":{"type":"string","format":"uuid"},"factoring_payable_id":{"type":"string","format":"uuid"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/stage"}}}},"stage":{"type":"object","required":["anticipation_status","timestamp","error_message","error_code"],"properties":{"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"timestamp":{"type":"string","format":"date"},"error_message":{"type":"string"},"error_code":{"type":"string"}}}}}}
```

## Update a invoice installment

> Update a invoice installment by ID

```json
{"openapi":"3.0.0","info":{"title":"Financing API","version":"1.0.0"},"servers":[{"url":"https://api.sandbox.trio.com.br","variables":{}},{"url":"https://api.qa.trio.com.br","variables":{}},{"url":"https://api.trio.com.br","variables":{}}],"paths":{"/financing/invoice_installments/{id}":{"patch":{"summary":"Update a invoice installment","description":"Update a invoice installment by ID","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installment"}}}},"responses":{"200":{"description":"Invoice installment updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/invoice_installment"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/401"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/500"}}}}},"tags":["invoice installments"]}}},"components":{"schemas":{"401":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"500":{"type":"object","properties":{"error":{"type":"object","required":["error_code","error_message"],"properties":{"error_code":{"type":"string"},"error_message":{"type":"string"}}}}},"invoice_installment":{"type":"object","required":["issue_date","invoice_number","invoice_series","installment","installment_due_date","installment_amount","document_supplier"],"properties":{"issue_date":{"type":"string","format":"date"},"invoice_number":{"type":"string"},"invoice_series":{"type":"string"},"installment":{"type":"string"},"installment_due_date":{"type":"string","format":"date"},"installment_amount":{"type":"number","format":"float","minimum":0},"document_supplier":{"type":"string"},"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"id":{"type":"string","format":"uuid"},"factoring_payable_id":{"type":"string","format":"uuid"},"stages":{"type":"array","items":{"$ref":"#/components/schemas/stage"}}}},"stage":{"type":"object","required":["anticipation_status","timestamp","error_message","error_code"],"properties":{"anticipation_status":{"type":"string","enum":["Created","Updated","Deleted","Requested","Approved","Rejected","Cancelled","Failed"]},"timestamp":{"type":"string","format":"date"},"error_message":{"type":"string"},"error_code":{"type":"string"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trio.com.br/api_reference/financing-api/invoice-installments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
