Beneficiary

Rota responsável por devolver uma lista de todos os beneficiários cadastrados no sistema, incluindo seus endereços e a qual solicitação estão vinculados

SecurityoAuth2ClientCredentials
Responses
200

A list of all beneficiaries registered in the system

400

Unable to return a list of all beneficiaries due to validation error

404

No beneficiaries registered in the system was found

get/api/v1/beneficiaries
Response samples
application/json
[
  • {
    }
]

Rota responsável por cadastrar um beneficiário por cliente e solicitação

SecurityoAuth2ClientCredentials
Request
path Parameters
userId
required
string or null
solicitationId
required
integer <int32>
Request Body schema:
name
required
string
cpf
required
string
rg
required
string
relationship
required
string
phoneNumber
required
string
required
object (CreateAddressForBeneficiaryRequest)
Responses
200

Add a new beneficiary per client and solicitation

400

Unable to add a new beneficiary per client and solicitation due to validation error

post/api/v1/users/{userId}/solicitations/{solicitationId}/beneficiaries
Request samples
{
  • "name": "Paulo Magno Alves da Rocha",
  • "cpf": "534.234.867-34",
  • "rg": "2991396",
  • "relationship": "Filho",
  • "phoneNumber": "(61) 93847-2933",
  • "address": {
    }
}
Response samples
application/json
[
  • {
    }
]

Rota responsável pela atualização dos dados de um beneficiário

SecurityoAuth2ClientCredentials
Request
path Parameters
beneficiaryId
required
integer <int32>
Request Body schema:
name
required
string
cpf
required
string
rg
required
string
relationship
required
string
phoneNumber
required
string
object (UpdateAddressRequest)
Responses
200

Update a beneficiary details

400

Unable to update a beneficiary due to validation error

404

No beneficiary registered by this beneficiary id in the system was found

put/api/v1/beneficiaries/{beneficiaryId}
Request samples
{
  • "name": "Alan Barbosa de Oliveira",
  • "cpf": "123.456.789-01",
  • "rg": "3441352",
  • "relationship": "Marido",
  • "phoneNumber": "(61) 92354-4523",
  • "address": {
    }
}
Response samples
application/json
{
  • "id": 1,
  • "name": "Paulo Gonçalves Ferreira ",
  • "cpf": "123.456.789-01",
  • "rg": "1234567",
  • "relationship": "Filho",
  • "phoneNumber": "(61) 98374-2827",
  • "address": {
    }
}

Rota responsável pela exclusão de um beneficiário

SecurityoAuth2ClientCredentials
Request
path Parameters
beneficiaryId
required
integer <int32>
Responses
204

Delete a beneficiary

400

Unable to delete a beneficiary due to validation error

delete/api/v1/beneficiaries/{beneficiaryId}
Response samples
application/json
{
  • "errors": [ ],
  • "httpStatus": 500
}