### JSON Receivable Retrieval Response Example
Source: https://docs.taginfraestrutura.com.br/reference/referencia
This snippet showcases a sample JSON response from a receivable retrieval request using a reference. It demonstrates the format of the data returned, including key fields like reference, due date, payment scheme, debt amount and settlement obligations.
```json
{
"receivables":[
{
"key":"29e17daca8b1bad85d97599c95a61721",
"reference":"UR_455",
"dueDate":"2021-01-01",
"paymentScheme":"VCC",
"debtor":"0101010101",
"originalAssetHolderDocumentType":"CPF,CNPJ",
"originalAssetHolder":"1212121212",
"amount":800,
"prePaidAmount":0,
"createdAt":"2020-09-23T13:14:04.0555155Z",
"lastUpdated":"2020-09-23T13:14:04.0555155Z",
"settlementObligations":[
{
"key":"29e17daca8b1bad85d97599c95a61721",
"totalAmount":800,
"settledAmount":100,
"balanceAmount":700,
"committedAmount":200,
"uncommittedAmount":500,
"expectedSettlementDate":"2021-01-01",
"assetHolderDocumentType":"CPF,CNPJ",
"assetHolder":"1212121212",
"lastUpdated":"2020-09-23T13:14:04.055",
"settlements":[
{
"key":"f03c2e1a-3116-44c0-8edd-b56f",
"reference":"f03c2e1a-3116-44c0-8ed",
"assetHolderDocumentType":"CPF,CNPJ",
"assetHolder":"99999999999",
"amount":100,
"settlementDate":"2021-01-01",
"bankAccount":{
"branch":"4322",
"account":"00211",
"accountDigit":"X4",
"accountType":"CC,CD,CG,CI,PG,PP",
"ispb":"34100000",
"documentType":"CPF,CNPJ",
"documentNumber":"00000000000000"
},
"lastUpdated":"2020-09-23T13:14:04.05",
"isReject":true,false,
}
],
"contractObligations":[
{
"key":"f03c2e1a-3116-44c0-8edb5",
"reference":"f03c2e1a-3116-44c0-8edd-6f",
"contractHolderDocumentType":"CPF,CNPJ",
"contractHolder":"99999999999",
"effectPriority":1,
"contractType":"warranty",
"warrantyType":"fiduciary",
"divisionMethod":"fixed",
"effectStrategy":"overall, specific",
"effectAmount":200,
"committedEffectAmount":200,
"bankAccount":{
"branch":"4322",
"account":"00211",
"accountDigit":"X4",
"accountType":"CC,CD,CG,CI,PG,PP",
"ispb":"34100000",
"documentType":"CPF,CNPJ",
"documentNumber":"00000000000000"
},
"lastUpdated":"2020-09-23T13:14:04.0555"
}
]
}
]
}
],
"extractionReferenceDate":"2021-01-01",
"recipient":"00000000000",
"recipientDocumentType":"CPF,CNPJ",
"processKey":"8865a756-6588-4116-a406-59248",
"createdAt":"2020-09-23T13:14:04.0555155Z"
}
```
--------------------------------
### JSON Receivable and Settlement Data Example
Source: https://docs.taginfraestrutura.com.br/reference/referencia
This snippet shows a JSON structure representing a receivable and its associated settlement data. It includes details such as reference IDs, due dates, amounts, bank account information, and settlement obligations. The purpose is to demonstrate the data structure involved in receivable reconciliation.
```json
{
"processReference":"PR_550",
"receivables":[
{
"reference":"UR_455",
"dueDate":"2020-02-02",
"originalAssetHolderDocumentType":"CPF,CNPJ",
"originalAssetHolder":"99999999999999",
"paymentScheme":"VCC",
"amount":5000000,
"prePaidAmount": 0,
"bankAccount":{
"branch":"1144",
"account":"13341",
"accountDigit":"X5",
"accountType":"CC",
"ispb":"34100000",
"documentType":"CPF,CNPJ",
"documentNumber":"99999999999999"
},
"settlements":[
{
"reference":"L_1875",
"assetHolderDocumentType":"CPF,CNPJ",
"assetHolder":"99999999999999",
"settlementDate":"2021-11-01",
"settlementObligationDate":"2021-11-01",
"amount":10000,
"bankAccount":{
"branch":"4322",
"account":"00211",
"accountDigit":"X4",
"accountType":"CC,CD,CG,CI,PG",
"ispb":"34100000",
"documentType":"CPF,CNPJ",
"documentNumber":"00000000000000"
}
}
]
}
]
}
```
--------------------------------
### Exemplo de Requisição GET para Consulta de Chave em Shell
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-opt-in-por-key
Este snippet demonstra como realizar uma requisição GET para consultar uma chave de opt-in usando `curl`. Ele especifica o método, a URL do endpoint e o cabeçalho de aceitação.
```shell
curl --request GET \
--url https://integration.nonprod.taginfraestrutura.com.br/receivable/consent/optin/e0839a6b-870b-41dd-a1d4-63136624decc \
--header 'accept: application/json'
```
--------------------------------
### GET /receivable/consent/optin/parameters
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-opt-in-por-parametros
Queries receivable opt-in consents based on provided parameters.
```APIDOC
## GET /receivable/consent/optin/parameters
### Description
This endpoint allows you to query receivable opt-in consents by specifying various parameters such as asset holder, beneficiary, acquirer, payment scheme, and date range. It can also filter for expired, rejected, or opted-out consents.
### Method
GET
### Endpoint
/receivable/consent/optin/parameters
### Parameters
#### Query Parameters
- **assetHolder** (string) - Required - Document Number of the asset holder for the Opt In.
- **beneficiary** (string) - Optional - Beneficiary of the Opt In.
- **acquirer** (string) - Optional - Document Number of the Acquirer or Sub-acquirer.
- **paymentScheme** (string) - Optional - Payment Scheme (e.g., "GCC").
- **initialDate** (string) - Required - Start date for the search interval (YYYY-MM-DD).
- **finalDate** (string) - Required - End date for the search interval (YYYY-MM-DD).
- **reject** (boolean) - Optional - Set to `true` for expired, rejected, and opted-out opt-ins, and `false` for active opt-ins.
### Request Example
```json
{
"example": "(No request body for GET request, parameters are in query string)"
}
```
### Response
#### Success Response (200)
- **key** (string) - Unique identifier for the consent.
- **assetHolder** (string) - Document number of the asset holder.
- **requester** (string) - Document number of the requester.
- **beneficiary** (string) - Document number of the beneficiary.
- **acquirer** (string) - Document number of the acquirer.
- **paymentScheme** (string) - Payment scheme.
- **signatureDate** (string) - Date the consent was signed.
- **origin** (string) - Origin of the consent (e.g., "Api").
- **consentType** (string) - Type of consent (e.g., "grant, update, revoke").
- **startDate** (string) - Start date of the consent validity.
- **endDate** (string) - End date of the consent validity.
- **reject** (boolean) - Indicates if the consent is rejected or expired.
- **status** (string) - Current status of the consent (e.g., "active, rejected, inactive").
- **createdAt** (string) - Timestamp when the consent was created.
- **updatedDate** (string) - Timestamp when the consent was last updated.
- **hasError** (boolean) - Flag indicating if there was an error associated with the consent.
- **errors** (array of strings) - List of errors, if any.
- **interopKey** (string) - Interoperability key.
- **originKey** (string) - Origin key.
- **processKey** (string) - Process key.
#### Success Response Example (200)
```json
{
"example": "[
{
"key":"9ae47137-ca83-426d-8f95-9eba8701",
"assetHolder":"77777777777777",
"requester":"11111111111111",
"beneficiary":"88888888888888",
"acquirer":"99999999999999",
"paymentScheme":"GCC",
"signatureDate":"2020-05-30",
"origin":"Api",
"consentType":"grant, update, revoke",
"startDate":"2020-10-01",
"endDate":"2020-09-28",
"reject":true,
"status":"active, rejected, inactive",
"createdAt":"2020-06-30",
"updatedDate":"2020-06-30",
"hasError":false,
"errors":["mensagem de erro caso exista"],
"interopKey":"a9d3bfbd-e54b-4a89-acde-35ff7fd5792e",
"originKey":"eee48759-ee12-4fc7-964d-baea4c4ce02e",
"processKey": "a4dce8c7-72e7-489e-b252-9ca"
}
]"
}
```
#### No Content Response (204)
Returned when no consents match the query parameters.
#### Error Response (400)
Returned when there are validation errors with the provided parameters.
- **errors** (array of strings) - List of validation errors.
- **processKey** (string) - Identifier for the error processing.
- **createdAt** (string) - Timestamp when the error occurred.
#### Error Response Example (400)
```json
{
"example": "{
"errors": [
"InitialDate: Parameter value is invalid. []",
"FinalDate: Parameter value is invalid. []",
"AssetHolder: Parameter value is invalid. []"
],
"processKey": "82f4a1d9-67e4-4fb1-a8d5-5aa7ba28e5e8",
"createdAt": "2022-05-02T20:27:05.196Z"
}"
}
```
```
--------------------------------
### Example Reconciliation File Content (JSON Lines)
Source: https://docs.taginfraestrutura.com.br/reference/conciliacao-de-agenda-visao-geral
This is an example of the content found within a reconciliation file, which is provided in JSON Lines format. Each line represents a distinct JSON object containing details about financial transactions or obligations for reconciliation purposes.
```text
{"key": "471ee464-6781-4e34-8180-d703a96d0ece","reference": "00484f20-2f4b-4178-9f0a-fa43c7332a55" "dueDate": "2023-02-05T00:00:00", "paymentScheme": "ECD", "debtor": "29934986000159", "originalAssetHolderDocumentType": "CNPJ", "originalAssetHolder": "29934986000159", "amount": 0, "prePaidAmount": 0, "createdAt": "2022-03-28T12:11:18.5296712Z", "lastUpdated": "2022-08-04T12:40:18.2641429Z", "settlementObligations": [ { "key": "471ee464-6781-4e34-8180-d703a96d0ece", "totalAmount": 0, "settledAmount": 0, "balanceAmount": 0, "committedAmount": 0, "uncommittedAmount": 0, "dueDate": "2023-02-05T00:00:00", "expectedSettlementDate": "2023-02-05T00:00:00", "originalAssetHolder": "29934986000159", "originalAssetHolderDocumentType": "CNPJ", "assetHolder": "29934986000159", "assetHolderDocumentType": "CNPJ", "obligationType": "Committed", "lastUpdated": "2022-08-04T12:40:18.2363337Z", "settlements":[ { "key":"6d3d5f6a-9bfb-4f7c-950d-4a383f4dbbf4", "reference":"f8716f25-26b8-4038-8fae-d156808ee1bb", "assetHolder":"58104595000105", "assetHolderDocumentType":"CNPJ", "amount":100000000, "settlementDate":"2024-05-28T00:00:00", "bankAccount":{ "branch":"3232", "account":"3232", "accountDigit":"X3", "accountType":"CC", "ispb":"12345678", "documentType":"CNPJ", "documentNumber":"58104595000105" }, "lastUpdated":"2024-05-27T16:33:07.9693736Z", "isRejected":false } ], "contractObligations": [ { "key": "471ee464-6781-4e34-8180-d703a96d0ece", "reference": "1663df5f-e400-4508-be13-19b73d1cada8", "contractHolderDocumentType": "CNPJ", "contractHolder": "29934986000159", "effectPriority": 1, "contractType": "Warranty", "warrantyType": "Fiduciary", "divisionMethod": "Percentage", "effectStrategy": "Specific", "effectAmount": 800, "committedEffectAmount": 0, "bankAccount": { "branch": "769", "account": "17266", "accountDigit": "9", "accountType": "CC", "ispb": "00000000", "documentType": "CNPJ", "documentNumber": "29934986000159" }, "createdAt": "2022-03-28T12:11:07.0116071Z", "lastUpdated": "2022-08-04T12:40:18.2363266Z", "isCanceled": false } ], "financialOperationEvents":[] } ] }
```
--------------------------------
### GET /receivable/settlement/reference
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-liquidacao-por-referencia
Retrieves settlement information based on a reference key. Supports pagination for large datasets.
```APIDOC
## GET /receivable/settlement/reference
### Description
Retrieves settlement information based on a reference key. Supports pagination for large datasets.
### Method
GET
### Endpoint
https://integration.nonprod.taginfraestrutura.com.br/receivable/settlement/reference
### Parameters
#### Query Parameters
- **reference** (string) - Required - Chave única externa do informe da Liquidação
- **perPage** (string) - Optional - Quantidade de itens por página
- **page** (string) - Optional - Página atual
### Request Example
```json
{
"reference": "reference-0",
"perPage": "100",
"page": "1"
}
```
### Response
#### Success Response (200)
- **settlements** (array) - List of settlement objects.
- **pages** (object) - Pagination details.
- **queryKey** (string) - Unique key for the query.
- **queryDate** (string) - Date and time the query was processed.
##### Settlement Object
- **key** (string) - Unique identifier for the settlement.
- **reference** (string) - External reference key.
- **assetHolderDocumentType** (string) - Document type of the asset holder.
- **assetHolder** (string) - Document number of the asset holder.
- **settlementDate** (string) - Date of settlement.
- **amount** (number) - Settlement amount.
- **settlementObligationDate** (string) - Date of settlement obligation.
- **paymentScheme** (string) - Payment scheme used.
- **reasonDetails** (string) - Details of the reason if the settlement was rejected.
- **bankAccount** (object) - Bank account details.
- **isRejected** (boolean) - Indicates if the settlement was rejected.
- **processKey** (string) - Key for the settlement process.
- **createdAt** (string) - Timestamp of creation.
##### Bank Account Object
- **branch** (string) - Bank branch.
- **account** (string) - Bank account number.
- **accountDigit** (string) - Account digit.
- **accountType** (string) - Type of bank account.
- **ispb** (string) - ISPB code.
- **documentType** (string) - Document type for the account holder.
- **documentNumber** (string) - Document number for the account holder.
#### Response Example (200 OK)
```json
{
"settlements": [
{
"key": "a7394c8c-6184-435f-bb31-184ab39a6ab1",
"reference": "L_1875",
"assetHolderDocumentType": "CPF,CNPJ",
"assetHolder": "99999999999999",
"settlementDate": "2020-02-02",
"amount": 10000,
"settlementObligationDate": "2021-11-01",
"paymentScheme": "VCC",
"reasonDetails": "Motivo caso rejeitado",
"bankAccount": {
"branch": "4322",
"account": "00211",
"accountDigit": "X4",
"accountType": "CC,CD,CG,CI,PG,PP",
"ispb": "34100000",
"documentType": "CPF,CNPJ",
"documentNumber": "00000000000000"
},
"isRejected": false,
"processKey": "a9-86c0-4edf-9eb7-6eee6d512a33",
"createdAt": "2020-02-25T00:25:00.073876Z"
}
],
"pages": {
"currentPage": 1,
"perPage": 10,
"totalPages": 1
},
"queryKey": "94eaf-ed17-4a84-92e0-7a3dc51ec",
"queryDate": "2020-03-10T12:51:35.000Z"
}
```
#### Error Response (404 Not Found)
- **errors** (array) - List of error messages.
- **processKey** (string) - Key for the process that resulted in the error.
- **createdAt** (string) - Timestamp of error creation.
#### Response Example (404 Not Found)
```json
{
"errors": [
"reason:No data found"
],
"processKey": "a35a64-944e-4c17-bafd-996a4a5e6b6d",
"createdAt": "2020-03-27T11:06:17.446Z"
}
```
```
--------------------------------
### Query receivable advancement reference - OpenAPI
Source: https://docs.taginfraestrutura.com.br/reference/consulta-refer%C3%AAncia
Defines the GET endpoint for querying receivable advancement references by reference ID with pagination support. Includes required and optional query parameters and a detailed response schema with example data.
```json
{
"openapi": "3.1.0",
"info": {
"title": "TAG Infraestrutura - Portal do Desenvolvedor (1.0.0)",
"version": "1.2.18"
},
"servers": [
{
"url": "https://integration.nonprod.taginfraestrutura.com.br"
}
],
"security": [
{}
],
"paths": {
"/receivable/advancement/reference?reference={reference}&perPage={perPage}&page={page}": {
"get": {
"summary": "Consulta - Referência",
"description": "",
"operationId": "consulta-referência",
"parameters": [
{
"name": "reference",
"in": "query",
"description": "Chave única externa da Antecipação",
"required": true,
"schema": {
"type": "string",
"default": "CG_15"
}
},
{
"name": "page",
"in": "query",
"description": "Página atual",
"schema": {
"type": "string",
"default": "1"
}
},
{
"name": "perPage",
"in": "query",
"description": "Quantidade de itens por página",
"schema": {
"type": "string",
"default": "2"
}
}
],
"responses": {
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\\n \\\"advancements\\\": [\\n {\\n \\\"reference\\\": \\\"ADV-ROBOT-01j265\\\",\\n \\\"assetHolderDocumentType\\\": \\\"CNPJ\\\",\\n \\\"assetHolder\\\": \\\"99999999999999\\\",\\n \\\"operationValue\\\": 100000000,\\n \\\"operationExpectedSettlementDate\\\": \\\"2022-04-26T00:00:00Z\\\",\\n \\\"advancedReceivables\\\": [\\n {\\n \\\"key\\\": \\\"8b6870c0-37cb-4218-b0a1-a411ebbb20e1\\\",\\n \\\"paymentScheme\\\": \\\"VCC\\\",\\n \\\"settlementObligationDate\\\": \\\"2022-04-26T00:00:00Z\\\",\\n \\\"advancedAmount\\\": 100000000\\n }\\n ],\\n \\\"processKey\\\": \\\"c25e33a6-27d0-438b-ab64-47922cda2641\\\",\\n \\\"createdAt\\\": \\\"2022-04-26T12:15:16.693Z\\\"\\n }\\n ],\\n \\\"pages\\\": {\\n \\\"currentPage\\\": 0,\\n \\\"perPage\\\": 100,\\n \\\"totalPages\\\": 1\\n },\\n \\\"queryKey\\\": \\\"00403f52-2618-480d-9d83-3a5b51eea840\\\",\\n \\\"queryDate\\\": \\\"2022-04-26T15:15:17.0380209Z\\\"\\n}"
}
},
"schema": {
"type": "object",
"properties": {
"advancements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"reference": {
"type": "string",
"example": "ADV-ROBOT-01j265"
},
"assetHolderDocumentType": {
"type": "string",
"example": "CNPJ"
},
"assetHolder": {
"type": "string",
"example": "99999999999999"
},
"operationValue": {
"type": "integer",
"example": 100000000,
"default": 0
},
"operationExpectedSettlementDate": {
"type": "string",
"example": "2022-04-26T00:00:00Z"
},
"advancedReceivables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"example": "8b6870c0-37cb-4218-b0a1-a411ebbb20e1"
},
"paymentScheme": {
"type": "string",
"example": "VCC"
},
"settlementObligationDate": {
"type": "string",
"example": "2022-04-26T00:00:00Z"
},
"advancedAmount": {
"type": "integer",
"example": 100000000,
"default": 0
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
```
--------------------------------
### OpenAPI Spec for Receivables Contract Query in JSON
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-garantia-ou-troca-de-titularidade-por-parametros
This JSON snippet defines an OpenAPI 3.1.0 specification for querying receivables contracts via GET request with multiple query parameters like dates and asset holders. It requires API access to the non-production integration server. The response is expected in JSON format with examples, but the provided code is truncated and may need full implementation for completeness.
```json
{
"openapi": "3.1.0",
"info": {
"title": "TAG Infraestrutura - Portal do Desenvolvedor (1.0.0)",
"version": "1.2.18"
},
"servers": [
{
"url": "https://integration.nonprod.taginfraestrutura.com.br"
}
],
"security": [
{}
],
"paths": {
"/receivable/contract?startContractDueDate={startContractDueDate}&endContractDueDate={endContractDueDate}&startSignatureDate={startSignatureDate}&endSignatureDate={endSignatureDate}&StartCreatedAt={StartCreatedAt}&EndCreatedAt={EndCreatedAt}&assetHolder={assetHolder}&PerPage={PerPage}&Page={Page}": {
"get": {
"summary": "Consulta - Parâmetros",
"description": "",
"operationId": "consulta-de-garantia-ou-troca-de-titularidade-por-parametros",
"parameters": [
{
"name": "startContractDueDate",
"in": "query",
"description": "Intervalo inicial para a data de vencimento da Averbação",
"schema": {
"type": "string",
"default": "2020-01-19"
}
},
{
"name": "endContractDueDate",
"in": "query",
"description": "Intervalo final para a data de vencimento da Averbação",
"schema": {
"type": "string",
"default": "2020-01-27"
}
},
{
"name": "startSignatureDate",
"in": "query",
"description": "Intervalo inicial para a data de assinatura",
"required": true,
"schema": {
"type": "string",
"default": "2020-01-19"
}
},
{
"name": "endSignatureDate",
"in": "query",
"description": "Intervalo final para a data de assinatura",
"schema": {
"type": "string",
"default": "2020-01-29"
}
},
{
"name": "startCreatedAt",
"in": "query",
"description": "Intervalo inicial para data de criação",
"schema": {
"type": "string",
"default": "2020-08-01"
}
},
{
"name": "endCreatedAt",
"in": "query",
"description": "Intervalo final para data de criação",
"schema": {
"type": "string",
"default": "2020-09-01"
}
},
{
"name": "assetHolder",
"in": "query",
"description": "Detentor do Ativo Financeiro",
"required": true,
"schema": {
"type": "string",
"default": "99999999999"
}
},
{
"name": "perPage",
"in": "query",
"description": "Quantidade de itens por página",
"schema": {
"type": "string",
"default": "100"
}
},
{
"name": "page",
"in": "query",
"description": "Página atual",
"schema": {
"type": "string",
"default": "1"
}
}
],
"responses": {
"200": {
"description": "200",
"content": {
"application/json": {
"examples": {
"Result": {
```
--------------------------------
### Key Field (GUID)
Source: https://docs.taginfraestrutura.com.br/reference/dicion%C3%A1rio-de-dados
Information about the 'key' field when it's a 32-digit alphanumeric GUID.
```APIDOC
## Key Field (GUID)
### Description
This is an alphanumeric field consisting of 32 digits (GUID) used as an identification key.
### Method
N/A (Data Field Description)
### Endpoint
N/A (Data Field Description)
### Parameters
#### Path Parameters
N/A
#### Query Parameters
N/A
#### Request Body
- **key** (string) - Required - The 32-digit GUID key.
### Request Example
```json
{
"key": "6404259d558047ebafde05445366a587"
}
```
### Response
#### Success Response (200)
N/A (Data Field Description)
#### Response Example
N/A (Data Field Description)
```
--------------------------------
### GET /receivable/advancement/processkey
Source: https://docs.taginfraestrutura.com.br/reference/consulta-processkey
Consulta adiantamentos de recebíveis associados a uma chave de processamento. A processkey é obrigatória. Suporta paginação via page e perPage.
```APIDOC
## GET /receivable/advancement/processkey\n\n### Description\nRetorna uma lista de adiantamentos de recebíveis asociados a uma chave de processamento (processKey), com metadados de paginação e referência da consulta.\n\n### Method\nGET\n\n### Endpoint\nBase URL: https://integration.nonprod.taginfraestrutura.com.br\n\n#### Path Parameters\nNenhum\n\n#### Query Parameters\n- **processKey** (string) - **Required** - Chave de processamento do adiantamento\n- **page** (string) - **Optional** - Número da página (padrão: \"1\")\n- **perPage** (string) - **Optional** - Itens por página (padrão: \"4\")\n\n#### Request Body\nNenhum\n\n### Request Example\n{\n \"processKey\": \"c25e33a6-27d0-438b-ab64-47922cda2641\",\n \"page\": \"1\",\n \"perPage\": \"10\"\n}\n\n### Response\n#### Success Response (200)\n- **advancements** (array) - Lista de adiantamentos\n - **reference** (string) - Identificador do adiantamento\n - **assetHolderDocumentType** (string) - Tipo de documento do titular do ativo (ex.: CNPJ)\n - **assetHolder** (string) - Documento do titular do ativo\n - **operationValue** (integer) - Valor total da operação\n - **operationExpectedSettlementDate** (string, date-time) - Data esperada de liquidação\n - **advancedReceivables** (array) - Recebíveis adiantados\n - **key** (string) - Identificador do recebível\n - **paymentScheme** (string) - Esquema de pagamento\n - **settlementObligationDate** (string, date-time) - Data da obrigação de liquidação\n - **advancedAmount** (integer) - Valor adiantado\n - **processKey** (string) - Chave de processamento do adiantamento\n - **createdAt** (string, date-time) - Data de criação do registro\n- **pages** (object) - Metadados de paginação\n - **currentPage** (integer) - Página atual\n - **perPage** (integer) - Itens por página\n - **totalPages** (integer) - Total de páginas\n- **queryKey** (string) - Chave de referência da consulta\n- **queryDate** (string, date-time) - Data da consulta\n\n#### Response Example\n{\
\"advancements\": [{\
\"reference\": \"ADV-ROBOT-01j265\",\
\"assetHolderDocumentType\": \"CNPJ\",\
\"assetHolder\": \"99999999999999\",\
\"operationValue\": 100000000,\
\"operationExpectedSettlementDate\": \"2022-04-26T00:00:00Z\",\
\"advancedReceivables\": [{\
\"key\": \"8b6870c0-37cb-4218-b0a1-a411ebbb20e1\",\
\"paymentScheme\": \"VCC\",\
\"settlementObligationDate\": \"2022-04-26T00:00:00Z\",\
\"advancedAmount\": 100000000\
}],\
\"processKey\": \"c25e33a6-27d0-438b-ab64-47922cda2641\",\
\"createdAt\": \"2022-04-26T12:15:16.693Z\"\
}],\
\"pages\": {\
\"currentPage\": 0,\
\"perPage\": 100,\
\"totalPages\": 1\
},\
\"queryKey\": \"00403f52-2618-480d-9d83-3a5b51eea840\",\
\"queryDate\": \"2022-04-26T15:15:17.0380209Z\"\
}
```
--------------------------------
### Synchronous Response Example for Commercial Establishment Relationships
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-rela%C3%A7%C3%B5es-por-estabelecimentos-comercias
Provides a JSON structure representing the synchronous response for active commercial establishment relationships. This includes details like commercial establishment document, acquirer document, trade repository, initial date, and payment schemes. It's essential for understanding the output format of the API.
```json
{
"relationships": [
{
"commercialEstablishmentDocument": "CNPJ_EC",
"acquirerDocument": "CNPJ_credenciadora_A",
"tradeRepository": "CNPJ_registradora_A",
"initialDate": "2023-06-20T03:00:00.000Z",
"paymentSchemes": [
"ECC",
"VCC",
"BCC",
"ECD",
"MCC"
]
},
{
"commercialEstablishmentDocument": "CNPJ_EC",
"acquirerDocument": "CNPJ_credenciadora_B",
"tradeRepository": "CNPJ_registradora_B",
"initialDate": "2023-07-25T12:44:08.000Z",
"paymentSchemes": [
"CBC",
"ECC",
"BCD",
"BCC",
"MCC",
"HCC",
"VCD",
"VCC"
]
}
]
}
```
--------------------------------
### POST /websites/taginfraestrutura_br/relacoes-ativas
Source: https://docs.taginfraestrutura.com.br/reference/consulta-de-rela%C3%A7%C3%B5es-por-estabelecimentos-comercias
Consulta relações ativas de estabelecimentos comerciais. Retorna dados de credenciadoras que operam na TAG e de outras registradoras. É necessário ter opt-ins registrados na TAG para realizar esta consulta.
```APIDOC
## POST /websites/taginfraestrutura_br/relacoes-ativas
### Description
Consulta relações ativas de estabelecimentos comerciais na TAG Infraestrutura. O endpoint retorna informações sobre credenciadoras e registradoras relacionadas aos estabelecimentos comerciais consultados.
### Method
POST
### Endpoint
/websites/taginfraestrutura_br/relacoes-ativas
### Parameters
#### Request Body
- **commercialEstablishmentDocument** (string) - Required - CNPJ do Estabelecimento Comercial a ser consultado
### Request Example
{
"commercialEstablishmentDocument": "CNPJ_EC"
}
### Response
#### Success Response (200)
- **relationships** (array) - Lista de relações ativas
- **commercialEstablishmentDocument** (string) - CNPJ do Estabelecimento Comercial
- **acquirerDocument** (string) - CNPJ da Instituição Credenciadora
- **tradeRepository** (string) - CNPJ da Registradora
- **initialDate** (string) - Data de início da relação
- **paymentSchemes** (array) - Lista de arranjos de pagamento
#### Response Example
{
"relationships": [
{
"commercialEstablishmentDocument": "CNPJ_EC",
"acquirerDocument": "CNPJ_credenciadora_A",
"tradeRepository": "CNPJ_registradora_A",
"initialDate": "2023-06-20T03:00:00.000Z",
"paymentSchemes": [
"ECC",
"VCC",
"BCC",
"ECD",
"MCC"
]
}
]
}
```
--------------------------------
### API XML Response Examples
Source: https://docs.taginfraestrutura.com.br/reference/registro-em-formato-xml
Demonstrates successful and error response formats for receivable registration API. The 200 response confirms registration with payment arrangement details, while the 400 response shows validation error handling with process tracking. Both examples follow specific XML schemas with namespace declarations.
```xml
31688539000109
09046989000149
JCC
2020-05-01
200
```
```xml
DocumentodoUsuarioFinalRecebedor: Parameter value is invalid. [0904698900014999]
f4bd4a28-d793-4b43-9e27-e1265c263bb0
2020-07-22T19:45:45.3368435Z
```
--------------------------------
### Download do Arquivo da Conciliação
Source: https://docs.taginfraestrutura.com.br/docs/conciliacao-optin
Instruções para download do arquivo de conciliação utilizando a URL fornecida na notificação assíncrona.
```APIDOC
## Download do Arquivo da Conciliação
### Description
Após a conclusão do processamento da conciliação de Opt-ins, uma notificação assíncrona será enviada contendo as URLs para download dos arquivos gerados (CSV e/ou JSON). Utilize essas URLs para baixar os arquivos e realizar a conciliação dos dados.
### Method
GET
### Endpoint
[URL do BucketFiles fornecida na notificação]
### Response
#### Success Response (200)
O conteúdo do arquivo de conciliação (CSV ou JSON) será retornado no corpo da resposta.
#### Response Example (JSON)
```json
[
{
"eventType": "consentreconciliation",
"data": {
"CreatedAt": "2023-05-18T20:15:09.6420158Z",
"ProcessKey": "b7539883-c2a9-45f2-a7dc-1030172c0661",
"Success": true,
"BucketFiles": [
{
"Type": "JSON",
"Url": "[Url para download do arquivo JSON]"
}
]
},
"processKey": "b7539883-c2a9-45f2-a7dc-1030172c0661",
"createdAt": "2023-05-18T20:15:13.471Z"
}
]
```
```
--------------------------------
### Consulta de Liquidação (Liquidation Consultation)
Source: https://docs.taginfraestrutura.com.br/docs/roteiro-informe-e-rejeicao-de-liquidacao
Endpoints available for consulting liquidations based on different criteria such as ProcessKey, Chave, Referência, or general Parameters.
```APIDOC
## Consultation Endpoints
### Description
Credenciadores or Subcredenciadores can consult liquidation information using various endpoints.
### Available Endpoints:
1. **Consulta por ProcessKey**
* **Endpoint:** (See external documentation for specific path)
* **Description:** Consults liquidation details using the ProcessKey.
* **Reference:** https://docs.taginfraestrutura.com.br/reference/consulta-de-liquidacao-por-processkey
2. **Consulta por Chave**
* **Endpoint:** (See external documentation for specific path)
* **Description:** Consults liquidation details using the Chave.
* **Reference:** https://docs.taginfraestrutura.com.br/reference/consulta-de-liquidacao-por-chave
3. **Consulta por Referência**
* **Endpoint:** (See external documentation for specific path)
* **Description:** Consults liquidation details using a reference identifier.
* **Reference:** https://docs.taginfraestrutura.com.br/reference/consulta-de-liquidacao-por-referencia
4. **Consulta por Parâmetros**
* **Endpoint:** (See external documentation for specific path)
* **Description:** Consults liquidation details using various parameters.
* **Reference:** https://docs.taginfraestrutura.com.br/reference/consulta-de-liquidacao-por-parametros
```