Bem vindo a API reference do gateway de clientes de Benefício Farmácia da Funcional

Queries

BRM_getBeneficiaries

Description

Retorna a lista de beneficiários do cliente com seus respectivos dados.

Response

Returns an BRM_PaginatedProgramType!

Arguments
Name Description
getAllBeneficiaries - Boolean Retornar todos usuários ativos/cancelados/desativados. Default = false
companyIdentity - [String!]! CNPJ do cliente
before - String Pagina resultados antes deste cursor
after - String Paginate resultados após este cursor
first - Int Retorna os primeiros N resultados
last - Int Retorna os últimos N resultados
limit - Int Retorna N resultados
offset - Int Pula N resultados

Example

Query
query BRM_getBeneficiaries(
  $getAllBeneficiaries: Boolean,
  $companyIdentity: [String!]!,
  $before: String,
  $after: String,
  $first: Int,
  $last: Int,
  $limit: Int,
  $offset: Int
) {
  BRM_getBeneficiaries(
    getAllBeneficiaries: $getAllBeneficiaries,
    companyIdentity: $companyIdentity,
    before: $before,
    after: $after,
    first: $first,
    last: $last,
    limit: $limit,
    offset: $offset
  ) {
    edges {
      ...BRM_BeneficiaryProfileTypeEdgeFragment
    }
    pageInfo {
      ...BRM_PageInfoTypeFragment
    }
  }
}
Variables
{
  "getAllBeneficiaries": false,
  "companyIdentity": ["xyz789"],
  "before": "xyz789",
  "after": "abc123",
  "first": 123,
  "last": 123,
  "limit": 123,
  "offset": 123
}
Response
{
  "data": {
    "BRM_getBeneficiaries": {
      "edges": [BRM_BeneficiaryProfileTypeEdge],
      "pageInfo": BRM_PageInfoType
    }
  }
}

BRM_getBeneficiariesByIdentity

Description

Retorna a lista de beneficiários por CPF (apenas de clientes).

Arguments
Name Description
beneficiaryIdentity - String! CPF do beneficiário

Example

Query
query BRM_getBeneficiariesByIdentity($beneficiaryIdentity: String!) {
  BRM_getBeneficiariesByIdentity(beneficiaryIdentity: $beneficiaryIdentity) {
    id
    holderIdentity
    isHolder
    beneficiaryIdentity
    registration
    name
    numberCard
    clientIdentity
    statusBeneficiary
    beneficiarySequentialNumber
  }
}
Variables
{"beneficiaryIdentity": "abc123"}
Response
{
  "data": {
    "BRM_getBeneficiariesByIdentity": [
      {
        "id": 4,
        "holderIdentity": "xyz789",
        "isHolder": true,
        "beneficiaryIdentity": "xyz789",
        "registration": "xyz789",
        "name": "abc123",
        "numberCard": "abc123",
        "clientIdentity": "abc123",
        "statusBeneficiary": 123.45,
        "beneficiarySequentialNumber": 123.45
      }
    ]
  }
}

BRM_getFieldsParameters

Description

Retorna a lista de campos configurados no layout de movimentação de beneficiários do cliente.

Arguments
Name Description
companyIdentity - String!

Example

Query
query BRM_getFieldsParameters($companyIdentity: String!) {
  BRM_getFieldsParameters(companyIdentity: $companyIdentity) {
    fieldName
    maxLength
    description
    required
  }
}
Variables
{"companyIdentity": "abc123"}
Response
{
  "data": {
    "BRM_getFieldsParameters": [
      {
        "fieldName": "abc123",
        "maxLength": 123,
        "description": "xyz789",
        "required": false
      }
    ]
  }
}

BRM_getProcessingStatus

Description

Retorna o status atual do processamento da instrução de movimentação de beneficiário na fila de processamento.

Arguments
Name Description
id - String!

Example

Query
query BRM_getProcessingStatus($id: String!) {
  BRM_getProcessingStatus(id: $id) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"id": "abc123"}
Response
{
  "data": {
    "BRM_getProcessingStatus": {
      "id": "4",
      "companyIdentity": "xyz789",
      "holderIdentity": "abc123",
      "beneficiarySequentialNumber": 987,
      "beneficiaryIdentity": "xyz789",
      "cardNumber": "xyz789",
      "registration": "abc123",
      "objectId": "abc123",
      "status": "WAITING",
      "statusMessage": "xyz789"
    }
  }
}

Closure_getClosure

Description

Returns closing information

Response

Returns [Closure_Closure!]

Arguments
Name Description
input - Closure_ClosureInputType!

Example

Query
query Closure_getClosure($input: Closure_ClosureInputType!) {
  Closure_getClosure(input: $input) {
    companyIdentity
    identity
    registration
    name
    total
  }
}
Variables
{"input": Closure_ClosureInputType}
Response
{
  "data": {
    "Closure_getClosure": [
      {
        "companyIdentity": "xyz789",
        "identity": "abc123",
        "registration": "abc123",
        "name": "abc123",
        "total": 123.45
      }
    ]
  }
}

Statement_holderCurrentBalance

Description

Returns beneficiaries debit info

Arguments
Name Description
holderIdentity - [String!]! CPF of the holders
companyIdentity - String! CNPJ of the company where the holders are registered

Example

Query
query Statement_holderCurrentBalance(
  $holderIdentity: [String!]!,
  $companyIdentity: String!
) {
  Statement_holderCurrentBalance(
    holderIdentity: $holderIdentity,
    companyIdentity: $companyIdentity
  ) {
    identity
    payroll
    cash
    subsidized
    total
  }
}
Variables
{
  "holderIdentity": ["abc123"],
  "companyIdentity": "xyz789"
}
Response
{
  "data": {
    "Statement_holderCurrentBalance": [
      {
        "identity": "xyz789",
        "payroll": 123.45,
        "cash": 987.65,
        "subsidized": 123.45,
        "total": 123.45
      }
    ]
  }
}

Mutations

BRM_createBeneficiary

Description

Insere uma instrução de inclusão de beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryDetailInput!

Example

Query
mutation BRM_createBeneficiary($input: BRM_BeneficiaryDetailInput!) {
  BRM_createBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryDetailInput}
Response
{
  "data": {
    "BRM_createBeneficiary": {
      "id": 4,
      "companyIdentity": "abc123",
      "holderIdentity": "abc123",
      "beneficiarySequentialNumber": 987,
      "beneficiaryIdentity": "xyz789",
      "cardNumber": "abc123",
      "registration": "abc123",
      "objectId": "xyz789",
      "status": "WAITING",
      "statusMessage": "xyz789"
    }
  }
}

BRM_createOrUpdateBeneficiary

Description

Insere, de acordo com a situação atual do cadastro do beneficiário, uma instrução de inclusão, de atualização, de reativação ou de transferência de beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryDetailInput!

Example

Query
mutation BRM_createOrUpdateBeneficiary($input: BRM_BeneficiaryDetailInput!) {
  BRM_createOrUpdateBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryDetailInput}
Response
{
  "data": {
    "BRM_createOrUpdateBeneficiary": {
      "id": "4",
      "companyIdentity": "xyz789",
      "holderIdentity": "xyz789",
      "beneficiarySequentialNumber": 123,
      "beneficiaryIdentity": "xyz789",
      "cardNumber": "abc123",
      "registration": "xyz789",
      "objectId": "abc123",
      "status": "WAITING",
      "statusMessage": "xyz789"
    }
  }
}

BRM_disableBeneficiary

Description

Insere uma instrução de bloqueio de beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryInput!

Example

Query
mutation BRM_disableBeneficiary($input: BRM_BeneficiaryInput!) {
  BRM_disableBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryInput}
Response
{
  "data": {
    "BRM_disableBeneficiary": {
      "id": "4",
      "companyIdentity": "abc123",
      "holderIdentity": "xyz789",
      "beneficiarySequentialNumber": 123,
      "beneficiaryIdentity": "abc123",
      "cardNumber": "xyz789",
      "registration": "abc123",
      "objectId": "xyz789",
      "status": "WAITING",
      "statusMessage": "xyz789"
    }
  }
}

BRM_enableBeneficiary

Description

Insere uma instrução de reativação de beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryDetailInput!

Example

Query
mutation BRM_enableBeneficiary($input: BRM_BeneficiaryDetailInput!) {
  BRM_enableBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryDetailInput}
Response
{
  "data": {
    "BRM_enableBeneficiary": {
      "id": "4",
      "companyIdentity": "xyz789",
      "holderIdentity": "abc123",
      "beneficiarySequentialNumber": 123,
      "beneficiaryIdentity": "xyz789",
      "cardNumber": "abc123",
      "registration": "abc123",
      "objectId": "abc123",
      "status": "WAITING",
      "statusMessage": "abc123"
    }
  }
}

BRM_transferBeneficiary

Description

Insere uma instrução de transferência de unidade do beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryDetailInput!

Example

