Last active
May 16, 2019 21:44
-
-
Save lucassabreu/7ae80271ce90b4fbd38a94dce5482ea7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "3.0.0", | |
"info": { | |
"description": "# Introdução\nEste documento provê informações sobre os serviços e a maneira de se\nintegrar com a plataforma da Alpe (Securitização). <br/>\nA API é **REST** com padrão de resposta em formatos **JSON**. <br/>\n# Autenticação\nPara consumo dos serviços encontrados na Alpe Securitização, será\nnecessário a apresentação de sua API Key para autenticação:\n- [Secret api key](#section/Authentication/SecretApiKey): Chave\nutilizada para comunicação com o servidor. Não compartilhe a chave com\noutras entidades e a mantenha segura.\n<!-- ReDoc-Inject: <security-definitions> -->\n", | |
"version": "1.0.0", | |
"title": "Alpe Securitização", | |
"contact": { | |
"name": "Alpe", | |
"email": "contato@alpenet.com.br" | |
}, | |
"x-logo": { | |
"url": "/logo-alpe.png", | |
"backgroundColor": "#FFFFFF" | |
} | |
}, | |
"tags": [ | |
{ | |
"name": "Cessionário", | |
"description": "Serviços para gerenciamento de informações dos cessionários" | |
}, | |
{ | |
"name": "Cedente", | |
"description": "Serviços para gerenciamento de informações dos cedentes (Em construção)" | |
} | |
], | |
"x-tagGroups": [ | |
{ | |
"name": "Alpe API", | |
"tags": [ | |
"Cessionário", | |
"Cedente" | |
] | |
} | |
], | |
"security": [ | |
{ | |
"SecretApiKey": [] | |
} | |
], | |
"paths": { | |
"/:cnpjEntidade/cessionario/cedente/:cedenteCnpj/valorDisponivel": { | |
"get": { | |
"tags": [ | |
"Cessionário", | |
"Cedente" | |
], | |
"summary": "Buscar valor disponível no cedente", | |
"operationId": "getAvaliableValueStore", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cedente", | |
"in": "path", | |
"description": "Documento do cedente", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/ValueStore" | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cedente/recorrente": { | |
"get": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "Obter Dados Aprovação Automática", | |
"operationId": "ObterDadosAprovacaoAutomatica", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/ObterDadosAprovacaoAutomatica" | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
}, | |
"501": { | |
"$ref": "#/components/responses/NotImplemented" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cedente/valorDisponivelParcelado": { | |
"post": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "valorDisponivelParcelado", | |
"operationId": "getValueAvailable", | |
"description": "Buscar valor disponível parcelado", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjCedente", | |
"in": "path", | |
"description": "Documento do Cedente", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/AvailableValueParcel" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"values": { | |
"type": "array", | |
"description": "Valores", | |
"items": { | |
"$ref": "#/components/schemas/ParcelValue" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
}, | |
"501": { | |
"$ref": "#/components/responses/NotImplemented" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cessao": { | |
"post": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "Solicitar cessão", | |
"operationId": "insertAssignment", | |
"description": "Se o tipo de cessão for \"Recorrente com aprovação automática\", chamar a api \"/cessionario/cedente/:cnpjCedente/recorrente\" para verificar se a operação é permitida. Se o tipo de cessão for \"Parcelada\",chamar a api \"/cessionario/cedente/:cnpjCedente/valorDisponivelParcelado/:dataVencimento\" para obter os planos de parcelamento válidos para a agenda do cedente. Neste caso, a cessão apenas será aceita se for selecionado um plano válido.", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/Assignment" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Id de cessão criada.", | |
"example": 1 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cessao/:cessaoId": { | |
"get": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "Buscar cessão", | |
"operationId": "getCession", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cessaoId", | |
"in": "path", | |
"description": "Identificador da cessão", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"$ref": "#/components/schemas/GetCessionResponse" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cessoes": { | |
"get": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "Buscar cessões", | |
"operationId": "getCessions", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/GetCessionsResponse" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cessionario/cessao/alterar": { | |
"put": { | |
"tags": [ | |
"Cessionário" | |
], | |
"summary": "Alterar cessão", | |
"operationId": "changeAssignment", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/AssignmentChange" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK" | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/relatorio/analitico": { | |
"post": { | |
"tags": [ | |
"Cessionário", | |
"Cedente" | |
], | |
"summary": "Consultar extrato detalhado", | |
"operationId": "getFinancialReport", | |
"description": "Consultar extrato detalhado", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/GetFinancialReport" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/GetFinancialReportResponse" | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cedente/cessao": { | |
"post": { | |
"tags": [ | |
"Cedente" | |
], | |
"summary": "Realizar pagamento", | |
"operationId": "insertPayment", | |
"description": "Realizar cessão de pagamento", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/Payment" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Id do pagamento criado.", | |
"example": 1 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cedente/antecipacao/recebiveis": { | |
"post": { | |
"tags": [ | |
"Cedente" | |
], | |
"summary": "Buscar recebíveis", | |
"operationId": "getReceivables", | |
"description": "Realizar recebíveis", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/GetReceivables" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"200": { | |
"description": "OK", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/GetReceivablesResponse" | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
}, | |
"/:cnpjEntidade/cedente/antecipacao/solicitar": { | |
"post": { | |
"tags": [ | |
"Cedente" | |
], | |
"summary": "Solicitar antecipação", | |
"operationId": "requestAntecipation", | |
"description": "Solicitar antecipação através da seleção dos recebíveis. É necessário anteriormente ter chamado a api \"/:cnpjEntidade/cessionario/antecipacao/recebiveis\" e enviar uma lista de receivableId. A antecipação pode ser feita até as 16hrs do dia, após esse horário a antecipação será rejeitada e precisará ser realizada no próximo dia.", | |
"parameters": [ | |
{ | |
"name": "operatorId", | |
"in": "header", | |
"description": "Id do Operador", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
}, | |
{ | |
"name": "cnpjEntidade", | |
"in": "path", | |
"description": "Documento da entidade", | |
"required": true, | |
"schema": { | |
"type": "string" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"$ref": "#/components/schemas/RequestAntecipation" | |
} | |
} | |
}, | |
"description": "request", | |
"required": true | |
}, | |
"responses": { | |
"204": { | |
"description": "Antecipação realizada com sucesso", | |
"content": { | |
"application/json;charset=UTF-8": { | |
"schema": { | |
"type": "object" | |
} | |
} | |
} | |
}, | |
"401": { | |
"$ref": "#/components/responses/AccessForbidden" | |
} | |
} | |
} | |
} | |
}, | |
"servers": [ | |
{ | |
"url": "https://sec-api.alpenet.com.br/" | |
}, | |
{"url":"https://integracao-erp.alpe-dev.com.br"} | |
], | |
"components": { | |
"responses": { | |
"AccessForbidden": { | |
"description": "Acesso não autorizado, API-KEY inválida!" | |
}, | |
"NotImplemented": { | |
"description": "Não implementado!", | |
"content": { | |
"*/*": { | |
"schema": { | |
"$ref": "#/components/schemas/Error" | |
} | |
} | |
} | |
}, | |
"NotFound": { | |
"description": "Resource was not found", | |
"content": { | |
"*/*": { | |
"schema": { | |
"$ref": "#/components/schemas/Error" | |
} | |
} | |
} | |
} | |
}, | |
"securitySchemes": { | |
"SecretApiKey": { | |
"description": "Para comunicação com a API, o usuário receberá uma API-KEY, a qual será necessária para o consumo dos serviços oferecidos.\n", | |
"type": "apiKey", | |
"name": "API-KEY: xxxx-xxxx-xx-xxxxxxx", | |
"in": "header" | |
} | |
}, | |
"schemas": { | |
"Error": { | |
"type": "object", | |
"properties": { | |
"status": { | |
"type": "integer", | |
"minimum": 100, | |
"maximum": 600 | |
}, | |
"error": { | |
"type": "string" | |
}, | |
"details": { | |
"type": "string" | |
} | |
} | |
}, | |
"Assignment": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor solicitado", | |
"example": 1000 | |
}, | |
"cedente": { | |
"type": "string", | |
"description": "Documento do cedente", | |
"example": 23659650000100 | |
}, | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"payDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"reference": { | |
"type": "string", | |
"description": "Referência complementar", | |
"example": "Pedido relacionado a NF 11255" | |
}, | |
"valueStore": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor disponível", | |
"example": 1000 | |
}, | |
"paymentDistributionType": { | |
"type": "string", | |
"description": "Forma de diluição do pagamento\n* No dia do vencimento\n* Em até 7 dias\n* Em até 14 dias\n* Em até 21 dias ", | |
"enum": [ | |
"diaVencimento", | |
"seteDias", | |
"quatorzeDias", | |
"vinteUmDias" | |
] | |
}, | |
"assignmentType": { | |
"type": "string", | |
"description": "Tipo de cessão\n* Cessão\n* Cessão recorrente com aprovação automática\n* Cessão parcelada", | |
"enum": [ | |
"cessao", | |
"cessaoRecorrenteAprovacaoAutomatica", | |
"cessaoParcelada" | |
] | |
}, | |
"maximumRecurrentValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor máximo para pagamento recorrente. Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": 1000 | |
}, | |
"recurrentExpirationDate": { | |
"type": "string", | |
"description": "Data de expiração do pagamento recorrente(YYYY-MM-DD). Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"paymentQuantity": { | |
"type": "integer", | |
"maximum": 6, | |
"description": "Quantidade de parcelas. . Informado apenas se assignmentType = parcelada", | |
"example": 1 | |
} | |
} | |
}, | |
"Payment": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor solicitado", | |
"example": 1000 | |
}, | |
"cedente": { | |
"type": "string", | |
"description": "Documento do cessionário", | |
"example": 23659650000100 | |
}, | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"payDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"reference": { | |
"type": "string", | |
"description": "Referência complementar", | |
"example": "Pedido relacionado a NF 11255" | |
}, | |
"valueStore": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor disponível", | |
"example": 1000 | |
}, | |
"paymentDistributionType": { | |
"type": "string", | |
"description": "Forma de diluição do pagamento\n* No dia do vencimento\n* Em até 7 dias\n* Em até 14 dias\n* Em até 21 dias ", | |
"enum": [ | |
"diaVencimento", | |
"seteDias", | |
"quatorzeDias", | |
"vinteUmDias" | |
] | |
}, | |
"assignmentType": { | |
"type": "string", | |
"description": "Tipo de cessão\n* Cessão\n* Cessão recorrente com aprovação automática\n* Cessão parcelada", | |
"enum": [ | |
"cessao", | |
"cessaoRecorrenteAprovacaoAutomatica", | |
"cessaoParcelada" | |
] | |
}, | |
"maximumRecurrentValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor máximo para pagamento recorrente. Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": 1000 | |
}, | |
"recurrentExpirationDate": { | |
"type": "string", | |
"description": "Data de expiração do pagamento recorrente(YYYY-MM-DD). Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"paymentQuantity": { | |
"type": "integer", | |
"maximum": 6, | |
"description": "Quantidade de parcelas. . Informado apenas se assignmentType = parcelada", | |
"example": 1 | |
} | |
} | |
}, | |
"GetCessionsResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Identificador da cessão", | |
"example": 1 | |
}, | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor solicitado", | |
"example": 1000 | |
}, | |
"cedente": { | |
"type": "string", | |
"description": "Documento do cedente", | |
"example": 23659650000100 | |
}, | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"payDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"createdDate": { | |
"type": "string", | |
"description": "Data de criação (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"reference": { | |
"type": "string", | |
"description": "Referência complementar", | |
"example": "Pedido relacionado a NF 11255" | |
}, | |
"storeAcceptDate": { | |
"type": "string", | |
"description": "Data de aceite do cedente (YYYY-MM-DD)", | |
"example": "2018-01-02", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"assignmentType": { | |
"type": "string", | |
"description": "Código da cessão no siscof", | |
"enum": [ | |
"aguardandoAprovacao", | |
"aprovado", | |
"recusado", | |
"falha", | |
"expirada" | |
] | |
}, | |
"paymentDistributionType": { | |
"type": "string", | |
"description": "Forma de diluição do pagamento\n* No dia do vencimento\n* Em até 7 dias\n* Em até 14 dias\n* Em até 21 dias", | |
"enum": [ | |
"diaVencimento", | |
"seteDias", | |
"quatorzeDias", | |
"vinteUmDias" | |
] | |
}, | |
"status": { | |
"type": "string", | |
"description": "Status da cessão.\n* aguardandoAprovacao\n* aprovado\n* recusado\n* falha\n* expirada\n", | |
"enum": [ | |
"aguardandoAprovacao", | |
"aprovado", | |
"recusado", | |
"falha", | |
"expirada" | |
] | |
} | |
} | |
}, | |
"GetCessionResponse": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Identificador da cessão", | |
"example": 1 | |
}, | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor solicitado", | |
"example": 1000 | |
}, | |
"cedente": { | |
"type": "string", | |
"description": "Documento do cedente", | |
"example": 23659650000100 | |
}, | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"payDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"createdDate": { | |
"type": "string", | |
"description": "Data de criação (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"reference": { | |
"type": "string", | |
"description": "Referência complementar", | |
"example": "Pedido relacionado a NF 11255" | |
}, | |
"storeAcceptDate": { | |
"type": "string", | |
"description": "Data de aceite do cedente (YYYY-MM-DD)", | |
"example": "2018-01-02", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"assignmentType": { | |
"type": "string", | |
"description": "Código da cessão no siscof", | |
"enum": [ | |
"aguardandoAprovacao", | |
"aprovado", | |
"recusado", | |
"falha", | |
"expirada" | |
] | |
}, | |
"paymentDistributionType": { | |
"type": "string", | |
"description": "Forma de diluição do pagamento\n* No dia do vencimento\n* Em até 7 dias\n* Em até 14 dias\n* Em até 21 dias", | |
"enum": [ | |
"diaVencimento", | |
"seteDias", | |
"quatorzeDias", | |
"vinteUmDias" | |
] | |
}, | |
"status": { | |
"type": "string", | |
"description": "Status da cessão.\n* aguardandoAprovacao\n* aprovado\n* recusado\n* falha\n* expirada\n", | |
"enum": [ | |
"aguardandoAprovacao", | |
"aprovado", | |
"recusado", | |
"falha", | |
"expirada" | |
] | |
}, | |
"recurrent": { | |
"type": "object", | |
"properties": { | |
"maximumValue": { | |
"type": "number", | |
"description": "Valor máximo para cessão recorrente", | |
"example": 1 | |
}, | |
"expirationDate": { | |
"type": "number", | |
"format": "double", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
}, | |
"installment": { | |
"type": "object", | |
"properties": { | |
"paymentNumber": { | |
"type": "integer", | |
"description": "Número de parcelas até 6", | |
"example": 1 | |
}, | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor da parcela", | |
"example": 1 | |
} | |
} | |
}, | |
"receivables": { | |
"type": "array", | |
"description": "Recebíveis sobre a cessão (Disponível apenas para detalhe da cessão)", | |
"items": { | |
"$ref": "#/components/schemas/Receivable" | |
} | |
} | |
} | |
}, | |
"Receivable": { | |
"type": "object", | |
"properties": { | |
"payDate": { | |
"type": "string", | |
"description": "Data pagar EC (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"payValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor pagar EC", | |
"example": 1000 | |
} | |
} | |
}, | |
"ParcelValue": { | |
"type": "object", | |
"properties": { | |
"paymentNumber": { | |
"type": "number", | |
"format": "double", | |
"description": "Número de parcelas", | |
"example": 1000 | |
}, | |
"value": { | |
"type": "number", | |
"description": "Valor da parcela", | |
"example": 3 | |
} | |
} | |
}, | |
"AvailableValueParcel": { | |
"type": "object", | |
"properties": { | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
}, | |
"ExpirationDate": { | |
"type": "object", | |
"properties": { | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de vencimento (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
}, | |
"AssignmentAcceptance": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Identificador da cessão", | |
"example": 1 | |
} | |
} | |
} | |
} | |
}, | |
"AssignmentChange": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "integer", | |
"description": "Identificador da cessão", | |
"example": 1 | |
}, | |
"expirationDate": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"reference": { | |
"type": "string", | |
"description": "Referência complementar", | |
"example": "Pedido relacionado a NF 11255" | |
} | |
} | |
}, | |
"ValueStore": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor disponível", | |
"example": 1000 | |
}, | |
"cedente": { | |
"type": "string", | |
"description": "Documento do cedente", | |
"example": 23659650000100 | |
} | |
} | |
} | |
} | |
}, | |
"ObterDadosAprovacaoAutomatica": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"allowed": { | |
"type": "boolean", | |
"description": "Se já houver cessão recorrente aprovada e não houver cessão recorrente no mês, será permitido", | |
"example": true | |
}, | |
"maximumRecurrentValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor máximo para pagamento recorrente. Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": 1000 | |
}, | |
"recurrentExpirationDate": { | |
"type": "string", | |
"description": "Data de expiração do pagamento recorrente(YYYY-MM-DD). Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
} | |
} | |
}, | |
"RecurrentResponse": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"allowed": { | |
"type": "boolean", | |
"description": "Se já houver cessão recorrente aprovada e não houver cessão recorrente no mês, será permitido", | |
"example": true | |
}, | |
"maximumRecurrentValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor máximo para pagamento recorrente. Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": 1000 | |
}, | |
"recurrentExpirationDate": { | |
"type": "string", | |
"description": "Data de expiração do pagamento recorrente(YYYY-MM-DD). Informado apenas se assignmentType = recorrenteAprovacaoAutomatica", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
} | |
} | |
}, | |
"ValueStoreInstallment": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"values": { | |
"type": "array", | |
"description": "Lista com os limites para cada parcela", | |
"items": { | |
"type": "object", | |
"properties": { | |
"value": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor disponível", | |
"example": 1000 | |
}, | |
"paymentNumber": { | |
"type": "integer", | |
"description": "Número da parcela", | |
"example": 3 | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"GetFinancialReport": { | |
"type": "object", | |
"properties": { | |
"initialDateSell": { | |
"type": "string", | |
"description": "Data de venda inicial (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"finalDateSell": { | |
"type": "string", | |
"description": "Data de venda final (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"finalPaymentDate": { | |
"type": "string", | |
"description": "Data de pagamento inicial (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"initialPaymentDate": { | |
"type": "string", | |
"description": "Data de pagamento final (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
} | |
} | |
}, | |
"GetFinancialReportResponse": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"values": { | |
"type": "array", | |
"description": "Lista com o extrato detalhado.", | |
"items": { | |
"type": "object", | |
"properties": { | |
"operation": { | |
"type": "string", | |
"description": "Valor disponível", | |
"example": "23-Reserva parcelado 2 a 6" | |
}, | |
"dateSell": { | |
"type": "string", | |
"description": "Data da venda", | |
"example": "2018-08-10T03:00:00.000Z" | |
}, | |
"datePayment": { | |
"type": "string", | |
"description": "Data do pagamento", | |
"example": "2018-10-11T03:00:00.000Z" | |
}, | |
"transactionStatus": { | |
"type": "string", | |
"description": "Status do pagamento", | |
"example": "Pagto Pendente" | |
}, | |
"flag": { | |
"type": "string", | |
"description": "Bandeira", | |
"example": "Mastercard" | |
}, | |
"sellValue": { | |
"type": "string", | |
"description": "Valor da parcela", | |
"example": "73,50" | |
}, | |
"receivedValue": { | |
"type": "string", | |
"description": "Valor a receber", | |
"example": "71,29" | |
}, | |
"discountValue": { | |
"type": "string", | |
"description": "Valor do desconto", | |
"example": "2,21" | |
}, | |
"posId": { | |
"type": "string", | |
"description": "Identificador do terminal POS", | |
"example": "GW016108" | |
}, | |
"autorisationId": { | |
"type": "string", | |
"description": "Identificador da autorização", | |
"example": "035306" | |
}, | |
"nsu": { | |
"type": "string", | |
"description": "NSU", | |
"example": "3617110116" | |
}, | |
"card": { | |
"type": "string", | |
"description": "Número do cartão", | |
"example": "000525664******1580" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"GetReceivables": { | |
"type": "object", | |
"properties": { | |
"initialDateSell": { | |
"type": "string", | |
"description": "Data de expiração (YYYY-MM-DD)", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}" | |
}, | |
"finalDateSell": { | |
"description": "Data de expiração (YYYY-MM-DD). Opcional", | |
"example": "2018-01-01", | |
"pattern": "\\d{4}-\\d{1,2}-\\d{1,2}", | |
"nullable": true, | |
"type": "string" | |
}, | |
"flagId": { | |
"description": "Lista de identificadores das bandeiras. Opcional", | |
"items": { | |
"type": "integer", | |
"description": "identificador da bandeira.", | |
"minimum": 1, | |
"maximum": 4 | |
}, | |
"example": "[1, 2]", | |
"nullable": true, | |
"type": "array" | |
}, | |
"productId": { | |
"description": "Lista de identificadores dos produtos. Opcional", | |
"items": { | |
"type": "integer", | |
"description": "identificador do produto.", | |
"minimum": 2, | |
"maximum": 4 | |
}, | |
"example": "[2, 3]", | |
"nullable": true, | |
"type": "array" | |
} | |
} | |
}, | |
"GetReceivablesResponse": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"values": { | |
"type": "array", | |
"description": "Lista dos recebíveis.", | |
"items": { | |
"type": "object", | |
"properties": { | |
"receivableId": { | |
"type": "string", | |
"description": "Identificador do recebível", | |
"example": "AAAHHBAAAAAADNvAAD" | |
}, | |
"autorisationId": { | |
"type": "string", | |
"description": "Identificador da autorização", | |
"example": "035306" | |
}, | |
"flag": { | |
"type": "string", | |
"description": "Bandeira", | |
"example": "Mastercard" | |
}, | |
"dateAntecipation": { | |
"type": "string", | |
"description": "Data do pagamento", | |
"example": "2018-10-11T03:00:00.000Z" | |
}, | |
"datePayment": { | |
"type": "string", | |
"description": "Data do pagamento", | |
"example": "2018-10-11T03:00:00.000Z" | |
}, | |
"dateSell": { | |
"type": "string", | |
"description": "Data da venda", | |
"example": "2018-08-10T03:00:00.000Z" | |
}, | |
"receivedValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor antecipado", | |
"example": 59.45 | |
}, | |
"taxAntecipationValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor da antecipação", | |
"example": 2.5 | |
}, | |
"sellValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor da parcela", | |
"example": 61.5 | |
}, | |
"saleValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor da venda", | |
"example": 123 | |
}, | |
"discountValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor do desconto da antecipação", | |
"example": 0.2 | |
}, | |
"antecipationDays": { | |
"type": "number", | |
"format": "integer", | |
"description": "Dias para antecipação", | |
"example": 4 | |
}, | |
"mdrDiscountValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor do desconto mdr", | |
"example": 0.2 | |
}, | |
"paymentValue": { | |
"type": "number", | |
"format": "double", | |
"description": "Valor a pagar", | |
"example": 59.65 | |
}, | |
"currentPartPayment": { | |
"type": "number", | |
"format": "integer", | |
"description": "Parcela atual", | |
"example": 1 | |
}, | |
"amountPartPayment": { | |
"type": "number", | |
"format": "integer", | |
"description": "Quantidade de parcelas", | |
"example": 12 | |
}, | |
"operation": { | |
"type": "string", | |
"description": "Valor disponível", | |
"example": "3-Parcelado 2 a 6" | |
}, | |
"nsu": { | |
"type": "string", | |
"description": "NSU", | |
"example": "3617110116" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"RequestAntecipation": { | |
"type": "object", | |
"properties": { | |
"data": { | |
"type": "object", | |
"properties": { | |
"receivables": { | |
"type": "array", | |
"description": "Lista dos identificadores dos recebíveis.", | |
"items": { | |
"type": "string", | |
"format": "integer", | |
"description": "Identificador dos recebíveis." | |
}, | |
"example": [ | |
"AAAHHBAAAAAADNvAAD" | |
] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment