---
# System prepended metadata

title: Consulta dados de cartões e faturas

---

Consulta dados de cartões e faturas


1. [Autenticar em Cartões na API de Autenticar em Cartões](#autentica)
2. [Reautenticar (refresh de sessão) em Cartões na API de Reautenticar em Cartões](#reautentica)
3. [Busca cooperado pelo CPF](#customer)
4. [Busca cartões pelo customer ID](#card)
5. [Busca faturas do cartão do Cooperado](#fatura)




### <a id="autentica"></a>Endpoint que autentica em cartões
**POST**:
/auth/realms/api-gateway/protocol/openid-connect/token

**Headers:**

Content-Type
Exemplo: application/x-www-form-urlencoded
Form URL Encoded:

grant_type=password
client_id=unicred
username=user
password=******

**Retornos:**

200 (Ok)
401 (Unauthorized)
500 (Internal Server Error)
Exemplos de retorno:

Retorna 200 quando autentica com sucesso

**Body de retorno:**
```JSON
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI2cG9MdlIzckE2aVRBMThhbE1GeGk4b0xFN0F0SWVVZG5xcFpLdlVqYlE0In0.eyJleHAiOjE2MTM2NTk1NzksImlhdCI6MTYxMzY1OTI3OSwianRpIjoiMzI0ZGNlOGUtNjliNS00NWFlLWE3ZDAtMDIzMTAzNmUzODk3IiwiaXNzIjoiaHR0cDovL2F1dGgudGVzdC5jYXJ0b2VzdW5pY3JlZC5jb20uYnIvYXV0aC9yZWFsbXMvYXBpLWdhdGV3YXkiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiYWE1OWMyOWItNDdiZi00ODMwLTgyNWMtNGIzODU1ODg4ZmYwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidW5pY3JlZCIsInNlc3Npb25fc3RhdGUiOiJhODJkMjc5Mi05NzEzLTRjYzUtYTk2My0wY2MwMTkwZWFlMzUiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwiZ2V0X3Jld2FyZHNfYmFsYW5jZSIsImdldF9jdXN0b21lcl9kb2N1bWVudCIsInVtYV9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1bmljcmVkIiwic2Vzc2lvbl9zdGF0ZSI6ImE4MmQyNzkyLTk3MTMtNGNjNS1hOTYzLTBjYzAxOTBlYWUzNSI",
  "token_type": "bearer",
  "not-before-policy": 0,
  "session_state": "a82d2792-9713-4cc5-a963-0cc0190eae35",
  "scope": "email profile"
}
```
## <a id="reautentica"></a>Endpoint que reautentica em cartoes

**POST:**
/auth/realms/api-gateway/protocol/openid-connect/token

**Headers:**

Content-Type
Exemplo: application/x-www-form-urlencoded
Form URL Encoded:

grant_type=refresh_token
client_id=unicred
refresh_token=eyJhbGciOiJIUzI1NiIsInR5cCI…

**Retornos:**

200 (Ok)
401 (Unauthorized)
500 (Internal Server Error)
Exemplos de retorno:

Retorna 200 quando autentica com sucesso

**Body de retorno:**

```JSON
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI2cG9MdlIzckE2aVRBMThhbE1GeGk4b0xFN0F0SWVVZG5xcFpLdlVqYlE0In0.eyJleHAiOjE2MTM2NTk1NzksImlhdCI6MTYxMzY1OTI3OSwianRpIjoiMzI0ZGNlOGUtNjliNS00NWFlLWE3ZDAtMDIzMTAzNmUzODk3IiwiaXNzIjoiaHR0cDovL2F1dGgudGVzdC5jYXJ0b2VzdW5pY3JlZC5jb20uYnIvYXV0aC9yZWFsbXMvYXBpLWdhdGV3YXkiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiYWE1OWMyOWItNDdiZi00ODMwLTgyNWMtNGIzODU1ODg4ZmYwIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidW5pY3JlZCIsInNlc3Npb25fc3RhdGUiOiJhODJkMjc5Mi05NzEzLTRjYzUtYTk2My0wY2MwMTkwZWFlMzUiLCJhY3IiOiIxIiwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwiZ2V0X3Jld2FyZHNfYmFsYW5jZSIsImdldF9jdXN0b21lcl9kb2N1bWVudCIsInVtYV9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1bmljcmVkIiwic2Vzc2lvbl9zdGF0ZSI6ImE4MmQyNzkyLTk3MTMtNGNjNS1hOTYzLTBjYzAxOTBlYWUzNSI",
  "token_type": "bearer",
  "not-before-policy": 0,
  "session_state": "a82d2792-9713-4cc5-a963-0cc0190eae35",
  "scope": "email profile"
}
```




### <a id="customer"></a> Endpoint que busca cartões de um customer.

**GET:**
/v1/cards/card/cards?customerUuid=699296d4-7a5f-451e-b879-c61db92f97fd

**Headers:**

Authorization
Exemplo: bearer token
Traffic-Code
Exemplo: 136
Query Param:

customerUuid
Exemplo: 699296d4-7a5f-451e-b879-c61db92f97fd

**Retornos:**

200 (Ok)
400 (Bad Request)
401 (Unauthorized)
404 (Not Found)
500 (Internal Server Error)

**Exemplos de retorno:**

Retorna 200 com uma lista de cartões:

```JSON
[
   {
    "uuid": "e7cddce1-127b-4f55-9676-e6c1c5d6d36e",
    "lastFourNumbers": "3456",
    "printedName": "ALMIRO DOMINGOS",
    "ownerName": "Almiro Domingos",
    "productName": "Gold",
    "productUuid": "cd3d599d-17d0-4187-840b-5d40970ef477",
    "totalLimit": 20000.00,
    "validThru": "2025-11-25T07:00:00",
    "status": {"code": 1, "type": "ACTIVE", "description": "Active"},
    "dateLastChangeDueDay": "2025-11-13T07:00:00",
    "additional": false,
    "automaticDebit": false,
    "firstBlock": false,
    "availableLimit": 10000.00,
    "accountNumber": "123491",
    "dueDay": 5,
    "email": "almiro@unicred.com.br",
    "telephone": {
       "areaCode": "51",
       "number": "98580651"
    },
    "address": {
       "zipCode": "92056000",
       "publicPlace": "Ipiranga",
       "number": "7200",
       "complement": "sala 101",
       "neighborhood": "Jardim do Salso",
       "city": "Porto Alegre",
       "federatedUnit": "RS"
    },
    "cardAccount": {
       "uuid": "755d4f39-ebd4-3a22-b7b6-6988073dbd98"
    },
    "modality": "DEBIT",
    "customerUuid": "8196feb0-ebc6-4db6-aa23-0a54387430ef",
    "annuityUuid": "fc12eebb-8f6b-4eb1-bedb-f3b20afd34e5",
    "annuityValue": 20.00,
    "travelNotice": false
  },
  {
    "uuid": "e7cddce1-127b-4f55-9676-f6c1c5d6d38l",
    "lastFourNumbers": "1158",
    "printedName": "JOSE BARROSO",
    "ownerName": "Jose Barroso",
    "productName": "Gold",
    "productUuid": "cd3d599d-17d0-4187-840b-5d40970ef477",
    "totalLimit": 12000.00,
    "validThru": "2025-11-25T07:00:00",
    "status": {"code": 2, "type": "BLOCKED", "description": "Temporary locked allows unlock via cell phone"},
    "dateLastChangeDueDay": "2025-11-13T07:00:00",
    "additional": false,
    "automaticDebit": false,
    "firstBlock": true,
    "availableLimit": 1000.00,
    "accountNumber": "123491",
    "dueDay": 5,
    "email": "jose@unicred.com.br",
    "telephone": {
       "areaCode": "51",
       "number": "98580651"
    },
    "address": {
       "zipCode": "92056000",
       "publicPlace": "Ipiranga",
       "number": "7200",
       "complement": "sala 101",
       "neighborhood": "Jardim do Salso",
       "city": "Porto Alegre",
       "federatedUnit": "RS"
    },
      "cardAccount": {
         "uuid": "33651f06-6115-4aab-843b-cea8eddf76c95"
    },
    "modality": "MULTIPLE",
    "customerUuid": "8196feb0-ebc6-4db6-aa23-0a54387430ef",
    "annuityUuid": "fc12eebb-8f6b-4eb1-bedb-f3b20afd34e5",
    "annuityValue": 20.00,
    "travelNotice": true
  }
]
```



### <a id="card"></a>Endpoint que busca o cooperado em cartões.

**GET:**
/v1/cards/customers/natural-persons/document

**Headers:**

Authorization
Exemplo: bearer token
Traffic-Code
Exemplo: 136
Document
Ex: 07848399990

**Retornos:**

200 (Ok)
400 (Bad Request)
401 (Unauthorized)
404 (Not Found) // Customer não encontrado
500 (Internal Server Error)

**Exemplos de retorno:**

Retorna 200 quando o customer existe:

```JSON
{
  "customerUuid": "string",
  "institution": "string",
  "name": "string",
  "organizations": ["string"],
  "document": "string",
  "dateOfBirth": "2020-03-26",
  "gender": "string",
  "email": "string",
  "mobile": {
    "countryCode": "string",
    "areaCode": "string",
    "number": "string"
  }
}
```



### <a id="fatura"></a>Endpoint de consultar últimas faturas fechada.

> Operação realizada para recuperar as faturas, utilizando o filtro situation = CLOSED e limit = 1 para retornar a última fatura fechada oi x para quantas faturas desejar
> 

**GET:**/cards/v1/invoices/card-account/{uuid}

**Headers:**

- Authorization **(required)**
    - **Exemplo:** eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI2cG9MdlIzckE2aVRBMThhbE1GeGk4b0xFN0F0SWVVZG5xcFpLdlVqYlE0In0.eyJleHAiOjE2MTM2NTk1NzksImlhdCI6MTYxMzY1OTI3OSwianRpIjoiM
- Traffic-Code **(required)**
    - **Exemplo:** 136

**Path:**

- uuid **(required)** - UUID card identifier
    - **Exemplo:** b45cffe0-84dd-3d20-9928-bee85e7b0f21

**Query Params:**

- situation
    - **Exemplo:** CLOSED
- limit
    - **Exemplo:** 1

**Retornos:**

- 200 (Ok)
- 400 (Bad Request)
- 401 (Unauthorized)
- 500 (Internal Server Error)

**Exemplos de retorno:**

# 

**Retorna 200 quando é retornado as faturas**

**Body de retorno:**

```
[
  {
    "uuid": "fb4e305d-eaf2-4119-8e8d-17bfb0b0aa28",
    "situation": "OPENED",
    "paid": false,
    "dueDate": "2020-01-23",
    "realDueDate": "2020-01-25",
    "closingDate": "2020-01-20",
    "totalAmount": 2000,
    "minimumPaymentAmount": 200,
    "lineNumber": "00190500954014481606906809350314337370000000100",
    "pdfAvailable": false,
    "debitAccount": {
      "automaticDebit": false,
      "cancelled": true,
      "organization": "1120",
      "accountNumber": "123456"
    }
  }
]

```

**Retorna 400 quando ocorre um erro de envio informações inválidas**

**Body de retorno:**