openapi: 3.0.3
info:
  title: Aprovall EDGE API
  version: 1.0.0
  description: API REST pour la plateforme Aprovall - Gouvernance, gestion des risques et conformité des tiers (TPGRC)
  contact:
    name: Aprovall API Manager
    email: api@aprovall.com
servers:
  - url: https://edge.aprovall.com
    description: Production server
  - url: http://edge.test-e-attestations.com
    description: Test server
tags:
  - name: Authenticate
    description: ''
  - name: Account information
    description: Informations about your e-Attestations Account and statistics like the number of thirdparties you monitore on e-Attestations
  - name: Requirements
    description: |-
      Account's requirements are the documents you are allowed to ask to your thirdpartis in your dossiers.

      It depends on your e-Attestations configuration that you've designed with the help of you key account manager or automaticaly with your e-attestations subscription.
  - name: Thirdparties
    description: Account's thirdparties list and details.
  - name: Dossiers
    description: |-
      All account's dossiers.

      The 'dossier' resource is the materialization of the client / third party relationship.

      In the response :

      <ul>
      <li><code>monitored</code> : active / inactive dossier</li>
      <li><code>state</code> : true for an active and complete dossier</li>
      <li><code>thirdpartyState</code> : true for a registered user</li>
      <li><code>stateLastChangeDate</code> : complete / incomplete date for an active dossier (null for an inative dossier) </li>
      </ul>
  - name: Dossiers creation & Processes
    description: Dossier creation is an asynchronous process, you can find more details <a href="https://e-attestations.io/docs/t-1-create-dossier">here</a>
  - name: Dossiers updates
    description: ''
  - name: Dossier's notes
    description: Add notes on your dossier. They will be visible when you do a GET on a dossier.
  - name: Dossier's documents
    description: ''
  - name: Dossier's Evidences & Files
    description: |-
      get all evidences :
      - a form filled
      - a document fetched
      - a document uploaded

      Each evidence is a file ( binary file + informations).
  - name: Documents
    description: ''
  - name: Documents actions
    description: ''
  - name: Advanced search
    description: "## 🔍 Advanced Search Endpoints\n\nThese three endpoints (`thirdparties`, `dossiers`, and `documents` advanced-search) allow you to perform complex multi-criteria searches with flexible filtering logic.\n\n**Filter Logic:**\n\n- **Within a single criteria object:**\_All fields are combined with\_**AND**\_logic\n    \n    - A result must match ALL specified criteria\n        \n- **Between multiple criteria objects:**\_Results are combined with\_**OR**\_logic\n    \n    - A result must match ANY of the criteria objects\n        \n\n**Example:**\n\n```\n{\n  \"filter\": {\n    \"dossiers\": [\n      {\n        \"dossierType\": \"SUPPLY_CONTRACT\",\n        \"status\": \"VALID\"\n      },\n      {\n        \"dossierType\": \"PARTNERSHIP\",\n        \"status\": \"IN_PROGRESS\"\n      }\n    ]\n  }\n}\n\n ```\n\n**This searches for:**\n\n- Dossiers that are (type = SUPPLY_CONTRACT\_**AND**\_status = VALID)\n    \n- **OR**\n    \n- Dossiers that are (type = PARTNERSHIP\_**AND**\_status = IN_PROGRESS)\n    \n\nThis flexible approach allows you to build complex queries that match your specific business needs."
  - name: Errors codes
    description: |-
      Here are the HTTP Status Codes and Error Codes used by our API:

      | HTTP Status Code | Description |
      | --- | --- |
      | `200 OK` | Successful. |
      | `400 Bad Request` | In the API response, field which is missing or invalid will be emphasized. |
      | `401 Unauthorized` | The client passed in the invalid Auth token. Client should refresh the token and then try again. |
      | `403 Forbidden` | Access to this resource is forbidden in this context. |
      | `404 Not Found` | The ressource is missing. |
      | `500 Internal Server Error` | Servers are not working as expected. The request is probably valid but needs to be requested again later. |

      In case you receive a 400 ou 500 Http Status Code, you will find in the response a custom error code which give more information on the error cause:

      | **Error code** | **Error description** |
      | --- | --- |
      | E001 | Missing parameter |
      | E002 | Unknown parameter |
      | E003 | Empty parameter |
      | E010 | Wrong format |
      | E011 | Maximum size exceeded |
      | E021 | Expiration date is in the past |
      | E022 | Date in future |
      | E030 | Invalid E-mail domain |
      | E100 | No company matching your search |
      | E101 | Error qualifying the company |
      | E102 | Company does not exist |
      | E103 | Company is closed |
      | E104 | Too many companies for this criteria |
      | E105 | Company ID has change to |
      | E111 | Thirdparty code (supplierCode) is different regarding the existing one |
      | E112 | Thirdparty code (supplierCode) is already used for another thirdparty |
      | E113 | Thirdparty account disabled |
      | E122 | Impossible to import an international company. 'The international' option is not activated. |
      | E200 | No dossier matching your search |
      | E201 | Dossier disabled |
      | E202 | Reference exists for third party |
      | E203 | No dossier with this reference |
      | E204 | Dossier already enabled |
      | E205 | Dossier is reactivated with a date in the past. You should modify the date. |
      | E206 | Dossier type not found |
      | E207 | Updating documents is forbidden on a typed dossier |
      | E301 | Requirement disabled |
      | E302 | Requirement not allowed |
      | E303 | Requirement disabled from the dossier type |
      | E304 | Requirement not allowed from the dossier type |
      | E401 | Unauthorised to make request on your DnB account. |
      | E402 | You have reach the request limit of your DnB account. |
      | E1000 | Error during id encryption |
      | E1001 | Error during id decryption |
      | E1002 | SIREN or SIRET type must be used with FR countryCode |
      | E1005 | Invalid value |
      | E1006 | Service temporarily unavailable |