Query
mutation BRM_transferBeneficiary($input: BRM_BeneficiaryDetailInput!) {
  BRM_transferBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryDetailInput}
Response
{
  "data": {
    "BRM_transferBeneficiary": {
      "id": "4",
      "companyIdentity": "xyz789",
      "holderIdentity": "abc123",
      "beneficiarySequentialNumber": 123,
      "beneficiaryIdentity": "xyz789",
      "cardNumber": "abc123",
      "registration": "xyz789",
      "objectId": "abc123",
      "status": "WAITING",
      "statusMessage": "xyz789"
    }
  }
}

BRM_updateBeneficiary

Description

Insere uma instrução de atualização de dados de beneficiário na fila de processamento.

Arguments
Name Description
input - BRM_BeneficiaryDetailInput!

Example

Query
mutation BRM_updateBeneficiary($input: BRM_BeneficiaryDetailInput!) {
  BRM_updateBeneficiary(input: $input) {
    id
    companyIdentity
    holderIdentity
    beneficiarySequentialNumber
    beneficiaryIdentity
    cardNumber
    registration
    objectId
    status
    statusMessage
  }
}
Variables
{"input": BRM_BeneficiaryDetailInput}
Response
{
  "data": {
    "BRM_updateBeneficiary": {
      "id": 4,
      "companyIdentity": "abc123",
      "holderIdentity": "abc123",
      "beneficiarySequentialNumber": 987,
      "beneficiaryIdentity": "abc123",
      "cardNumber": "abc123",
      "registration": "xyz789",
      "objectId": "abc123",
      "status": "WAITING",
      "statusMessage": "abc123"
    }
  }
}

createToken

Description

Create a token for user

Response

Returns a Token

Arguments
Name Description
login - String! User Login
password - String! User Password

Example

Query
mutation createToken(
  $login: String!,
  $password: String!
) {
  createToken(
    login: $login,
    password: $password
  ) {
    token
    allowedServices
    user {
      ...UserFragment
    }
  }
}
Variables
{
  "login": "xyz789",
  "password": "abc123"
}
Response
{
  "data": {
    "createToken": {
      "token": "abc123",
      "allowedServices": ["abc123"],
      "user": User
    }
  }
}

Types

BRM_BeneficiaryDetailInput

Fields
Input Field Description
companyIdentity - String!

CNPJ do cliente.

holderIdentity - String!

CPF do titular.

beneficiarySequentialNumber - Int!

Número sequencial do beneficiário no grupo familiar, no caso de titular, preencher com 0

beneficiaryIdentity - String

CPF do beneficiário.

cardNumber - String

Número do cartão.

registration - String

Matrícula.

objectId - String

Identificador único gerado no sistema do cliente.

name - String!

Nome completo do beneficiário.

genderClient - String

Identifica o sexo do beneficiário.

kinshipClient - String

Identifica o grau de parentesco do beneficiário no grupo familiar.

benefitStartDate - String

Data de início do benefício do beneficiário.

benefitFinishDate - String

Data de Fim do benefício do beneficiário.

sector - String

Setor de atuação.

branch - String

Filial.

address - String

Endereço.

addressComplement - String

Complemento de endereço.

neighborhood - String

Bairro.

city - String

Cidade.

state - String

Sigla do Estado

zipCode - String

CEP.

phoneNumber - String

Número do telefone.

creditLimit - Float

Limite de crédito.

creditPremium - Float

Prêmio de crédito.

gender - BRM_Gender

Gênero.

dateOfBirth - BRM_DateTime

Data de nascimento.

addressing - String

Endereçamento interno.

plan - String

Plano.

accessionDate - BRM_DateTime

Data de adesão.

email - String

E-mail.

cellPhoneNumber - String

Número do telefone celular.

kinship - BRM_Kinship

Parentesco com o titular.

costCenter - String

Centro de custo.

universityStudent - Boolean

Estudante universitário

userType - String

Tipo de usuário.

payrollDebitLimit - Float

Limite de débito em folha de pagamento.

retired - Boolean

Aposentado.

payScaleGroup - String

Código da faixa salarial.

payrollDebit - Boolean

Débito em folha de pagamento.

beneficiaryId - String

Código de identificação do beneficiário no cliente.

dependentTypeIdentification - String

Identificador do beneficiário (T - Titular | D - Dependente)

Example
{
  "companyIdentity": "abc123",
  "holderIdentity": "xyz789",
  "beneficiarySequentialNumber": 987,
  "beneficiaryIdentity": "xyz789",
  "cardNumber": "abc123",
  "registration": "xyz789",
  "objectId": "xyz789",
  "name": "xyz789",
  "genderClient": "abc123",
  "kinshipClient": "abc123",
  "benefitStartDate": "xyz789",
  "benefitFinishDate": "abc123",
  "sector": "abc123",
  "branch": "abc123",
  "address": "xyz789",
  "addressComplement": "xyz789",
  "neighborhood": "abc123",
  "city": "abc123",
  "state": "abc123",
  "zipCode": "abc123",
  "phoneNumber": "xyz789",
  "creditLimit": 123.45,
  "creditPremium": 987.65,
  "gender": "M",
  "dateOfBirth": BRM_DateTime,
  "addressing": "xyz789",
  "plan": "xyz789",
  "accessionDate": BRM_DateTime,
  "email": "xyz789",
  "cellPhoneNumber": "xyz789",
  "kinship": "PARENT",
  "costCenter": "xyz789",
  "universityStudent": true,
  "userType": "xyz789",
  "payrollDebitLimit": 123.45,
  "retired": true,
  "payScaleGroup": "abc123",
  "payrollDebit": false,
  "beneficiaryId": "xyz789",
  "dependentTypeIdentification": "abc123"
}

BRM_BeneficiaryInput

Fields
Input Field Description
companyIdentity - String!

CNPJ do cliente.

holderIdentity - String!

CPF do titular.

beneficiarySequentialNumber - Int!

Número sequencial do beneficiário no grupo familiar, no caso de titular, preencher com 0

beneficiaryIdentity - String

CPF do beneficiário.

cardNumber - String

Número do cartão.

registration - String

Matrícula.

objectId - String

Identificador único gerado no sistema do cliente.

name - String!

Nome completo do beneficiário.

Example
{
  "companyIdentity": "xyz789",
  "holderIdentity": "xyz789",
  "beneficiarySequentialNumber": 987,
  "beneficiaryIdentity": "xyz789",
  "cardNumber": "abc123",
  "registration": "xyz789",
  "objectId": "abc123",
  "name": "abc123"
}

BRM_BeneficiaryParameterType

Fields
Field Name Description
fieldName - String! Nome do parâmetro.
maxLength - Int Tamanho máximo.
description - String! Descrição do conteúdo.
required - Boolean! Indica se o preenchimento é obrigatório.
Example
{
  "fieldName": "xyz789",
  "maxLength": 123,
  "description": "abc123",
  "required": true
}

BRM_BeneficiaryProcessingStatusType

Fields
Field Name Description
id - ID! Identificador do registro de movimentação do beneficiário.
companyIdentity - String companyIdentity
holderIdentity - String CPF do titular.
beneficiarySequentialNumber - Int Número sequencial do beneficiário no grupo familiar, no caso de titular, preencher com 0
beneficiaryIdentity - String CPF do beneficiário.
cardNumber - String Número do cartão.
registration - String Matrícula
objectId - String Identificador único gerado no sistema do cliente.
status - BRM_ProcessStatus status
statusMessage - String Mensagem de complemento do status.
Example
{
  "id": 4,
  "companyIdentity": "xyz789",
  "holderIdentity": "xyz789",
  "beneficiarySequentialNumber": 987,
  "beneficiaryIdentity": "xyz789",
  "cardNumber": "xyz789",
  "registration": "abc123",
  "objectId": "xyz789",
  "status": "WAITING",
  "statusMessage": "xyz789"
}

BRM_BeneficiaryProfileType

Fields
Field Name Description
id - ID! Código de identificação do beneficiário.
holderIdentity - String! CPF do titular.
isHolder - Boolean! É o titular ?
beneficiaryIdentity - String CPF do beneficiário. ( CPF dependente )
registration - String Matrícula
name - String Nome completo do beneficiário.
numberCard - String Número do Cartão.
clientIdentity - String! CNPJ do Cliente.
statusBeneficiary - Float Status do Beneficiário. 0 - Ativo, 1 - Bloqueado, 2 - Cancelado, 3 - Bloqueio temporário, 4 - Suspenso
beneficiarySequentialNumber - Float Número sequencial do beneficiário no grupo familiar, sendo 0 = titular
Example
{
  "id": "4",
  "holderIdentity": "xyz789",
  "isHolder": false,
  "beneficiaryIdentity": "abc123",
  "registration": "xyz789",
  "name": "abc123",
  "numberCard": "xyz789",
  "clientIdentity": "abc123",
  "statusBeneficiary": 123.45,
  "beneficiarySequentialNumber": 123.45
}

BRM_BeneficiaryProfileTypeEdge

Fields
Field Name Description
cursor - String! Cursor para paginação
node - BRM_BeneficiaryProfileType! Dados do registro
Example
{
  "cursor": "xyz789",
  "node": BRM_BeneficiaryProfileType
}

BRM_DateTime

Description

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

Example
BRM_DateTime

BRM_Gender

Description

Gênero.

Values
Enum Value Description

M

Masculino.

F

Feminino.
Example
"M"

BRM_Kinship

Description

Parentesco com o titular.

Values
Enum Value Description

PARENT

Pai ou Mãe

BROTHER_OR_SISTER

Irmão ou Irmã

PARTNER

Conjuge ou Companheiro

AGREGATED

Agregado

COUSIN

Primo ou Prima

UNCLE_OR_AUNT

Tio ou Tia

GRANDPARENT

Avô ou Avó

OTHER

Outros

SON_OR_DAUGHTER

Filho ou Filha

SPECIAL_DEPENDENT

Dependente especial

FINANCIAL_DEPENDENT

Dependente financeiro

DIVORCED

Cônjuge divorciado

UNDISCLOSED

Não Informado
Example
"PARENT"

BRM_PageInfoType

Description

Dados de uma paginação de registros

Fields
Field Name Description
hasNextPage - Boolean Possui próxima página?
hasPreviousPage - Boolean Possui página anterior?
startCursor - String Cursor do primeiro registro desta página
endCursor - String Cursor do último registro desta página
pageCount - Int Quantidade de registros desta página
totalCount - Int Quantidade total de registros
Example
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "startCursor": "xyz789",
  "endCursor": "xyz789",
  "pageCount": 987,
  "totalCount": 987
}

BRM_PaginatedProgramType

Fields
Field Name Description
edges - [BRM_BeneficiaryProfileTypeEdge!] Resultados da paginação com seus cursores
pageInfo - BRM_PageInfoType! Informações de paginação
Example
{
  "edges": [BRM_BeneficiaryProfileTypeEdge],
  "pageInfo": BRM_PageInfoType
}

BRM_ProcessStatus

Description

Status do processamento.

Values
Enum Value Description

WAITING

Aguardando processamento

SUCCESS

Processamento finalizado com sucesso

ERROR

Erro no processamento

IMPORT_ERROR

Erro na importação
Example
"WAITING"

Boolean

Description

The Boolean scalar type represents true or false.

Example
true

Closure_Closure

Description

Returns closing information

Fields
Field Name Description
companyIdentity - String The National Register of Legal Entities (CNPJ) is a form of registration made by the IRS to identify the companies and their financial movements.
identity - String A document which legally identifies this person: it could be the CPF for Brazilian beneficiaries, SSN for Americans, DNI for Argentins, and so on.
registration - String Internal identification of beneficiaries
name - String Name of beneficiaries
total - Float Total purchasing
Example
{
  "companyIdentity": "xyz789",
  "identity": "abc123",
  "registration": "xyz789",
  "name": "xyz789",
  "total": 123.45
}

Closure_ClosureInputType

Fields
Input Field Description
companyIdentity - String!

CNPJ of the company where the holders are registered

closureDate - String!

Closing date

Example
{
  "companyIdentity": "xyz789",
  "closureDate": "xyz789"
}

Date

Description

The date scalar type represents only date information. The date type uses Y-m-d format.

Example
"2007-12-03"

Datetime

Description

The datetime scalar type represents date and time information. The datetime type uses Y-m-d H:i:s format.

Example
Datetime

Float

Description

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

Example
987.65

ID

Description

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Example
"4"

Int

Description

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Example
123

Permission

Description

A user permission

Fields
Field Name Description
service - ServiceCodeEnum Service code
industries - [String] Industries codes
Example
{"service": "CA", "industries": ["xyz789"]}

Profile

Description

An user profile

Fields
Field Name Description
role - UserTypeEnum! Type of the user.
identity - String User identity.
Example
{"role": "MASTER", "identity": "xyz789"}

ServiceCodeEnum

Description

Service codes

Values
Enum Value Description

CA

WE

RE

MSR

RA

FNB

TT

AMF

SST

ECF

CP

AUT

Example
"CA"

Statement_Authorization

Fields
Field Name Description
id - ID!
Example
{"id": 4}

Statement_Beneficiary

Description

returns a beneficiary info

