Created
May 9, 2020 15:15
-
-
Save jhonata-menezes/0d31a00170b511d69e1d9bd6da54015e 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: | |
title: DICT API | |
version: 1.0.0-RC2 | |
license: | |
name: Apache 2.0 | |
url: 'http://www.apache.org/licenses/LICENSE-2.0' | |
contact: | |
name: Suporte TI BCB | |
email: [email protected] | |
url: 'https://www.bcb.gov.br/estabilidadefinanceira/pagamentosinstantaneos' | |
description: >- | |
O Diretório de Identificadores de Contas Transacionais - DICT - é o serviço | |
do arranjo PIX que permite | |
buscar detalhes de contas transacionais com chaves de endereçamento mais | |
convenientes para quem faz | |
um pagamento. Entre os tipos de chave atualmente disponíveis estão CPF, | |
CNPJ, telefone, e-mail e EVP. | |
As informações retornadas pelo DICT permitem ao pagador confirmar a | |
identidade do recebedor, proporcionando | |
uma experiência mais fácil e segura. Permitem também ao PSP do pagador criar | |
a mensagem de instrução de | |
pagamento a ser enviada para o sistema de liquidação com os detalhes de | |
conta do recebedor. | |
# Segurança | |
## Autenticação | |
O DICT utiliza autenticação mútua TLS. | |
As definições de autenticação para essa API estão especificados no | |
[manual de segurança | |
PIX](https://www.bcb.gov.br/content/estabilidadefinanceira/forumpireunioes/Anexo%20IV%20-%20Manual%20de%20Seguranca%20PIX%20v2.0.pdf) | |
## Assinatura digital | |
Requisições que incluam ou alterem informações no DICT devem ser assinadas | |
com | |
[XML Digital Signature](https://www.w3.org/2000/09/xmldsig) pelo | |
participante que envia a requisição. | |
Requisições de consulta não precisam ser assinadas. Respostas retornadas | |
pelo DICT serão assinadas digitalmente. | |
As assinaturas **devem** ser validadas pelos clientes da API. | |
A assinatura será colocada no elemento `Signature` das requisições e | |
respostas. | |
O `Signature` será | |
[envelopado](https://www.w3.org/TR/xmldsig-core1/#def-SignatureEnveloped) | |
pelo XML que está | |
sendo assinado (assinatura é um elemento filho). | |
Para mais detalhes sobre a forma de construir a assinatura, consulte o | |
[manual de segurança | |
PIX](https://www.bcb.gov.br/content/estabilidadefinanceira/forumpireunioes/Anexo%20IV%20-%20Manual%20de%20Seguranca%20PIX%20v2.0.pdf). | |
## Limitação de requisições | |
Para previnir ataques de enumeração, há mecanismo de limitação da quantidade | |
de consultas que podem ser feitas | |
num espaço de tempo (_rate-limiting_). | |
A limitação atua em dois níveis, para usuários individuais e para um | |
participante como um todo. | |
Para cada um desses níveis, há limite para o número de consultas que não | |
resultam em pagamento. | |
Quando algum desses limites for atingido, o serviço retornará status `429`, | |
especificando a causa. | |
Cabeçalhos indicando os parâmetros de _rate-limiting_ serão retornados nas | |
requisições. Ver, por exemplo, | |
os cabeçalhos retornados ao [consultar vínculo](#operation/getEntry). | |
# Evolução da API | |
As seguintes mudanças são esperadas e consideradas retro-compatíveis | |
(_backwards-compatibility_): | |
- Adição de novos recursos na API. | |
- Adição de novos parâmetros opcionais a requisições. | |
- Adição de novos campos em respostas da API. | |
- Alteração da ordem de campos. | |
- Adição de novos elementos em enumerações | |
Mudanças compatíveis não geram nova versão da API. | |
Clientes devem estar preparados para lidar com essas mudanças sem quebrar. | |
Mudanças incompatíveis geram nova versão da API. | |
# Tratamento de erros | |
O DICT retorna códigos de status HTTP para indicar sucesso ou falhas das | |
requisições. | |
Códigos 2xx indicam sucesso. Códigos 4xx indicam falhas causadas pelas | |
informações | |
enviadas pelo cliente ou pelo estado atual das entidades. Códigos 5xx | |
indicam problemas | |
no serviço no lado do DICT. | |
As respostas de erro incluem no corpo detalhes do erro seguindo o schema da | |
RFC | |
[Problem Details for HTTP APIs](https://tools.ietf.org/html/rfc7807). | |
O campo `type` identifica o tipo de erro e no DICT segue o padrão: | |
`https://dict.pi.rsfn.net.br/api/v1/error/<TipoErro>` | |
Abaixo estão listados os tipos de erro do DICT. | |
**Gerais** | |
- `Forbidden` | |
- Requisição de participante autenticado que viola alguma regra de autorização. | |
Ver [rfc7231](https://tools.ietf.org/html/rfc7231#section-6.5.3). | |
- `BadRequest` | |
- Requisição com formato inválido. | |
Ver [rfc7231](https://tools.ietf.org/html/rfc7231#section-6.5.1) | |
- `NotFound` | |
- Entidade não encontrada. | |
Ver [rfc7231](https://tools.ietf.org/html/rfc7231#section-6.5.4) | |
- `RateLimited` | |
- Limite de requisições foi atingido. | |
Ver seção sobre [limitação de requisições](#section/Seguranca/Limitacao-de-requisicoes) | |
- `ServiceUnavailable` | |
- Serviço não está disponível no momento. Serviço solicitado pode estar em manutenção ou fora | |
da janela de funcionamento. | |
- `RequestSignatureInvalid` | |
- Assinatura digital da requisição enviada é inválida. | |
- `RequestOnBehalfUnauthorized` | |
- Participante direto envia requisição em nome de participante indireto para o qual não tem autorização. | |
- `RequestIdAlreadyUsed` | |
- Requisição foi feita com mesmo `RequestId` de requisição feita anteriormente, mas com parâmetros diferentes. | |
**Vínculos** | |
- `EntryInvalid` | |
- Existem campos inválidos ao tentar criar novo vínculo. | |
- `EntryLimitExceeded` | |
- Número de vínculos associados a conta transacional excedeu o limite máximo. | |
- `EntryAlreadyExists` | |
- Já existe vínculo para essa chave com o mesmo participante e dono. | |
- `EntryCannotBeQueriedForBookTransfer` | |
- Vínculo consultado está custodiado no mesmo PSP do usuário pagador para quem está sendo feita a consulta. | |
Quando o pagador e o recebedor estão no mesmo PSP, não deve ser feita consulta ao DICT. | |
- `EntryKeyOwnedByDifferentPerson` | |
- Já existe vínculo para essa chave mas ela é possuída por outra pessoa. | |
Indica-se que seja feita uma reivindicação de posse. | |
- `EntryKeyInCustodyOfDifferentParticipant` | |
- Já existe vínculo para essa chave com o mesmo dono, mas ela encontra-se associada | |
a outro participante. Indica-se que seja feita uma reivindicação de portabilidade. | |
- `EntryLockedByClaim` | |
- Existe uma reivindicação com status diferente de concluída ou cancelada para a chave | |
do vínculo. Enquanto estiver nessa situação, o vínculo não pode ser excluído. | |
**Reivindicações** | |
- `ClaimInvalid` | |
- Existem campos inválidos ao tentar criar nova reivindicação. | |
- `ClaimTypeInconsistent` | |
- Tipo de reivindicação pedida é inconsistente. Esse erro ocorre nas situações em que | |
se tenta criar a) reivindicação de _posse_, mas vínculo existente tem como dona a mesma | |
pessoa que reivindica ou b) reinvidicação de _portabilidade_, mas vínculo existente tem | |
como dona pessoa diferente da que reivindica. | |
- `ClaimKeyNotFound` | |
- Não existe vínculo registrado com a chave que está sendo reivindicada. | |
- `ClaimAlreadyExistsForKey` | |
- Existe uma reivindicação com status diferente de concluída ou cancelada para a chave reivindicada. | |
Nova reivindicação para a chave só pode ser criada se a atual foi concluída ou cancelada. | |
- `ClaimResultingEntryAlreadyExists` | |
- Vínculo que resultaria ao processar reivindicação já existe, com mesma chave, participante e dono. | |
- `ClaimOperationInvalid` | |
- Status atual da reivindicação não permite que operação seja feita. | |
- `ClaimResolutionPeriodNotEnded` | |
- Para reivindicação de posse, PSP doador não pode __confirmar__ antes do término do período resolução. | |
Para portabilidade, PSP doador não pode __cancelar__ por fim de prazo antes do término do período resolução. | |
- `ClaimCompletionPeriodNotEnded` | |
- Para reivindicação de posse, se PSP reivindicador tenta encerrar antes do término do período encerramento. | |
servers: | |
- url: 'https://dict.pi.rsfn.net.br/api/v1/' | |
description: Servidor de Produção | |
- url: 'https://dict-h.pi.rsfn.net.br/api/v1/' | |
description: Servidor de Homologação | |
tags: | |
- name: Directory | |
x-displayName: Diretório | |
description: >- | |
O diretório de identificadores de contas transacionais é um conjunto de | |
vínculos. | |
Um vínculo é uma associação entre uma chave de endereçamento, uma conta | |
transacional e seu dono. | |
O dono pode ser uma pessoa física ou uma pessoa jurídica. A chave de | |
endereçamento é usada identificar um vínculo. | |
Os tipos de chave suportadas atualmente são as seguintes: | |
| Tipo | Exp. | |
regular | |
| Exemplo | | |
Comentário | |
| | |
|---------------|------------------------------------------------------------------------------------------------------------|--------------------------------------|---------------------------------------------------------------------------| | |
| CPF | | |
^\[0-9\]{11}$ | |
| 12345678901 | |
| | |
| | |
| CNPJ | | |
^\[0-9\]{14}$ | |
| 12345678901234 | |
| | |
| | |
| PHONE | | |
^\\+\[1-9\]\[0-9\]\d{1,14}$ | |
| +5510998765432 | |
| | |
| | |
| EMAIL | [e-mails válidos W3C | |
HTML5](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address) | |
| [email protected] | E-mail deve possuir no máximo 77 | |
caracteres e deve ser em minúsculo | | |
| EVP | | |
[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} | |
| 123e4567-e89b-12d3-a456-426655440000 | Endereço Virtual de Pagamento é | |
um tipo de chave é gerado pelo DICT | | |
Novos tipos de chave poderão vir a ser adicionados no futuro. Logo, é | |
importante que a implementação de clientes | |
seja flexível, permitindo a adição de novos tipos de chave. | |
- name: Claim | |
x-displayName: Reivindicação | |
description: >- | |
Conforme as chaves mudem de dono ou os usuários finais criem contas | |
transacionais em outros PSPs, | |
os seguintes cenários precisarão ser tratados: | |
1. Houve troca de posse de uma chave (telefone ou email) e o novo dono | |
deseja | |
criar um vínculo para uma conta sua mas o dono anterior já possui vínculo | |
registrado | |
no DICT com essa chave. | |
2. Um usuário deseja mudar a vinculação de uma chave sua para outra conta, | |
que | |
está domiciliada em um participante diferente do atual. | |
Para o cenário 1, deve ser criada uma _reivindicação de posse_. Já para o | |
cenário 2, | |
uma _portabilidade_. Em ambos cenários existirá a figura do PSP que irá | |
ceder a chave (PSP Doador), | |
e o PSP que irá receber a chave (PSP Reivindicador). No cenário de | |
_reivindicação de posse_, o PSP | |
doador e o reivindicador podem ser o mesmo. | |
Nessa especificação, _reivindicação_ sem qualificador é usado como termo | |
mais genérico para se referir | |
tanto à reivindicação de posse quanto à (reivindicação de) portabilidade. | |
Os processos de reivindicação são sempre iniciados pelo PSP reivindicador. | |
Uma reivindicação tem as seguintes situações: | |
- `OPEN` - Aberta pelo reivindicador, mas ainda não recebida pelo doador. | |
- `WAITING_RESOLUTION` - Já foi recebida pelo doador e está aguardando a resolução. Os critérios confirmação | |
ou cancelamento da reivindicação seguem normas específicas a depender do tipo (posse ou portabilidade). | |
- `CONFIRMED` - O doador confirmou a reivindicação. Isso implica a remoção da chave do DICT e da base interna | |
do PSP doador. Está aguardando o reivindicador encerrar o processo. | |
- `CANCELLED` - O doador ou reivindicador cancelou a reivindicação, mantendo o vínculo inalterado (conforme estava antes da | |
reivindicação) tanto no DICT quanto na base interna do PSP. | |
- `COMPLETED` - Tanto o DICT quanto o reivindicador atualizaram suas bases com o novo vínculo. | |
**Diagrama de estados** | |
``` | |
( OPEN )------->( WAITING_RESOLUTION )------->( CONFIRMED )------->( | |
COMPLETED ) | |
| / | |
| / | |
| / | |
| /--Apenas para | |
v / reivindicação | |
( CANCELLED )<------------v de posse | |
``` | |
**Importante!** | |
Os participantes deverão monitorar as reivindicações fazendo _polling_ | |
períodico no _endpoint_ | |
de [listar reivindicações](#operation/listClaims). A periodicidade | |
adequada dependerá | |
das definições de nível de serviço. | |
- name: Reconciliation | |
x-displayName: Reconciliação | |
description: >- | |
A reconciliação permite que o participante identifique inconsistências nos | |
vínculos da sua base de dados interna | |
e o DICT. É possível fazer a verificação de forma agregada, sobre todo o | |
conjunto de vínculos, e a verificação de um | |
vínculo individual. | |
Para permitir que a reconciliação seja feita de forma eficiente e segura, | |
toda operação realizada em cima de um vínculo | |
gera um identificador de conteúdo, ou CID (_content identifier_). O CID é | |
um número de 256 bits que identifica de forma | |
única o vínculo e todos os seus atributos essenciais (ver seção sobre | |
cálculo do CID). Modifições dos dados essenciais | |
do vínculo implicam na modificação do CID associado a ele. | |
A verificação agregada dos vínculos é feita com base no _verificador de | |
sincronismo_ (VSync). O participante pode | |
aferir a igualdade do conjunto de vínculos em seu domínio gerando o VSync | |
(ver seção sobre cálculo do VSync) da sua base | |
e criando uma [verificação de | |
sincronismo](#operation/createSyncVerification). A igualdade dos VSyncs do | |
DICT e do | |
PSP implica, com altíssima probabilidade, que o conjunto de CIDs é igual. | |
Caso os VSyncs sejam diferentes, o conjunto | |
de CIDs é necessariamente diferente, o que significa que há divergências | |
no conjunto de dados de vínculos naquele momento. | |
Ao identificar divergências, PSP poderá [consultar pelo | |
CID](#operation/getEntryByCid), [alterar](#operation/updateEntry), | |
[remover](#operation/deleteEntry) ou [criar](#operation/createEntry) | |
vínculos colocando no campo `Reason` das requisições | |
o valor `RECONCILIATION`. | |
As operações feitas no conjunto de vínculos sob domínio do PSP podem ser | |
acompanhadas de forma contínua no | |
[log de eventos de CIDs](#operation/listCidSetEvents). | |
Para obter uma lista completa dos CIDs no DICT relativos a um tipo de | |
chave, um PSP poderá solicitar a | |
[criação de um arquivo de CIDs](#operation/createCidSetFile). | |
## Cálculo de CID | |
O CID é calculado da seguinte forma: | |
``` | |
entryAttributes = keyType "&" key "&" ownerTaxIdNumber "&" ownerName "&" | |
ownerTradeName "&" participant "&" branch "&" accountNumber "&" | |
accountType | |
cidBytes = hmacSha256(requestIdBytes, entryAttributes) | |
cid = lowercase-hexadecimal(cidBytes) | |
``` | |
Observações: | |
- `entryAttributes` é uma string construída pela junção dos atributos | |
essenciais do vínculo, separados por `&`. | |
Todos atributos são strings codificadas em UTF-8. Atributos nulos são codificados com string em branco, "". | |
- `hmacSha256` é a função HMAC baseada na função de hash SHA-256. | |
- `requestIdBytes` são 16 bytes aleatórios, gerados para identificar a | |
requisição que cria o vínculo, usado como chave na função hmacSha256. | |
- `cid` é a representação hexadecimal, em lowercase, do resultado da | |
função hmacSha256. | |
Exemplo: | |
``` | |
entryAttributes = 'PHONE&+5511987654321&11122233300&João | |
Silva&&12345678&00001&0007654321&CACC' | |
requestIdBytes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
cid = '28c06eb41c4dc9c3ae114831efcac7446c8747777fca8b145ecd31ff8480ae88' | |
``` | |
## Cálculo do VSync | |
O VSync é resultado da aplicação de bitwise-XOR ('OU' exclusivo bit-a-bit) | |
sobre todos os CIDs de um determinado | |
tipo de chave. | |
Exemplo: | |
``` | |
cids = | |
['28c06eb41c4dc9c3ae114831efcac7446c8747777fca8b145ecd31ff8480ae88', | |
'4d4abb9168114e349672b934d16ed201a919cb49e28b7f66a240e62c92ee007f', | |
'fce514f84f37934bc8aa0f861e4f7392273d71b9d18e8209d21e4192a7842058'] | |
vsync = xor(xor(cids[0], cids[1]), cids[2]) = | |
'996fc1dd3b6b14bcf0c9fe8320eb66d7e2a3fd874ccf767b2e939641b1ea8eaf' | |
```` | |
Observações: | |
- VSync para um conjunto vazio de CIDs é definido como zero. | |
- Há três CIDs no exemplo acima, representados em hexadecimal. A operação | |
bitwise-XOR é feita com os CIDs em formato binário. | |
- bitwise-XOR é comutativo, não importa a ordem da sua aplicação. | |
- Para calcular o novo VSync resultante da adição de um CID ao conjunto, | |
basta calcular o XOR desse CID com o VSync atual. | |
O novo VSync resultante da remoção de um CID é calculado da mesma forma. | |
paths: | |
/entries/: | |
post: | |
summary: Criar Vínculo | |
description: >- | |
Cria um novo vínculo de chave com conta transacional. | |
### Idempotência | |
A operação de criação de vínculo é idempotente. Isso significa que é | |
seguro realizar uma nova tentativa em caso de falhas | |
temporárias, como erros de conexão ou término abrupto de processos. A | |
resposta retornada para uma requisição repetida é | |
equivalente à resposta dada à primeira requisição processada. | |
Para garantir a idempotência da operação, a requisição tem um campo | |
`RequestId`. Esse campo é um | |
[UUID versão 4](https://tools.ietf.org/html/rfc4122#section-4.4) e deve | |
ser único no contexto de um mesmo participante. | |
O `RequestId` fica associado ao vínculo criado e é usado no cálculo do | |
seu CID (ver seção de reconciliação). | |
Uma requisição de criação é considerada repetida quando o CID do vínculo | |
contido na requisição já existe no DICT. | |
Caso seja feita uma requisição com um `RequestId` previamente usado, mas | |
com parâmetros diferentes para o vínculo, | |
será retornado o erro `RequestIdAlreadyUsed`. | |
operationId: createEntry | |
tags: | |
- Directory | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateEntryRequest' | |
examples: | |
phone: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateEntryRequest> | |
<Signature></Signature> | |
<Entry> | |
<Key>+5561988880000</Key> | |
<KeyType>PHONE</KeyType> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Owner> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Owner> | |
</Entry> | |
<Reason>USER_REQUESTED</Reason> | |
<RequestId>a946d533-7f22-42a5-9a9b-e87cd55c0f4d</RequestId> | |
</CreateEntryRequest> | |
responses: | |
'201': | |
description: Created | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateEntryResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateEntryResponse> | |
<Signature></Signature> | |
<Entry> | |
<Key>11122233300</Key> | |
<KeyType>CPF</KeyType> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Owner> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Owner> | |
<CreationDate>2019-11-18</CreationDate> | |
<KeyOwnershipDate>2019-11-18</KeyOwnershipDate> | |
</Entry> | |
</CreateEntryResponse> | |
'400': | |
$ref: '#/components/responses/EntryInvalid' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/entries/{Key}': | |
parameters: | |
- schema: | |
$ref: '#/components/schemas/Key' | |
name: Key | |
in: path | |
required: true | |
get: | |
summary: Consultar Vínculo | |
tags: | |
- Directory | |
description: >- | |
Obtém um vínculo contendo os detalhes de conta transacional associados a | |
uma chave de endereçamento. | |
### Limitação de requisições | |
A política de limitação (_rate-limiting_) funciona com base em | |
cabeçalhos enviados na requisição. | |
O parâmetro `PI-PayerId` é o identificador pseudonimizado do usuário | |
final, vinculado a um participante. | |
Requisições vindas de um mesmo usuário, para um mesmo participante, | |
devem usar o mesmo identificador. | |
Como sugestão de implementação, pode ser utilizado o valor hexadecimal | |
da aplicação de | |
[HMAC-SHA-256](https://tools.ietf.org/html/rfc4634#section-7) a um | |
identificador do usuário, | |
com chave de conhecimento restrito ao participante. | |
### Cache | |
Consultas a vínculos podem ter suas respostas _cacheadas_ no PSP, | |
devendo seguir as | |
diretivas contidas no header | |
[`Cache-Control`](https://tools.ietf.org/html/rfc7234#section-5.2). | |
_Importante_: Para fazer uso de cache, clientes HTTP geralmente precisam | |
ser configurados. Não | |
é comum que tenham essa funcionalidade habilitada por padrão. | |
operationId: getEntry | |
parameters: | |
- schema: | |
type: string | |
pattern: '^[0-9]{8}' | |
example: '12345678' | |
in: header | |
name: PI-PayerAccountServicer | |
description: >- | |
Identificador SPB do participante onde o pagador possui conta. Usado | |
para _rate-limiting_. | |
required: true | |
- schema: | |
type: string | |
pattern: '[0-9a-z]{64}' | |
in: header | |
name: PI-PayerId | |
description: >- | |
Identificador pseudonimizado do pagador que originou a requisição. | |
Usado para _rate-limiting_. | |
required: true | |
- schema: | |
type: string | |
in: header | |
name: PI-EndToEndId | |
description: >- | |
Identificador fim-a-fim do pagamento associado a essa requisição. | |
Corresponde ao campo `EndToEndId` na mensagem pacs.008. Usado para | |
_rate-limiting_. | |
required: true | |
responses: | |
'200': | |
description: OK | |
headers: | |
PI-RateLimit-ClientRemaining: | |
description: >- | |
Número de requisições disponíveis para que limite associado ao | |
`PI-PayerId` seja atingido. | |
schema: | |
type: integer | |
example: 100 | |
PI-RateLimit-ClientReset: | |
description: Segundos até que limite associado ao `PI-PayerId` seja renovado. | |
schema: | |
type: integer | |
example: 30 | |
PI-RateLimit-ParticipantRemaining: | |
description: >- | |
Número de requisições disponíveis para que limite associado ao | |
`PI-PayerAccountServicer` seja atingido. | |
schema: | |
type: integer | |
example: 100 | |
PI-RateLimit-ParticipantReset: | |
description: >- | |
Segundos até que limite associado ao `PI-PayerAccountServicer` | |
seja renovado. | |
schema: | |
type: integer | |
example: 30 | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/GetEntryResponse' | |
examples: | |
natural-person: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<GetEntryResponse> | |
<Signature></Signature> | |
<Entry> | |
<Key>11122233300</Key> | |
<KeyType>CPF</KeyType> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Owner> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Owner> | |
<CreationDate>2019-11-18</CreationDate> | |
<KeyOwnershipDate>2019-11-18</KeyOwnershipDate> | |
</Entry> | |
</GetEntryResponse> | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'429': | |
$ref: '#/components/responses/RateLimited' | |
put: | |
summary: Atualizar Vínculo | |
tags: | |
- Directory | |
description: >- | |
Atualiza um vínculo. | |
A ser utilizado no cenário de atualização da informação da conta de um | |
cliente, permanecendo este no mesmo PSP. | |
Somente pode ser atualizada a informação de conta do vínculo. Outras | |
atualizações do vínculo devem ser feitas | |
por exclusão/inclusão do vínculo, portabilidade ou reivindicação de | |
posse, a depender da situação. | |
operationId: updateEntry | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/UpdateEntryRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<UpdateEntryRequest> | |
<Signature></Signature> | |
<Key>+5561988887777</Key> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Reason>USER_REQUESTED</Reason> | |
</UpdateEntryRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/UpdateEntryResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<UpdateEntryResponse> | |
<Signature></Signature> | |
<Entry> | |
<Key>11122233300</Key> | |
<KeyType>CPF</KeyType> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Owner> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Owner> | |
<CreationDate>2019-11-18</CreationDate> | |
<KeyOwnershipDate>2019-11-18</KeyOwnershipDate> | |
</Entry> | |
</UpdateEntryResponse> | |
'400': | |
$ref: '#/components/responses/BadRequest' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/entries/{Key}/delete': | |
parameters: | |
- schema: | |
$ref: '#/components/schemas/Key' | |
name: Key | |
in: path | |
required: true | |
post: | |
summary: Remover Vínculo | |
operationId: deleteEntry | |
description: Remove um vínculo de chave com conta. | |
tags: | |
- Directory | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/DeleteEntryRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<DeleteEntryRequest> | |
<Signature></Signature> | |
<Key>+5561988887777</Key> | |
<Reason>ACCOUNT_CLOSURE</Reason> | |
</DeleteEntryRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/DeleteEntryResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<DeleteEntryResponse> | |
<Signature></Signature> | |
<Key>+5561988887777</Key> | |
</DeleteEntryResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
/claims/: | |
post: | |
summary: Criar Reivindicação | |
description: >- | |
Cria uma nova reivindicação. | |
Essa operação é feita pelo participante reivindicador a pedido do | |
usuário final. | |
O vínculo atual permanece inalterado, até que haja a confirmação pelo | |
PSP doador. | |
Nem todo tipo de chave pode ser reivindicado ou portado. A tabela abaixo | |
define as possibilidades: | |
| compatível? | OWNERSHIP | PORTABILITY | | |
|---------------|:----------:|:------------:| | |
| CPF | | ✓ | | |
| CNPJ | | ✓ | | |
| PHONE | ✓ | ✓ | | |
| EMAIL | ✓ | ✓ | | |
| EVP | | | | |
operationId: createClaim | |
tags: | |
- Claim | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateClaimRequest' | |
examples: | |
phone-claim: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateClaimRequest> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
</Claim> | |
</CreateClaimRequest> | |
responses: | |
'201': | |
description: Created | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>OPEN</Status> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</CreateClaimResponse> | |
'400': | |
$ref: '#/components/responses/ClaimInvalid' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
get: | |
parameters: | |
- description: ISPB do partipante direto ou indireto interessado | |
schema: | |
type: string | |
pattern: '^[0-9]{8}' | |
name: Participant | |
in: query | |
required: true | |
- description: Restringe a reivindicações em que o participante é doador | |
schema: | |
type: boolean | |
name: IsDonor | |
in: query | |
required: false | |
- description: Restringe a reivindicações em que o participante é reivindicador | |
schema: | |
type: boolean | |
name: IsClaimer | |
in: query | |
required: false | |
- description: Status da reivindicação | |
schema: | |
$ref: '#/components/schemas/ClaimStatus' | |
name: Status | |
in: query | |
required: false | |
- description: Tipo de reivindicação | |
schema: | |
$ref: '#/components/schemas/ClaimType' | |
name: Type | |
in: query | |
required: false | |
- description: >- | |
Filtra reivindicações com data-hora de modificação maior ou igual a | |
`modifiedAfter` | |
schema: | |
type: string | |
format: date-time | |
name: ModifiedAfter | |
in: query | |
required: false | |
- description: >- | |
Filtra reivindicações com data-hora de modificação menor ou igual a | |
`modifiedBefore` | |
schema: | |
type: string | |
format: date-time | |
name: ModifiedBefore | |
in: query | |
required: false | |
- description: Número limite de reivindicações a retornar | |
schema: | |
type: integer | |
name: Limit | |
in: query | |
required: false | |
summary: Listar Reivindicações | |
description: >- | |
Obtém lista de reivindicações em que o participante é doador ou | |
reivindicador. | |
Lista de reivindicações é ordenada de forma crescente pelo campo | |
`LastModified` . | |
operationId: listClaims | |
tags: | |
- Claim | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/ListClaimsResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<ListClaimsResponse> | |
<Signature></Signature> | |
<Claims> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>OPEN</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</Claims> | |
</ListClaimsResponse> | |
'400': | |
$ref: '#/components/responses/BadRequest' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'/claims/{ClaimId}': | |
parameters: | |
- schema: | |
type: string | |
format: uuid | |
name: ClaimId | |
in: path | |
required: true | |
get: | |
summary: Consultar Reivindicação | |
operationId: getClaim | |
description: Obtém detalhes de uma reivindicação. | |
tags: | |
- Claim | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/GetClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<GetClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>OPEN</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</GetClaimResponse> | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'/claims/{ClaimId}/acknowledge': | |
parameters: | |
- schema: | |
type: string | |
format: uuid | |
name: ClaimId | |
in: path | |
required: true | |
post: | |
summary: Receber Reivindicação | |
operationId: acknowledgeClaim | |
description: >- | |
Notifica recebimento pelo participante doador de reivindicação com | |
status `OPEN`. | |
tags: | |
- Claim | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/AcknowledgeClaimRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<AcknowledgeClaimRequest> | |
<Signature></Signature> | |
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId> | |
</AcknowledgeClaimRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/AcknowledgeClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<AcknowledgeClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>WAITING_RESOLUTION</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</AcknowledgeClaimResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/claims/{ClaimId}/confirm': | |
parameters: | |
- schema: | |
type: string | |
format: uuid | |
name: ClaimId | |
in: path | |
required: true | |
post: | |
summary: Confirmar Reivindicação | |
operationId: confirmClaim | |
description: >- | |
Confirma a operação de reivindicação. | |
Para reivindicação de posse, status deve ser `WAITING_RESOLUTION` e | |
prazo definido pelo | |
campo `ResolutionPeriodEnd` deve ter passado. | |
Para portabilidade, status deve ser `WAITING_RESOLUTION`. | |
A tabela abaixo define, a depender da razão e do tipo, quem pode | |
confirmar. | |
<table> | |
<thead> | |
<tr> | |
<th></th> | |
<th colspan="2">OWNERSHIP</th> | |
<th colspan="2">PORTABILITY</th> | |
</tr> | |
<tr> | |
<th>Razão</th> | |
<th>Doador</th> | |
<th>Reivindicador</th> | |
<th>Doador</th> | |
<th>Reivindicador</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>USER_REQUESTED</td> | |
<td></td> | |
<td></td> | |
<td>✓</td> | |
<td></td> | |
</tr> | |
<tr> | |
<td>ACCOUNT_CLOSURE</td> | |
<td></td> | |
<td></td> | |
<td>✓</td> | |
<td></td> | |
</tr> | |
<tr> | |
<td>DEFAULT_OPERATION</td> | |
<td>✓</td> | |
<td></td> | |
<td></td> | |
<td></td> | |
</tr> | |
</tbody> | |
</table> | |
tags: | |
- Claim | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/ConfirmClaimRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<ConfirmClaimRequest> | |
<Signature></Signature> | |
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId> | |
<Reason>USER_REQUESTED</Reason> | |
</ConfirmClaimRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/ConfirmClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<ConfirmClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>CONFIRMED</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</ConfirmClaimResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/claims/{ClaimId}/cancel': | |
parameters: | |
- schema: | |
type: string | |
format: uuid | |
name: ClaimId | |
in: path | |
required: true | |
post: | |
summary: Cancelar Reivindicação | |
operationId: cancelClaim | |
description: >- | |
Cancela reivindicação. | |
Para reivindicação de posse, status deve ser `WAITING_RESOLUTION` ou | |
`CONFIRMED`. | |
Para portabilidade, status deve ser `WAITING_RESOLUTION`. Se razão de | |
cancelamento for | |
`DEFAULT_OPERATION`, prazo definido pelo campo `ResolutionPeriodEnd` | |
deve ter passado. | |
A tabela abaixo define, a depender da razão e do tipo, quem pode | |
cancelar. | |
<table> | |
<thead> | |
<tr> | |
<th></th> | |
<th colspan="2">OWNERSHIP</th> | |
<th colspan="2">PORTABILITY</th> | |
</tr> | |
<tr> | |
<th>Razão</th> | |
<th>Doador</th> | |
<th>Reivindicador</th> | |
<th>Doador</th> | |
<th>Reivindicador</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr> | |
<td>USER_REQUESTED</td> | |
<td></td> | |
<td>✓</td> | |
<td>✓</td> | |
<td>✓</td> | |
</tr> | |
<tr> | |
<td>ACCOUNT_CLOSURE</td> | |
<td></td> | |
<td>✓</td> | |
<td></td> | |
<td>✓</td> | |
</tr> | |
<tr> | |
<td>FRAUD</td> | |
<td>✓</td> | |
<td>✓</td> | |
<td>✓</td> | |
<td>✓</td> | |
</tr> | |
<tr> | |
<td>DEFAULT_OPERATION</td> | |
<td></td> | |
<td></td> | |
<td>✓</td> | |
<td></td> | |
</tr> | |
</tbody> | |
</table> | |
tags: | |
- Claim | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CancelClaimRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CancelClaimRequest> | |
<Signature></Signature> | |
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId> | |
<Reason>USER_REQUESTED</Reason> | |
</CancelClaimRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CancelClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CancelClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>CANCELLED</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</CancelClaimResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/claims/{ClaimId}/complete': | |
parameters: | |
- schema: | |
type: string | |
format: uuid | |
name: ClaimId | |
in: path | |
required: true | |
post: | |
summary: Concluir Reivindicação | |
operationId: completeClaim | |
description: >- | |
Conclui reivindicação pelo reivindicador. | |
Para reivindicação de posse, status deve ser `CONFIRMED` e prazo | |
definido pelo campo `CompletionPeriodEnd` | |
deve ter passado. | |
Para portabilidade, status deve ser `CONFIRMED`. | |
### Idempotência | |
A operação de conclusão de reivindicação é idempotente. Valem aqui as | |
mesmas considerações feitas sobre esse tema | |
na operação de [Criar Vínculo](#operation/createEntry). | |
tags: | |
- Claim | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CompleteClaimRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CompleteClaimRequest> | |
<Signature></Signature> | |
<ClaimId>123e4567-e89b-12d3-a456-426655440000</ClaimId> | |
<RequestId>a946d533-7f22-42a5-9a9b-e87cd55c0f4d</RequestId> | |
</CompleteClaimRequest> | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CompleteClaimResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CompleteClaimResponse> | |
<Signature></Signature> | |
<Claim> | |
<Type>OWNERSHIP</Type> | |
<Key>+5561988887777</Key> | |
<KeyType>PHONE</KeyType> | |
<ClaimerAccount> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</ClaimerAccount> | |
<Claimer> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Claimer> | |
<DonorParticipant>87654321</DonorParticipant> | |
<Id>123e4567-e89b-12d3-a456-426655440000</Id> | |
<Status>COMPLETED</Status> | |
<ResolutionPeriodEnd>2020-01-17T10:00:00Z</ResolutionPeriodEnd> | |
<CompletionPeriodEnd>2020-01-17T10:00:00Z</CompletionPeriodEnd> | |
<LastModified>2020-01-10T10:00:00Z</LastModified> | |
</Claim> | |
</CompleteClaimResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
/sync-verifications/: | |
post: | |
summary: Verificar Sincronismo | |
description: Cria uma verificação de sincronismo para um partipante e tipo de chave. | |
operationId: createSyncVerification | |
tags: | |
- Reconciliation | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateSyncVerificationRequest' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateSyncVerificationRequest> | |
<Signature></Signature> | |
<SyncVerification> | |
<Participant>12345678</Participant> | |
<KeyType>CPF</KeyType> | |
<SyncVerifierLastModified>2020-01-10T10:00:00Z</SyncVerifierLastModified> | |
<SyncVerifier>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</SyncVerifier> | |
</SyncVerification> | |
</CreateSyncVerificationRequest> | |
responses: | |
'201': | |
description: Created | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateSyncVerificationResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateSyncVerificationResponse> | |
<Signature></Signature> | |
<SyncVerification> | |
<Participant>12345678</Participant> | |
<KeyType>CPF</KeyType> | |
<SyncVerifierLastModified>2020-01-10T10:00:00Z</SyncVerifierLastModified> | |
<SyncVerifier>e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855</SyncVerifier> | |
<Id>1234</Id> | |
<Result>OK</Result> | |
</SyncVerification> | |
</CreateSyncVerificationResponse> | |
'400': | |
$ref: '#/components/responses/BadRequest' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
/cids/files/: | |
post: | |
summary: Criar Arquivo de CIDs | |
description: >- | |
Cria um arquivo contendo todos os CIDs de um determinado tipo de chave | |
do participante. | |
O formato do arquivo é um CID por linha ('\n' como EOL), sem ordem | |
definida. | |
Geração do arquivo é feita assincronamente. | |
operationId: createCidSetFile | |
tags: | |
- Reconciliation | |
requestBody: | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateCidSetFileRequest' | |
examples: | |
phone: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateCidSetFileRequest> | |
<Signature></Signature> | |
<Participant>12345678</Participant> | |
<KeyType>PHONE</KeyType> | |
</CreateCidSetFileRequest> | |
responses: | |
'201': | |
description: Created | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/CreateCidSetFileResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<CreateCidSetFileResponse> | |
<Signature></Signature> | |
<CidSetFile> | |
<Id>1234</Id> | |
<Status>REQUESTED</Status> | |
<Participant>12345678</Participant> | |
<KeyType>PHONE</KeyType> | |
<RequestTime>2020-01-10T10:00:00Z</RequestTime> | |
</CidSetFile> | |
</CreateCidSetFileResponse> | |
'400': | |
$ref: '#/components/responses/BadRequest' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'503': | |
$ref: '#/components/responses/ServiceUnavailable' | |
'/cids/files/{Id}': | |
get: | |
summary: Consultar Arquivo de CIDs | |
description: Obtém detalhes do arquivo de CIDs requisitado | |
operationId: getCidSetFile | |
tags: | |
- Reconciliation | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/GetCidSetFileResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<GetCidSetFileResponse> | |
<Signature></Signature> | |
<CidSetFile> | |
<Id>1234</Id> | |
<Status>AVAILABLE</Status> | |
<Participant>12345678</Participant> | |
<KeyType>PHONE</KeyType> | |
<RequestTime>2020-01-10T10:00:00Z</RequestTime> | |
<CreationTime>2020-01-10T10:00:10Z</CreationTime> | |
<Url>https://some_download_url/apath/12345678/dict_file_name.cids</Url> | |
<Bytes>3200000</Bytes> | |
<Sha256>f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b</Sha256> | |
</CidSetFile> | |
</GetCidSetFileResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
/cids/events: | |
get: | |
parameters: | |
- description: ISPB do partipante direto ou indireto interessado | |
schema: | |
type: string | |
pattern: '^[0-9]{8}' | |
name: Participant | |
in: query | |
required: true | |
- description: Tipo de chave | |
schema: | |
$ref: '#/components/schemas/KeyType' | |
name: KeyType | |
in: query | |
required: true | |
- description: Filtra eventos com data-hora maior ou igual a `StartTime` | |
schema: | |
type: string | |
format: date-time | |
name: StartTime | |
in: query | |
required: false | |
- description: Filtra eventos com data-hora menor ou igual a `EndTime` | |
schema: | |
type: string | |
format: date-time | |
name: EndTime | |
in: query | |
required: false | |
- description: Número limite de eventos a retornar | |
schema: | |
type: integer | |
name: Limit | |
in: query | |
required: false | |
summary: Listar Eventos de CIDs | |
description: >- | |
Lista os eventos de CIDs para um tipo de chave do participante, | |
ordenados de forma crescente por `Timestamp`. | |
A tabela abaixo resume os eventos de CIDs gerados como conseqüência de | |
cada operação. | |
| Operação | Eventos de | |
CID | | |
|------------------------------------------------------|-----------------------------| | |
| [Criar Vínculo](#operation/createEntry) | | |
adiciona | | |
| [Remover Vínculo](#operation/deleteEntry) | | |
remove | | |
| [Atualizar Vínculo](#operation/updateEntry) | remove e | |
adiciona | | |
| [Confirmar Reivindicação](#operation/confirmClaim) | remove (PSP | |
doador) | | |
| [Concluir Reivindicação](#operation/completeClaim) | adiciona (PSP | |
reivindicador)| | |
operationId: listCidSetEvents | |
tags: | |
- Reconciliation | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/ListCidSetEventsResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<ListCidSetEventsResponse> | |
<Signature></Signature> | |
<Participant>12345678</Participant> | |
<KeyType>CPF</KeyType> | |
<StartTime>2020-01-10T10:00:00Z</StartTime> | |
<EndTime>2020-01-10T11:00:00Z</EndTime> | |
<SyncVerifierStart>ed02457b5c41d964dbd2f2a609d63fe1bb7528dbe55e1abf5b52c249cd735797</SyncVerifierStart> | |
<SyncVerifierEnd>a592f5fb5bef95a3ec8431ebaf609e1af1e4c1b46edb0475394c5595988c748c</SyncVerifierEnd> | |
<CidSetEvents> | |
<CidSetEvent> | |
<Type>ADDED</Type> | |
<Cid>ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb</Cid> | |
<Timestamp>2020-01-10T10:00:00Z</Timestamp> | |
</CidSetEvent> | |
<CidSetEvent> | |
<Type>REMOVED</Type> | |
<Cid>961b6dd3ede3cb8ecbaacbd68de040cd78eb2ed5889130cceb4c49268ea4d506</Cid> | |
<Timestamp>2020-01-10T11:11:11Z</Timestamp> | |
</CidSetEvent> | |
</CidSetEvents> | |
</ListCidSetEventsResponse> | |
'400': | |
$ref: '#/components/responses/BadRequest' | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'/cids/entries/{Cid}': | |
parameters: | |
- schema: | |
$ref: '#/components/schemas/Cid' | |
name: Cid | |
in: path | |
required: true | |
get: | |
summary: Consultar Vínculo por CID | |
tags: | |
- Reconciliation | |
description: Obtém detalhes de um vínculo ativo identificado pelo CID | |
operationId: getEntryByCid | |
responses: | |
'200': | |
description: OK | |
content: | |
application/xml: | |
schema: | |
$ref: '#/components/schemas/GetEntryByCidResponse' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<GetEntryByCidResponse> | |
<Signature></Signature> | |
<Cid>ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb</Cid> | |
<Entry> | |
<Key>11122233300</Key> | |
<KeyType>CPF</KeyType> | |
<Account> | |
<Participant>12345678</Participant> | |
<Branch>00001</Branch> | |
<AccountNumber>0007654321</AccountNumber> | |
<AccountType>CACC</AccountType> | |
</Account> | |
<Owner> | |
<Type>NATURAL_PERSON</Type> | |
<TaxIdNumber>11122233300</TaxIdNumber> | |
<Name>João Silva</Name> | |
</Owner> | |
<CreationDate>2019-11-18</CreationDate> | |
<KeyOwnershipDate>2019-11-18</KeyOwnershipDate> | |
</Entry> | |
</GetEntryByCidResponse> | |
'403': | |
$ref: '#/components/responses/Forbidden' | |
'404': | |
$ref: '#/components/responses/NotFound' | |
components: | |
schemas: | |
AccountType: | |
enum: | |
- CACC | |
- SLRY | |
- SVGS | |
description: >- | |
Tipo de conta, conforme dicionário de domínio para a mensagem pacs.008 | |
do SPI. | |
example: CACC | |
pattern: '[A-Z]{4}' | |
BrazilianAccount: | |
type: object | |
description: Dados de conta transacional no Brasil. | |
properties: | |
Participant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: Identificador SPB do provedor da conta | |
Branch: | |
type: string | |
description: 'Agência, sem dígito verificador.' | |
pattern: '[0-9]{1,4}' | |
example: '0001' | |
AccountNumber: | |
type: string | |
description: >- | |
Número de conta, incluindo verificador. Se verificador for letra, | |
substituir por 0. | |
pattern: '[0-9]{1,20}' | |
example: '0007654321' | |
AccountType: | |
$ref: '#/components/schemas/AccountType' | |
required: | |
- Participant | |
- AccountNumber | |
- AccountType | |
Key: | |
type: string | |
description: Chave de endereçamento | |
maxLength: 77 | |
example: '12345678901' | |
KeyType: | |
type: string | |
description: Tipo de chave. _Novos tipos podem surgir_. | |
enum: | |
- CPF | |
- CNPJ | |
- PHONE | |
- EVP | |
example: CPF | |
NaturalPerson: | |
type: object | |
properties: | |
Type: | |
type: string | |
default: NATURAL_PERSON | |
TaxIdNumber: | |
type: string | |
description: CPF - Cadastro de Pessoa Física | |
pattern: '[0-9]{11}' | |
example: '11122233300' | |
Name: | |
type: string | |
description: Nome completo | |
example: João Silva | |
maxLength: 100 | |
required: | |
- Type | |
- TaxIdNumber | |
- Name | |
LegalPerson: | |
type: object | |
properties: | |
Type: | |
type: string | |
default: LEGAL_PERSON | |
TaxIdNumber: | |
type: string | |
description: CNPJ - Cadastro Nacional de Pessoa Jurídica | |
example: '11222333000150' | |
pattern: '[0-9]{14}' | |
Name: | |
type: string | |
description: Razão social | |
maxLength: 100 | |
example: Padaria Tres Irmãos Ltda | |
TradeName: | |
type: string | |
description: Nome fantasia | |
maxLength: 100 | |
example: Padaria 3 Irmãos | |
required: | |
- Type | |
- TaxIdNumber | |
- Name | |
ISPB: | |
type: string | |
pattern: '^[0-9]{8}' | |
example: '12345678' | |
Entry: | |
type: object | |
description: 'Vínculo entre uma chave de endereçamento, conta transacional e seu dono.' | |
properties: | |
Key: | |
$ref: '#/components/schemas/Key' | |
KeyType: | |
$ref: '#/components/schemas/KeyType' | |
Account: | |
$ref: '#/components/schemas/BrazilianAccount' | |
Owner: | |
oneOf: | |
- $ref: '#/components/schemas/NaturalPerson' | |
- $ref: '#/components/schemas/LegalPerson' | |
discriminator: | |
propertyName: Type | |
mapping: | |
NATURAL_PERSON: '#/NaturalPerson' | |
LEGAL_PERSON: '#/LegalPerson' | |
required: | |
- KeyType | |
- Account | |
- Owner | |
ExtendedEntry: | |
allOf: | |
- $ref: '#/components/schemas/Entry' | |
- type: object | |
xml: | |
name: Entry | |
properties: | |
CreationDate: | |
type: string | |
format: date | |
description: Data de criação do vínculo. | |
KeyOwnershipDate: | |
type: string | |
format: date | |
description: >- | |
Data a partir da qual o dono tem posse ininterrupta da chave de | |
endereçamento. | |
Posse da chave aqui é definida pela existência de um vínculo | |
associando a chave ao dono, | |
possivelmente com contas distintas. | |
required: | |
- Key | |
- CreationDate | |
- KeyOwnershipDate | |
EntryOperationReason: | |
type: string | |
enum: | |
- USER_REQUESTED | |
- ACCOUNT_CLOSURE | |
- BRANCH_TRANSFER | |
- ENTRY_INACTIVITY | |
- RECONCILIATION | |
ClaimStatus: | |
type: string | |
enum: | |
- OPEN | |
- WAITING_RESOLUTION | |
- CONFIRMED | |
- CANCELLED | |
- COMPLETED | |
ClaimType: | |
type: string | |
enum: | |
- OWNERSHIP | |
- PORTABILITY | |
description: Tipo de reivindicação | |
ClaimOperationReason: | |
type: string | |
enum: | |
- USER_REQUESTED | |
- ACCOUNT_CLOSURE | |
- FRAUD | |
- DEFAULT_OPERATION | |
description: Razão da operação | |
Claim: | |
type: object | |
properties: | |
Type: | |
$ref: '#/components/schemas/ClaimType' | |
Key: | |
$ref: '#/components/schemas/Key' | |
KeyType: | |
allOf: | |
- $ref: '#/components/schemas/KeyType' | |
- description: >- | |
Tipo de chave. CPF e CNPJ são inválidos, não podem ter posse | |
reivindicada. | |
ClaimerAccount: | |
$ref: '#/components/schemas/BrazilianAccount' | |
Claimer: | |
oneOf: | |
- $ref: '#/components/schemas/NaturalPerson' | |
- $ref: '#/components/schemas/LegalPerson' | |
discriminator: | |
propertyName: Type | |
mapping: | |
NATURAL_PERSON: '#/NaturalPerson' | |
LEGAL_PERSON: '#/LegalPerson' | |
required: | |
- Key | |
- KeyType | |
- ClaimerAccount | |
- Claimer | |
- Type | |
ExtendedClaim: | |
allOf: | |
- $ref: '#/components/schemas/Claim' | |
- type: object | |
xml: | |
name: Claim | |
properties: | |
DonorParticipant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: >- | |
Identificador SPB do participante que doa a chave | |
reinvidicada | |
Id: | |
type: string | |
format: uuid | |
Status: | |
$ref: '#/components/schemas/ClaimStatus' | |
ResolutionPeriodEnd: | |
type: string | |
format: date-time | |
description: Data-hora quando termina o período de resolução. | |
CompletionPeriodEnd: | |
type: string | |
format: date-time | |
description: Data-hora quando termina o período de encerramento. | |
LastModified: | |
type: string | |
format: date-time | |
description: Data-hora da última modificação do status da reivindicação | |
required: | |
- Donor | |
- Id | |
- Status | |
- ResolutionPeriodEnd | |
- CompletionPeriodEnd | |
- LastModified | |
Cid: | |
type: string | |
pattern: '[0-9a-z]{64}' | |
description: Identificador de conteúdo | |
CidSetEventType: | |
type: string | |
enum: | |
- ADDED | |
- REMOVED | |
CidSetEvent: | |
type: object | |
properties: | |
Type: | |
$ref: '#/components/schemas/CidSetEventType' | |
Cid: | |
$ref: '#/components/schemas/Cid' | |
Timestamp: | |
type: string | |
format: date-time | |
description: Data-hora do evento | |
RequestId: | |
type: string | |
format: uuid | |
description: Chave de idempotência da requisição. UUID versão 4. | |
SyncVerificationResult: | |
type: string | |
enum: | |
- OK | |
- NOK | |
SyncVerifier: | |
type: string | |
pattern: '[0-9a-z]{64}' | |
example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | |
SyncVerification: | |
type: object | |
properties: | |
Participant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: Identificador SPB do participante custodiante das chaves | |
KeyType: | |
$ref: '#/components/schemas/KeyType' | |
SyncVerifierLastModified: | |
type: string | |
format: date-time | |
description: Data-hora do último evento que alterou SyncVerifier | |
SyncVerifier: | |
allOf: | |
- $ref: '#/components/schemas/SyncVerifier' | |
- description: Verificador de sincronismo | |
required: | |
- Participant | |
- KeyType | |
- SyncVerifierLastModified | |
- SyncVerifier | |
ExtendedSyncVerification: | |
allOf: | |
- $ref: '#/components/schemas/SyncVerification' | |
- type: object | |
xml: | |
name: SyncVerification | |
properties: | |
Id: | |
type: integer | |
Result: | |
$ref: '#/components/schemas/SyncVerificationResult' | |
required: | |
- Id | |
- Result | |
FileStatus: | |
type: string | |
description: Status de geração do arquivo. | |
enum: | |
- REQUESTED | |
- PROCESSING | |
- AVAILABLE | |
- ERROR | |
example: AVAILABLE | |
CidSetFile: | |
type: object | |
properties: | |
Id: | |
type: integer | |
Status: | |
allOf: | |
- $ref: '#/components/schemas/FileStatus' | |
- description: Status de geração do arquivo de CIDs | |
Participant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: Identificador SPB do participante custodiante das chaves | |
KeyType: | |
$ref: '#/components/schemas/KeyType' | |
RequestTime: | |
type: string | |
format: date-time | |
description: Data-hora de solicitação da geração do arquivo. | |
CreationTime: | |
type: string | |
format: date-time | |
description: >- | |
Data-hora em que o arquivo foi gerado. Presente quando status for | |
`AVAILABLE`. | |
Url: | |
type: string | |
description: >- | |
URL para download do arquivo. Presente quando status for | |
`AVAILABLE`. | |
maxLength: 500 | |
example: >- | |
https://alguma_url.algum_dominio/algum_path/nome_do_arquivo_gerado_pelo_dict.tipo | |
Bytes: | |
type: integer | |
description: Tamanho do arquivo. Presente quando status for `AVAILABLE`. | |
Sha256: | |
type: string | |
description: >- | |
SHA256 do conteúdo do arquivo. Presente quando status for | |
`AVAILABLE`. | |
pattern: '^[A-Fa-f0-9]{64}' | |
example: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | |
required: | |
- Id | |
- Status | |
- Participant | |
- KeyType | |
- RequestTime | |
CreateCidSetFileRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Participant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: Identificador SPB do participante custodiante das chaves | |
KeyType: | |
$ref: '#/components/schemas/KeyType' | |
required: | |
- Participant | |
- KeyType | |
CreateCidSetFileResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
CidSetFile: | |
$ref: '#/components/schemas/CidSetFile' | |
GetCidSetFileResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
CidSetFile: | |
$ref: '#/components/schemas/CidSetFile' | |
CreateSyncVerificationRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
SyncVerification: | |
$ref: '#/components/schemas/SyncVerification' | |
required: | |
- SyncVerification | |
CreateSyncVerificationResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
SyncVerification: | |
$ref: '#/components/schemas/ExtendedSyncVerification' | |
required: | |
- SyncVerification | |
ListCidSetEventsResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Participant: | |
allOf: | |
- $ref: '#/components/schemas/ISPB' | |
- description: Identificador SPB do participante custodiante das chaves | |
KeyType: | |
$ref: '#/components/schemas/KeyType' | |
StartTime: | |
type: string | |
format: date-time | |
description: Data-hora do primeiro evento da lista | |
EndTime: | |
type: string | |
format: date-time | |
description: Data-hora do último evento da lista | |
SyncVerifierStart: | |
allOf: | |
- $ref: '#/components/schemas/SyncVerifier' | |
- description: Verificador de sincronismo antes do primeiro evento | |
SyncVerifierEnd: | |
allOf: | |
- $ref: '#/components/schemas/SyncVerifier' | |
- description: Verificador de sincronismo após último evento | |
CidSetEvents: | |
type: array | |
items: | |
$ref: '#/components/schemas/CidSetEvent' | |
required: | |
- Participant | |
- KeyType | |
- StartTime | |
- EndTime | |
- SyncVerifierStart | |
- SyncVerifierEnd | |
GetEntryByCidResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Cid: | |
$ref: '#/components/schemas/Cid' | |
Entry: | |
$ref: '#/components/schemas/ExtendedEntry' | |
required: | |
- Cid | |
- Entry | |
CreateClaimRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/Claim' | |
required: | |
- Claim | |
CreateClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
AcknowledgeClaimRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
ClaimId: | |
type: string | |
format: uuid | |
required: | |
- ClaimId | |
AcknowledgeClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
ConfirmClaimRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
ClaimId: | |
type: string | |
format: uuid | |
required: | |
- ClaimId | |
ConfirmClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
CancelClaimRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
ClaimId: | |
type: string | |
format: uuid | |
Reason: | |
$ref: '#/components/schemas/ClaimOperationReason' | |
required: | |
- ClaimId | |
- Reason | |
CancelClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
CompleteClaimRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
ClaimId: | |
type: string | |
format: uuid | |
Reason: | |
$ref: '#/components/schemas/ClaimOperationReason' | |
RequestId: | |
$ref: '#/components/schemas/RequestId' | |
required: | |
- ClaimId | |
- Reason | |
- RequestId | |
CompleteClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
GetClaimResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claim: | |
$ref: '#/components/schemas/ExtendedClaim' | |
required: | |
- Claim | |
ListClaimsResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Claims: | |
type: array | |
items: | |
$ref: '#/components/schemas/ExtendedClaim' | |
CreateEntryRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Entry: | |
$ref: '#/components/schemas/Entry' | |
Reason: | |
allOf: | |
- $ref: '#/components/schemas/EntryOperationReason' | |
- description: 'Valores válidos: `USER_REQUESTED` e `RECONCILIATION`' | |
RequestId: | |
$ref: '#/components/schemas/RequestId' | |
required: | |
- Entry | |
- Reason | |
- RequestId | |
UpdateEntryRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Key: | |
$ref: '#/components/schemas/Key' | |
Account: | |
$ref: '#/components/schemas/BrazilianAccount' | |
Reason: | |
allOf: | |
- $ref: '#/components/schemas/EntryOperationReason' | |
- description: >- | |
Valores válidos: `USER_REQUESTED`, `BRANCH_TRANSFER` e | |
`RECONCILIATION` | |
required: | |
- Key | |
- Account | |
- Reason | |
UpdateEntryResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Entry: | |
$ref: '#/components/schemas/ExtendedEntry' | |
required: | |
- Entry | |
CreateEntryResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Entry: | |
$ref: '#/components/schemas/ExtendedEntry' | |
required: | |
- Entry | |
DeleteEntryRequest: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Key: | |
$ref: '#/components/schemas/Key' | |
Reason: | |
allOf: | |
- $ref: '#/components/schemas/EntryOperationReason' | |
- description: >- | |
Valores válidos: `USER_REQUESTED`, `ACCOUNT_CLOSURE`, | |
`ENTRY_INACTIVITY` e `RECONCILIATION` | |
required: | |
- Key | |
- Reason | |
DeleteEntryResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Key: | |
$ref: '#/components/schemas/Key' | |
required: | |
- Key | |
GetEntryResponse: | |
type: object | |
properties: | |
Signature: | |
type: object | |
xml: | |
prefix: ds | |
namespace: 'http://www.w3.org/2000/09/xmldsig#' | |
Entry: | |
$ref: '#/components/schemas/ExtendedEntry' | |
required: | |
- Entry | |
Problem: | |
type: object | |
xml: | |
name: problem | |
namespace: 'urn:ietf:rfc:7807' | |
properties: | |
type: | |
type: string | |
format: uri | |
example: 'https://dict.pi.rsfn.net.br/api/v1/error/NotFound' | |
title: | |
type: string | |
example: Not found | |
status: | |
type: integer | |
example: 404 | |
detail: | |
type: string | |
violations: | |
type: array | |
items: | |
$ref: '#/components/schemas/Violation' | |
required: | |
- type | |
- title | |
- status | |
Violation: | |
type: object | |
xml: | |
name: violation | |
properties: | |
reason: | |
type: string | |
value: | |
type: string | |
property: | |
type: string | |
required: | |
- reason | |
responses: | |
NotFound: | |
description: Not found | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/NotFound</type> | |
<title>Not found</title> | |
<status>404</status> | |
<detail>Entry associated with given key does not exist</detail> | |
</problem> | |
Forbidden: | |
description: Forbidden | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/Forbidden</type> | |
<title>Forbidden</title> | |
<status>403</status> | |
<detail>Participant is not allowed to access this resource</detail> | |
</problem> | |
RateLimited: | |
description: Rate-Limited | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/RateLimited</type> | |
<title>Rate limited</title> | |
<status>429</status> | |
</problem> | |
ServiceUnavailable: | |
description: Service Unavailable | |
headers: | |
Retry-After: | |
schema: | |
type: integer | |
description: >- | |
Tempo de espera em segundos sugerido para nova requisição. Ver | |
[rfc7231#section-7.1.3](https://tools.ietf.org/html/rfc7231#section-7.1.3) | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/ServiceUnavailable</type> | |
<title>Service Unavailable</title> | |
<status>503</status> | |
<detail>Service is under scheduled maintenance</detail> | |
</problem> | |
ClaimInvalid: | |
description: Claim Invalid | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/ClaimInvalid</type> | |
<title>Claim is invalid</title> | |
<status>400</status> | |
<detail>Claim has invalid fields</detail> | |
<violations> | |
<violation> | |
<reason>Value does not match regex '^\+[1-9]\d{1,14}$'</reason> | |
<value>61988887777</value> | |
<property>claim.key</property> | |
</violation> | |
</violations> | |
</problem> | |
EntryInvalid: | |
description: Entry Invalid | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/EntryInvalid</type> | |
<title>Entry is invalid</title> | |
<status>400</status> | |
<detail>Entry has invalid fields</detail> | |
<violations> | |
<violation> | |
<reason>Value does not match regex '^\+[1-9]\d{1,14}$'</reason> | |
<value>61988887777</value> | |
<property>entry.key</property> | |
</violation> | |
</violations> | |
</problem> | |
BadRequest: | |
description: Bad Request | |
content: | |
application/problem+xml: | |
schema: | |
$ref: '#/components/schemas/Problem' | |
examples: | |
example: | |
value: |- | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<problem xmlns="urn:ietf:rfc:7807"> | |
<type>https://dict.pi.rsfn.net.br/api/v1/error/BadRequest</type> | |
<title>Bad Request</title> | |
<status>400</status> | |
<detail>Could not parse request body</detail> | |
</problem> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment