> ## Documentation Index
> Fetch the complete documentation index at: https://docs.smartcomply.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Historique de crédit d'entreprise Premium

> Récupérez un rapport de crédit d'entreprise consolidé auprès des bureaux CRC et First Central.

L'endpoint Historique de crédit d'entreprise Premium agrège les données de crédit des bureaux CRC et First Central, fournissant une vue unifiée de la solvabilité d'une entreprise, notamment l'historique de prêt, les résumés de performance, les détails des dirigeants et les demandes de crédit.

## Endpoint

```
POST /api/onboarding/business/premium/
```

## Requête

### En-têtes

| En-tête          | Valeur                | Requis |
| ---------------- | --------------------- | ------ |
| `x-access-token` | Votre clé secrète API | Oui    |
| `Content-Type`   | `application/json`    | Oui    |

### Paramètres de corps

| Paramètre             | Type   | Requis | Description                                      |
| --------------------- | ------ | ------ | ------------------------------------------------ |
| `registration_number` | string | Oui    | Le numéro RC ou d'enregistrement de l'entreprise |

### Exemple

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://adhere-api.smartcomply.com/api/onboarding/business/premium/" \
    -H "x-access-token: YOUR_SECRET_KEY" \
    -H "Content-Type: application/json" \
    -d '{"registration_number": "RC123456"}'
  ```
</CodeGroup>

## Réponse

### 200 OK

Chaque champ de `data.score` est un tableau d'objets avec des clés `source` (`"CRC"` ou `"FIRST_CENTRAL"`) et `value`, fournissant des ventilations par bureau.

| Champ                         | Type   | Description                               |
| ----------------------------- | ------ | ----------------------------------------- |
| `data.name`                   | string | Nom de l'entreprise                       |
| `data.businessType`           | string | Type d'entreprise                         |
| `data.score.directors`        | array  | Dirigeants par bureau                     |
| `data.score.totalNoOfLoans`   | array  | Prêts totaux par bureau                   |
| `data.score.totalBorrowed`    | array  | Montant total emprunté par bureau         |
| `data.score.totalOutstanding` | array  | Solde impayé par bureau                   |
| `data.score.totalOverdue`     | array  | Montant en retard par bureau              |
| `data.score.loanHistory`      | array  | Historique de prêt par bureau             |
| `data.score.creditEnquiries`  | array  | Demandes de crédit par bureau             |
| `data.score.loanPerformance`  | array  | Performance des prêts par bureau          |
| `data.score.bureauStatus`     | object | Statut de succès/échec pour chaque bureau |

```json theme={null}
{
  "status": "success",
  "data": {
    "_id": "636e768d8215a2e2fb06cfde",
    "business_reg_no": "RC123456",
    "name": "CAPITALFIELD ASSET MGT LTD",
    "businessType": "SMALLANDMEDIUMSCALEENTERPRISE",
    "score": {
      "totalNoOfLoans": [
        {"source": "CRC", "value": 24},
        {"source": "FIRST_CENTRAL", "value": 9}
      ],
      "totalBorrowed": [
        {"source": "CRC", "value": 567401372},
        {"source": "FIRST_CENTRAL", "value": 1004525869.55}
      ],
      "totalNoOfDelinquentFacilities": [
        {"source": "CRC", "value": 1},
        {"source": "FIRST_CENTRAL", "value": 0}
      ],
      "bureauStatus": {
        "crc": "success",
        "firstCentral": "success"
      }
    },
    "searchedDate": "2023-11-23T16:17:36.391Z"
  },
  "message": "Premium check successful"
}
```

### 400 Bad Request

```json theme={null}
{
  "status": "failed",
  "data": [],
  "message": "Missing required fields"
}
```

### 401 Unauthorized

```json theme={null}
{
  "status": "failed",
  "message": "Authentication credentials were not provided."
}
```


## OpenAPI

````yaml POST /api/onboarding/business/premium/
openapi: 3.0.3
info:
  title: Adhere API
  description: >-
    Identity verification, credit checks, transaction monitoring, and loan fraud
    detection across Africa.
  version: 3.0.0
servers:
  - url: https://adhere-api.smartcomply.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Nigeria KYC
  - name: Kenya KYC
  - name: Ghana KYC
  - name: Rwanda KYC
  - name: Uganda KYC
  - name: Document Verification
  - name: Biometrics
  - name: Individual Credit
  - name: Business Credit
  - name: Transaction Monitoring
  - name: Transaction Screening
  - name: Transaction KYC
  - name: Loan Fraud
  - name: User Journey
paths:
  /api/onboarding/business/premium/:
    post:
      tags:
        - Business Credit
      summary: Premium Business Credit History
      operationId: premiumBusiness
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - registration_number
              properties:
                registration_number:
                  type: string
                  example: RC-123456
      responses:
        '200':
          description: Premium business credit report retrieved
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: failed
              data:
                type: array
                items: {}
              message:
                type: string
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: failed
              message:
                type: string
                example: Authentication credentials were not provided.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-access-token
      description: Your Adhere API secret key

````