Fields
Field Name Description
id - ID! plant ID
customer - Statement_Customer the customer in legacy databases
features - Statement_FeatureMap!
dependent - Int! the dependent sequential identification in legacy databases
dependents - [Statement_Beneficiary!]! the dependents of this beneficiary
name - String!
cardNumber - Statement_CardNumber
status - String!
identity - String! a document which legally identifies this person: it could be the CPF for Brazilian beneficiaries, SSN for Americans, DNI for Argentins, and so on.
credit - Statement_Credit returns info about the cycle credit
currentCycle - Statement_Cycle returns the current active cycle
cycles - Statement_CycleConnection returns all the cycles for this beneficiary
Arguments
purchases - Statement_PurchaseConnection! list the purchases made by this beneficiary in a cursor-relay pagination fashion
Arguments
Example
{
  "id": "4",
  "customer": Statement_Customer,
  "features": Statement_FeatureMap,
  "dependent": 123,
  "dependents": [Statement_Beneficiary],
  "name": "xyz789",
  "cardNumber": Statement_CardNumber,
  "status": "xyz789",
  "identity": "abc123",
  "credit": Statement_Credit,
  "currentCycle": Statement_Cycle,
  "cycles": Statement_CycleConnection,
  "purchases": Statement_PurchaseConnection
}

Statement_BeneficiaryBalance

Description

Returns beneficiaries debit info

Fields
Field Name Description
identity - String A document which legally identifies this person: it could be the CPF for Brazilian beneficiaries, SSN for Americans, DNI for Argentins, and so on.
payroll - Float Amount that will be discounted in beneficiary payroll
cash - Float Amount paid in cash on purchase
subsidized - Float Amount that benefits company will pay
total - Float Sum of all of the above, cash, payroll and subsidized
Example
{
  "identity": "xyz789",
  "payroll": 987.65,
  "cash": 987.65,
  "subsidized": 987.65,
  "total": 987.65
}

Statement_CardNumber

Description

Pharmaceutical benefits card number

Example
Statement_CardNumber

Statement_Connection

Fields
Field Name Description
edges - [Statement_Edge!]!
pageInfo - Statement_PageInfo!
Possible Types
Statement_Connection Types

Statement_CycleConnection

Statement_PurchaseConnection

Example
{
  "edges": [Statement_Edge],
  "pageInfo": Statement_PageInfo
}

Statement_Credit

Fields
Field Name Description
period - Statement_Period!
amount - Float!
balance - Float!
validity - Statement_Date!
specialCredit - [Statement_SpecialCreditType!]
Example
{
  "period": "MONTHLY",
  "amount": 987.65,
  "balance": 123.45,
  "validity": Statement_Date,
  "specialCredit": [Statement_SpecialCreditType]
}

Statement_Customer

Fields
Field Name Description
id - ID!
Example
{"id": "4"}

Statement_Cycle

Fields
Field Name Description
id - ID!
starts - Statement_Date!
ends - Statement_Date!
active - Boolean!
balance - Statement_PaymentInfo
Arguments
purchases - Statement_PurchaseConnection!
Arguments
Example
{
  "id": "4",
  "starts": Statement_Date,
  "ends": Statement_Date,
  "active": false,
  "balance": Statement_PaymentInfo,
  "purchases": Statement_PurchaseConnection
}

Statement_CycleConnection

Description

cursor-relay connection guard for Purchase collection

Fields
Field Name Description
edges - [Statement_CycleEdge!]!
pageInfo - Statement_PageInfo!
Example
{
  "edges": [Statement_CycleEdge],
  "pageInfo": Statement_PageInfo
}

Statement_CycleEdge

Description

cursor-relay purchase edge

Fields
Field Name Description
cursor - String!
node - Statement_Cycle!
Example
{
  "cursor": "xyz789",
  "node": Statement_Cycle
}

Statement_CycleFilterInput

Fields
Input Field Description
starts - Statement_TimeRangeInput
Example
{"starts": Statement_TimeRangeInput}

Statement_CycleScope

Values
Enum Value Description

SELF

FAMILY

Example
"SELF"

Statement_Date

Description

A date string, such as 2007-12-03, compliant with the full-date format outlined in section 5.6 of the RFC 3339 profile of the ISO 8601 standard for representation of dates and times using the Gregorian calendar.

Example
Statement_Date

Statement_DateTime

Description

A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.

Example
Statement_DateTime

Statement_Edge

Fields
Field Name Description
cursor - String!
node - Statement_Node!
Possible Types
Statement_Edge Types

Statement_CycleEdge

Statement_PurchaseEdge

Example
{
  "cursor": "xyz789",
  "node": Statement_Node
}

Statement_FeatureMap

Fields
Field Name Description
showLimit - Boolean
showBalance - Boolean
showRenewDate - Boolean
Example
{"showLimit": false, "showBalance": false, "showRenewDate": true}