paths:
  /api/v1/account:
    get:
      tags:
        - Account information
      summary: Account(s)
      description: GET a request for the default account
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 119631
                    creation: '2015-04-02T10:56:07.736'
                    account: CPTDO2E2FFC774EDD6637F
                    name: Compte Test
                    company: Compte Test
                    maxDossiers: 10
                    subscriptionDate: '2019-05-24T13:01:31.514'
                    subscriptionStatus: ACTIVE
                    subscriptions:
                      - accountId: 119631
                        key: APIEDGE
                        endSubscriptionDate: null
                        startSubscriptionDate: '2019-05-24T13:01:31.514'
                        status: ACTIVE
  /api/v1/account/{account_id}:
    get:
      tags:
        - Account information
      summary: Account statistics
      description: |-
        Requests one account's detailed statistics and indicators.
        Indicator "I001" correspond to dossiers  related to undeclared work reglementation.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  accountId: 119631
                  numberOfThirdparties: 22
                  numberOfCompleteDossiers: 7
                  numberOfCompleteThirdparties: 9
                  numberOfDossiers: 41
                  numberOfSubscribedThirdparties: 14
                  listIndicatorsStatistics:
                    - indicatorCode: I001
                      numberOfDossiers: 11
                      numberOfSubscribedThirdparties: 7
                      numberOfCompleteDossiers: 5
                      numberOfCompleteThirdparties: 1
                      numberOfThirdparties: 7
  /api/v1/account/{account_id}/dossierTypes:
    get:
      tags:
        - Account information
      summary: Account dossier types list
      description: |-
        Requests one account's dossier types.

        A dossier type is a defined set of documents that you can attach to a dossier to manage your requirements more easily.

        To create and manage your dossier types, please contact your key account manager.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 1
                    code: TESTRIB
                    libelle: TEST RIB
                    requirements:
                      - documentId: 49
                        accountId: 119631
                        code: RIB_IBAN
                        name: InternationalBankAccountNumberIBAN
                        descriptionCategoryFr: COORDONNEES BANCAIRES
                        descriptionCategoryEn: BANK ACCOUNT
                        descriptionFr: Coordonnées bancaires
                        descriptionEn: International Bank Account Number (IBAN)
                  - id: 2
                    code: TEST LSE
                    libelle: TESTLSE
                    requirements:
                      - documentId: 5
                        accountId: 119631
                        code: LST_SAL_ETR
                        name: Autorisationsdetravail
                        descriptionCategoryFr: TRAVAIL DISSIMULE
                        descriptionCategoryEn: ILLEGAL WORK
                        descriptionFr: Liste nominative des salariés étrangers soumis à autorisation de travail
                        descriptionEn: List of names of posted workers subjected to work permit
  /api/v1/account/{account_id}/attributes:
    get:
      tags:
        - Account information
      summary: Account attributes
      description: |-
        Get all account attributes.

        An attribute is linked to a third party or un dossier (a set of documents)

        The **bondType** query param determine the attribute type :

        - thirdparty : for third party attributes
            
        - dossier : for dossier attributes
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: bondType
          in: query
          required: false
          description: ''
          schema:
            type: string
          example: thirdparty
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 800
                    accountId: 111
                    type: boolean
                    bondType: thirdparty
                    label: STRATEGIC
                    creationDate: '2024-02-29T14:54:09.677+00:00'
                  - id: 801
                    accountId: 111
                    type: date
                    bondType: thirdparty
                    label: CONTACT_DATE
                    creationDate: '2024-02-29T14:54:20.389+00:00'
                  - id: 884
                    accountId: 111
                    type: percentage
                    bondType: thirdparty
                    label: PERCENTAGE_ATTRIBUTE
                    creationDate: '2024-06-10T16:53:05.625+00:00'
                  - id: 912
                    accountId: 111
                    type: decimal
                    bondType: thirdparty
                    label: TURNOVER_LAST_YEAR
                    creationDate: '2024-07-31T12:37:57.565+00:00'
                  - id: 913
                    accountId: 111
                    type: list_unique
                    bondType: thirdparty
                    label: REGION
                    creationDate: '2024-07-31T12:38:29.522+00:00'
                    values:
                      - id: 2952
                        value: Option_1
                      - id: 2953
                        value: Option_2
                      - id: 2954
                        value: Option_3
                  - id: 916
                    accountId: 111
                    type: string
                    bondType: thirdparty
                    label: CATEGORY
                    creationDate: '2024-08-09T13:20:19.297+00:00'
                  - id: 921
                    accountId: 111
                    type: list_multiple
                    bondType: thirdparty
                    label: RISK
                    creationDate: '2024-09-03T07:45:52.709+00:00'
                    values:
                      - id: 2958
                        value: High
                      - id: 2959
                        value: Moderate
                      - id: 2960
                        value: Low
  /api/v1/account/{account_id}/requirements:
    get:
      tags:
        - Requirements
      summary: Requirements for the account
      description: Request account's allowed requierements which are the documents that you can use to compose dossiers.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - documentId: 1
                    accountId: 119631
                    code: ATT_VIGI
                    name: Attestationdevigilance6mois
                    descriptionCategoryFr: TRAVAIL DISSIMULE
                    descriptionCategoryEn: ILLEGAL WORK
                    descriptionFr: Attestation de vigilance (6 mois)
                    descriptionEn: Attestation de vigilance (6 mois)
                  - documentId: 5
                    accountId: 119631
                    code: LST_SAL_ETR
                    name: Autorisationsdetravail
                    descriptionCategoryFr: TRAVAIL DISSIMULE
                    descriptionCategoryEn: ILLEGAL WORK
                    descriptionFr: Liste nominative des salariés étrangers soumis à autorisation de travail
                    descriptionEn: List of names of posted workers subjected to work permit
                  - documentId: 49
                    accountId: 119631
                    code: RIB_IBAN
                    name: InternationalBankAccountNumberIBAN
                    descriptionCategoryFr: COORDONNEES BANCAIRES
                    descriptionCategoryEn: IBAN
                    descriptionFr: Coordonnées bancaires - RIB
                    descriptionEn: International Bank Account Number (IBAN)
  /api/v1/account/{account_id}/dossiers/{dossierId}/requirements:
    get:
      tags:
        - Requirements
      summary: Requirements of one dossier
      description: Request one dossier's requirements/allowed documents to use in account's dossiers
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossierId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - documentId: 105
                    accountId: 119631
                    code: I9
                    name: Certificat ISO 9001
                    nameEn: ISO 9001 certification
                    dossierId: 840158
                  - documentId: 1024
                    accountId: 119631
                    code: VT
                    name: Vincent teste
                    nameEn: Vincent teste
                    dossierId: 840158
                  - documentId: 2
                    accountId: 119631
                    code: JUSTIF_IMM
                    name: Justificatif d’immatriculation
                    nameEn: Justificatif d’immatriculation
                    dossierId: 840158
                  - documentId: 194
                    accountId: 119631
                    code: ADO
                    name: Attestation d'inscription ORIAS
                    nameEn: Attestation d'inscription ORIAS
                    dossierId: 840158
                  - documentId: 135
                    accountId: 119631
                    code: CDSCP
                    name: Contrat de sous-traitance QOVANS SERVICES
                    nameEn: Contrat de sous-traitance QOVANS SERVICES
                    dossierId: 840158
                  - documentId: 470
                    accountId: 119631
                    code: TDCDDTEMP(
                    name: Attestation CARSAT accidents du travail et maladies professionnelles (AT/MP)
                    nameEn: Attestation CARSAT accidents du travail et maladies professionnelles (AT/MP)
                    dossierId: 840158
  /api/v1/account/{account_id}/thirdparties/search:
    post:
      tags:
        - Thirdparties
      summary: Search for new thirdparty
      description: |-
        Before creating a new dossier, you have to know a third party identifier : VAT number, DUNS etc.

        This endpoint allows you to search for third party with different methods :

        <table><tbody><tr><th>Parameter</th><th>Type</th><th>Description</th></tr><tr><td><div>countryCode\\*</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>string (2-alpha code)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>ISO 3166 country code. List here : <a rel="noreferrer noopener nofollow" href="https://developers.aprovall.com/guides/dictionary/countries" target="_blank" url="https://developers.aprovall.com/guides/dictionary/countries">https://developers.aprovall.com/guides/dictionary/countries</a> Example : "FR", "US"</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>searchBy\\*</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>string</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div><p>This parameter must be one of the following values :<br></p><ul><li><p><b>NAME</b> : Search by thirdparty name</p></li><li><p><b>DUNS</b> : Dun &amp; Bradstreet identifier</p></li><li><p><b>SIRET</b> : 14 digit number referring to your business location (SIREN + 5 digits). <i>countryCode</i> must be <code>FR</code></p></li><li><p><b>SIREN</b> : unique French business identification number (9 digits). <i>countryCode</i> must be <code>FR</code></p></li><li><p><b>VAT</b> : identifier used in many countries, including the countries of the European Union.</p></li><li><p><b>LOCAL_ID</b> : local identifier for a specified country</p></li></ul></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>value\\*</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>string</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>value of the previously chosen type (<code>searchBy</code>) : DUNS, SIRET, SIREN, VAT, LOCAL_ID or NAME</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>

        In the JSON response :

        - monitored : `true` for a followed third party, which have at least one active dossier in this account
            
        - present : `true` for a third party, already followed by e-Attestations
            
        - isIdEncrypted : `true` : for a non-french third party, without providing a DUNS number. If true, the DUNS number will be encrypted
            
        - id : may be :
            
            <ul><li><div>a SIRET number for a french third party</div></li><li><div>a DUNS number (if specified) for a non-french third party,</div></li><li><div>an encrypted DUNS for a non-french third party without providing DUNS number.</div></li></ul>
            

        Possibles 400 errors :

        | **Code** | **Description** |
        | --- | --- |
        | E1002 | SIREN or SIRET type must be used with FR countryCode |
        | E1004 | Impossible to import a french third party with local ID. Use SIRET or SIREN instead |
        | E1005 | Invalid value |
        | E1006 | Service temporarily unavailable |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                - monitored: true
                  present: false
                  name: Cok Evelyn
                  addressStreet: Sint-Amandsplein 5
                  addressCity: Grimbergen (Strombeek-Bever )
                  addressPostCode: '1853'
                  headquarter: true
                  id: u486vsDrNDWh4G2TyQ5Cyw==
                  isIdEncrypted: true
                  localIdValue: '0683869999'
                  localIdType: BE_ENTERPRISE_NUMBER
                  website: null
                  isdCode: null
                  nationalPhone: '049999999999'
                  activityCode: null
                  activityLabel: null
                  source: DNB
                  thirdPartyId: 491345
                  registrationNumbers:
                    - number: '0683869999'
                      code: 800
                      libelle: Enterprise Number (BE)
                - monitored: false
                  present: false
                  name: Coca-Cola European Partners Belgium
                  addressStreet: Chaussée de Mons 1424
                  addressCity: Bruxelles
                  addressPostCode: '1070'
                  headquarter: true
                  id: QG4fRP+kZektI+VlJup5lA==
                  isIdEncrypted: true
                  localIdValue: BE0425079999
                  localIdType: BE_VAT_NUMBER
                  website: null
                  isdCode: null
                  nationalPhone: '0299999999'
                  activityCode: null
                  activityLabel: null
                  source: DNB
                  thirdPartyId: null
                  registrationNumbers:
                    - number: BE0425079999
                      code: 99
                      libelle: Value Added Tax Number (BE)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              countryCode: FR
              searchBy: VAT
              value: FR69503829368
  /api/v1/account/{account_id}/thirdparties:
    post:
      tags:
        - Thirdparties
      summary: Append a new unmanaged third party in my portfolio
      description: |-
        Import a third party manually without linking it to an external business registry such as Altares or Dun & Bradstreet (D&B).

        Only use this endpoint if the third party does not exist in Altares or DNB registries (CIT001, CIT002, CIT003).

        The body contains several attributes :

        | **Parameter** | **Mandatory** | **Type** | **Description** |
        | --- | --- | --- | --- |
        | companyIdType | yes | String | **CIT004** |
        | unmanagedSupplierInformation | yes | JSON object | third party informations |

        **unmanagedSupplierInformation** :

        | **Parameter** | **Mandatory** | **Type** | **Description** |
        | --- | --- | --- | --- |
        | name | yes | String | **CIT004** |
        | addressCity | yes | JSON object | City |
        | addressCountryCode | yes | String | ISO country code (e.g., FR, US). See all countries code here : [https://developers.aprovall.com/guides/dictionary/countries](https://developers.aprovall.com/guides/dictionary/countries) |
        | addressPostCode | yes | String | Postal/ZIP code |
        | addressStreet | yes | String | Street address |
        | capital | no | String | Share capital amount |
        | capitalCurrency | no | String | Currency code (e.g., EUR, USD). See all currencies code here : [https://developers.aprovall.com/guides/dictionary/currencies](https://developers.aprovall.com/guides/dictionary/currencies) |
        | category | no | String | Values: **PME** (Small/Medium), **ETI** (Mid-sized), **GE** (Large) |
        | companyIdValue | no | String | Company identifier (e.g., SIRET, VAT etc) |
        | etabActivityCode | yes | String | Activity code from a specific list : [https://developers.aprovall.com/guides/dictionary/activities](https://developers.aprovall.com/guides/dictionary/activities) |
        | headquarter | yes | Boolean | HQ or not |
        | legalCategoryCode | no | String | Legal form code from a specific list : [https://developers.aprovall.com/guides/dictionary/legal-categories](https://developers.aprovall.com/guides/dictionary/legal-categories) |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  authorizingRoles: []
                  thirdpartyId: 516873
                  accountId: 15601
                  companyIdType: CIT004
                  siret: null
                  localIdValue: null
                  localIdType: null
                  siren: null
                  tva: null
                  duns: null
                  dateCreation: '2026-01-29'
                  companyStartDate: null
                  followingDate: '2026-01-29'
                  legalCategoryLabel: Entrepreneur individuel
                  legalCategoryCode: '1000'
                  acronym: null
                  brandName: null
                  addressingName: null
                  activityLabel: Cash grains
                  activityCode: '011'
                  etabActivityCode: '011'
                  etabActivityType: SIC
                  etabActivityLabel: Cash grains
                  ceo: null
                  principals: []
                  capital: 1000
                  capitalCurrency: EUR
                  turnover: null
                  turnoverCurrency: null
                  lastBalanceSheetDate: null
                  workforce: null
                  companyIdValue: '123456789'
                  thirdpartyCode: null
                  monitored: false
                  onboarded: true
                  stoppingDate: null
                  stoppingReason: null
                  isMonitored: 'false'
                  name: MY THIRD PARTY
                  addressStreet: 2 rue de la Gare
                  addressCity: CLAM
                  addressPostCode: '58745'
                  addressCountryCode: FR
                  additionalAddressDetails: null
                  province: null
                  etabPhoneNumber: null
                  website: null
                  headquarter: true
                  groupCompanyName: null
                  groupSiren: null
                  groupPercentageOwnership: null
                  registered: false
                  isRegistered: 'false'
                  registrationDate: null
                  active: true
                  isActive: 'true'
                  outOfBusiness: false
                  isOutOfBusiness: 'false'
                  stateLastChangeDate: '2026-01-29'
                  complete: null
                  isComplete: n/a
                  category: PME
                  subCategory: null
                  thirdpartyAlerts: null
                  totalDossiers: 0
                  thirdpartyUsers: []
                  listRegistrationNumber: []
                  lastStateSuivi: null
                  financialHistory: null
                  hasRestrictedDisclosure: false
                  dunsEncrypted: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              companyIdType: CIT004
              unmanagedSupplierInformation:
                etabActivityCode: '011'
                addressStreet: 2 rue de la Gare
                capital: '1000'
                addressCountryCode: FR
                headquarter: true
                companyIdValue: '123456789'
                legalCategoryCode: '1000'
                addressPostCode: '58745'
                name: My third party
                category: PME
                addressCity: CLAM
                capitalCurrency: EUR
    get:
      tags:
        - Thirdparties
      summary: Search for my account thirdparties by criterias
      description: |-
        Requests thirdparties by search criteria.

        You can view multiple examples on the right and select them with the dropdown.

        The list of search criteria :

        | Parameter | Type | Description |
        | --- | --- | --- |
        | name | String | the thirdparty company name |
        | siren | String | the thirdparty company siren (french company id) |
        | siret | String | the thirdparty siret (french thirdparty id) |
        | tva | String | the thirdparty VAT number |
        | duns | String | the thirdparty DUNS number (D&B identifier) |
        | thirdpartyCode | String | the thirdparty code (supplier code defined by the client) |
        | monitored | boolean | search for thirdparties your currently monitoring Aprovall. If monitored=false, you can request for thirdparties your no longer monitoring on e-Attestations. Monitored=true for all third parties who have at least one active dossier |
        | onboarded | boolean | search for onboarded thirdparties. If onboarded=true, returns thirdparties that are currently followed. If onboarded=false, returns archived thirdparties |
        | complete | boolean | complete=true for all third parties who have complete dossiers / complete=false for all third parties who have at least one incomplete dossier |
        | registered | boolean | search for thirdparties based on their registration status on Aprovall portal |
        | isCollectiveProceeding | boolean | search for thirdparties that are in collective proceeding (redressement judiciaire, liquidation, etc.) |
        | stateLastChangeDate | String (format yyyy-MM-dd) | enable to search for third parties which state has changed since the specified date (the date must be formatted like this : '2021-06-02'). Example : one dossier has changed state to incomplete on February 1 2022, therefore stateLastChangeDate will be 2022-02-01 |
        | identityLastChangeDate | String (format yyyy-MM-dd) | enable to search for thirdparties who's identity information has change since the specified date (address, principals, ...) |
        | companyClosedDate | String (format yyyy-MM-dd) | search for thirdparties whose company has been closed since the specified date |
        | fromCreationDate | String (format yyyy-MM-dd) | search for thirdparties created (followed) since the specified date |
        | attributeLabel | String | the label of a custom attribute to filter on (must be used with attributeValue or fromAttributeChangeDate) |
        | attributeValue | String | the value of the custom attribute to filter on (must be used with attributeLabel) |
        | fromAttributeChangeDate | String (format yyyy-MM-dd) | search for thirdparties whose custom attribute value has changed since the specified date |
        | eventNames | List | Filter third parties that have specific events in their history. You can specify one or more event types separated by commas. See available event types here : [https://developers.aprovall.com/guides/dictionary/events](https://developers.aprovall.com/guides/dictionary/events) |
        | eventOccurrenceStartDate | String (format yyyy-MM-dd'T'HH:mm:ss) | start date for event occurrence filter (must be used with eventNames and eventOccurrenceEndDate) |
        | eventOccurrenceEndDate | String (format yyyy-MM-dd'T'HH:mm:ss) | end date for event occurrence filter (must be used with eventNames and eventOccurrenceStartDate) |
        | page | Integer | the page number for pagination (default: 0) |
        | pageSize | Integer | the number of results per page |
        | insee | boolean | this parameter is not a search criteria but enable to get complementary information for french thirdparties, like insee code. All INSEE informations will be present in the insee section of the JSON response |
        | finess | boolean | this parameter is not a search criteria but enable to get complementary information for a FINESS (Fichier national des établissements sanitaires et sociaux) third party. All FINESS informations will be present in the finess section of the JSON response |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - thirdpartyId: 1185
                    companyIdType: CIT001
                    companyIdValue: '49384180300999'
                    thirdpartyCode: '20192511'
                    siren: '493841999'
                    siret: '49384180300999'
                    tva: FR92493841803
                    name: COMPANY NAME
                    dateCreation: '2010-11-26'
                    companyStartDate: '2006-11-20'
                    legalCategoryLabel: SASU Société par actions simplifiée à associé unique
                    legalCategoryCode: '5720'
                    acronym: null
                    activityLabel: Conseil pour les affaires et autres conseils de gestion
                    activityCode: 7022Z
                    etabActivityCode: 7022Z
                    etabActivityType: CODE_APE
                    etabActivityLabel: Conseil pour les affaires et autres conseils de gestion
                    ceo: DUPONT Jean
                    principals:
                      - name: Dupont
                        firstname: Jean
                        function: Président
                    capital: 5000
                    capitalCurrency: EUR
                    turnover: 128204
                    turnoverCurrency: EUR
                    lastBalanceSheetDate: '2012-12-31'
                    workforce: 0
                    addressStreet: 6 ALLEE DE LA GARE
                    addressCity: PARIS
                    addressPostCode: '75001'
                    addressCountryCode: FR
                    etabPhoneNumber: null
                    website: null
                    category: PME
                    subCategory: MICRO
                    headquarter: true
                    groupCompanyName: null
                    groupSiren: null
                    groupPercentageOwnership: null
                    listRegistrationNumber: []
                  - thirdpartyId: 1186
                    companyIdType: CIT001
                    companyIdValue: '49384180300998'
                    thirdpartyCode: '20192511'
                    siren: '493841998'
                    siret: '49384180300998'
                    tva: FR92493841803
                    name: COMPANY NAME 2
                    dateCreation: '2010-11-26'
                    companyStartDate: '2006-11-20'
                    legalCategoryLabel: SASU Société par actions simplifiée à associé unique
                    legalCategoryCode: '5720'
                    acronym: null
                    activityLabel: Conseil pour les affaires et autres conseils de gestion
                    activityCode: 7022Z
                    etabActivityCode: 7022Z
                    etabActivityType: CODE_APE
                    etabActivityLabel: Conseil pour les affaires et autres conseils de gestion
                    ceo: DUPONT Jean
                    principals:
                      - name: Dupont
                        firstname: Jean
                        function: Président
                    capital: 5000
                    capitalCurrency: EUR
                    turnover: 128204
                    turnoverCurrency: EUR
                    lastBalanceSheetDate: '2012-12-31'
                    workforce: 0
                    addressStreet: 6 ALLEE DE LA GARE 2
                    addressCity: PARIS
                    addressPostCode: '75002'
                    addressCountryCode: FR
                    etabPhoneNumber: null
                    website: null
                    category: PME
                    subCategory: MICRO
                    headquarter: true
                    groupCompanyName: null
                    groupSiren: null
                    groupPercentageOwnership: null
                    listRegistrationNumber: []
                page: 0
                size: 10
                totalElements: 50
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}:
    put:
      tags:
        - Thirdparties
      summary: Update a thirdparty code
      description: |-
        Modify a thirdparty code ( or supplier code)

        This code must be unique

        Possible 400 errors :

        | **Code** | **Description** |
        | --- | --- |
        | E001 | Missing parameter supplierCode |
        | E011 | Maximum size exceeded |
        | E112 | Thirdparty code (supplierCode) is already used for another thirdparty |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              supplierCode: NEW_SUPPLIER_CODE_1
    get:
      tags:
        - Thirdparties
      summary: Account thirdparthy details
      description: |-
        Request one thirdparty details by the given id

        You can specify the page size et page number with the following parameters.

        <table>
        <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        </tr>
        <td>insee</td>
        <td>boolean</td>
        <td>this parameter is not a search criteria but enable to get complementary information for french thirdparties, like insee code. All INSEE informations will be present in the <code>insee</code> section of the JSON response</td>
        </tr>
        <tr>
        <td>finess</td>
        <td>boolean</td>
        <td>this parameter is not a search criteria but enable to get complementary information for a FINESS (Fichier national des établissements sanitaires et sociaux) third party. All FINESS informations will be present in the <code>finess</code> section of the JSON response
        </td>
        </tr>
        </table>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  thirdpartyId: 875
                  accountId: 119631
                  companyIdType: CIT001
                  siret: '50382936800045'
                  siren: '503829368'
                  tva: FR69503829368
                  dateCreation: '2010-11-24'
                  legalCategoryLabel: Société par actions simplifiée
                  legalCategoryCode: '5710'
                  acronym: null
                  activityLabel: Edition de logiciels applicatifs
                  activityCode: 5829C
                  ceo: null
                  capital: 545444
                  capitalCurrency: EUR
                  turnover: 4891866
                  turnoverCurrency: EUR
                  lastBalanceSheetDate: '2019-12-31T01:00:00.000'
                  workforce: 18
                  companyIdValue: '50382936800045'
                  thirdpartyCode: '123'
                  monitored: true
                  isMonitored: 'true'
                  name: E-ATTESTATIONS.COM
                  addressStreet: 2 RUE DU CHEMIN DES FEMMES
                  addressCity: MASSY
                  addressPostCode: '91300'
                  addressCountryCode: FR
                  registered: true
                  isRegistered: 'true'
                  registrationDate: '2010-11-24'
                  active: true
                  isActive: 'true'
                  outOfBusiness: false
                  isOutOfBusiness: 'false'
                  stateLastChangeDate: '2021-05-11'
                  complete: false
                  isComplete: 'false'
                  category: PME
                  subCategory: PE
                  thirdpartyUsers:
                    - userId: 3241
                      firstName: Test
                      lastName: Test
                      email: test@e-attestations.com
                      phone: +33 1 00 00 00 00
                      accountId: 875
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/attributes:
    post:
      tags:
        - Thirdparties
      summary: Add or update a thirdparty attribute
      description: |-
        Add or update a thirdparty attribute.

        - label : attribute name, you can find this name by using the following endpoint : **Account attributes**
            
        - values : an array of values, multiples values can be added a **list_multiple** attribute type
            

        Il you want to set an empty value, you can set the following value : "values":\[null\]

        Possible 400 errors codes :

        | **Code** | **Description** |
        | --- | --- |
        | E001 | Missing parameter |
        | E011 | For non multiple attribute, juste one value must be present in the values array |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              label: 4. Purchase Annual Amount
              values:
                - +5K€
    get:
      tags:
        - Thirdparties
      summary: Account thirdparthy attributes
      description: Get all attributes for a specifc thirdparty
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 6896
                    attributeId: 784
                    label: 4. Purchase Annual Amount
                    type: list_unique
                    bondType: thirdparty
                    creationDate: '2024-10-10T09:00:46.469+00:00'
                    updateDate: null
                    values:
                      - +5K€
                  - id: 6898
                    attributeId: 911
                    label: Attribut_numérique_1
                    type: decimal
                    bondType: thirdparty
                    creationDate: '2024-10-10T09:00:55.361+00:00'
                    updateDate: null
                    values:
                      - '12'
                  - id: 6588
                    attributeId: 800
                    label: BOOLEEN
                    type: boolean
                    bondType: thirdparty
                    creationDate: '2024-02-29T15:26:51.503+00:00'
                    updateDate: '2024-10-10T09:00:59.467+00:00'
                    values:
                      - 'true'
                  - id: 6899
                    attributeId: 801
                    label: DATE
                    type: date
                    bondType: thirdparty
                    creationDate: '2024-10-10T09:01:09.347+00:00'
                    updateDate: null
                    values:
                      - '2024-10-11'
                  - id: null
                    attributeId: 916
                    label: Text attribute
                    type: string
                    bondType: thirdparty
                    creationDate: null
                    updateDate: null
                    values:
                      - Text attribute value
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/contacts:
    post:
      tags:
        - Thirdparties
      summary: Add un new thirdparty contact
      description: |-
        Invite a new contact for a specific third party

        **lang** parameter can take the following values :

        - en : english
            
        - fr : french
            
        - es : spanish
            
        - de : german
            
        - it : italian
            
        - pt : portuguese
            
        - nl : dutch
            

        An invitation email will be send in this lang

        Possible 400 errors

        | **Code** | **Description** |
        | --- | --- |
        | E1005 | Invalid value (Invalid email address) |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              email: email@domain.com
              lang: en
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/stop:
    post:
      tags:
        - Thirdparties
      summary: Archive a third party
      description: |-
        Archive a new third party in my porffolio

        The body contains several attributes :

        | **Parameter** | **Mandatory** | **Type** | **Description** |
        | --- | --- | --- | --- |
        | deactivationReason | no | String | Reason for third-party deactivation |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  authorizingRoles: []
                  thirdpartyId: 875
                  accountId: 15601
                  companyIdType: CIT001
                  siret: '50382936800052'
                  siren: '503829368'
                  tva: FR69503829368
                  duns: '260004250'
                  dateCreation: '2010-11-24'
                  companyStartDate: '2008-04-07'
                  followingDate: '2012-12-27'
                  legalCategoryLabel: Société par actions simplifiée
                  legalCategoryCode: '5710'
                  acronym: null
                  brandName: null
                  addressingName: E-ATTESTATIONS.COM CERTICORPS
                  activityLabel: Edition de logiciels applicatifs
                  activityCode: 5829C
                  etabActivityCode: 5829C
                  etabActivityType: CODE_APE
                  etabActivityLabel: Edition de logiciels applicatifs
                  ceo: null
                  principals:
                    - name: Dupont
                      firstname: Philippe
                      function: Directeur général
                      companyName: null
                  capital: 111
                  capitalCurrency: EUR
                  turnover: 1111111
                  turnoverCurrency: EUR
                  lastBalanceSheetDate: '2022-12-31T01:00:00.000'
                  workforce: 24
                  companyIdValue: '50382936800052'
                  thirdpartyCode: tp code example
                  monitored: true
                  onboarded: true
                  stoppingDate: '2023-06-27'
                  stoppingReason: null
                  isMonitored: 'true'
                  name: E-ATTESTATIONS.COM
                  addressStreet: 27 AVENUE CARNOT
                  addressCity: MASSY
                  addressPostCode: '91300'
                  addressCountryCode: FR
                  etabPhoneNumber: '0158060010'
                  website: null
                  headquarter: true
                  groupCompanyName: null
                  groupSiren: null
                  groupPercentageOwnership: null
                  registered: true
                  isRegistered: 'true'
                  registrationDate: '2010-11-24'
                  active: true
                  isActive: 'true'
                  outOfBusiness: false
                  isOutOfBusiness: 'false'
                  stateLastChangeDate: '2023-10-30'
                  complete: false
                  isComplete: 'false'
                  category: PME
                  subCategory: PE
                  thirdpartyAlerts: NEANT
                  totalDossiers: 18
                  thirdpartyUsers:
                    - userId: 981739
                      firstName: Jean
                      lastName: DUPONT
                      email: j.dupont@email.com
                      phone: +33 6 11 11 11 11
                      accountId: 875
                  listRegistrationNumber: []
                  lastStateSuivi: null
                  dunsEncrypted: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              deactivationReason: we no longer work with this thirdparty
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/calculated-attributes:
    get:
      tags:
        - Thirdparties
      summary: Account thirdparthy calculated attributes
      description: |-
        Get all calculted attributes for a specific thirdparty.

        Response details :

        - name : attribute name
            
        - resultType : result type of the attribute :
            
            - STRING : for a text value
                
            - ARITHMETIC_FORMULA_OUTPUT : for a double value
                
        - resultValue : attribute value, depending of the type ( text or double)
            
        - resultColorCode: hexa code color displayed in the SAAS application for this attribute
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 111
                    calculationId: null
                    name: text attribute
                    resultType: STRING
                    resultValue: France
                    resultColorCode: '#9900ef'
                    resultLastUpdateDate: '2024-05-15T16:05:57.187+00:00'
                  - id: 222
                    calculationId: null
                    name: numeric label
                    resultType: ARITHMETIC_FORMULA_OUTPUT
                    resultValue: '4.5'
                    resultColorCode: ''
                    resultLastUpdateDate: '2024-07-23T10:22:33.969+00:00'
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/indicators:
    get:
      tags:
        - Thirdparties
      summary: Account thirdparthy indicators
      description: |-
        Get all indicators for a specific thirdparty.

        Response details :

        - name : indicator name
            
        - resultType : result type of the indicator :
            
            - STRING : for a text value
                
            - ARITHMETIC_FORMULA_OUTPUT : for a double value
                
        - resultValue : indicator value, depending of the type ( text or double)
            
        - resultColorCode: hexa code color displayed in the SAAS application for this indicator
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 12
                    calculationId: null
                    name: Indued_ACT
                    resultType: STRING
                    resultValue: MEDIUM
                    resultColorCode: '#fcb900'
                    resultLastUpdateDate: '2024-04-27T22:06:13.936+00:00'
                  - id: 23
                    calculationId: null
                    name: RISK_CYBER
                    resultType: STRING
                    resultValue: DEFAVORABLE
                    resultColorCode: '#eb144c'
                    resultLastUpdateDate: '2023-12-11T13:43:54.794+00:00'
                  - id: 313
                    calculationId: null
                    name: TEST_INDICATOR
                    resultType: STRING
                    resultValue: Default
                    resultColorCode: ''
                    resultLastUpdateDate: '2024-03-22T08:09:33.603+00:00'
                  - id: 131
                    calculationId: null
                    name: SIS-ID
                    resultType: STRING
                    resultValue: OK
                    resultColorCode: '#00d084'
                    resultLastUpdateDate: '2024-10-01T07:01:04.602+00:00'
                  - id: 2423
                    calculationId: null
                    name: ARITHMETIC INDICATOR
                    resultType: ARITHMETIC_FORMULA_OUTPUT
                    resultValue: '12345'
                    resultColorCode: ''
                    resultLastUpdateDate: '2024-07-26T15:54:50.188+00:00'
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/scores:
    get:
      tags:
        - Thirdparties
      summary: Account thirdparthy scores
      description: 'Get all scores from external sources : DNB, Ecovadis, Transparency etc.'
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  datablocks_financial_strength:
                    scoreDate: '2024-07-03'
                    score: '1'
                    isFailureScore: false
                    rating: HH1
                    financialStrength: HH
                    riskLevel: very_low
                    riskSegmentDescription: Minimum Risk - Proceed with transaction – offer extended terms if required
                    riskSegmentDescriptionFr: Risque minimum - Poursuivre la transaction - proposer des conditions prolongées si nécessaire
                    financialStrengthDescription: This entity has minimal Capital (Under 12K€).
                    financialStrengthDescriptionFr: Ce tiers dispose d'un capital minimal (moins de 12K€).
                    dnbAssessment:
                      failureScore:
                        classScore: null
                        classScoreDescription: null
                        scoreDate: '2024-07-03'
                        scoreModel:
                          description: FR43077
                          dnbCode: null
                        nationalPercentile: null
                        scoreOverrideReasons: null
                        rawScore: null
                        riskIncidencePercentage: null
                        scoreCommentary: null
                      delinquencyScore:
                        classScore: null
                        classScoreDescription: null
                        scoreDate: null
                        scoreModel: null
                        nationalPercentile: null
                        scoreOverrideReasons: null
                        rawScore: null
                        riskIncidencePercentage: null
                        scoreCommentary: null
                      historyRating:
                        description: null
                        dnbCode: null
                      standardRating:
                        rating: HH1
                        scoreDate: '2024-07-03'
                        financialStrength: HH
                        riskSegment: '1'
                        ratingOverrideReasons: null
                        ratingReason: null
                      nordicAAARating:
                        rating: null
                        scoreDate: null
                        financialStrength: null
                        riskSegment: null
                      financialCondition:
                        description: null
                        dnbCode: null
                      creditLimitRecommendation: null
                      emergingMarketMediationScore: null
                      hasSevereNegativeEvents: null
                  transparency:
                    - cpiYear: 2019
                      countryIso2: FR
                      countryIso3: FRA
                      countryScore: 69
                      countryRank: 23
                      cpiNumberOfSources: 8
                      cpiStandardError: 2
                      countryScorePrecedentVar: -3
                      countryRankPrecedentVar: 2
                      countryNosPrecedentVar: 0
                      color: '#E99D20'
                      intervalEnumName: SIXTY_TO_SIXTY_NINE
                    - cpiYear: 2020
                      countryIso2: FR
                      countryIso3: FRA
                      countryScore: 69
                      countryRank: 23
                      cpiNumberOfSources: 8
                      cpiStandardError: 1
                      countryScorePrecedentVar: 0
                      countryRankPrecedentVar: 0
                      countryNosPrecedentVar: 0
                      color: '#E99D20'
                      intervalEnumName: SIXTY_TO_SIXTY_NINE
                    - cpiYear: 2021
                      countryIso2: FR
                      countryIso3: FRA
                      countryScore: 71
                      countryRank: 22
                      cpiNumberOfSources: 8
                      cpiStandardError: 1
                      countryScorePrecedentVar: 2
                      countryRankPrecedentVar: -1
                      countryNosPrecedentVar: 0
                      color: '#EEB805'
                      intervalEnumName: SEVENTY_TO_SEVENTY_NINE
                    - cpiYear: 2022
                      countryIso2: FR
                      countryIso3: FRA
                      countryScore: 72
                      countryRank: 21
                      cpiNumberOfSources: 8
                      cpiStandardError: 0
                      countryScorePrecedentVar: 1
                      countryRankPrecedentVar: -1
                      countryNosPrecedentVar: 0
                      color: '#EEB805'
                      intervalEnumName: SEVENTY_TO_SEVENTY_NINE
                    - cpiYear: 2023
                      countryIso2: FR
                      countryIso3: FRA
                      countryScore: 71
                      countryRank: 0
                      cpiNumberOfSources: 0
                      cpiStandardError: 0
                      countryScorePrecedentVar: 0
                      countryRankPrecedentVar: 0
                      countryNosPrecedentVar: 0
                      color: '#EEB805'
                      intervalEnumName: SEVENTY_TO_SEVENTY_NINE
                  indued:
                    due_diligence_id: '111'
                    due_diligence:
                      status: fpm_done
                      fpm_url: https://api-indued.altares.com/v3/entities/...
                      compliance_score: 5
                      country_score: 1
                      activity_score: 2
                      state: active
                      pep_score: 1
                      sanctions_score: 1
                      adverse_media_score: 1
                      risk_event_score: 1
                      report_url: https://api-indued.altares.com/api/v3/reports/...
                      risk_level: 2
                      workflow_status: null
                      failure_score: null
                    report_id: '111'
                    report_data:
                      status: succeeded
                      url: https://api-indued.altares.com/api/v3/...
                    created_date: '2024-10-09T19:30:10.871+00:00'
                    last_modified_date: '2024-10-09T19:30:10.871+00:00'
  /api/v1/account/{account_id}/legalstatus:
    get:
      tags:
        - Thirdparties
      summary: Account thirdparties legal informations
      description: |-
        Get all legal informations about followed third parties : address modification, judicial liquidation...

        <table>
        <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        </tr>
        <td>fromDate</td>
        <td>YYYY-MM-DD</td>
        <td>all legal informations from this specified date</td>
        </tr>
        </table>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: fromDate
          in: query
          required: false
          description: ''
          schema:
            type: string
          example: '2020-01-01'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - content:
                      Raison Sociale: COMPANY NAME FRANCE
                      Siren: '014725836'
                      Évenement: Information légale - Changement d'adresse
                      Date de parution: 29/03/2020
                      Annonce: N° Annonce XXXX, N° Bodacc XX, N° Parution XXXXXXX
                      Tribunal: XXXX TRIBUNAL DE COMMERCE DE LYON 69
                      Descriptif: 'Nouveau siège. Mise en activité de la société. Origine : Fonds reçu en location gérance.'
                    category: Modifications
                  - content:
                      Raison Sociale: COMPANY NAME FRANCE
                      Siren: '014725836'
                      Évenement: Information légale - Location gérance reçue d'un fonds de commerce
                      Date de parution: 29/03/2020
                      Annonce: N° Annonce XXXX, N° Bodacc XX, N° Parution XXXXXXX
                      Tribunal: PERPIC TRIBUNAL DE COMMERCE DE PERPIGNAN 66
                      Descriptif: 'Mise en activité de la société. Origine : Fonds reçu en location gérance.'
                    category: Modifications
                  - content:
                      Raison Sociale: COMPANY NAME IMMOBILIER
                      Siren: '014725836'
                      Évenement: Information légale - Nomination / modification sur les commissaires aux comptes
                      Date de parution: 29/03/2020
                      Annonce: N° Annonce XXXX, N° Bodacc XX, N° Parution XXXXXXX
                      Tribunal: XXXXX TRIBUNAL DE COMMERCE DE VERSAILLES 78
                      Descriptif: Modification survenue sur l'administration.
                    category: Modifications
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/history:
    get:
      tags:
        - Thirdparties
      summary: Account thirdparties location history
      description: Get the history of this thirdparty's locations
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - etablissementId: 360621
                    thirdpartyId: 875
                    identifiant: '50382936800045'
                    tpStartDate: '2017-06-07T02:00:00'
                    tpClosingDate: null
                    addressStreet: 2 RUE DU CHEMIN DES FEMMES
                    addressCity: MASSY
                    addressPostCode: '91300'
                    addressCountryCode: FR
                    active: true
                  - etablissementId: 684534
                    thirdpartyId: 875
                    identifiant: '50382936800052'
                    tpStartDate: '2021-10-01T02:00:00'
                    tpClosingDate: null
                    addressStreet: 27 AVENUE CARNOT
                    addressCity: MASSY
                    addressPostCode: '91300'
                    addressCountryCode: FR
                    active: true
                  - etablissementId: 930
                    thirdpartyId: 875
                    identifiant: '50382936800037'
                    tpStartDate: '2010-06-24T02:00:00'
                    tpClosingDate: '2017-06-07T02:00:00'
                    addressStreet: VILLA DE LOURCINE
                    addressCity: PARIS 14E ARRONDISSEMENT
                    addressPostCode: '75014'
                    addressCountryCode: FR
                    active: false
  /api/v1/account/{account_id}/dossiers/all:
    get:
      tags:
        - Dossiers
      summary: Dossiers ALL
      description: Requests all dossiers at once (not paginated)
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - dossierId: 1433524
                    accountId: 119631
                    siren: '542107800'
                    siret: '54210780003943'
                    tva: FR72542107800
                    thirdpartyId: 320479
                    companyIdType: CIT001
                    companyIdValue: '54210780003943'
                    thirdpartyCode: '9833'
                    thirdpartyState: true
                    thirdpartyName: E-ATTESTATIONS.COM
                    thirdpartyActivityCode: 5829C
                    thirdpartyActivityLabel: Edition de logiciels applicatifs
                    thirdpartyAlerts: NEANT
                    companyCountryCode: FR
                    monitored: false
                    isMonitored: 'false'
                    dossierReference: TEST
                    description: description_1433524
                    purchasingCategory: ttttt
                    creationDate: '2018-07-16T11:04:59.756'
                    startingDate: null
                    expirationDate: null
                    stoppingDate: '2020-03-17T10:55:42.411'
                    stoppingReason: ACTION_VOLONTAIRE
                    state: null
                    isComplete: 'true'
                    stateLastChangeDate: null
                    notes:
                      - dateCreation: '2018-09-18T14:41:33.193+00:00'
                        prenomNom: Jean Dupont
                        userOid: 14785
                        contenu: this is a note
                      - dateCreation: '2018-09-18T14:43:56.742+00:00'
                        prenomNom: Jean Dupont
                        userOid: 14785
                        contenu: This is a second note
                    indicators:
                      - indicatorCode: I001
                        state: true
                        isComplete: 'true'
                        lastChangeDate: '2020-03-17T10:47:37.585'
                    documents: []
                    statusCode: VALID
                  - dossierId: 1504311
                    accountId: 119631
                    siren: '480470152'
                    siret: '48047015200012'
                    tva: FR71480470152
                    thirdpartyId: 86049
                    companyIdType: CIT001
                    companyIdValue: '48047015200012'
                    thirdpartyCode: null
                    companyCountryCode: FR
                    thirdpartyState: true
                    thirdpartyName: GOOGLE
                    thirdpartyActivityCode: 5829C
                    thirdpartyActivityLabel: Edition de logiciels applicatifs
                    thirdpartyAlerts: NEANT
                    monitored: true
                    isMonitored: 'true'
                    dossierReference: '-'
                    description: ''
                    purchasingCategory: ''
                    creationDate: '2018-07-16T11:04:59.756'
                    startingDate: null
                    expirationDate: null
                    stoppingDate: null
                    stoppingReason: NA
                    state: true
                    isComplete: 'true'
                    stateLastChangeDate: '2021-05-26T13:58:04.688'
                    notes: []
                    indicators:
                      - indicatorCode: I001
                        state: true
                        isComplete: 'true'
                        lastChangeDate: '2021-05-26T13:58:04.688'
                    documents:
                      - documentId: 11675833
                        dossierId: 1504311
                        documentCode: RIB_IBAN
                        documentName: Coordonnées bancaires - RIB
                        documentNameEn: International Bank Account Number (IBAN)
                        requestDate: '2021-05-26T13:58:05.312'
                        present: true
                        isPresent: 'true'
                        evidences:
                          - id: 2704163
                            responseId: 2238768
                            uploadDate: '2017-04-25T10:45:16.537'
                            fileUUID: a3218884b699c5074ce07e111c6eb43ddb3ddcf2
                            fileName: file:/data/CCDocs/50382936800045/20190306-110611_50382936800045_NDA_e-attestations.com.pdf
                            fileCreation: '2017-04-25T10:45:16.520'
                            fileSize: 25999
                            expirationDate: '2022-04-25T23:59:59.999'
                            formdata:
                              - type: iban
                                key: f_49_bn_0
                                title: IBAN
                                order: 0
                                value: FR76 XXXX XXXX XXXX XXXX XXXX XXX
                            format: ORIGINALNUMERIQUE
                            issuer: DO
                            transmitter: FOURNISSEUR
                            metadata:
                              bank_data_country_iso: FR
                              bank_data_bank: STE GENERALE
                              sepa_data_cor1: 'NO'
                              verified: 'true'
                              sepa_data_sct: 'YES'
                              bank_data_country: ''
                              bank_data_address: 28 R DES ARTS
                              bank_data_account: XXXXXXXXX
                              bank_data_phone: ''
                              bank_data_zip: XXXXX
                              bank_data_city: LILLE
                              bank_data_bic: XXXXXX
                              bank_data_fax: ''
                              sepa_data_b2b: 'YES'
                              bank_data_www: ''
                              sepa_data_scc: 'YES'
                              sepa_data_sdd: 'YES'
                              date_verification: 25/04/2017
                              bank_data_email: ''
                    statusCode: VALID
  /api/v1/account/{account_id}/dossiers:
    get:
      tags:
        - Dossiers
      summary: Dossiers by criterias
      description: |-
        Requests dossiers by search criterias.

        The list of search criterias :

        <table><tbody><tr><th>Parameter</th><th>Type</th><th>Description</th></tr><tr><td><div>siren</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>third party company siren (french company id)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>siret</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>third party siret (third party SIRET number)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>tva</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>third party intra-Community VAT number</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>duns</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Dun &amp; Bradstreet DUNS number</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>stateLastChangeDate</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String (format : YYYY-MM-DD)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>enable to search for dossiers which <b>state</b> has changed since the specified date (the date must be formatted like this : '2021-06-02'). ( state incomplete to complete for example)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>state</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>boolean</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>true : search for <b>active</b> and <b>complete</b> dossiers., or false for <b>incomplete</b> or inative <b>dossier</b></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>monitored</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>boolean</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>get all <b>active</b> dossiers (complete or incomplete)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>thirdpartyId</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Integer</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>technical third party ID</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>thirdpartyCode</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>third party code : defined during dossier creation or update</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>documentCode</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Find all dossiers including a document (search by document <b>code</b> (to find it, use this endpoint <code>Requirements Requirements for the account</code></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>dossierTypeCode</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>If you have enable dossier types on your account, you can search by the code of the dossier type</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>fromUploadedDate</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String (format : YYYY-MM-DD)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>find all dossiers which a document has been uploaded greater than or equal to this date. Example : find all dossiers including an IBAN document (documentCode=RIB_IBAN) , uploaded today (fromUploadedDate=2021-01-01)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>dossierReference</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>dossier reference : defined during dossier creation or update</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>op</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>string</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Possible values : 'like', 'ends' or 'starts'.<br>This parameter works with these parameters : thirdpartyCode and/or dossierReference.<br>For example : ?thirdpartyCode="OOG"&amp;op=like returns all dossiers with thirdpartyCode = "GOOGLE"</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>pageSize</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>integer</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>the number of results returned by the request (default is 10)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div>page</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>integer</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>parameter to specify the number of the page you want to access (default is 0)</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><code>eventNames</code></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>array of strings</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Filter dossiers that have specific events in their history. You can specify one or more event types separated by commas. See available event types here : <a rel="noreferrer noopener nofollow" href="https://developers.aprovall.com/guides/dictionary/events" target="_blank" url="https://developers.aprovall.com/guides/dictionary/events">https://developers.aprovall.com/guides/dictionary/events</a></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><code>eventOccurrenceStartDate</code></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>array of strings</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>Start date for filtering events. Format: <code>yyyy-MM-dd'T'HH:mm:ss</code> (e.g., "2024-01-01T00:00:00")</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr><tr><td><div><code>eventOccurrenceEndDate</code></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>array of strings</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>End date for filtering events. Format: <code>yyyy-MM-dd'T'HH:mm:ss</code> (e.g., "2024-12-31T23:59:59")</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>

        Example :

        ` ``/dossiers? `**`stateLastChangeDate=`**`2021-05-01&`**`monitored=`**`true&`**`siren=`**`493841803&`**`thirdpartyCode=`**`2019&`**`op=`**` starts`` `

        This request returns :

        <ul><li><div>all active dossiers of the third party with SIREN = 493841803</div></li><li><div>with a change since May 1, 2021</div></li><li><div>with a third party code that starts with "2019"</div></li></ul>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: monitored
          in: query
          required: false
          description: ''
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - dossierId: 1331486
                    accountId: 119631
                    siren: '753368935'
                    siret: '75336893500015'
                    tva: FR27753368935
                    thirdpartyId: 177931
                    companyIdType: CIT001
                    companyIdValue: '75336893500015'
                    thirdpartyCode: FO1001
                    thirdpartyState: true
                    thirdpartyName: TAXY COMPANY NAME
                    thirdpartyActivityCode: 5829C
                    thirdpartyActivityLabel: Edition de logiciels applicatifs
                    thirdpartyAlerts: NEANT
                    companyCountryCode: FR
                    monitored: false
                    isMonitored: 'false'
                    dossierReference: TESTAPI1.1
                    description: description_1331486
                    purchasingCategory: Taxi
                    creationDate: '2018-07-16T11:04:59.756'
                    startingDate: null
                    expirationDate: '2021-12-31T00:00:00.000'
                    stoppingDate: '2019-11-28T09:24:24.914'
                    stoppingReason: ACTION_VOLONTAIRE
                    state: null
                    isComplete: 'false'
                    stateLastChangeDate: null
                    notes: []
                    indicators:
                      - indicatorCode: I001
                        state: true
                        isComplete: 'true'
                        lastChangeDate: '2019-11-26T15:43:40.118'
                    documents: []
                    statusCode: VALID
                  - dossierId: 1331488
                    accountId: 119631
                    siren: '753368935'
                    siret: '75336893500015'
                    tva: FR27753368935
                    thirdpartyId: 177931
                    companyIdType: CIT001
                    companyIdValue: '75336893500015'
                    thirdpartyCode: FO1001
                    thirdpartyState: true
                    thirdpartyName: TAXY COMPANY NAME
                    thirdpartyActivityCode: 5829C
                    thirdpartyActivityLabel: Edition de logiciels applicatifs
                    thirdpartyAlerts: NEANT
                    companyCountryCode: FR
                    monitored: false
                    isMonitored: 'false'
                    dossierReference: TESTAPI1.1002
                    description: description_1331488
                    purchasingCategory: Ambulance
                    creationDate: '2018-07-16T11:04:59.756'
                    startingDate: null
                    expirationDate: '2021-12-31T00:00:00.000'
                    stoppingDate: '2019-11-28T09:24:34.377'
                    stoppingReason: ACTION_VOLONTAIRE
                    state: null
                    isComplete: 'false'
                    stateLastChangeDate: null
                    notes: []
                    indicators:
                      - indicatorCode: I001
                        state: true
                        isComplete: 'true'
                        lastChangeDate: '2019-11-26T15:45:34.130'
                    documents: []
                    statusCode: VALID
                page: 0
                size: 10
                totalElements: 1
    post:
      tags:
        - Dossiers creation & Processes
      summary: Deprecated - Create new dossier with third party identifier (async)
      description: |-
        Creates a new dossier with a lot of requirement and details.

        This is an **asynchronous** process, so this request return a **processId**. With this ID, you can check the state of the dossier creation with another endpoint ( see "Dossier creation : state" )

        With this Postman collection, **we automatically** set the processId variable, so that you can directly call "Dossier creation : get process by id" endpoint (you do not have to copy/paste the processId )

        You can use some or all of the attributes depending of your needs and your use cases.

        We have a new attribute `dossierTypeCode`: you can specify dossier types by contacting your key account manager. This new feature allows to preconfigure a defined set of requirement, to simplify the dossier configuration.

        The body contains several attributes :

        | Parameter | **Type** | **Description** |
        | --- | --- | --- |
        | companyIdType\* | String | Three possible values :  <br>  <br>\- CIT001  <br>_for a SIRET number (french companies), composed of 14 numbers. Ex : 50382936800045_  <br>  <br>\- CIT002  <br>_for an intra-community VAT number, composed of two letters (country code), followed by numbers. Ex : FR69503829368_  <br>  <br>\- CIT003  <br>_for a DUNS number, composed of 9 numbers. Ex : 260004250. Or you can use an encrypted DUNS, found by using the_ `_Thirdparties Search for new thirdparty_` _endpoint_ |
        | companyIdValue\* | String | SIRET, TVA or DUNS value |
        | companyIdEncrypted\* | Boolean | `true` for encrypted DUNS, fetched with `Thirdparties Search for new thirdparty` endpoint. This parameter is optional and is `false` by default. If you know the DUNS number, skip this parameter. `companyIdType` must be `CIT003` |
        | thirdpartyCode\* | String | A reference code from an external system or database. If a third party code already exists (set in another dossier), let this field empty |
        | dossierReference\* | String | A dossier that identifies this dossier and that could come from an external system or database for instance |
        | description | String | A free text field for description, or any other use |
        | purchasingCategory | String | Another free text field for dossiers category, or any other use |
        | expirationDate | YYYY-MM-DD | If given this date will be the end of this dossier. The third party won't be monitored with this dossier after this date |
        | requiredDocuments | String\[\] | This array sets the required documents for this third party managed with this dossier.  <br>Each item in the list is a document **code** (to find it, use this endpoint `Requirements Requirements for the account` |
        | dossierTypeCode | String | If you have enable dossier types on your account, you can specify a dossier type when you create your dossier |
        | thirdpartyEmail | String\[\] | third party email addresses. Persons will receive an email. |
        | usersInCharge | String\[\] | A list of emails of users from your organisation that will receive ownership for this dossier management. Will invite them or send an email. |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  processId: 8af2b3c479d77a840179e5a7468401da
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              companyIdType: CIT001
              companyIdValue: '43258335900109'
              thirdpartyCode: TEST3
              dossierReference: TEST#3
              description: Dossier
              purchasingCategory: Dog
              expirationDate: '2020-05-31'
              requiredDocuments:
                - JUSTIF_IMM
              thirdpartyEmail:
                - nobody@e-attestations.com
              userInCharge:
                - nobody@e-attestations.com
  /api/v1/account/{account_id}/dossiers/{dossier_id}:
    get:
      tags:
        - Dossiers
      summary: Dossier details
      description: Requests one dossier details by its id
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  dossierId: 1433524
                  accountId: 119631
                  siren: '542107800'
                  siret: '54210780003943'
                  tva: FR72542107800
                  thirdpartyId: 320479
                  companyIdType: CIT001
                  companyIdValue: '54210780003943'
                  thirdpartyCode: '9833'
                  thirdpartyState: true
                  thirdpartyName: TAXY COMPANY NAME
                  thirdpartyActivityCode: 5829C
                  thirdpartyActivityLabel: Edition de logiciels applicatifs
                  thirdpartyAlerts: NEANT
                  companyCountryCode: FR
                  monitored: false
                  isMonitored: 'false'
                  dossierReference: TEST
                  description: description_1433524
                  purchasingCategory: ttttt
                  creationDate: '2018-07-16T11:04:59.756'
                  startingDate: null
                  expirationDate: null
                  stoppingDate: '2020-03-17T10:55:42.411'
                  stoppingReason: ACTION_VOLONTAIRE
                  state: null
                  isComplete: 'true'
                  stateLastChangeDate: null
                  notes: []
                  indicators:
                    - indicatorCode: I001
                      state: true
                      isComplete: 'true'
                      lastChangeDate: '2020-03-17T10:47:37.585'
                  documents: []
                  statusCode: VALID
    post:
      tags:
        - Dossiers updates
      summary: Update details of one dossier
      description: |-
        Update active dossier informations.

        The body may contains these attributes to update :

        | Parameter | Type | Description |
        | --- | --- | --- |
        | dossierReference | String | A dossier that identifies this dossier and that could come from an external system or database for instance |
        | description | String | A free text field for description, or any other use |
        | purchasingCategory | String | Another free text field for dossiers category, or any other use |
        | expirationDate | YYYY-MM-DD | If given this date will be the end of this dossier. The third party won't be monitored with this dossier after this date |
        | thirdpartyCode | String | A reference code from an external system or database. If a value is present, the third party code will be updated for all dossiers (concerning this third party) |
        | thirdpartyEmail | String\[\] | third party email addresses. Persons will receive an email. |

        List of possible 400 errors :

        | **Error code** | **Error description** |
        | --- | --- |
        | E001 | Missing parameter |
        | E002 | Unknown parameter |
        | E003 | Empty parameter |
        | E010 | Wrong format |
        | E021 | Expiration date is in the past |
        | E022 | Date in future |
        | E030 | Invalid E-mail domain |
        | E111 | Thirdparty code (supplierCode) is different regarding the existing one |
        | E112 | Thirdparty code (supplierCode) is already used for another thirdparty |
        | E201 | Dossier disabled |
        | E202 | Reference exists for third party |
        | E206 | Dossier type not found |
        | E207 | Updating documents is forbidden on a typed dossier |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              dossierReference: EC7BJC6030/5920015318-NEW
              description: NEW DESCRIPTION 1
              purchasingCategory: NEW PURCHASSING CATEGORY 1
              expirationDate: '2025-03-15'
              thirdpartyCode: '2133'
              thirdpartyEmail:
                - nobody@e-attestations.com
  /api/v1/account/{account_id}/dossiers/{dossier_id}/attributes:
    get:
      tags:
        - Dossiers
      summary: Dossier attributes
      description: Get all dossiers attributes
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 6900
                    attributeId: 157
                    label: multiple liste label
                    type: list_multiple
                    bondType: dossier
                    creationDate: '2024-10-10T09:17:05.467+00:00'
                    updateDate: null
                    values:
                      - aaa
                  - id: 6901
                    attributeId: 903
                    label: Test FLO
                    type: integer
                    bondType: dossier
                    creationDate: '2024-10-10T09:17:20.713+00:00'
                    updateDate: null
                    values:
                      - '10'
                  - id: 6902
                    attributeId: 96
                    label: Region
                    type: list_multiple
                    bondType: dossier
                    creationDate: '2024-10-10T09:18:22.678+00:00'
                    updateDate: null
                    values:
                      - Ain
                  - id: 6903
                    attributeId: 915
                    label: Responsable de dossier
                    type: string
                    bondType: dossier
                    creationDate: '2024-10-10T09:18:35.387+00:00'
                    updateDate: null
                    values:
                      - text attribute
    post:
      tags:
        - Dossiers updates
      summary: Add or update a dossier attribute
      description: |-
        Add or update a dossier attribute.

        - label : attribute name, you can find this name by using the following endpoint : **Account attributes**
            
        - values : an array of values, multiples values can be added a **list_multiple** attribute type
            

        Il you want to set an empty value, you can set the following value : "values":\[null\]

        Possible 400 errors codes :

        | **Code** | **Description** |
        | --- | --- |
        | E001 | Missing parameter |
        | E011 | For non multiple attribute, juste one value must be present in the values array |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              label: Supplier Due Diligence Procedure Workflow
              values:
                - 'yes'
  /api/v1/account/{account_id}/thirdparties/{thirdparty_id}/dossiers:
    post:
      tags:
        - Dossiers creation & Processes
      summary: Create new dossier (sync)
      description: |-
        Creates a new dossier with details for an existing third party

        This is an **synchronous** process

        You can use some or all of the attributes depending of your needs and your use cases.

        We have a new attribute `dossierTypeCode`: you can specify dossier types by contacting your key account manager. This new feature allows to preconfigure a defined set of requirement, to simplify the dossier configuration.

        The body contains several attributes :

        | Parameter | **Type** | **Description** |
        | --- | --- | --- |
        | thirdpartyCode\* | String | A reference code from an external system or database. If a third party code already exists (set in another dossier), let this field empty |
        | dossierReference\* | String | A dossier that identifies this dossier and that could come from an external system or database for instance |
        | description | String | A free text field for description, or any other use |
        | purchasingCategory | String | Another free text field for dossiers category, or any other use |
        | expirationDate | YYYY-MM-DD | If given this date will be the end of this dossier. The third party won't be monitored with this dossier after this date |
        | requiredDocuments | String\[\] | This array sets the required documents for this third party managed with this dossier.  <br>Each item in the list is a document **code** (to find it, use this endpoint `Requirements Requirements for the account` |
        | dossierTypeCode | String | If you have enable dossier types on your account, you can specify a dossier type when you create your dossier. List of all dossier types list available by calling this endpoint  <br>`Account dossier types list` |
        | thirdpartyEmail | String\[\] | third party email addresses. Persons will receive an email. |
        | usersInCharge | String\[\] | A list of emails of users from your organisation that will receive ownership for this dossier management. Will invite them or send an email. |

        List of possible errors :

        | **Error code** | **Error description** |
        | --- | --- |
        | E001 | Missing parameter |
        | E002 | Unknown parameter |
        | E003 | Empty parameter |
        | E010 | Wrong format |
        | E021 | Expiration date is in the past |
        | E022 | Date in future |
        | E030 | Invalid E-mail domain |
        | E101 | Error qualifying the company |
        | E102 | Company does not exist |
        | E103 | Company is closed |
        | E105 | Company ID has change to |
        | E111 | Thirdparty code (supplierCode) is different regarding the existing one |
        | E112 | Thirdparty code (supplierCode) is already used for another thirdparty |
        | E113 | Thirdparty account disabled |
        | E122 | Impossible to import an international company. 'The international' option is not activated. |
        | E201 | Dossier disabled |
        | E202 | Reference exists for third party |
        | E204 | Dossier already enabled |
        | E206 | Dossier type not found |
        | E207 | Updating documents is forbidden on a typed dossier |
        | E301 | Requirement disabled |
        | E302 | Requirement not allowed |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: thirdparty_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  processId: 8af2b3c479d77a840179e5a7468401da
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              thirdpartyCode: TEST4
              dossierReference: TEST#4
              description: Optional description
              thirdpartyEmail:
                - nobody@e-attestations.com
              dossierTypeCode: TRAVDISS
  /api/v1/account/{account_id}/dossiers/process/8af2b4a592fc4d0701930b248bc20000:
    get:
      tags:
        - Dossiers creation & Processes
      summary: 'Dossier creation : get process by id'
      description: |-
        Get dossier creation result for a given id.

        When the dossier creation is completed (complete=true in the response) :

        <ul><li><div>dossier successfully created (sucess=true in the response). You can find the dossier ID in the response : <code>"dossierId": 123456789</code></div></li><li><div>dossier not created : at least one error has occured during the creation (errors in the response). You can find the list in the <b>Error codes</b> section</div></li><li><div>complete : true if the dossier is created</div></li><li><div>success : true if the dossier is created without errors</div></li></ul>

        List of possible errors :

        | **Error code** | **Error description** |
        | --- | --- |
        | E001 | Missing parameter |
        | E002 | Unknown parameter |
        | E003 | Empty parameter |
        | E010 | Wrong format |
        | E021 | Expiration date is in the past |
        | E022 | Date in future |
        | E030 | Invalid E-mail domain |
        | E101 | Error qualifying the company |
        | E102 | Company does not exist |
        | E103 | Company is closed |
        | E105 | Company ID has change to |
        | E111 | Thirdparty code (supplierCode) is different regarding the existing one |
        | E112 | Thirdparty code (supplierCode) is already used for another thirdparty |
        | E113 | Thirdparty account disabled |
        | E122 | Impossible to import an international company. 'The international' option is not activated. |
        | E201 | Dossier disabled |
        | E202 | Reference exists for third party |
        | E204 | Dossier already enabled |
        | E206 | Dossier type not found |
        | E207 | Updating documents is forbidden on a typed dossier |
        | E301 | Requirement disabled |
        | E302 | Requirement not allowed |
        | E1002 | SIREN or SIRET type must be used with FR countryCode |
        | E1003 | Impossible to import a french third party with a VAT number. Use SIRET or SIREN instead |
        | E1004 | Impossible to import a french third party with local ID. Use SIRET or SIREN instead |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  processId: 4028818379e5c78b0179e606c12b0001
                  creation: '2021-06-07T10:31:12.895+00:00'
                  complete: true
                  success: true
                  isComplete: 'true'
                  isSuccessful: 'true'
                  dossierId: 123456789
                  errors: []
                  params:
                    requiredDocuments: null
                    companyIDValue: ESA79973681
                    companyIDType: CIT002
                    purchasingCategory: null
                    userInCharge: null
                    supplierCode: null
                    supplierEmail: null
                    expirationDate: null
                    description: null
                    dossierReference: az2
  /api/v1/account/{account_id}/dossiers/processes:
    get:
      tags:
        - Dossiers creation & Processes
      summary: 'Dossier creation : get processes'
      description: |-
        Get all dossier creation results (called processes)

        By default, we fetch all processes from today's date.

        <table>
        <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        </tr>
        <tr>
        <td>fromDate</td>
        <td>YYYY-MM-DD</td>
        <td>get all processes from this specified date</td>
        </tr>
        </table>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - processId: 8af2b3c479d77a840179e5a7468401da
                    creation: '2021-06-07T08:46:55.619+00:00'
                    complete: true
                    success: false
                    isComplete: 'true'
                    isSuccessful: 'false'
                    dossierId: 123456789
                    errors:
                      - code: E202
                        message: Reference exists for third party (TEST#7)
                        request: null
                        reason: null
                    params:
                      requiredDocuments: null
                      companyIDValue: '49384180300056'
                      companyIDType: CIT001
                      purchasingCategory: null
                      userInCharge: null
                      supplierCode: null
                      supplierEmail: null
                      expirationDate: null
                      description: null
                      dossierReference: TEST#7
                  - processId: 8af2b416790d53c201790d57eee50000
                    creation: '2021-04-26T08:42:17.099+00:00'
                    complete: true
                    success: true
                    isComplete: 'true'
                    isSuccessful: 'true'
                    errors: []
                    params:
                      requiredDocuments: null
                      companyIDValue: RS100870578
                      companyIDType: CIT002
                      purchasingCategory: null
                      userInCharge: null
                      supplierCode: null
                      supplierEmail: null
                      expirationDate: null
                      description: null
                      dossierReference: TEST#7
  /api/v1/account/{account_id}/dossiers/{dossier_id}/stop:
    post:
      tags:
        - Dossiers updates
      summary: Stop one dossier
      description: |-
        Stop one dossier

        The body may contains one attribute : 

        <table>
        <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        </tr>
        <td>deactivationReason</td>
        <td>string</td>
        <td>Reason for the stopped file</td>
        </tr>
        </table>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              example:
                error:
                  - code: NOT_FOUND
                    message: The resource does not exist. Please check you search criteria and values.
                    request: 'ServletWebRequest: uri=/api/v1/account/15601/dossiers/444444;client=10.114.1.144;user=aaa@e-attestations.com'
                    reason: accountId-15601dossierId-444444
  /api/v1/account/{account_id}/dossiers/{dossier_id}/reactivate:
    post:
      tags:
        - Dossiers updates
      summary: Activate one dossier
      description: |-
        Activate a stopped dossier

        The body may contains one attribute : 

        <table>
        <tr>
        <th>Parameter</th>
        <th>Type</th>
        <th>Description</th>
        </tr>
        <td>expirationDate</td>
        <td>YYYY-MM-DD</td>
        <td>A new expiration date, may be null</td>
        </tr>
        </table>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example: {}
  /api/v1/account/{account_id}/dossiers/{dossier_id}/requirements:
    post:
      tags:
        - Dossiers updates
      summary: Update requirements of one dossier
      description: |-
        Update requirements of one dossier

        The body contains one attribute :

        <table><tbody><tr><td><div>requiredDocuments</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>String[]</div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td><td><div>This array sets the new required documents for this third party managed with this dossier.<br>Each item in the list is a document <b>code</b> (to find it, use this endpoint <code>Requirements Requirements for the account</code></div><div contenteditable="false"><div><div><div></div></div></div><div></div></div></td></tr></tbody></table>

        Possible 400 errors :

        | **Code** | **Description** |
        | --- | --- |
        | E002 | Unknown requirement |
        | E201 | Dossier disabled |
        | E207 | Updating documents is forbidden on a typed dossier |
        | E003 | Empty parameter |
        | E301 | Requirement disabled |
        | E302 | Requirement not allowed |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example: {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              newRequiredDocuments:
                - JUSTIF_IMM
  /api/v1/account/{account_id}/dossiers/{dossier_id}/note:
    post:
      tags:
        - Dossier's notes
      summary: Create a note
      description: Add a note on a dossier. The content must be a string. This note will be bvisible when you get a dossier, with information like the creation date and the creator's name.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  dateCreation: '2024-10-10T09:42:03.213+00:00'
                  prenomNom: Jean Dupont
                  userOid: 1111
                  contenu: Test note 1
                  noteOId: 1006
                  dateUpdate: null
                  listMentionedUsers: null
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              content: Test note 1
  /api/v1/account/{account_id}/dossiers/{dossier_id}/note/{note_id}:
    delete:
      tags:
        - Dossier's notes
      summary: Delete a note by id
      description: Delete a note by id
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
        - name: note_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              newRequiredDocuments:
                - JUSTIF_IMM
  /api/v1/account/{account_id}/dossiers/{dossier_id}/documents:
    get:
      tags:
        - Dossier's documents
      summary: Documents
      description: |-
        GET dossier documents by its id for a specific account.

        Each document can be a file uploaded, a form filled by a third party or the depositor may have refuse to submit a document (boolean hasRefusedToFile = true).

        Some information is added in the response when a document has been completed by a third party :

        <ul><li><p><code>present: true</code></p></li><li><p><b>evidences</b> array is composed of informations about the form filled or file uploaded : uploaded date, file size, form datas...</p></li></ul>

        First example : two required document files (one is present, the other not)

        Second axample : a completed form ( with all form datas in the `evidences` section in the response
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - documentId: 11078435
                    dossierId: 1324073
                    documentCode: LST_SAL_ETR
                    documentName: Liste nominative des salariés étrangers soumis à autorisation de travail
                    documentNameEn: List of names of posted workers subjected to work permit
                    requestDate: '2020-02-12T18:07:56.974'
                    present: true
                    isPresent: 'true'
                    statusCode: VALID
                    evidences:
                      - id: 6876412
                        responseId: 2238768
                        uploadDate: '2020-10-29T11:55:46.367'
                        fileUUID: a4d8acd5-8254-477c-9019-fa85aef8d224
                        fileName: filename.pdf
                        fileCreation: '2020-10-29T11:55:46.345'
                        fileSize: 128790
                        expirationDate: '2021-04-29T23:59:59.999'
                        formdata: []
                        format: ORIGINALNUMERIQUE
                        issuer: DO
                        transmitter: FOURNISSEUR
                        metadata: {}
                  - documentId: 11031065
                    dossierId: 1324073
                    documentCode: FAP2
                    documentName: Formulaire administratif PLURIAL 2020
                    documentNameEn: Formulaire administratif PLURIAL 2020
                    requestDate: '2020-02-06T10:08:46.996'
                    present: false
                    isPresent: 'false'
                    evidences: []
  /api/v1/account/{account_id}/dossiers/{dossier_id}/documents/{document_id}:
    get:
      tags:
        - Dossier's documents
      summary: Document refused
      description: |-
        GET one dossier's document details by its id

        Retrieves details of a **rejected** document by its ID.

        Each document can be a file uploaded or a form filled by a third party.

        Some information is added in the response when a document has been completed by a third party :

        <ul><li><div><code>present: true</code></div></li><li><div><b>historicEvidences</b> array is composed of informations about the form filled or file uploaded : uploaded date, file size, form datas...</div></li></ul>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
        - name: document_id
          in: path
          required: true
          schema:
            type: integer
        - name: withHistoric
          in: query
          required: false
          description: ''
          schema:
            type: boolean
          example: 'true'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - authorizingRoles: []
                    documentId: 12344775
                    dossierId: 1591140
                    documentCode: CBT
                    typeDocumentId: 1473
                    documentName: Test Doc name
                    documentNameEn: null
                    requestDate: '2025-09-16T16:27:41.345'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    historicEvidences:
                      - id: 8104569
                        responseId: 8338400
                        uploadDate: '2025-09-16T16:29:09.003'
                        fileUUID: d93cd201-440c-4ec5-84e1-5774c0234975
                        fileName: xxx.pdf
                        fileCreation: '2025-09-16T16:29:08.970'
                        fileSize: 8624
                        validityStartDate: null
                        expirationDate: '2025-12-22T14:17:13.791'
                        format: NA
                        issuer: FOURNISSEUR
                        transmitter: FOURNISSEUR
                        specificData: null
                        metadata:
                          ai_result: 'false'
                          from_external_portal: 'false'
                          depositor: Florian Peuteuil
                          smart_check_fail: 'false'
                          code_securite_hand_written: 'false'
                        formdata:
                          - type: checkbox
                            key: f_1473_vc_0
                            title: |+
                              Avec quelles équipes travailles tu ?

                            fieldId: 791d4116-4228-4755-91fc-e15d77a660da
                            order: 0
                            hasPriority: false
                            value: Team Produit
                          - type: unknown
                            key: f_1473_frf_3
                            title: |
                              Forfait annul est de :
                            fieldId: e9f5b567-8d33-4862-8785-78e00b1f60c1
                            order: 3
                            hasPriority: false
                            value: 5000 EUR - Euro
                          - type: unknown
                            key: f_1473_ql_4
                            title: |
                              Quel sport préfères tu vraiment ?
                            fieldId: b81cbc1d-99e8-42da-b699-8cf46f6a5254
                            order: 4
                            hasPriority: false
                            value: Aprovall Padel Club
                          - type: string
                            key: f_1473_cmm_5
                            title: |+
                              Comment s'appelle ton collègue ?

                            fieldId: 0a0cfc9b-6762-4369-8950-88d60e95463a
                            order: 5
                            hasPriority: false
                            value: Elodie
                          - type: email
                            key: f_1473_ql_6
                            title: |+
                              Quel est ton email ?

                            fieldId: 644bf080-9519-4352-97f6-f9abba4311ac
                            order: 6
                            hasPriority: false
                            value: bbb@aprovall.com
                          - type: email
                            key: f_1473_qll_7
                            title: |
                              Quelle est l'adresse email de votre RSSI ? 
                            fieldId: b4d11bfa-044c-463a-a9d8-5526bb34d83d
                            order: 7
                            hasPriority: false
                            value: aaa@aprovall.com
                          - type: checkbox
                            key: f_1473_qll_8
                            title: |
                              Quelles sont les actions que vous menez en matière d'éthique ? 
                            fieldId: 93e96e87-e758-425e-be12-375e79c532ca
                            order: 8
                            hasPriority: false
                            value: Equité
                          - type: checkbox
                            key: f_1473_qls_9
                            title: |
                              quels sont vos certif ?
                            fieldId: 8d5041c5-6edd-4921-9edd-0ffe87754915
                            order: 9
                            hasPriority: false
                            value: A
                        acquisition: null
                        smartControlActivated: false
                        smartControlV2: false
                        enableBelowExpectationStatus: false
                        hasRefusedToFile: false
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
  /api/v1/account/{account_id}/dossiers/{dossier_id}/documents/{document_id}/files:
    get:
      tags:
        - Dossier's Evidences & Files
      summary: Evidences
      description: |-
        GET one dossier's document evidence ( file or form filled) by its id

        This endpoint return all datas from completed form or uploaded files
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
        - name: document_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - id: 6876412
                    responseId: 2238768
                    uploadDate: '2020-10-29T11:55:46.367'
                    fileUUID: a4d8acd5-8254-477c-9019-fa85aef8d224
                    fileCreation: '2020-10-29T11:55:46.345'
                    fileSize: 128790
                    expirationDate: '2021-04-29T23:59:59.999'
                    formdata: []
                    format: ORIGINALNUMERIQUE
                    issuer: DO
                    transmitter: FOURNISSEUR
                    metadata: {}
  /api/v1/account/{account_id}/dossiers/{dossier_id}/documents/{document_id}/files/{file_id}:
    get:
      tags:
        - Dossier's Evidences & Files
      summary: File download (binary format)
      description: |-
        GET one file content from the given dossierId, documentId and fileId

        The content is a PDF file to download. With Postman you can see the content.

        For a form filled, e-Attestations produces a PDF with all third party's responses

        You can see the document directly in Postman :

        <a href="https://e-attestations.io/img/postman_file_upload.png">
        <img src="https://e-attestations.io/img/postman_file_upload.png" />
        </a>
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
        - name: document_id
          in: path
          required: true
          schema:
            type: integer
        - name: file_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
  /api/v1/account/{account_id}/dossiers/{dossier_id}/documents/{document_id}/files/{file_id}/link:
    get:
      tags:
        - Dossier's Evidences & Files
      summary: File download Copy (auto signed URL)
      description: Generate an auto signed URL for downloading the evidence file
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
        - name: document_id
          in: path
          required: true
          schema:
            type: integer
        - name: file_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content: https://AUTO_SIGNED_URL.COM
  /api/v1/account/{account_id}/dossiers/{dossier_id}/files/download:
    get:
      tags:
        - Dossier's Evidences & Files
      summary: File download all files for this dossier
      description: |-
        GET all files for a dossier.

        The content is an url to download a zip file containing the files.
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: dossier_id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              example:
                content: '"https://ea-test-application-data.s3.eu-west-1.amazonaws.com/35586982-6fcc-4cf6-8cb6-dd436ffd5cdb.zip?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEMH%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCWV1LXdlc3QtMSJGMEQCIExUp1KIjm0Tji%2Fjbn32I7nSds3T%2FfxGQHxGGZHKFHfkAiAbPBZfxwUrGCw%2Bo7FivAIMfG0ZP5NGxQRwvdK3ITHDPSrzAwhKEAIaDDA4ODc4MjM5MjQ4MSIMGmy74eqYfQgclpJCKtADz7v9Hfn1V8PXPjDRkSfH1emXo6WHa7WPa5c1sB%2Bi49YqY2sPb0EEUZFXZ7%2BLimiY7pJJAzMznee7z6VH2uCdOCjdoKm9%2FSHdu8yps4WFk7XiA1HIfeEReZ%2B43a2yA%2FdxNB9Fdhl5A%2Fq4jx2udkwwPt58gwfzl3ilkQTgVwml6JGVWwfPotB0g18p3vdr3Sz%2FYEY%2Ba52A2EvjucMZ3hpr8l26wOaKhdFqXSjf5HKafKL9DasYNWkTKw3SZIW1fjgqa13Sa%2FBpCemsGEzkqqa08nWvf1%2BVkT281gxd5wfxpUu5i4a0FuOZ3lFmCh%2FT4I1B5oTfZqzeeD5nP6NS9hMeFcDzSi3hBZsLEhhRcppSLK4R%2Fge4g7qqdCG8ptVXonu0jh%2BxtGUeg8h2R3A7YIrWD1lRSt4pVEPFS6uNd%2FGzbcWar51wtiTc4QgXqM5gIxYbZO7%2F85ASzSdlE6vQpPWkgfBCL%2BqTrBxkw%2BeQhu%2Frkgy6BJOTr5RMMWc%2BNr%2BchEFNVAvXI4y7TGiS9UbWIuVqXQjWka1GjMcl3pW5TLXqbQ9i9xqj52s1MMCUPTiVqyxDXQBpJ8SkPbQdTSC%2F2AIRVKrgisUqs1RkOfTunJV%2BH%2BAww5PtkQY6pgFpaBWquCwVMFdgpR28WVcLSBQC%2FDXtFRNxlVTHRGijy%2BmJJNHv5JDNmQ2FMPeMfl7yOCHVvy9jZHfWM0kVSCpqQja3RTkxHfTNqBqKItQdtApsro81pKQ%2FTv0vYzF%2FZ7NS83cjjFxLRfCYB0N2Im5Be%2BUKYxOoVBp%2Fhs9asAb%2B6kXr00FPvQKRokLgI3ZNYu59GK8dIGUg4qaOULeVoKFNTy7VgLOG&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220323T164931Z&X-Amz-SignedHeaders=host&X-Amz-Expires=600&X-Amz-Credential=ASIARJK6XZSQWCWT3QMV%2F20220323%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Signature=974ec0f7ab1c8e9eccc044e5fdd725ab02eaa8e86549cd9af0209f7c5447c7fa"'
  /api/v1/account/{account_id}/documents/search:
    get:
      tags:
        - Documents
      summary: Get documents informations
      description: |-
        **Search for documents by criteria and events**

        Search for documents by criteria and events.

        This endpoint allows you to retrieve a filtered list of documents based on various criteria including third party, dossier, document code, and event history.

        It provides a global search across all documents in your account, without requiring you to navigate through individual dossiers. The response contains document information with detailed evidence data.

        The result is paginated with 10 entries per page by default.

        | Parameter | Type | Required | Description |
        | --- | --- | --- | --- |
        | `thirdPartyId` | integer | No | Filter documents by third party identifier |
        | `dossierId` | integer | No | Filter documents by dossier identifier |
        | `documentCode` | string | No | Filter documents by document code (e.g., "KBIS", "RC_PRO").  <br>List of codes available with this endpoint :  <br>**Requirements for the account** |
        | `page` | integer | No | The number of the page you want to access (default is 0) |
        | `pageSize` | integer | No | The number of results returned per page (default is 10) |
        | `eventNames` | array of strings | No | Filter documents that have specific events in their history. You can specify one or more event types separated by commas. See available event types here : [https://developers.aprovall.com/guides/dictionary/events](https://developers.aprovall.com/guides/dictionary/events) |
        | `eventOccurrenceStartDate` | datetime (ISO-8601) | No | Start date for filtering events. Format: `yyyy-MM-dd'T'HH:mm:ss` (e.g., "2024-01-01T00:00:00") |
        | `eventOccurrenceEndDate` | datetime (ISO-8601) | No | End date for filtering events. Format: `yyyy-MM-dd'T'HH:mm:ss` (e.g., "2024-12-31T23:59:59") |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '0'
        - name: pageSize
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '10'
        - name: documentCode
          in: query
          required: false
          description: ''
          schema:
            type: string
          example: RIB_IBAN
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - authorizingRoles: []
                    documentId: 12171882
                    dossierId: 1500943
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-10-21T09:03:38.882'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: MISSING
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169533
                    dossierId: 1578488
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:56:55.506'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169535
                    dossierId: 1578573
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:57:06.898'
                    requestEndDate: '2025-08-15T22:00:15.391'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 11727976
                    dossierId: 1510900
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2021-08-03T11:53:14.330'
                    requestEndDate: '2021-11-16T10:01:15.022'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: MISSING
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169538
                    dossierId: 1575716
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:57:21.768'
                    requestEndDate: '2025-03-04T15:55:42.054'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: ACTION_REQUIRED
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169537
                    dossierId: 1523631
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:57:16.481'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169526
                    dossierId: 1541475
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:56:06.761'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169530
                    dossierId: 1532067
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:56:38.702'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169540
                    dossierId: 1534888
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:57:31.690'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                  - authorizingRoles: []
                    documentId: 12169527
                    dossierId: 1542728
                    documentCode: RIB_IBAN
                    typeDocumentId: 49
                    documentName: Coordonnées bancaires
                    documentNameEn: International Bank Account Number (IBAN)
                    requestDate: '2024-09-23T15:56:15.807'
                    present: false
                    hasRefusedToFile: false
                    isPresent: 'false'
                    depositor: null
                    evidences: []
                    statusCode: NOT_VALID
                    smartControlActivated: false
                    smartControlV2: false
                    acquisition: null
                page: 0
                size: 10
                totalElements: 83
  /api/v1/account/{account_id}/responses/{responseId}/approve:
    post:
      tags:
        - Documents actions
      summary: Approve a document
      description: |-
        If the document status is "action required", you can approve it with an optional reason.

        URL parameter : **responseId** is present in the **evidences** JSON part

        | **Parameter** | **Mandatory** | **Type** | **Description** |
        | --- | --- | --- | --- |
        | comment | no | String | optional reason |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: responseId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              comment: OK
  /api/v1/account/{account_id}/responses/{responseId}/reject:
    post:
      tags:
        - Documents actions
      summary: Refuse a document
      description: |-
        If the document status is "action required", you can refuse it with an optional reason.

        URL parameter : **responseId** is present in the **evidences** JSON part

        | **Parameter** | **Mandatory** | **Type** | **Description** |
        | --- | --- | --- | --- |
        | comment | no | String | optional reason |
        | shareRejectionReason | yes | Boolean | If set to true, the third party will be notified by email of the document rejection. |
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: responseId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              comment: KO
  /api/v1/account/{account_id}/thirdparties/advanced-search:
    post:
      tags:
        - Advanced search
      summary: Third parties
      description: |-
        Paginated and filtered search of third parties for an account with filters on countries, custom attributes, indicators, and scores. Allows retrieval of detailed information including rating data (ESG scores, financial, security, etc.) and business attributes.

        **Endpoint**: POST /api/v1/account/{accountId}/thirdparties/advanced-search

        ---

        ## Parameters

        ### Path Parameters

        **accountId** (Long, required) - Unique identifier of the prime contractor account

        ### Query Parameters

        **page** (int, optional, default: 0) - Page number (starts at 0)

        **rowPerPage** (int, optional, default: 50) - Number of results per page

        **onboarded** (Boolean, optional) - Filter on onboarded third parties (true) or archived (false)

        ---

        ## Request Body

        ### Main Structure

        **filters** (Object, required) - Object containing filtering criteria

        **filters.thirdparties** (Array, required) - List of third party search filters

        ---

        ### Available Filters in thirdparties\[\]

        ### 🔍 Identification

        **name** (String) - Third party name (partial search, case-insensitive)

        **code** (String) - Custom third party code

        **companyIdType** (String) - Company identifier type. Possible values:

        - "CIT001" : Identifier (SIREN or SIRET)
            
        - "CIT002" : VAT number
            
        - "CIT003" : DUNS
            

        **identifier** (String) - Company identifier value (used with companyIdType)

        ---

        ### 🌍 Geography and Activity

        **countries** (Array) - List of ISO Alpha-2 country codes ("FR", "DE", "IT", etc.)

        **departments** (Array) - French department codes ("75", "92", "2A", "2B", etc.)

        **majorActivities** (Array) - Main activity sector codes (major APE codes)

        ---

        ### 📊 Status and Qualification

        **contacts** (Array) - ⚠️ WARNING: Despite its name, this parameter filters on the third party's registration status. Possible values (lowercase):

        - "subscribed" : Registered third party
            
        - "invited" : Invited third party
            
        - "not_invited" : Not invited third party
            

        **complete** (Boolean) - Third party with complete data

        - true : Third party in COMPLET state
            
        - false : Third party in INCOMPLET or SANS_CONTRAT_EN_COURS state
            

        **unmanaged** (Boolean) - Filter on data origin

        - true : Unmanaged third parties (origin UNMANAGED)
            
        - false : Managed third parties (origin DNB or ALTARES)
            

        ---

        ### 🏷️ Business Attributes and Indicators

        **attributes** (Map>) - Filters on custom attributes

        - Key: Attribute name (label)
            
        - Value: List of accepted values (OR operator between values)
            

        **calculatedAttributes** (Map>) - Filters on calculated attributes

        - Key: Calculated attribute name
            
        - Value: List of values
            

        **indicators** (Map>) - Filters on calculated indicators

        - Key: Indicator name
            
        - Value: List of values or ranges (e.g., \["0-50", "51-100"\])
            

        ---

        ### ⭐ Scores and Ratings

        **scores** (Object, optional) - Filters on rating scores

        #### Transparency Scores

        **transparency** (Array) - Transparency level by country

        - Values: "HIGH", "MEDIUM", "LOW", "NP" (not published)
            

        #### Financial Scores

        **financialStrengthScore** (Array) - Financial risk segment

        - Values: "LOW_RISK", "MEDIUM_RISK", "HIGH_RISK"
            

        **financialStrengthRating** (Array) - Financial rating (e.g., \["N1", "N2"\])

        #### ESG Scores (Environment, Social, Governance)

        **esgScore** (Array) - Overall ESG scores (0-100)

        **esgDepth** (Array) - ESG data depth

        - Values: "A", "B", "C", "D"
            

        **esgRiskEnvironment** (Array) - Environmental risk score (0-100)

        **esgRiskSocial** (Array) - Social risk score (0-100)

        **esgRiskGovernance** (Array) - Governance risk score (0-100)

        #### Other Scores

        **indued** (Map>) - Indued scores (due diligence)

        - Key: Indued score identifier
            
        - Value: List of severities
            

        **ecovadis** (Map>) - EcoVadis scores (CSR)

        - Key: EcoVadis score identifier
            
        - Value: List of performances
            

        **securityRating** (Map>) - Cybersecurity scores

        - Key: Score identifier
            
        - Value: List of values
            

        **creditsafe** (Map>) - Creditsafe scores (credit)

        - Key: Creditsafe score identifier
            
        - Value: List of values
            

        ---

        ### 🔌 External Sources

        **dataHub** (Map>) - Filters on external DataHub data

        - Key: DataHub field ID (as string)
            
        - Value: List of accepted values
            

        ---

        ### 🔧 Sorting and Display Options

        **sort** (Map, optional) - Result sorting

        - Key: Field name to sort by
            
        - Value: Sort direction ("asc" or "desc")
            
        - Example: {"followingDate": "desc", "name": "asc"}
            
        - Special supports:
            
            - "attribute-{label}" : Sort by custom attribute
                
            - "indicator-{label}" : Sort by indicator
                
            - "calculatedAttribute-{label}" : Sort by calculated attribute
                

        **outputs** (Array, optional) - Additional data to include in response

        - Possible values:
            
            - "scores" : Include all rating scores
                
            - "attributes" : Include detailed attribute values
                
            - "calculatedAttributes" : Include calculated attributes
                
            - "indicators" : Include indicators
                
        - Important: Without this option, only basic data is returned
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '0'
        - name: rowPerPage
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '50'
        - name: onboarded
          in: query
          required: false
          description: ''
          schema:
            type: boolean
          example: 'true'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - authorizingRoles: []
                    thirdpartyId: 12345
                    accountId: 100001
                    companyIdType: CIT001
                    siret: '12345678900012'
                    siren: '123456789'
                    tva: FR12123456789
                    legalCategoryLabel: SASU Société par actions simplifiée à associé unique
                    legalCategoryCode: null
                    activityLabel: Conseil pour les affaires et autres conseils de gestion
                    activityCode: 7022Z
                    etabActivityCode: 7022Z
                    etabActivityType: CODE_APE
                    etabActivityLabel: Conseil pour les affaires et autres conseils de gestion
                    principals: null
                    workforce: 1072
                    monitored: true
                    onboarded: true
                    unmanaged: false
                    headquarter: true
                    companyIdValue: '12345678900012'
                    thirdpartyCode: null
                    name: ACME CONSULTING SAS
                    address: 123 RUE DE LA PAIX
                    addressCity: PARIS
                    addressPostCode: '75001'
                    addressCountryCode: FR
                    registered: true
                    registrationStatus: subscribed
                    active: true
                    followingDate: '2024-11-21'
                    thirdpartyAlerts: NEANT
                    complete: true
                    thirdpartyUsers: null
                    listRegistrationNumber: []
                    attributeValues:
                      - id: 1001
                        attributeId: 1086
                        label: C. Criticité
                        type: boolean
                        bondType: thirdparty
                        creationDate: '2024-11-21T10:41:57.153+00:00'
                        updateDate: '2024-11-21T10:45:44.071+00:00'
                        isRequired: null
                        values:
                          - 'true'
                        ctxModelId: null
                        referencingCalculations: null
                    majorFr: Services
                    majorEn: Services
                    majorCode: I
                    scores:
                      datablocks_financial_strength:
                        rating: N2
                        riskLevel: low
                      datablocks_esg:
                        score: '2'
                        esgDataDepth: A
                        environmentalRankingScore: 2
                        socialRankingScore: 3
                        governanceRankingScore: 2
                        noDataAvailable: false
                      security_rating:
                        reference: null
                        account_reference: null
                        company_reference: null
                        cartography_reference: null
                        date: null
                        activity_v3: null
                        audit_type: null
                        asset_count: null
                        score: null
                        attack_surface_score: null
                        mail_score: null
                        web_score: null
                        vulnerability_score: null
                        vulnerability_snapshot_score: null
                        security_control_score: null
                        security_incident_score: null
                        global_score: null
                        sector_score: null
                        rating_period: null
                        ip_providers: null
                        activity_ip_providers: null
                        all_ip_providers: null
                        segments: null
                        asset_size: null
                        maturity_level: null
                      ecovadis:
                        ev_data: null
                        error: null
                        error_message: null
                        main_integration_id: null
                      creditsafe:
                        companyId: null
                        date: null
                        internationalScore: null
                        previousInternationalScore: null
                        nationalScoreValue: null
                        nationalScoreMax: null
                        creditLimit: null
                        creditLimitValue: null
                        creditLimitCurrency: null
                        companyExposure: null
                        activityExposure: null
                        preferentialStatus: null
                        dbt: null
                        financialStrength: null
                        countryCode: null
                        error: null
                      indued:
                        due_diligence_id: '1234567'
                        due_diligence:
                          status: fpm_in_progress
                          fpm_url: https://...
                          compliance_score: 7
                          country_score: 1
                          activity_score: 2
                          state: active
                          pep_score: 1
                          sanctions_score: 1
                          adverse_media_score: 3
                          risk_event_score: 3
                          report_url: null
                          risk_level: 3
                          workflow_status: null
                          failure_score: null
                          creation_time: '2024-11-21T10:41:59.895+00:00'
                          report_time: null
                          screening_time: '2024-11-21T10:42:17.482+00:00'
                          enrichment_time: '2024-11-21T10:42:10.340+00:00'
                        report_id: null
                        report_data: null
                        created_date: '2024-11-21T10:41:59.451+00:00'
                        error: null
                    calculatedAttributes:
                      - id: 4001
                        calculationId: 99
                        name: Profil de Risque
                        resultType: STRING
                        resultValue: Risque Moyen
                        resultColorCode: '#fcb900'
                        resultLastUpdateDate: '2024-11-21T10:41:57.308+00:00'
                        nature: CALCULATED_ATTRIBUTE
                        targetResourceType: THIRD_PARTY
                        targetResourceId: 12345
                    indicators:
                      - id: 5001
                        calculationId: 101
                        name: Risque Financier
                        resultType: STRING
                        resultValue: Risque Faible
                        resultColorCode: '#00d084'
                        resultLastUpdateDate: '2024-11-21T10:45:45.975+00:00'
                        nature: INDICATOR
                        targetResourceType: THIRD_PARTY
                        targetResourceId: 12345
                    transparencyScore: 67
                    duns: '123456789'
                    dateCreation: '2012-02-29'
                    companyStartDate: '2002-08-01'
                    companyClosedDate: null
                    acronym: null
                    brandName: null
                    addressingName: ACME CONSULTING SAS
                    capital: 14300000
                    capitalCurrency: EUR
                    ceo: null
                    turnover: 224524062
                    turnoverCurrency: EUR
                    lastBalanceSheetDate: '2024-12-31'
                    addressStreet: 123 RUE DE LA PAIX
                    etabPhoneNumber: '0123456789'
                    website: null
                    category: ETI
                    subCategory: AE
                    hasRestrictedDisclosure: false
                    dunsEncrypted: false
                  - authorizingRoles: []
                    thirdpartyId: 67890
                    accountId: 100001
                    companyIdType: CIT001
                    siret: '98765432100012'
                    siren: '987654321'
                    tva: FR98987654321
                    legalCategoryLabel: Société par actions simplifiée
                    legalCategoryCode: null
                    activityLabel: Activités des agences de travail temporaire
                    activityCode: 7820Z
                    etabActivityCode: 7820Z
                    etabActivityType: CODE_APE
                    etabActivityLabel: Activités des agences de travail temporaire
                    principals: null
                    workforce: 75055
                    monitored: true
                    onboarded: true
                    unmanaged: false
                    headquarter: true
                    companyIdValue: '98765432100012'
                    thirdpartyCode: null
                    name: GLOBAL SERVICES FRANCE
                    address: 456 AVENUE DES CHAMPS
                    addressCity: LYON
                    addressPostCode: '69001'
                    addressCountryCode: FR
                    registered: true
                    registrationStatus: subscribed
                    active: true
                    followingDate: '2024-02-27'
                    thirdpartyAlerts: NEANT
                    complete: false
                    thirdpartyUsers: null
                    listRegistrationNumber: []
                    attributeValues:
                      - id: 2001
                        attributeId: 1026
                        label: E. Intervention sur site
                        type: boolean
                        bondType: thirdparty
                        creationDate: '2024-02-27T16:38:48.251+00:00'
                        updateDate: null
                        isRequired: null
                        values:
                          - 'true'
                        ctxModelId: null
                        referencingCalculations: null
                      - id: 2007
                        attributeId: 1024
                        label: D. Dépenses
                        type: integer
                        bondType: thirdparty
                        creationDate: '2024-02-27T16:38:41.131+00:00'
                        updateDate: null
                        isRequired: null
                        values:
                          - '100000'
                        ctxModelId: null
                        referencingCalculations: null
                    majorFr: Services
                    majorEn: Services
                    majorCode: I
                    scores:
                      datablocks_financial_strength:
                        rating: 5A1
                        riskLevel: very_low
                      datablocks_esg:
                        score: '2'
                        esgDataDepth: C
                        environmentalRankingScore: 3
                        socialRankingScore: 2
                        governanceRankingScore: 1
                        noDataAvailable: false
                      security_rating: null
                      ecovadis: null
                      creditsafe: null
                      indued:
                        due_diligence_id: '12234'
                        due_diligence:
                          status: fpm_in_progress
                          fpm_url: https://...
                          compliance_score: 9
                          country_score: 1
                          activity_score: 2
                          state: active
                          pep_score: 3
                          sanctions_score: 1
                          adverse_media_score: 3
                          risk_event_score: 3
                          report_url: null
                          risk_level: 3
                          workflow_status: null
                          failure_score: null
                          creation_time: '2024-02-27T16:29:52.625+00:00'
                          report_time: null
                          screening_time: '2024-02-27T16:30:21.468+00:00'
                          enrichment_time: '2024-02-27T16:30:16.629+00:00'
                        report_id: null
                        report_data: null
                        created_date: '2024-02-27T16:29:50.960+00:00'
                        error: null
                    calculatedAttributes:
                      - id: 6001
                        calculationId: 99
                        name: Profil de Risque
                        resultType: STRING
                        resultValue: Risque Moyen
                        resultColorCode: '#fcb900'
                        resultLastUpdateDate: '2024-02-27T16:29:50.330+00:00'
                        nature: CALCULATED_ATTRIBUTE
                        targetResourceType: THIRD_PARTY
                        targetResourceId: 67890
                    transparencyScore: 67
                    duns: '987654321'
                    dateCreation: '2012-01-12'
                    companyStartDate: '2000-03-01'
                    companyClosedDate: null
                    acronym: null
                    brandName: GLOBAL SERVICES
                    addressingName: GLOBAL SERVICES FRANCE
                    capital: 50000000
                    capitalCurrency: EUR
                    ceo: null
                    turnover: 3199354000
                    turnoverCurrency: EUR
                    lastBalanceSheetDate: '2024-12-31'
                    addressStreet: 456 AVENUE DES CHAMPS
                    etabPhoneNumber: '0498765432'
                    website: null
                    category: GE
                    subCategory: null
                    hasRestrictedDisclosure: false
                    dunsEncrypted: false
                page: 0
                size: 2
                totalElements: 9
                globalCount: 122
  /api/v1/account/{account_id}/dossiers/advanced-search:
    post:
      tags:
        - Advanced search
      summary: Dossiers
      description: |-
        This endpoint allows you to perform an advanced multi-criteria search on dossiers within an account. It supports multiple filters on dossier information, associated third party information, custom attributes, calculated attributes, and indicators.

        ---

        ## 📌 URL Parameters

        - **accountId** (required): The account identifier
            
        - **monitored** (optional): Filter on dossier status
            
            - `true`: Active/monitored dossiers
                
            - `false`: Archived/inactive dossiers
                
            - `null` (omitted): All dossiers (active and archived)
                
        - **onboarded** (optional): Filter on third party integration status
            
            - `true`: Dossiers with onboarded third parties
                
            - `false`: Dossiers with non-onboarded third parties
                
            - `null` (omitted): All dossiers (onboarded or not)
                
        - **page** (optional): Page number (default: 0)
            
        - **rowPerPage** (optional): Number of results per page (default: 50)
            

        ---

        ## 📦 Request Body (searchParams)

        ### 🔍 Dossier Identification

        - **dossierType**: Dossier type code (string). Use "FREE" for dossiers without a type
            
        - **reference**: Dossier reference (case-insensitive search)
            

        ### 🏢 Third Party Identification (inherited filters)

        These parameters allow filtering by information from the third party associated with the dossier:

        - **name**: Third party name (case-insensitive search)
            
        - **code**: Third party code (case-insensitive search)
            
        - **identifier**: Third party identifier (SIREN/SIRET, VAT, or DUNS) - must be combined with **companyIdType**
            
        - **companyIdType**: Type of identifier used. Possible values:
            
            - CIT001: National identifier (SIREN/SIRET for France)
                
            - CIT002: VAT number
                
            - CIT003: DUNS number
                

        ### 📅 Creation Period

        - **start**: Dossier creation start date (ISO 8601 format: YYYY-MM-DD)
            
        - **end**: Dossier creation end date (ISO 8601 format: YYYY-MM-DD)
            

        ### 📊 Status

        - **status**: Global dossier status. Possible values (English codes):
            
            - MISSING: Incomplete
                
            - IN_PROGRESS: Acquisition in progress
                
            - NOT_VALID: Not compliant
                
            - ACTION_REQUIRED: Action required
                
            - VALID: Compliant
                
            - BELOW_EXPECTATION: Insufficient
                

        ### 🎯 Custom Attributes

        - **attributes**: Object containing filters on dossier custom attributes
            
            - Structure: `{ "attribute_name": ["value1", "value2"], ... }`
                
            - Multiple values for the same attribute are linked by an OR operator
                
            - Different attributes are linked by an AND operator
                

        ### 📈 Calculated Attributes

        - **calculatedAttributes**: Object containing filters on dossier calculated attributes
            
            - Structure: `{ "calculated_attribute_name": ["value1", "value2"], ... }`
                
            - Multiple values for the same calculated attribute are linked by an OR operator
                
            - Different calculated attributes are linked by an AND operator
                

        ### 🔢 Indicators

        - **indicators**: Object containing filters on dossier indicators
            
            - Structure: `{ "indicator_name": ["value1", "value2"], ... }`
                
            - Multiple values for the same indicator are linked by an OR operator
                
            - Different indicators are linked by an AND operator
                

        ### ⚙️ Search Configuration

        - **sort**: Object defining result sorting
            
            - Structure: `{ "field": "direction" }`
                
            - Possible directions: "asc" or "desc"
                
            - Example: `{ "creationDate": "desc" }`
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '0'
        - name: rowPerPage
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '50'
        - name: onboarded
          in: query
          required: false
          description: ''
          schema:
            type: boolean
          example: 'true'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - authorizingRoles: []
                    nameFr: Decarbonization Form
                    nameEn: ''
                    nameEs: ''
                    dossierId: 3550187
                    documentId: 30789356
                    reponseId: 22068966
                    fileId: 21676606
                    issuer: FOURNISSEUR
                    transmitter: FOURNISSEUR
                    depositDate: '2025-04-29T10:18:23.013'
                    endDate: '2026-04-29T23:59:59.999'
                    depositorName: Sarah Mitchell
                    present: true
                    dossierReference: CSR
                    dossierTypeCode: CSR
                    dossierTypeLibelle: Environment
                    typeDocumentId: 1699
                    documentCode: NEW_FORM_303
                    thirdpartyId: 697
                    thirdpartyName: GLOBAL STAFFING SERVICES
                    thirdpartyIdentifier: '12345678901234'
                    thirdpartyCode: null
                    thirdpartyActivityLabel: Temporary employment agency activities
                    statusCode: VALID
                    statusReason: ''
                    statusReasonDetail: ''
                    statusActorEmail: ''
                    acquisition: FO
                    hierarchicalOrder: 0
                    refusedToFile: false
                  - authorizingRoles: []
                    nameFr: Standard ESG Questionnaire
                    nameEn: ''
                    nameEs: ''
                    dossierId: 3550187
                    documentId: 30789357
                    reponseId: null
                    fileId: null
                    issuer: null
                    transmitter: null
                    depositDate: null
                    depositorName: null
                    present: false
                    dossierReference: CSR
                    dossierTypeCode: CSR
                    dossierTypeLibelle: Environment
                    typeDocumentId: 3830
                    documentCode: ESGFORM
                    thirdpartyId: 697
                    thirdpartyName: GLOBAL STAFFING SERVICES
                    thirdpartyIdentifier: '12345678901234'
                    thirdpartyCode: null
                    thirdpartyActivityLabel: Temporary employment agency activities
                    statusCode: MISSING
                    statusReason: ''
                    statusReasonDetail: ''
                    statusActorEmail: ''
                    acquisition: FO
                    hierarchicalOrder: 0
                    refusedToFile: false
                page: 0
                size: 2
                totalElements: 1266
                globalCount: 1266
                answerableElements: 59
  /api/v1/account/{account_id}/documents/advanced-search:
    post:
      tags:
        - Advanced search
      summary: Documents
      description: |-
        This endpoint allows you to perform an advanced multi-criteria search on documents within an account. It supports filters on document type, validity period, status, and acquisition channel.

        **Important:** This endpoint automatically filters documents to show only those from **onboarded third parties** and **active dossiers**. These filters are not configurable.

        ---

        ## 📌 URL Parameters

        - **accountId** (required): The account identifier
            
        - **page** (optional): Page number (default: 0)
            
        - **rowPerPage** (optional): Number of results per page (default: 50)
            

        ---

        ## 📦 Request Body (searchParams)

        ### 🔍 Document Filters

        - **documents**: Array of document search criteria. Each object can contain:
            
            - **documentCode**: Document code (string)
                
            - **start**: Validity start date (ISO 8601 format: YYYY-MM-DD)
                
            - **end**: Validity end date (ISO 8601 format: YYYY-MM-DD)
                
            - **status**: Document status. Possible values (English codes):
                
                - MISSING: Incomplete
                    
                - IN_PROGRESS: Acquisition in progress
                    
                - NOT_VALID: Not compliant
                    
                - ACTION_REQUIRED: Action required
                    
                - VALID: Compliant
                    
                - BELOW_EXPECTATION: Insufficient
                    

        ### ⚙️ Search Configuration

        - **sort**: Object defining result sorting
            
            - Structure: `{ "field": "direction" }`
                
            - Possible directions: "asc" or "desc"
                
            - Example: `{ "depositDate": "desc" }`
                

        ---
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: integer
        - name: page
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '0'
        - name: rowPerPage
          in: query
          required: false
          description: ''
          schema:
            type: integer
          example: '50'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
              example:
                content:
                  - authorizingRoles: []
                    nameFr: Cyber insurance
                    nameEn: ''
                    nameEs: ''
                    dossierId: 3190530
                    documentId: 30035669
                    reponseId: 25297110
                    fileId: 24901550
                    issuer: FOURNISSEUR
                    transmitter: FOURNISSEUR
                    depositDate: '2025-12-30T17:44:59.312'
                    endDate: '2026-12-31T23:59:59.999'
                    depositorName: John Anderson
                    present: true
                    dossierReference: CYBER
                    dossierTypeCode: CYBER
                    dossierTypeLibelle: Cybersecurity
                    typeDocumentId: 713
                    documentCode: AC
                    thirdpartyId: 875
                    thirdpartyName: TECHSOLUTIONS INC
                    thirdpartyIdentifier: '98765432100012'
                    thirdpartyCode: null
                    thirdpartyActivityLabel: Application software publishing
                    statusCode: VALID
                    statusReason: ''
                    statusReasonDetail: ''
                    statusActorEmail: ''
                    acquisition: FO
                    hierarchicalOrder: 0
                    refusedToFile: false
                page: 0
                size: 50
                totalElements: 1
                globalCount: 1266
                answerableElements: 0
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
  schemas: {}
security:
  - bearerAuth: []