Statement_Industry

Fields
Field Name Description
name - String!
Example
{"name": "abc123"}

Statement_Massified

Fields
Field Name Description
pmc - Float
productValue - Float
discount - Float
Example
{"pmc": 987.65, "productValue": 123.45, "discount": 123.45}

Statement_Node

Fields
Field Name Description
id - ID!
Possible Types
Statement_Node Types

Statement_Cycle

Statement_Purchase

Example
{"id": "4"}

Statement_PageInfo

Fields
Field Name Description
hasNextPage - Boolean!
hasPreviousPage - Boolean!
Example
{"hasNextPage": true, "hasPreviousPage": false}

Statement_PaginationInput

Fields
Input Field Description
first - Int
after - ID
Example
{"first": 123, "after": "4"}

Statement_PaymentInfo

Description

information about payment splitting between the agents

Fields
Field Name Description
payroll - Float! amount that will be discounted in beneficiary payroll
cash - Float! amount paid in cash on purchase
subsidized - Float! amount that benefits customer will pay
total - Float! sum of all of the above, cash, payroll and subsidized
card - Float! amount that will be debited from card limit
Example
{
  "payroll": 987.65,
  "cash": 987.65,
  "subsidized": 123.45,
  "total": 123.45,
  "card": 123.45
}

Statement_Period

Values
Enum Value Description

MONTHLY

ANUAL

TRIMESTRAL

SPECIAL

UNKNOWN

Example
"MONTHLY"

Statement_Place

Description

location of a place

Fields
Field Name Description
city - String!
address - String!
neighborhood - String!
Example
{
  "city": "xyz789",
  "address": "xyz789",
  "neighborhood": "xyz789"
}

Statement_Product

Fields
Field Name Description
id - ID! internal product id (plant)
legacy - ID! legacy product id
name - String!
ean - String!
description - String
industry - Statement_Industry
Example
{
  "id": 4,
  "legacy": "4",
  "name": "xyz789",
  "ean": "xyz789",
  "description": "abc123",
  "industry": Statement_Industry
}

Statement_Purchase

Fields
Field Name Description
id - ID!
cardNumber - String the card number associated with this purchase
authorization - Statement_Authorization! authorization ID
sequence - Int! the sequential number
timestamp - Statement_DateTime! when the purchase was realized
soldAt - Statement_DateTime when the purchase was fulfilled by the system
payment - Statement_PaymentInfo detailed payment information, could be null if data is still being processed
massified - Statement_Massified massified of items
items - [Statement_PurchaseItem!]! product list of a purchase
store - Statement_Seller! store whose sold the products
prescriptionSent - Boolean whether or not the prescription was sent
rating - Statement_Rating rating of this purchase
danfeKeySended - Boolean whether or not you have a key DANFE
Example
{
  "id": 4,
  "cardNumber": "xyz789",
  "authorization": Statement_Authorization,
  "sequence": 123,
  "timestamp": Statement_DateTime,
  "soldAt": Statement_DateTime,
  "payment": Statement_PaymentInfo,
  "massified": Statement_Massified,
  "items": [Statement_PurchaseItem],
  "store": Statement_Seller,
  "prescriptionSent": true,
  "rating": Statement_Rating,
  "danfeKeySended": false
}

Statement_PurchaseConnection

Description

cursor-relay connection guard for Purchase collection

Fields
Field Name Description
edges - [Statement_PurchaseEdge!]!
pageInfo - Statement_PageInfo!
Example
{
  "edges": [Statement_PurchaseEdge],
  "pageInfo": Statement_PageInfo
}

Statement_PurchaseEdge

Description

cursor-relay purchase edge

Fields
Field Name Description
cursor - String!
node - Statement_Purchase!
Example
{
  "cursor": "xyz789",
  "node": Statement_Purchase
}

Statement_PurchaseItem

Fields
Field Name Description
quantity - Int!
isSpecialProgram - Boolean!
payment - Statement_PaymentInfo
massified - Statement_Massified
product - Statement_Product
Example
{
  "quantity": 987,
  "isSpecialProgram": false,
  "payment": Statement_PaymentInfo,
  "massified": Statement_Massified,
  "product": Statement_Product
}

Statement_Rating

Fields
Field Name Description
level - Statement_RatingLevel
description - String
source - Statement_Source
Example
{
  "level": "Bad",
  "description": "xyz789",
  "source": "Portal"
}

Statement_RatingLevel

Values
Enum Value Description

Bad

Regular

Excellent

Example
"Bad"

Statement_Seller

Description

the store whose sold the products

Fields
Field Name Description
id - ID!
companyName - String!
location - Statement_Place!
Example
{
  "id": 4,
  "companyName": "xyz789",
  "location": Statement_Place
}

Statement_Source

Values
Enum Value Description

Portal

MobileApp

Example
"Portal"

Statement_SpecialCreditType

Fields
Field Name Description
specialAmount - Float!
specialbalance - Float!
specialTitle - String!
Example
{
  "specialAmount": 123.45,
  "specialbalance": 123.45,
  "specialTitle": "abc123"
}

Statement_TimeRangeInput

Fields
Input Field Description
since - Statement_DateTime
until - Statement_DateTime
Example
{
  "since": Statement_DateTime,
  "until": Statement_DateTime
}

String

Description

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Example
"abc123"

Token

Description

A Token type

Fields
Field Name Description
token - String! The generated token
allowedServices - [String] List of services this user is allowed to use. Now each application sets its own rules.
user - User Authenticated user.
Example
{
  "token": "xyz789",
  "allowedServices": ["abc123"],
  "user": User
}

User

Description

A User Type

Fields
Field Name Description
id - ID User id.
uuid - ID User UUID.
email - String User e-mail.
kind - UserKindEnum User kind.
status - UserStatusEnum User status.
type - String Type of the user. Moved to the role field from the list of profiles.
name - String Name of the user.
identity - String User identity.
professionalLicense - String User professional license. Now get the identity from the pharmaceutical profile.
permissions - [Permission] Industries allowed in each service Now each application sets its own rules.
customersCodes - [String!]! Customers codes associated with the user Get the codes from the token payload itself.
socialMediaAvatarUrl - String If connected via social media, get the avatar URL
funcionalAcessoIdCredenciado - String If connected to Funcional Acesso, return the ID Credenciado No longer supported.
mobileNumber - String User mobile number.
bornOn - Date User birth date.
receiveOffers - Boolean If user accepts receiving offers by email/sms
passwordChangedAt - Datetime The last time the password was changed. It may be null if it was never changed.
profiles - [Profile!]! User profiles and roles
revokedUuids - [ID!]! User UUID.
socialIntegrations - [ID!]! User integration with social media.
createdAt - Datetime User Created At
lastLoginAt - Datetime The last time the user signed in. Please note that a user session may last for a long time, depending on the target service.
pendingEmail - String User unconfirmed e-mail address.
afterConfirmationRedirectUrl - String URL to redirect when confirmation.
Example
{
  "id": "4",
  "uuid": "4",
  "email": "xyz789",
  "kind": "SYSTEM",
  "status": "UNCONFIRMED",
  "type": "abc123",
  "name": "abc123",
  "identity": "abc123",
  "professionalLicense": "abc123",
  "permissions": [Permission],
  "customersCodes": ["xyz789"],
  "socialMediaAvatarUrl": "abc123",
  "funcionalAcessoIdCredenciado": "xyz789",
  "mobileNumber": "abc123",
  "bornOn": "2007-12-03",
  "receiveOffers": true,
  "passwordChangedAt": Datetime,
  "profiles": [Profile],
  "revokedUuids": ["4"],
  "socialIntegrations": ["4"],
  "createdAt": Datetime,
  "lastLoginAt": Datetime,
  "pendingEmail": "xyz789",
  "afterConfirmationRedirectUrl": "xyz789"
}

UserKindEnum

Description

User kind

Values
Enum Value Description

SYSTEM

PERSON

COMPANY

Example
"SYSTEM"

UserStatusEnum

Description

Allowed user status

Values
Enum Value Description

UNCONFIRMED

ACTIVE

BLOCKED

Example
"UNCONFIRMED"

UserTypeEnum

Description

Allowed user types

Values
Enum Value Description

MASTER

INDUSTRY

WHOLESALER

WHOLESALER_BRANCH

POINT_OF_SALES

RETAILER

SHOP_ASSISTANT

SHOP_MANAGER

PHARMACEUTICAL

BENEFITS_COMPANY

PHARMA_INDUSTRY

SUPPORT

PHARMA_BENEFIT_MANAGER

RETAIL_PHARMA_BENEFIT_MANAGER

POINT_OF_SALES_BUYER

BENEFICIARY_CARD

INDUSTRY_EMPLOYEE

PHARMA_COMPANY

TRADE_MANAGER

SYSTEM_FUNCIONAL_ACESSO_ACCREDITED_ID

FIDELIZACAO

Example
"MASTER"