openapi: 3.0.0
info:
  title: Party API - Apigee
  description: >-
    Party API documentation <h2>Authentication & Authorization</h2> <p>You will
    need to be identified before calling any endpoints. </p> <p>In order to be
    recognized and authorized to access our Party API, we put in place 2
    mechanisms:</p><ul><li>Authentication mechanism is done with a client id
    dedicated to you. <br/>Remember that the client id provided should be shared
    with care.<br/> The client id must be inserted in the header of the request
    in the appropriate field</li><li>Authorization mechanism is done by a
    well-known authorization flow for REST Web API: <strong>Basic auth
    flow.</strong></li></ul>
  license:
    name: Internal usage only
  version: 1.3.1
servers:
  - url: https://indus.api.euromaster.com
    description: APIGEE UAT
  - url: https://preprod.api.euromaster.com
    description: APIGEE PREPROD
  - url: https://api.euromaster.com
    description: APIGEE PROD
tags:
  - name: Customers
    description: Customers operation with all operation types
  - name: Parties
    description: Parties operation with all operation types
  - name: Sites
    description: Sites operation with all operation types
  - name: Offers
    description: Offers operation with all operation types
  - name: Subscriptions
    description: Subscriptions operation with all operation types
  - name: Users
    description: Users operation with all operation types
  - name: InspectorCustomers
    description: Inspector customers operation with all operation types
paths:
  /party-erm/v1/retail-customers/external:
    post:
      summary: Create retail customer.
      description: This endpoint allows to create or update a retail customer.
      operationId: createRetailCustomer
      tags:
        - Customers
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRetailCustomerQueryDTO'
            examples:
              standardBody:
                value:
                  externalRef: '12345678'
                  membership: Michelin
                  title: M
                  firstName: John
                  lastName: DOE
                  secondLastName: null
                  nationalIdentificationNumber: 12345678E
                  email: mail@email.com
                  phoneNumber: 00 001 1111111
                  mobilePhoneNumber: null
                  birthDate: '1990-10-10'
                  addressLine1: Neumarkter Str.
                  addressLine2: null
                  addressLine3: null
                  postalCode: '44666'
                  city: City
                  subdivision: null
                  countryCode: DE
                  communicationChannel:
                    sms:
                      authorized: true
                      marketingConsent: true
                      consentDate: '2024-09-10'
                    email:
                      authorized: true
                      marketingConsent: true
                      consentDate: null
                    postal:
                      authorized: true
                      marketingConsent: true
                      consentDate: null
                  gdpr:
                    signed: true
                    signedDate: '2024-12-27'
      responses:
        '200':
          $ref: '#/components/responses/CreateRetailCustomerResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 2'
                        property: countryCode
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: externalRef
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/extended:
    summary: Parties endpoint
    get:
      summary: Get parties data
      description: Get parties data filtered by parameters
      operationId: getPartiesExtended
      tags:
        - Parties
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: externalRef
          required: false
          description: external ref of the party
          schema:
            $ref: '#/components/schemas/externalRef'
        - in: query
          name: source
          required: false
          description: source of the party
          schema:
            $ref: '#/components/schemas/source'
      responses:
        '200':
          $ref: '#/components/responses/PartiesExtendedResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageNumber:
                  value:
                    errors:
                      - error: The pageNumber must be lower than or equals to 3
                        property: pageNumber
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}/extended:
    get:
      summary: Get a party with extended information
      description: Get a party with extended information by party code
      operationId: getPartyExtended
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/PartyExtendedResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPartyCode:
                  value:
                    errors:
                      - error: The party code 1000000 cannot be found
                        property: partyCode
        '500':
          description: Internal error
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/external:
    post:
      summary: Create party data
      description: Create party external
      operationId: createPartyExternal
      tags:
        - Parties
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePartyExternalQueryDTO'
            examples:
              standardBody:
                summary: Create a party
                description: Create a party with the given informations
                value:
                  externalRef: YEIZR
                  functionalRef: B1234
                  type: B2B
                  name: TRANSPORT NICOLAS
                  active: true
                  legalIdentifier:
                    siren: '123456789'
                    NIF: Y1234567A
                    vatNumber: FR123456789
      responses:
        '200':
          $ref: '#/components/responses/CreatePartyExternalResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missing mandatory field:
                  value:
                    errors:
                      - error: The field 'externalRef' is mandatory
                        property: externalRef
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/quick-search:
    get:
      summary: Quick search parties data
      description: Quick search parties data (name and code) filtered by parameters
      operationId: searchParties
      tags:
        - Parties
      parameters:
        - in: query
          name: value
          schema:
            $ref: '#/components/schemas/ValueQueryParam'
          required: true
          description: The value contained in the party's name
        - in: query
          name: limit
          schema:
            $ref: '#/components/schemas/LimitQueryParam'
          description: The limit size
      responses:
        '200':
          $ref: '#/components/responses/SearchPartiesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidLimit:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: limit
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties:
    post:
      summary: Create a party.
      description: This endpoint allows to create a party.
      operationId: createParty
      tags:
        - Parties
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePartyQueryDTO'
            examples:
              standardBody:
                value:
                  functionalRef: B1234
                  type: B2B
                  name: TRANSPORT NICOLAS
      responses:
        '200':
          $ref: '#/components/responses/CreatePartyResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: functionalRef
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: type
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    get:
      summary: Get parties data
      description: Get parties data filtered by parameters
      operationId: getParties
      tags:
        - Parties
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: functionalRef
          required: false
          description: Functional reference
          schema:
            $ref: '#/components/schemas/functionalRef'
        - in: query
          name: type
          required: false
          description: Type of parties
          schema:
            $ref: '#/components/schemas/TypeEnum'
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive parties (default false)
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
        - in: query
          name: withExternalRef
          required: false
          description: >-
            If filled then return external references for each party (default
            false)
          schema:
            $ref: '#/components/schemas/WithExternalRefQueryParam'
        - in: query
          name: codes
          required: false
          description: List of party code
          schema:
            $ref: '#/components/schemas/PartyCodeListQueryParameter'
      responses:
        '200':
          $ref: '#/components/responses/PartiesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageNumber:
                  value:
                    errors:
                      - error: The pageNumber must be lower than or equals to 3
                        property: pageNumber
        '500':
          description: Internal error
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}:
    get:
      summary: Get a party
      description: Retrieve a party by his code
      operationId: getParty
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/PartyResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    put:
      summary: Update a party
      description: Update a party by his code
      operationId: updateParty
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePartyQueryDTO'
            examples:
              standardBody:
                value:
                  functionalRef: B1234
                  type: B2B
                  name: TRANSPORT NICOLAS
      responses:
        '200':
          $ref: '#/components/responses/UpdatePartyResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    delete:
      summary: Delete a party
      description: Update a party to set his active attribute to false
      operationId: deleteParty
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '204':
          description: Success, no content
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalErrorDTO'
              examples:
                Internal error:
                  summary: An internal error occured
                  value:
                    error: >-
                      An internal error occurred, please try again later. Thank
                      you for your understanding
  /party-erm/v1/parties/{partyCode}/sites:
    get:
      summary: Get sites for a party
      description: Retrieve sites by party code
      operationId: getPartySites
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetPartySitesResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}/bank-account/external:
    post:
      summary: Add bank account
      description: Add bank account by party code
      operationId: createBankAccountExternal
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBankAccountExternalQueryDTO'
            examples:
              standardBody:
                summary: Create a bank account
                description: Create a bank account with the given informations
                value:
                  owner: John Doe
                  bankName: Bank
                  bankKey: '1234'
                  countryCode: FR
                  number: '123456789'
                  iban: FR123456789
                  controlKey: '1234'
                  bic: BANK000FR
      responses:
        '204':
          description: Success, no content
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPartyCode:
                  value:
                    errors:
                      - error: The party code 1000000 cannot be found
                        property: partyCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}/bank-accounts:
    get:
      summary: Get bank account
      description: Get bank account by party code
      operationId: getBankAccount
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetBankAccountsResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPartyCode:
                  value:
                    errors:
                      - error: The party code 1000000 cannot be found
                        property: partyCode
        '500':
          description: Internal error
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}/bank-accounts/{iban}:
    delete:
      summary: Delete a bank account
      description: Delete a bank account based on the IBAN
      operationId: deleteBankAccount
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
        - in: path
          name: iban
          required: true
          description: IBAN of the bank account to delete
          schema:
            $ref: '#/components/schemas/IbanQueryParam'
      responses:
        '204':
          description: Bank account deleted successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPartyCode:
                  value:
                    errors:
                      - error: The party code 1000000 cannot be found
                        property: partyCode
                InvalidIban:
                  value:
                    errors:
                      - error: The iban 1000000 cannot be found
                        property: iban
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/me:
    get:
      summary: Get a party
      description: Retrieve a party by its okta token
      operationId: getMyParty
      tags:
        - Parties
      responses:
        '200':
          $ref: '#/components/responses/PartyResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/me/sites:
    get:
      summary: Get sites for the current user
      description: Retrieve sites by party of the current user
      operationId: getMyPartySites
      tags:
        - Parties
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
      responses:
        '200':
          $ref: '#/components/responses/PartySitesPaginatedResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/me/users:
    get:
      summary: >-
        Returns a list of users associated with the current authenticated user's
        party
      description: >-
        This endpoint allows filtering, sorting, and pagination depending on
        implementation. It is typically used to retrieve all users belonging to
        my party for administrative or integration purposes. Proper
        authorization is required to access my party’s user list.
      operationId: getMyPartyUsers
      tags:
        - Parties
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: withInactive
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
          required: false
          description: Include inactive users
      responses:
        '200':
          $ref: '#/components/responses/GetMyPartyUsersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/me/contacts:
    get:
      summary: Get contacts for the current user
      description: Retrieve contacts by party of the current user
      operationId: getMyPartyContacts
      tags:
        - Parties
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
      responses:
        '200':
          $ref: '#/components/responses/GetMyContactsResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/sites:
    get:
      summary: Get sites data
      description: Get sites data filtered by parameters
      operationId: getSites
      tags:
        - Sites
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: name
          required: false
          description: The value contained in the site's name
          schema:
            $ref: '#/components/schemas/name'
        - in: query
          name: functionalRef
          required: false
          description: functional ref of the site
          schema:
            $ref: '#/components/schemas/functionalRef'
        - in: query
          name: externalRef
          required: false
          description: external ref of the site
          schema:
            $ref: '#/components/schemas/externalRef'
        - in: query
          name: source
          required: false
          description: source of the site
          schema:
            $ref: '#/components/schemas/source'
        - in: query
          name: withInactive
          required: false
          description: Retrieve inactive site or not
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
        - in: query
          name: withExternalRef
          required: false
          description: Retrieve external ref data or not
          schema:
            $ref: '#/components/schemas/WithExternalRefQueryParam'
        - in: query
          name: codes
          required: false
          description: List of site code
          schema:
            $ref: '#/components/schemas/SiteCodeListQueryParameter'
      responses:
        '200':
          $ref: '#/components/responses/SitesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageNumber:
                  value:
                    errors:
                      - error: The pageNumber must be lower than or equals to 3
                        property: pageNumber
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    post:
      summary: Create a site.
      description: This endpoint allows to create a site.
      operationId: createSite
      tags:
        - Sites
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSiteQueryDTO'
            examples:
              standardBody:
                value:
                  partyCode: 1000032
                  functionalRef: B1234
                  name: Euromaster Kepler
                  addressLine1: Industrichone
                  addressLine2: null
                  addressLine3: null
                  postalCode: '42697'
                  city: Solingen
                  subdivision: null
                  countryCode: DE
      responses:
        '200':
          $ref: '#/components/responses/CreateSiteResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: countryCode
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: partyCode
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/sites/external:
    post:
      summary: Create site data
      description: Create site external
      operationId: createSiteExternal
      tags:
        - Sites
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSiteExternalQueryDTO'
            examples:
              standardBody:
                summary: Create a site
                description: Create a site with the given informations
                value:
                  externalRef: UIOZE
                  partyCode: 1000032
                  functionalRef: B1234
                  name: Euromaster Kepler
                  legalIdentifier:
                    siret: '123456789'
                  addressLine1: Industrichone
                  addressLine2: null
                  addressLine3: null
                  postalCode: '42697'
                  city: Solingen
                  subdivision: null
                  countryCode: DE
      responses:
        '200':
          $ref: '#/components/responses/CreateSiteExternalResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missing mandatory field:
                  value:
                    errors:
                      - error: The field 'externalRef' is mandatory
                        property: externalRef
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/sites/{siteCode}:
    get:
      summary: Get a site
      description: Retrieve a site by his code
      operationId: getSite
      tags:
        - Sites
      parameters:
        - in: path
          name: siteCode
          required: true
          description: Targeted site code
          schema:
            $ref: '#/components/schemas/SiteCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetSiteResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SiteCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    put:
      summary: Update a site
      description: Update a site by his code
      operationId: updateSite
      tags:
        - Sites
      parameters:
        - in: path
          name: siteCode
          required: true
          description: Targeted site code
          schema:
            $ref: '#/components/schemas/SiteCodeQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSiteQueryDTO'
            examples:
              standardBody:
                value:
                  partyCode: '1000032'
                  functionalRef: B1234
                  name: Euromaster Kepler
                  addressLine1: Industrichone
                  addressLine2: null
                  addressLine3: null
                  postalCode: '42697'
                  city: Solingen
                  subdivision: null
                  countryCode: DE
      responses:
        '200':
          $ref: '#/components/responses/UpdateSiteResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SiteCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    delete:
      summary: Delete a site
      description: Update a site to set his active attribute to false
      operationId: deleteSite
      tags:
        - Sites
      parameters:
        - in: path
          name: siteCode
          required: true
          description: Targeted site code
          schema:
            $ref: '#/components/schemas/SiteCodeQueryParam'
      responses:
        '204':
          description: Success, no content
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SiteCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/offers:
    get:
      summary: Get offers data
      description: Get offers data filtered by parameters
      operationId: getOffers
      tags:
        - Offers
      parameters:
        - in: query
          name: category
          schema:
            $ref: '#/components/schemas/CategoryQueryParam'
          required: false
          description: The category of the offer
        - in: query
          name: partyType
          schema:
            $ref: '#/components/schemas/PartyTypeQueryParam'
          required: false
          description: The type of the party
        - in: query
          name: type
          schema:
            $ref: '#/components/schemas/OfferTypeQueryParam'
          required: false
          description: The type of the offer
        - in: query
          name: vehicleCategory
          schema:
            $ref: '#/components/schemas/VehicleCategoryQueryParam'
          required: false
          description: The category of the vehicle
      responses:
        '200':
          $ref: '#/components/responses/GetOffersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: type
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/offers/{code}:
    get:
      summary: Get an offer
      description: Retrieve an offer by its code
      operationId: getOffer
      tags:
        - Offers
      parameters:
        - in: path
          name: code
          required: true
          description: Targeted offer code
          schema:
            $ref: '#/components/schemas/offerCode'
      responses:
        '200':
          $ref: '#/components/responses/GetOfferResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/OfferCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/countries:
    summary: Get countries referential endpoint
    get:
      summary: Get countries referential
      description: Get countries referential
      operationId: getCountriesReferential
      tags:
        - Countries
      parameters:
        - in: query
          name: language
          required: false
          description: Language for translation (e.g. 'nl-NL', 'fr-FR')
          schema:
            $ref: '#/components/schemas/languageQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetCountriesReferentialResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: language
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions:
    post:
      summary: Create a subscription.
      description: This endpoint allows to create a subscription.
      operationId: createSubscription
      tags:
        - Subscriptions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionQueryDTO'
            examples:
              standardBody:
                value:
                  name: Subscription Name
                  active: true
                  contractorCode: 900000
                  customerCode: 900001
                  offerCode: 100000
                  startDate: '2024-03-01'
                  endDate: '2026-03-01'
                  inspectionFrequency: 90
                  pressure: true
                  resale: false
                  nonResale: false
                  requiredPO: false
                  glAccount: 607
                  vatType: FRD - DEBIT FR
                  commercialAgreement: offreSmall_MCP1
                  paymentType: CASH
                  disputeContactCode: 102762
                  accountingContactCode: 105162
                  purchasingContactCode: 109201
                  businessOwnerContactCode: 107202
                  lines:
                    - customerSiteCode: 900000
                      inspectionServiceProviderCode: 900002
                    - customerSiteCode: 900001
                      inspectionServiceProviderCode: 900003
      responses:
        '200':
          $ref: '#/components/responses/CreateSubscriptionResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: offerCode
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                subscriptionAlreadyExists:
                  value:
                    errors:
                      - error: >-
                          The subscription already exists for the given parties
                          and offer
                        property: contractorCode, customerCode, offerCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    get:
      summary: Get all subscriptions
      description: Get all subscriptions filtered by parameters
      operationId: getSubscriptions
      tags:
        - Subscriptions
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: contractorCode
          required: false
          description: Contractor party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
        - in: query
          name: customerCode
          required: false
          description: Customer party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
        - in: query
          name: offerCode
          required: false
          description: List of offer codes
          schema:
            $ref: '#/components/schemas/OfferCodeListQueryParameter'
        - in: query
          name: startDate
          required: false
          description: Start date of the subscription
          schema:
            $ref: '#/components/schemas/startDateSubscription'
        - in: query
          name: endDate
          required: false
          description: End date of the subscription
          schema:
            $ref: '#/components/schemas/endDateSubscription'
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive subscriptions
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
        - in: query
          name: customerSiteCode
          required: false
          description: List of customer site codes
          schema:
            $ref: '#/components/schemas/SiteCodeListQueryParameter'
      responses:
        '200':
          $ref: '#/components/responses/SubscriptionsResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions/{subscriptionCode}:
    get:
      summary: Get a subscription
      description: Retrieve a subscription by its code
      operationId: getSubscription
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
      responses:
        '200':
          $ref: '#/components/responses/GetSubscriptionResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SubscriptionCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    put:
      summary: Update partially a subscription
      description: Update partially a subscription by its code
      operationId: updateSubscription
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionQueryDTO'
            examples:
              standardBody:
                value:
                  name: Subscription Name
                  active: true
                  startDate: '2024-03-01'
                  endDate: '2026-03-01'
                  inspectionFrequency: 90
                  pressure: true
                  resale: false
                  nonResale: false
                  requiredPO: false
                  glAccount: 607
                  vatType: FRD - DEBIT FR
                  commercialAgreement: offreSmall_MCP1
                  paymentType: CASH
                  disputeContactCode: 102762
                  accountingContactCode: 105162
                  purchasingContactCode: 109201
                  businessOwnerContactCode: 107202
      responses:
        '200':
          $ref: '#/components/responses/UpdateSubscriptionResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SubscriptionCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions/{subscriptionCode}/lines/{customerSiteCode}:
    post:
      summary: Add a line to a subscription
      description: This endpoint allows to add a line to a subscription.
      operationId: createSubscriptionLine
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
        - in: path
          name: customerSiteCode
          required: true
          description: Targeted customer site code
          schema:
            $ref: '#/components/schemas/CustomerSiteCodeParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSubscriptionLineQueryDTO'
            examples:
              standardBody:
                value:
                  inspectionServiceProviderCode: 1000032
      responses:
        '200':
          $ref: '#/components/responses/CreateSubscriptionLineResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: inspectionServiceProviderCode
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SubscriptionCodeNotFoundDTO'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                subscriptionAlreadyExists:
                  value:
                    errors:
                      - error: >-
                          The subscription line already exists for the given
                          subscription header and site
                        property: subscriptionCode, customerSiteCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
    put:
      summary: Update a subscription line
      description: This endpoint allows to update a subscription line.
      operationId: updateSubscriptionLine
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
        - in: path
          name: customerSiteCode
          required: true
          description: Targeted customer site code
          schema:
            $ref: '#/components/schemas/CustomerSiteCodeParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/updateSubscriptionLineQueryDTO'
            examples:
              standardBody:
                value:
                  inspectionServiceProviderCode: 1000032
      responses:
        '200':
          $ref: '#/components/responses/UpdateSubscriptionLineResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missingMandatoryTag:
                  summary: A mandatory tag is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: inspectionServiceProviderCode
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SubscriptionCodeNotFoundDTO'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                subscriptionAlreadyExists:
                  value:
                    errors:
                      - error: >-
                          The subscription line already exists for the given
                          subscription header and site
                        property: subscriptionCode, customerSiteCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-customer:
    get:
      summary: Get all my subscriptions as a customer
      description: >-
        Get all my subscriptions as a customer and as an authenticated user
        associated to a Party
      operationId: getSubscriptionsAsCustomer
      tags:
        - Subscriptions
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: contractorCode
          required: false
          description: Contractor party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
        - in: query
          name: offerCode
          required: false
          description: Offer code
          schema:
            $ref: '#/components/schemas/offerCode'
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive subscriptions
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/SubscriptionsAsCustomerResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-customer/{subscriptionCode}/lines:
    get:
      summary: Get detailed lines for a specific subscription
      description: >-
        Get detailed lines for a specific subscription for which I am a customer
        and an authenticated user associated with a party
      operationId: getLinesFromSubscriptionAsCustomer
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
      responses:
        '200':
          $ref: '#/components/responses/LinesFromSubscriptionAsCustomerResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/SubscriptionCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-customer/{subscriptionCode}/commercial-agreement:
    get:
      summary: Get commercial agreement for a specific subscription
      description: >-
        Get commercial agreement for a specific subscription for which I am a
        customer and an authenticated user associated with a party
      operationId: getCommercialAgreementFromSubscriptionAsCustomer
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
      responses:
        '200':
          $ref: >-
            #/components/responses/CommerialAgreementFromSubscriptionAsCustomerResponseDTO
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                subscriptionNotFound:
                  summary: The Subscription cannot be found
                  value:
                    errors:
                      - error: The Subscription code XXABCXX cannot be found
                        property: subscriptionCode
                commercialAgreementNotFound:
                  summary: The commercial agreement cannot be found
                  value:
                    errors:
                      - error: >-
                          The commercial agreement for the subscription XXABCXX
                          cannot be found
                        property: subscriptionCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-contractor:
    get:
      summary: Get all my subscriptions as a contractor
      description: >-
        Get all my subscriptions as a contractor and as an authenticated user
        associated to a Party
      operationId: getSubscriptionsAsContractor
      tags:
        - Subscriptions
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: customerCode
          required: false
          description: Customer party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
        - in: query
          name: offerCode
          required: false
          description: Offer code
          schema:
            $ref: '#/components/schemas/offerCode'
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive subscriptions
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/SubscriptionsAsContractorResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-contractor/{subscriptionCode}/lines:
    get:
      summary: Get lines for a contractor's subscription
      description: >-
        Get detailed lines for a specific subscription for which I am a
        contractor and an authenticated user associated with a party
      operationId: getSubscriptionLinesAsContractor
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
          required: true
          description: The subscription code
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
      responses:
        '200':
          $ref: '#/components/responses/GetSubscriptionLinesAsContractorResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions-as-contractor/{subscriptionCode}/lines/{customerSiteCode}:
    delete:
      summary: Delete a line for a specific subscription
      description: >-
        Delete a line for a specific subscription for which I am a contractor
        and an authenticated user associated with a party
      operationId: deleteSubscriptionLine
      tags:
        - Subscriptions
      parameters:
        - in: path
          name: subscriptionCode
          required: true
          description: Targeted subscription code
          schema:
            $ref: '#/components/schemas/SubscriptionCodeParam'
        - in: path
          name: customerSiteCode
          required: true
          description: Targeted customer site code
          schema:
            $ref: '#/components/schemas/CustomerSiteCodeParam'
      responses:
        '204':
          description: Success, no content
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
                subscriptionNotFound:
                  summary: The subscription cannot be found
                  value:
                    errors:
                      - error: The subscription code 1000000 cannot be found
                        property: subscriptionCode
                siteNotFound:
                  summary: The site cannot be found
                  value:
                    errors:
                      - error: The site code 1000000 cannot be found
                        property: customerSiteCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/languages:
    get:
      summary: Get languages referential endpoint
      description: Get languages referential
      operationId: getLanguagesReferential
      tags:
        - Languages
      parameters:
        - in: query
          name: language
          schema:
            $ref: '#/components/schemas/languageQueryParam'
          required: false
          description: Language for translation
      responses:
        '200':
          $ref: '#/components/responses/GetLanguagesReferentialResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: language
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/users:
    get:
      summary: Get users data
      description: Get users data filtered by parameters
      operationId: getUsers
      tags:
        - Users
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: hasCompany
          required: false
          description: Filter users by company association
          schema:
            $ref: '#/components/schemas/HasCompanyQueryParam'
        - in: query
          name: lastModifiedDateFrom
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
          required: false
          description: Filters users last modified on or after this date.
        - in: query
          name: lastModifiedDateTo
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
          required: false
          description: Filters users last modified on or before this date.
      responses:
        '200':
          $ref: '#/components/responses/UsersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageNumber:
                  value:
                    errors:
                      - error: The pageNumber must be lower than or equals to 3
                        property: pageNumber
        '500':
          description: Internal error
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/users/me:
    get:
      summary: Get a user
      description: Retrieve a user by its okta token
      operationId: getUser
      tags:
        - Users
      responses:
        '200':
          $ref: '#/components/responses/GetUserResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/UserNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/users/{userCode}:
    put:
      summary: Update a user
      description: Update a user by his code
      operationId: updateUser
      tags:
        - Users
      parameters:
        - in: path
          name: userCode
          required: true
          description: Targeted user code
          schema:
            $ref: '#/components/schemas/userCode'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserQueryDTO'
            examples:
              standardBody:
                value:
                  language: fr-FR
                  roles:
                    - code: INSPECTOR
                    - code: CONTRACTOR
      responses:
        '200':
          $ref: '#/components/responses/UpdateUserResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidLanguage:
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: language
                InvalidRole:
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 255'
                        property: roles[0].code
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidRequester:
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                InvalidUserCode:
                  value:
                    errors:
                      - error: The user code 1000000 cannot be found
                        property: userCode
                InvalidLanguage:
                  value:
                    errors:
                      - error: The language code fr-FR cannot be found
                        property: language
                InvalidRole:
                  value:
                    errors:
                      - error: The role code INSPECTOR cannot be found
                        property: roles
        '500':
          description: Internal error
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/parties/{partyCode}/contacts/external:
    post:
      summary: Create contact data
      description: Create a contact associated to a party from an external application
      operationId: createPartyContactExternal
      tags:
        - Parties
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Targeted party code
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePartyContactExternalQueryDTO'
            examples:
              standardBody:
                summary: Create a contact
                description: Create a contact with the given informations
                value:
                  externalRef: CTC
                  title: M
                  firstName: John
                  lastName: Doe
                  secondLastName: Doe2
                  nationalIdentificationNumber: 12345678E
                  email: john.doe@mail.com
                  phoneNumber: 00 001 1111111
                  mobilePhoneNumber: '+33612345678'
                  birthDate: '1970-01-01'
                  active: true
                  communicationChannel:
                    sms:
                      authorized: true
                      marketingConsent: true
                      consentDate: '1970-01-01'
                    email:
                      authorized: true
                      marketingConsent: true
                      consentDate: '1970-01-01'
                    postal:
                      authorized: true
                      marketingConsent: true
                      consentDate: '1970-01-01'
                  gdpr:
                    signed: true
                    signedDate: '2025-01-01'
      responses:
        '200':
          $ref: '#/components/responses/CreatePartyContactExternalResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missing mandatory field:
                  value:
                    errors:
                      - error: The field 'externalRef' is mandatory
                        property: externalRef
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '404':
          $ref: '#/components/responses/PartyCodeNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/inspector-customers/quick-search:
    get:
      summary: >-
        Quick search customers data for which my company is assigned as
        Inspector service provider.
      description: >-
        List of customers for which my company is assigned as Inspector service
        provider. Maximum number of results limited to 100.
      operationId: searchInspectorCustomers
      tags:
        - InspectorCustomers
      parameters:
        - in: query
          name: name
          schema:
            $ref: '#/components/schemas/CustomerNameQueryParam'
          required: true
          description: The value contained in the customer's name
      responses:
        '200':
          $ref: '#/components/responses/SearchInspectorCustomersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missingMandatoryTag:
                  summary: The field is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: name
                tooShortField:
                  summary: The field is too short
                  value:
                    errors:
                      - error: 'The field is too short. Min Length: 1'
                        property: name
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 100'
                        property: name
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/inspector-customers/{partyCode}:
    get:
      summary: >-
        Get a customer for which my company is assign as Inpector service
        provider
      description: >-
        Get a customer for which my company is assign as Inpector service
        provider
      operationId: getInspectorCustomersByCode
      tags:
        - InspectorCustomers
      parameters:
        - in: path
          name: partyCode
          required: true
          description: Refers to an end-customer
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/PartyResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
                invalidParty:
                  summary: The party cannot be found
                  value:
                    errors:
                      - error: The party code XXABCXX cannot be found
                        property: partyCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/inspector-customers/{partyCode}/sites:
    get:
      summary: Get my end-customers sites as Inspector service provider.
      description: Get my end-customers sites as Inspector service provider.
      operationId: getInspectorCustomersSites
      tags:
        - InspectorCustomers
      parameters:
        - in: path
          name: partyCode
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
          required: true
          description: Targeted party code
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: name
          schema:
            $ref: '#/components/schemas/CustomerNameQueryParam'
          required: false
          description: The value contained in the customer's name
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive parties (default false)
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetInspectorCustomersSitesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                tooShortField:
                  summary: The field is too short
                  value:
                    errors:
                      - error: 'The field is too short. Min Length: 1'
                        property: name
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 100'
                        property: name
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
                invalidParty:
                  summary: The party cannot be found
                  value:
                    errors:
                      - error: The party code XXABCXX cannot be found
                        property: partyCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/inspector-customers/{partyCode}/sites/{siteCode}:
    get:
      summary: Get a end-customer's site as inspector
      description: Get a end-customer's site for which I'm the inspector.
      operationId: getInspectorCustomersSite
      tags:
        - InspectorCustomers
      parameters:
        - in: path
          name: partyCode
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
          required: true
          description: Refers to a end-customer
        - in: path
          name: siteCode
          schema:
            $ref: '#/components/schemas/SiteCodeQueryParam'
          required: true
          description: Refers to a end-customer's site
      responses:
        '200':
          $ref: '#/components/responses/GetInspectorCustomersSiteResponseDTO'
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
                invalidParty:
                  summary: The party cannot be found
                  value:
                    errors:
                      - error: The party code XXABCXX cannot be found
                        property: partyCode
                siteNotFound:
                  summary: The site cannot be found
                  value:
                    errors:
                      - error: The site code 99999999 cannot be found
                        property: siteCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/customers/quick-search:
    get:
      summary: List of customers for which my company is contractor
      description: >-
        List of customers for which my company is contractor. The response is
        sorted by name.
      operationId: searchCustomers
      tags:
        - Customers
      parameters:
        - in: query
          name: name
          schema:
            $ref: '#/components/schemas/CustomerNameQueryParam'
          required: true
          description: The value contained in the customer's name
        - in: query
          name: type
          required: false
          description: Customer's type
          schema:
            $ref: '#/components/schemas/TypeEnum'
        - in: query
          name: limit
          schema:
            $ref: '#/components/schemas/Limit100QueryParam'
          description: The limit size
      responses:
        '200':
          $ref: '#/components/responses/SearchCustomersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                missingMandatoryTag:
                  summary: The field is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: name
                tooShortField:
                  summary: The field is too short
                  value:
                    errors:
                      - error: 'The field is too short. Min Length: 1'
                        property: name
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 100'
                        property: name
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/customers/{partyCode}/sites:
    get:
      summary: >-
        Retrieves the list of sites associated with the customer identified by
        partyCode.
      description: >-
        Access is limited to customers related to the user's party, and
        appropriate permissions must be verified.
      operationId: getCustomersSites
      tags:
        - Customers
      parameters:
        - in: path
          name: partyCode
          schema:
            $ref: '#/components/schemas/PartyCodeQueryParam'
          required: true
          description: Targeted party code
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: name
          schema:
            $ref: '#/components/schemas/CustomerNameQueryParam'
          required: false
          description: The value contained in the customer's name
        - in: query
          name: withInactive
          required: false
          description: If filled then return active and inactive parties (default false)
          schema:
            $ref: '#/components/schemas/WithInactiveQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/GetCustomersSitesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                tooShortField:
                  summary: The field is too short
                  value:
                    errors:
                      - error: 'The field is too short. Min Length: 1'
                        property: name
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 100'
                        property: name
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundDTO'
              examples:
                userNotFound:
                  summary: The user cannot be found
                  value:
                    errors:
                      - error: The user cannot be found
                        property: clientId
                partyNotFound:
                  summary: The user's party cannot be found
                  value:
                    errors:
                      - error: The user's party cannot be found
                        property: clientId
                invalidParty:
                  summary: The party cannot be found
                  value:
                    errors:
                      - error: The party code XXABCXX cannot be found
                        property: partyCode
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/suppliers/quick-search:
    get:
      summary: List of active suppliers for which my company is customer
      description: List of active suppliers for which my company is customer
      tags:
        - suppliers
      operationId: searchSuppliers
      parameters:
        - in: query
          name: limit
          schema:
            $ref: '#/components/schemas/Limit100QueryParam'
          required: false
          description: The limit size
        - in: query
          name: offerType
          schema:
            $ref: '#/components/schemas/OfferTypeQueryParam'
          required: false
          description: The offer type to search for
        - in: query
          name: name
          schema:
            $ref: '#/components/schemas/SupplierNameQueryParam'
          required: true
          description: The name to search for
      responses:
        '200':
          $ref: '#/components/responses/SearchSuppliersResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidLimit:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: limit
                missingMandatoryTag:
                  summary: The field is missing
                  value:
                    errors:
                      - error: Missing mandatory tag
                        property: name
                tooShortField:
                  summary: The field is too short
                  value:
                    errors:
                      - error: 'The field is too short. Min Length: 1'
                        property: name
                tooLongField:
                  summary: The field is too long
                  value:
                    errors:
                      - error: 'The field is too long. Max Length: 100'
                        property: name
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '404':
          $ref: '#/components/responses/MyPartyNotFoundDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
  /party-erm/v1/subscriptions/lines:
    get:
      summary: Get all subscription lines
      description: Get all subscription lines. Only for batch usage
      operationId: getSubscriptionLines
      tags:
        - Subscriptions
      parameters:
        - in: query
          name: pageNumber
          schema:
            $ref: '#/components/schemas/PageNumberQueryParam'
          required: false
          description: The page number
        - in: query
          name: pageSize
          schema:
            $ref: '#/components/schemas/PageSizeQueryParam'
          required: false
          description: The page size
        - in: query
          name: lastModifiedDateFrom
          required: false
          description: Date from for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateFromQueryParam'
        - in: query
          name: lastModifiedDateTo
          required: false
          description: Date to for last update date of data
          schema:
            $ref: '#/components/schemas/LastModifiedDateToQueryParam'
      responses:
        '200':
          $ref: '#/components/responses/SubscriptionLinesResponseDTO'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDTO'
              examples:
                InvalidPageSize:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageSize
                InvalidPageNumber:
                  value:
                    errors:
                      - error: must be greater than or equal to 1
                        property: pageNumber
                InvalidDatesOrder:
                  value:
                    errors:
                      - error: 'dateFrom : 2024-07-01T00:00:00 is greater than dateTo'
                        property: lastModifiedDateFrom
        '401':
          $ref: '#/components/responses/UnauthorizedDTO'
        '403':
          $ref: '#/components/responses/ForbiddenDTO'
        '500':
          $ref: '#/components/responses/InternalErrorDTO'
security:
  - OAuth2: []
    ApiKeyAuth: []
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      flows: {}
    ApiKeyAuth:
      type: apiKey
      in: header
      name: clientid
  schemas:
    CreateRetailCustomerQueryDTO:
      type: object
      additionalProperties: false
      properties:
        externalRef:
          $ref: '#/components/schemas/externalRef'
        membership:
          $ref: '#/components/schemas/membership'
        title:
          $ref: '#/components/schemas/title'
        firstName:
          $ref: '#/components/schemas/firstName'
        lastName:
          $ref: '#/components/schemas/lastName'
        secondLastName:
          $ref: '#/components/schemas/secondLastName'
        nationalIdentificationNumber:
          $ref: '#/components/schemas/nationalIdentificationNumber'
        email:
          $ref: '#/components/schemas/email'
        phoneNumber:
          $ref: '#/components/schemas/phoneNumber'
        mobilePhoneNumber:
          $ref: '#/components/schemas/mobilePhoneNumber'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        communicationChannel:
          type: object
          description: The contact's communication preferences
          properties:
            sms:
              type: object
              description: SMS communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            email:
              type: object
              description: Email communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            postal:
              type: object
              description: Postal communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
        gdpr:
          $ref: '#/components/schemas/gdpr'
      required:
        - externalRef
        - countryCode
    CreateSiteQueryDTO:
      type: object
      additionalProperties: false
      properties:
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
      required:
        - partyCode
        - name
        - countryCode
    UpdateSiteQueryDTO:
      type: object
      additionalProperties: false
      properties:
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
      required:
        - partyCode
        - name
        - countryCode
    CommunicationChannelDTO:
      type: object
      properties:
        authorized:
          type: boolean
          description: Indicates if communication is authorized
        marketingConsent:
          type: boolean
          description: >-
            Indicates if marketing consent for communication is given (null
            value if information not available)
        consentDate:
          type: string
          pattern: ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})$
          description: |-
            The date when marketing consent was given. 
             Required format: 
             YYYY-MM-DD 

             Example of accepted values: 
            2021-06-18
            2021-06-18
    CreatePartyQueryDTO:
      type: object
      additionalProperties: false
      properties:
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        name:
          $ref: '#/components/schemas/name'
      required:
        - type
    CreatePartyResponseDTO:
      type: object
      additionalProperties: false
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    CreateRetailCustomerResponseDTO:
      type: object
      properties:
        code:
          type: string
          maxLength: 50
          description: First site code of the customer / party you have just created
          example: '100000000'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
    CreateSiteResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    UpdateSiteResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    GetMyPartyUsersResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        users:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/UserDTO'
    BadRequestDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
    ForbiddenDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
    NotFoundDTO:
      type: object
      properties:
        error:
          type: string
          example: Site code not found
        property:
          type: string
          example: siteCode
    InternalErrorDTO:
      type: object
      properties:
        error:
          type: string
          example: Unexpected error while booking the appointment
    UnauthorizedDTO:
      type: object
      properties:
        errors:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
    ResourceNotFoundDTO:
      type: object
      additionalProperties: false
      properties:
        errors:
          type: array
          minItems: 1
          maxItems: 20
          items:
            $ref: '#/components/schemas/ErrorDetailDTO'
    ErrorDetailDTO:
      type: object
      properties:
        error:
          type: string
          format: string
          maxLength: 2000
          description: Error message
        property:
          type: string
          format: string
          maxLength: 50
          description: The name of the field affected by the error
    PageNumberQueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 1000
      description: The number of page requested, minimum 1
      default: 1
    PageSizeQueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 1000
      description: The size of the page
      default: 1000
    SiteCodeQueryParam:
      $ref: '#/components/schemas/siteCode'
      description: Code of the targeted site, starting at 1000000
    IbanQueryParam:
      $ref: '#/components/schemas/iban'
      description: IBAN of the bank account
    LastModifiedDateFromQueryParam:
      type: string
      format: date-time
      example: '2024-05-02T10:00:00'
      description: last modified date from, must have the format yyyy-MM-ddTHH:mm:ss
    LastModifiedDateToQueryParam:
      type: string
      format: date-time
      example: '2024-05-02T10:00:00'
      description: last modified date to, must have the format yyyy-MM-ddTHH:mm:ss
    ExternalRefQueryParam:
      $ref: '#/components/schemas/externalRef'
    FunctionalRefQueryParam:
      $ref: '#/components/schemas/functionalRef'
    NameQueryParam:
      $ref: '#/components/schemas/name'
    SourceQueryParam:
      $ref: '#/components/schemas/source'
    TypeQueryParam:
      $ref: '#/components/schemas/TypeEnum'
    WithInactiveQueryParam:
      type: boolean
      description: With inactive flag
      example: true
      default: false
    WithExternalRefQueryParam:
      type: boolean
      description: With externalRef flag
      example: true
      default: false
    ValueQueryParam:
      type: string
      example: Transp
      description: The value contained in the party's name
      minLength: 1
      maxLength: 255
    CustomerNameQueryParam:
      type: string
      example: Euromaster
      description: The value contained in the customer's name
      minLength: 1
      maxLength: 100
    Limit100QueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 100
      default: 100
      description: Maximum number of quick search items to return
    LimitQueryParam:
      type: integer
      format: int32
      example: '2'
      minimum: 1
      maximum: 1000
      default: 100
      description: Maximum number of items to return
    HasCompanyQueryParam:
      type: boolean
      description: Filter by companies
      example: true
      default: true
    PartyCodeListQueryParameter:
      type: array
      description: List of code delimited by ,
      minItems: 1
      maxItems: 100
      example: 123,234
      items:
        $ref: '#/components/schemas/partyCode'
    SiteCodeListQueryParameter:
      type: array
      description: List of code delimited by ,
      minItems: 1
      maxItems: 100
      example: 123,234
      items:
        $ref: '#/components/schemas/siteCode'
    OfferCodeListQueryParameter:
      type: array
      description: List of code delimited by ,
      minItems: 1
      maxItems: 100
      example: 123,234
      items:
        $ref: '#/components/schemas/offerCode'
    PaginationDTO:
      type: object
      additionalProperties: false
      properties:
        next:
          type: string
          maxLength: 200
          description: Url for next page
          example: /party-erm/v1/parties?page=3&size=50
        previous:
          type: string
          maxLength: 200
          description: Url for previous page
          example: /party-erm/v1/parties?page=1&size=50
        pageTotal:
          type: integer
          format: int32
          example: '2'
          minimum: 0
          maximum: 1000
          description: Number total of page available
        totalElements:
          type: integer
          format: int32
          example: '200'
          minimum: 0
          maximum: 10000
          description: Number total of elements available
    PartiesExtendedResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        parties:
          type: array
          maxItems: 1000
          items:
            description: Party information
            $ref: '#/components/schemas/PartyExtendedDTO'
    PartyExtendedDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        active:
          $ref: '#/components/schemas/active'
        membership:
          $ref: '#/components/schemas/membership'
        legalIdentifier:
          $ref: '#/components/schemas/PartyExtendedLegalIdentifierDTO'
        contacts:
          description: List of contacts associated with the party
          $ref: '#/components/schemas/PartyExtendedContactsDTO'
        sites:
          description: List of sites associated with the party
          type: array
          items:
            type: object
            properties:
              code:
                $ref: '#/components/schemas/siteCode'
              name:
                $ref: '#/components/schemas/name'
              legalIdentifier:
                $ref: '#/components/schemas/SiteLegalIdentifierDTO'
              functionalRef:
                $ref: '#/components/schemas/functionalRef'
              active:
                $ref: '#/components/schemas/active'
              addressLine1:
                $ref: '#/components/schemas/addressLine1'
              addressLine2:
                $ref: '#/components/schemas/addressLine2'
              addressLine3:
                $ref: '#/components/schemas/addressLine3'
              postalCode:
                $ref: '#/components/schemas/postalCode'
              city:
                $ref: '#/components/schemas/city'
              subdivision:
                $ref: '#/components/schemas/subdivision'
              countryCode:
                $ref: '#/components/schemas/countryCode'
              contact:
                description: List of contacts associated with the site
                $ref: '#/components/schemas/PartyExtendedContactsDTO'
              references:
                description: List of external references associated with the site.
                $ref: '#/components/schemas/references'
        references:
          description: List of external references associated with the party.
          $ref: '#/components/schemas/references'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    PartyExtendedContactsDTO:
      description: List of contacts associated with the site or party
      type: array
      items:
        type: object
        properties:
          code:
            $ref: '#/components/schemas/contactCode'
          title:
            $ref: '#/components/schemas/title'
          firstName:
            $ref: '#/components/schemas/firstName'
          lastName:
            $ref: '#/components/schemas/lastName'
          secondLastName:
            $ref: '#/components/schemas/secondLastName'
          nationalIdentificationNumber:
            $ref: '#/components/schemas/nationalIdentificationNumber'
          email:
            $ref: '#/components/schemas/email'
          phoneNumber:
            $ref: '#/components/schemas/phoneNumber'
          mobilePhoneNumber:
            $ref: '#/components/schemas/mobilePhoneNumber'
          birthDate:
            $ref: '#/components/schemas/birthDate'
          communicationChannel:
            type: object
            description: The contact's communication preferences
            properties:
              sms:
                type: object
                description: SMS communication preferences
                $ref: '#/components/schemas/CommunicationChannelDTO'
              email:
                type: object
                description: Email communication preferences
                $ref: '#/components/schemas/CommunicationChannelDTO'
              postal:
                type: object
                description: Postal communication preferences
                $ref: '#/components/schemas/CommunicationChannelDTO'
          gdpr:
            $ref: '#/components/schemas/gdpr'
          references:
            description: List of external references associated with the contact.
            $ref: '#/components/schemas/references'
    PartiesResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        parties:
          type: array
          maxItems: 1000
          items:
            description: Party information
            $ref: '#/components/schemas/PartyDTO'
    PartyDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        references:
          description: List of external references associated with the party.
          $ref: '#/components/schemas/references'
    UpdatePartyQueryDTO:
      type: object
      additionalProperties: false
      properties:
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        name:
          $ref: '#/components/schemas/name'
      required:
        - type
    UpdatePartyResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    SitesResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        sites:
          type: array
          maxItems: 1000
          items:
            description: Site information
            $ref: '#/components/schemas/SiteDTO'
    SiteDTO:
      type: object
      properties:
        partyCode:
          $ref: '#/components/schemas/partyCode'
        code:
          $ref: '#/components/schemas/siteCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        references:
          description: List of external references associated with the site.
          $ref: '#/components/schemas/references'
    SearchPartiesResponseDTO:
      type: array
      items:
        description: Search party information
        $ref: '#/components/schemas/SearchPartyDTO'
    SearchPartyDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
    CreateSiteExternalQueryDTO:
      type: object
      additionalProperties: false
      properties:
        partyCode:
          $ref: '#/components/schemas/partyCode'
        externalRef:
          $ref: '#/components/schemas/externalRef'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        name:
          $ref: '#/components/schemas/name'
        legalIdentifier:
          $ref: '#/components/schemas/SiteLegalIdentifierDTO'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
      required:
        - externalRef
        - partyCode
        - countryCode
    CreateSiteExternalResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
    CreatePartyExternalQueryDTO:
      type: object
      additionalProperties: false
      properties:
        externalRef:
          $ref: '#/components/schemas/externalRef'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        legalIdentifier:
          $ref: '#/components/schemas/PartyLegalIdentifierDTO'
      required:
        - externalRef
        - type
    CreateSubscriptionLineQueryDTO:
      type: object
      additionalProperties: false
      properties:
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
      required:
        - inspectionServiceProviderCode
    updateSubscriptionLineQueryDTO:
      type: object
      additionalProperties: false
      properties:
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
      required:
        - inspectionServiceProviderCode
    PartyResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        type:
          $ref: '#/components/schemas/TypeEnum'
        active:
          $ref: '#/components/schemas/active'
        membership:
          $ref: '#/components/schemas/membership'
        legalIdentifier:
          $ref: '#/components/schemas/PartyLegalIdentifierDTO'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SiteResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    PartySitesResponseDTO:
      type: array
      items:
        description: Party sites information
        $ref: '#/components/schemas/PartySiteResponseDTO'
    PartySitesPaginatedResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        sites:
          type: array
          maxItems: 1000
          items:
            description: Party sites information
            $ref: '#/components/schemas/PartySiteResponseDTO'
    PartySiteResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        legalIdentifier:
          $ref: '#/components/schemas/SiteLegalIdentifierDTO'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    CreatePartyExternalResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
    references:
      description: List of external references associated with the target
      type: array
      items:
        type: object
        properties:
          source:
            $ref: '#/components/schemas/source'
          externalRef:
            $ref: '#/components/schemas/externalRef'
          countryCode:
            $ref: '#/components/schemas/countryCode'
          lastModifiedDate:
            $ref: '#/components/schemas/lastModifiedDate'
    partyCode:
      type: integer
      format: int64
      description: Party code of the source
      example: 1000032
    externalRef:
      type: string
      maxLength: 255
      description: External reference identifier
      example: '12345678'
    functionalRef:
      type: string
      maxLength: 255
      description: Functional reference identifier
      example: B1234
    membership:
      type: string
      maxLength: 255
      description: Membership program of the party
      example: Michelin
    name:
      type: string
      maxLength: 255
      description: The name
      example: Euromaster Kepler
      x-is-jackson-optional-nullable: true
    SupplierNameQueryParam:
      type: string
      example: Euromaster
      description: The value contained in the supplier's name
      minLength: 1
      maxLength: 100
    title:
      type: string
      maxLength: 255
      description: The title of the contact (e.g., Mr., Mrs., Ms.)
      example: Mr.
    addressLine1:
      type: string
      maxLength: 255
      description: The first line of the address
      example: Industrichone
    addressLine2:
      type: string
      maxLength: 255
      description: The second line of the address
      example: Industrichone
    addressLine3:
      type: string
      maxLength: 255
      description: The third line of the address
      example: Industrichone
    postalCode:
      type: string
      maxLength: 255
      description: The postal code of the address
      example: '42697'
    city:
      type: string
      maxLength: 255
      description: The city of the address
      example: Solingen
    subdivision:
      type: string
      maxLength: 255
      description: The subdivision (e.g., state, province) of the address
      example: Subdivision
    countryCode:
      type: string
      maxLength: 255
      description: The country code of the address
      example: DE
    firstName:
      type: string
      maxLength: 255
      description: The first name of the contact
      example: John
    lastName:
      type: string
      maxLength: 255
      description: The last name of the contact
      example: DOE
    secondLastName:
      type: string
      maxLength: 255
      description: The second last name of the contact
      example: DAE
    nationalIdentificationNumber:
      type: string
      maxLength: 255
      description: The national identification number of the contact
      example: 12345678E
    email:
      type: string
      maxLength: 255
      description: The email address of the contact
      example: mail@email.com
    phoneNumber:
      type: string
      maxLength: 255
      description: The phone number of the contact
      example: 00 001 1111111
    mobilePhoneNumber:
      type: string
      maxLength: 255
      description: Mobile phone number of the contact
      example: '0101010101'
    birthDate:
      type: string
      format: date
      description: The birth date of the contact
      example: '1990-10-10'
    active:
      type: boolean
      description: Active flag
      example: true
    activeWithDefault:
      type: boolean
      description: Active flag
      example: true
      default: true
    category:
      type: string
      maxLength: 255
      example: CUSTOMER
      description: Category of the offer
    partyType:
      type: string
      maxLength: 255
      example: B2B
      description: Party type of the offer
    offerType:
      type: string
      maxLength: 255
      example: PROSPECTING
      description: Type of the offer
    vehicleCategory:
      type: string
      maxLength: 255
      example: TRUCK
      description: Vehicle category of the offer
    lastModifiedDate:
      type: string
      pattern: >-
        ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
      description: Date when the element was last modified.
      example: '2024-05-02T10:00:00'
    lastModifiedBy:
      type: string
      description: User who last modified the element.
      maxLength: 255
      example: user123
    TypeEnum:
      type: string
      enum:
        - B2B
        - B2C
      x-enum-varnames:
        - B2B
        - B2C
      description: The type of the party
      example: B2B
    source:
      description: Source of the external reference.
      type: string
      maxLength: 255
      example: GENES
    PartyCodeQueryParam:
      type: integer
      format: int64
      example: 1000001
      description: Code of the targeted party, starting at 1000000
    siteCode:
      type: integer
      format: int64
      description: Site code of the source
      example: 1000032
    contactCode:
      type: integer
      format: int64
      description: Contact code of the source
      example: 1000032
    CategoryQueryParam:
      type: string
      maxLength: 255
      description: The category of the offer
      example: CUSTOMER
    OfferTypeQueryParam:
      type: string
      maxLength: 255
      description: The type of the offer
      example: PROSPECTING
    PartyTypeQueryParam:
      type: string
      maxLength: 255
      description: The party type of the offer
      example: B2B
    VehicleCategoryQueryParam:
      type: string
      maxLength: 255
      description: The vehicle category of the offer
      example: TRUCK
    OfferCodeQueryParam:
      $ref: '#/components/schemas/offerCode'
    offerCode:
      type: integer
      format: int64
      description: Offer code
      example: 100000
    disputeContactCode:
      type: integer
      format: int64
      description: >-
        Code of the partner contact associated with the dispute role for this
        subscription
      example: 102762
      x-is-jackson-optional-nullable: true
    accountingContactCode:
      type: integer
      format: int64
      description: >-
        Code of the partner contact associated with the accounting role for this
        subscription
      example: 105162
      x-is-jackson-optional-nullable: true
    purchasingContactCode:
      type: integer
      format: int64
      description: >-
        Code of the partner contact associated with the purchasing role for this
        subscription
      example: 109201
      x-is-jackson-optional-nullable: true
    businessOwnerContactCode:
      type: integer
      format: int64
      description: >-
        Code of the Euromaster contact associated with the business owner role
        for this subscription
      example: 107202
      x-is-jackson-optional-nullable: true
    GetOffersResponseDTO:
      type: array
      items:
        $ref: '#/components/schemas/GetOfferResponseDTO'
    GetOfferResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/offerCode'
        active:
          $ref: '#/components/schemas/active'
        name:
          $ref: '#/components/schemas/name'
        category:
          $ref: '#/components/schemas/category'
        partyType:
          $ref: '#/components/schemas/partyType'
        type:
          $ref: '#/components/schemas/offerType'
        vehicleCategory:
          $ref: '#/components/schemas/vehicleCategory'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    languageQueryParam:
      type: string
      maxLength: 255
      description: Language of the translation (e.g. 'nl-NL', 'fr-FR')
      example: fr-FR
    CustomerSiteCodeParam:
      type: integer
      format: int64
      example: 100000
      description: Unique site code
    GetCountriesReferentialResponseDTO:
      type: array
      items:
        $ref: '#/components/schemas/GetCountryReferentialResponseDTO'
    GetCountryReferentialResponseDTO:
      type: object
      properties:
        code:
          type: string
          maxLength: 255
          example: FR
          description: Unique code of the country
        name:
          type: string
          maxLength: 255
          example: France
          description: Default country name
    subscriptionCode:
      type: integer
      format: int64
      description: Unique code of the subscription
      example: 1000032
    startDateSubscription:
      type: string
      format: date
      description: Start date of the subscription in YYYY-MM-DD format
      example: '2024-01-01'
      x-is-jackson-optional-nullable: true
    endDateSubscription:
      type: string
      format: date
      description: End date of the subscription in YYYY-MM-DD format
      example: '2025-01-01'
      x-is-jackson-optional-nullable: true
    inspectionFrequency:
      type: integer
      format: int32
      description: Frequency of inspections in days
      example: 90
      x-is-jackson-optional-nullable: true
    pressure:
      type: boolean
      description: Indicates if the pressure is taken
      example: true
      x-is-jackson-optional-nullable: true
    resale:
      type: boolean
      description: Indicates if the party is for resale
      example: false
      x-is-jackson-optional-nullable: true
    nonResale:
      type: boolean
      description: Indicates if the party is for non resale
      example: false
      x-is-jackson-optional-nullable: true
    requiredPO:
      type: boolean
      description: Indicates if a Purchase Order (PO) is required for this party
      example: false
      x-is-jackson-optional-nullable: true
    vatType:
      type: string
      maxLength: 255
      description: >-
        VAT Type associated with the subscription for accounting purposes, if
        applicable
      example: FRD - DEBIT FR
      x-is-jackson-optional-nullable: true
    glAccount:
      description: GL account linked to the supplier
      type: integer
      format: int64
      example: 607
      x-is-jackson-optional-nullable: true
    commercialAgreement:
      description: >-
        A document that provides the detailed pricing and a comprehensive
        description of the offer
      type: string
      maxLength: 255
      example: offreSmall_MCP1
      x-is-jackson-optional-nullable: true
    paymentTypeEnum:
      type: string
      enum:
        - CASH
        - CREDIT
      description: Payment type, if applicable
      example: CASH
      x-is-jackson-optional-nullable: true
    owner:
      type: string
      maxLength: 255
      description: Owner of the bank account
      example: bank name
    bankName:
      type: string
      maxLength: 255
      description: Name of the bank
      example: bank name
    bankKey:
      type: string
      maxLength: 255
      description: Key of the bank
      example: '1234'
    bankAccountNumber:
      type: string
      maxLength: 255
      description: Number of the bank account
      example: '123456789'
    iban:
      type: string
      maxLength: 255
      description: International Bank Account Number
      example: FR123456789
    controlKey:
      type: string
      maxLength: 255
      description: Key to validate or identify the account
      example: '1234'
    bic:
      type: string
      maxLength: 255
      description: Code to identify the bank
      example: BANK000FR
    StartDateQueryParam:
      $ref: '#/components/schemas/startDateSubscription'
    EndDateQueryParam:
      $ref: '#/components/schemas/endDateSubscription'
    CreateSubscriptionQueryDTO:
      type: object
      additionalProperties: false
      properties:
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/activeWithDefault'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        vatType:
          $ref: '#/components/schemas/vatType'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        disputeContactCode:
          $ref: '#/components/schemas/disputeContactCode'
        accountingContactCode:
          $ref: '#/components/schemas/accountingContactCode'
        purchasingContactCode:
          $ref: '#/components/schemas/purchasingContactCode'
        businessOwnerContactCode:
          $ref: '#/components/schemas/businessOwnerContactCode'
        lines:
          type: array
          description: List of subscription lines
          items:
            type: object
            properties:
              customerSiteCode:
                $ref: '#/components/schemas/siteCode'
              inspectionServiceProviderCode:
                $ref: '#/components/schemas/partyCode'
            required:
              - customerSiteCode
              - inspectionServiceProviderCode
      required:
        - contractorCode
        - customerCode
        - offerCode
    CreateSubscriptionResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        vatType:
          $ref: '#/components/schemas/vatType'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        disputeContactCode:
          $ref: '#/components/schemas/disputeContactCode'
        accountingContactCode:
          $ref: '#/components/schemas/accountingContactCode'
        purchasingContactCode:
          $ref: '#/components/schemas/purchasingContactCode'
        businessOwnerContactCode:
          $ref: '#/components/schemas/businessOwnerContactCode'
        lines:
          type: array
          description: List of subscription lines
          items:
            type: object
            properties:
              customerSiteCode:
                $ref: '#/components/schemas/siteCode'
              inspectionServiceProviderCode:
                $ref: '#/components/schemas/partyCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SubscriptionCodeParam:
      type: integer
      format: int64
      description: The code of the subscription
      example: 100000
    GetSubscriptionResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        active:
          $ref: '#/components/schemas/active'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
    UpdateSubscriptionQueryDTO:
      type: object
      additionalProperties: false
      properties:
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        vatType:
          $ref: '#/components/schemas/vatType'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        disputeContactCode:
          $ref: '#/components/schemas/disputeContactCode'
        accountingContactCode:
          $ref: '#/components/schemas/accountingContactCode'
        purchasingContactCode:
          $ref: '#/components/schemas/purchasingContactCode'
        businessOwnerContactCode:
          $ref: '#/components/schemas/businessOwnerContactCode'
    UpdateSubscriptionResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        vatType:
          $ref: '#/components/schemas/vatType'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        disputeContactCode:
          $ref: '#/components/schemas/disputeContactCode'
        accountingContactCode:
          $ref: '#/components/schemas/accountingContactCode'
        purchasingContactCode:
          $ref: '#/components/schemas/purchasingContactCode'
        businessOwnerContactCode:
          $ref: '#/components/schemas/businessOwnerContactCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SubscriptionsResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        subscriptions:
          type: array
          maxItems: 1000
          items:
            description: Subscription information
            $ref: '#/components/schemas/SubscriptionDTO'
    SubscriptionDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        name:
          $ref: '#/components/schemas/name'
        active:
          $ref: '#/components/schemas/active'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        vatType:
          $ref: '#/components/schemas/vatType'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        disputeContactCode:
          $ref: '#/components/schemas/disputeContactCode'
        accountingContactCode:
          $ref: '#/components/schemas/accountingContactCode'
        purchasingContactCode:
          $ref: '#/components/schemas/purchasingContactCode'
        businessOwnerContactCode:
          $ref: '#/components/schemas/businessOwnerContactCode'
        lines:
          type: array
          description: List of subscription lines
          items:
            type: object
            properties:
              customerSiteCode:
                $ref: '#/components/schemas/siteCode'
              inspectionServiceProviderCode:
                $ref: '#/components/schemas/partyCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SubscriptionsAsCustomerResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        subscriptions:
          type: array
          maxItems: 1000
          items:
            description: Subscriptions as customer information
            $ref: '#/components/schemas/SubscriptionsAsCustomerDTO'
    SubscriptionsAsCustomerDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        active:
          $ref: '#/components/schemas/active'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SubscriptionsAsContractorResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        subscriptions:
          type: array
          maxItems: 1000
          items:
            description: Subscriptions as contractor information
            $ref: '#/components/schemas/SubscriptionsAsContractorDTO'
    SubscriptionsAsContractorDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/subscriptionCode'
        active:
          $ref: '#/components/schemas/active'
        contractorCode:
          $ref: '#/components/schemas/partyCode'
        customerCode:
          $ref: '#/components/schemas/partyCode'
        offerCode:
          $ref: '#/components/schemas/offerCode'
        startDate:
          $ref: '#/components/schemas/startDateSubscription'
        endDate:
          $ref: '#/components/schemas/endDateSubscription'
        inspectionFrequency:
          $ref: '#/components/schemas/inspectionFrequency'
        pressure:
          $ref: '#/components/schemas/pressure'
        resale:
          $ref: '#/components/schemas/resale'
        nonResale:
          $ref: '#/components/schemas/nonResale'
        requiredPO:
          $ref: '#/components/schemas/requiredPO'
        glAccount:
          $ref: '#/components/schemas/glAccount'
        commercialAgreement:
          $ref: '#/components/schemas/commercialAgreement'
        paymentType:
          $ref: '#/components/schemas/paymentTypeEnum'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    LinesFromSubscriptionAsCustomerResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        lines:
          type: array
          maxItems: 1000
          items:
            description: Subscriptions as customer information
            $ref: '#/components/schemas/LinesFromSubscriptionAsCustomerDTO'
    CommerialAgreementFromSubscriptionAsCustomerResponseDTO:
      type: string
      format: binary
    LinesFromSubscriptionAsCustomerDTO:
      type: object
      properties:
        customerSiteCode:
          $ref: '#/components/schemas/siteCode'
          description: >-
            Code of the customer's site included in the subscription Refers to a
            site of a party (code of a party's site into the Party repository)
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
          description: >-
            Code of the service provider responsible for inspections associated
            to the customerSiteCode, if applicable Refers to a party (code of
            the party into the Party repository)
        billToCode:
          $ref: '#/components/schemas/siteCode'
          description: >-
            Code of the customer's site responsible for billing and receiving
            invoices associated to the customerSiteCode, if applicable Refers to
            a site of a party (code of a party's site into the Party repository)
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    CreateSubscriptionLineResponseDTO:
      type: object
      properties:
        customerSiteCode:
          $ref: '#/components/schemas/siteCode'
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
    UpdateSubscriptionLineResponseDTO:
      type: object
      properties:
        customerSiteCode:
          $ref: '#/components/schemas/siteCode'
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
    GetLanguagesReferentialResponseDTO:
      type: array
      items:
        $ref: '#/components/schemas/GetLanguageReferentialResponseDTO'
    GetLanguageReferentialResponseDTO:
      type: object
      properties:
        code:
          type: string
          maxLength: 255
          example: fr-FR
          description: Unique code of the language
        name:
          type: string
          maxLength: 255
          example: French
          description: Default language name
    UsersResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        users:
          type: array
          maxItems: 1000
          items:
            description: User information
            $ref: '#/components/schemas/UserDTO'
    UserDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/userCode'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        userName:
          $ref: '#/components/schemas/userName'
        firstName:
          $ref: '#/components/schemas/firstName'
        lastName:
          $ref: '#/components/schemas/lastName'
        language:
          $ref: '#/components/schemas/language'
        active:
          $ref: '#/components/schemas/active'
        roles:
          type: array
          description: List of role
          items:
            type: object
            properties:
              code:
                $ref: '#/components/schemas/roleCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    userCode:
      type: integer
      format: int64
      description: Unique user code
      example: 1000032
    userName:
      type: string
      maxLength: 255
      description: Technical user name (email)
      example: pierre.martin@email.com
    language:
      type: string
      maxLength: 255
      description: Language of the translation (e.g. 'nl-NL', 'fr-FR')
      example: fr-FR
    roleCode:
      type: string
      maxLength: 255
      description: Unique role code
      example: INSPECTOR
    UserCodeParam:
      $ref: '#/components/schemas/userCode'
    UpdateUserQueryDTO:
      type: object
      additionalProperties: false
      properties:
        language:
          $ref: '#/components/schemas/language'
        roles:
          type: array
          description: List of role
          items:
            type: object
            properties:
              code:
                $ref: '#/components/schemas/roleCode'
    UpdateUserResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/userCode'
    CreateBankAccountExternalQueryDTO:
      type: object
      additionalProperties: false
      properties:
        owner:
          $ref: '#/components/schemas/owner'
        bankName:
          $ref: '#/components/schemas/bankName'
        bankKey:
          $ref: '#/components/schemas/bankKey'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        number:
          $ref: '#/components/schemas/bankAccountNumber'
        iban:
          $ref: '#/components/schemas/iban'
        controlKey:
          $ref: '#/components/schemas/controlKey'
        bic:
          $ref: '#/components/schemas/bic'
    BankAccountsResponseDTO:
      type: array
      items:
        description: Bank accounts information
        $ref: '#/components/schemas/BankAccountResponseDTO'
    BankAccountResponseDTO:
      type: object
      properties:
        owner:
          $ref: '#/components/schemas/owner'
        bankName:
          $ref: '#/components/schemas/bankName'
        bankKey:
          $ref: '#/components/schemas/bankKey'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        number:
          $ref: '#/components/schemas/bankAccountNumber'
        iban:
          $ref: '#/components/schemas/iban'
        controlKey:
          $ref: '#/components/schemas/controlKey'
        bic:
          $ref: '#/components/schemas/bic'
    siren:
      type: string
      maxLength: 255
      example: '824393151'
      description: >-
        SIREN (short for "Système d’Identification du Répertoire des
        ENtreprises") is a unique 9-digit identification number assigned by the
        French government (via INSEE) to every legal entity operating in France,
        such as companies, associations, or public institutions.
      pattern: ^\d{9}$
    nif:
      type: string
      maxLength: 255
      example: X9956748M
      description: >-
        The NIF (Número de Identificación Fiscal) is the Tax Identification
        Number issued by the Spanish Tax Agency to identify both individuals and
        legal entities (companies) for tax and administrative purposes. It's a
        mandatory alphanumeric code for any company operating legally within
        Spain, whether domestic or foreign.
      pattern: ^[A-Z]\d{7}[A-Z]$
    vatNumber:
      type: string
      maxLength: 255
      example: FR50824393151
      description: Supplier Intra-Community VAT Number
      pattern: ^[A-Z]{2}[A-Z0-9]{8,12}$
    PartyLegalIdentifierDTO:
      type: object
      description: Legal identifier information
      properties:
        siren:
          $ref: '#/components/schemas/siren'
        NIF:
          $ref: '#/components/schemas/nif'
        vatNumber:
          $ref: '#/components/schemas/vatNumber'
    PartyExtendedLegalIdentifierDTO:
      type: object
      description: Legal identifier information
      properties:
        siren:
          $ref: '#/components/schemas/siren'
        vatNumber:
          $ref: '#/components/schemas/vatNumber'
        nif:
          $ref: '#/components/schemas/nif'
    SiteLegalIdentifierDTO:
      type: object
      description: Legal identifier information
      properties:
        siret:
          type: string
          maxLength: 255
          example: '36252187900034'
          description: SIRET of the site
    CreatePartyContactExternalQueryDTO:
      type: object
      additionalProperties: false
      properties:
        externalRef:
          $ref: '#/components/schemas/externalRef'
        title:
          $ref: '#/components/schemas/title'
        firstName:
          $ref: '#/components/schemas/firstName'
        lastName:
          $ref: '#/components/schemas/lastName'
        secondLastName:
          $ref: '#/components/schemas/secondLastName'
        nationalIdentificationNumber:
          $ref: '#/components/schemas/nationalIdentificationNumber'
        email:
          $ref: '#/components/schemas/email'
        phoneNumber:
          $ref: '#/components/schemas/phoneNumber'
        mobilePhoneNumber:
          $ref: '#/components/schemas/mobilePhoneNumber'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        active:
          $ref: '#/components/schemas/active'
        communicationChannel:
          type: object
          description: The contact's communication preferences
          properties:
            sms:
              type: object
              description: SMS communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            email:
              type: object
              description: Email communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            postal:
              type: object
              description: Postal communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
        gdpr:
          $ref: '#/components/schemas/gdpr'
      required:
        - externalRef
    CreatePartyContactExternalResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/contactCode'
    GetMyContactsResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        contacts:
          type: array
          maxItems: 1000
          items:
            $ref: '#/components/schemas/ContactDto'
    gdpr:
      type: object
      description: GDPR consent details.
      properties:
        signed:
          type: boolean
          description: Indicates if the GDPR consent is signed
        signedDate:
          type: string
          pattern: ^([0-9]{4})-(?:[0-9]{2})-([0-9]{2})$
          description: |-
            The date when the GDPR consent was signed. 
             Required format: 
             YYYY-MM-DD 

             Example of accepted values: 
            2021-06-18
            2021-06-18
    ContactDto:
      type: object
      description: Contact informations
      properties:
        code:
          $ref: '#/components/schemas/contactCode'
        title:
          $ref: '#/components/schemas/title'
        firstName:
          $ref: '#/components/schemas/firstName'
        lastName:
          $ref: '#/components/schemas/lastName'
        secondLastName:
          $ref: '#/components/schemas/secondLastName'
        nationalIdentificationNumber:
          $ref: '#/components/schemas/nationalIdentificationNumber'
        email:
          $ref: '#/components/schemas/email'
        phoneNumber:
          $ref: '#/components/schemas/phoneNumber'
        mobilePhoneNumber:
          $ref: '#/components/schemas/mobilePhoneNumber'
        birthDate:
          $ref: '#/components/schemas/birthDate'
        communicationChannel:
          type: object
          description: The contact's communication preferences
          properties:
            sms:
              type: object
              description: SMS communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            email:
              type: object
              description: Email communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
            postal:
              type: object
              description: Postal communication preferences
              $ref: '#/components/schemas/CommunicationChannelDTO'
        gdpr:
          $ref: '#/components/schemas/gdpr'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SearchInspectorCustomersResponseDTO:
      type: array
      items:
        description: Search inspector customers
        $ref: '#/components/schemas/SearchInspectorCustomerDTO'
    SearchInspectorCustomerDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
    SearchCustomersResponseDTO:
      type: array
      items:
        description: Search customers
        $ref: '#/components/schemas/SearchCustomerDTO'
    SearchCustomerDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
    InspectorCustomersSitesResponseDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/siteCode'
        name:
          $ref: '#/components/schemas/name'
        legalIdentifier:
          $ref: '#/components/schemas/SiteLegalIdentifierDTO'
        partyCode:
          $ref: '#/components/schemas/partyCode'
        functionalRef:
          $ref: '#/components/schemas/functionalRef'
        active:
          $ref: '#/components/schemas/active'
        addressLine1:
          $ref: '#/components/schemas/addressLine1'
        addressLine2:
          $ref: '#/components/schemas/addressLine2'
        addressLine3:
          $ref: '#/components/schemas/addressLine3'
        postalCode:
          $ref: '#/components/schemas/postalCode'
        city:
          $ref: '#/components/schemas/city'
        subdivision:
          $ref: '#/components/schemas/subdivision'
        countryCode:
          $ref: '#/components/schemas/countryCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    GetSubscriptionLinesAsContractorResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        lines:
          type: array
          maxItems: 1000
          items:
            description: Line information
            $ref: '#/components/schemas/SubscriptionLineDTO'
    SubscriptionLineDTO:
      type: object
      properties:
        customerSiteCode:
          $ref: '#/components/schemas/siteCode'
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
        billToCode:
          $ref: '#/components/schemas/siteCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
    SearchSuppliersResponseDTO:
      type: array
      items:
        description: Search supplier information
        $ref: '#/components/schemas/SearchSupplierDTO'
    SearchSupplierDTO:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/partyCode'
        name:
          $ref: '#/components/schemas/name'
    SubscriptionLinesResponseDTO:
      type: object
      properties:
        pagination:
          description: Pagination information
          $ref: '#/components/schemas/PaginationDTO'
        subscriptionLines:
          type: array
          maxItems: 1000
          items:
            description: Subscription line information
            $ref: '#/components/schemas/SubscriptionLineResponseDTO'
    SubscriptionLineResponseDTO:
      type: object
      properties:
        subscriptionCode:
          $ref: '#/components/schemas/subscriptionCode'
        customerSiteCode:
          $ref: '#/components/schemas/siteCode'
        inspectionServiceProviderCode:
          $ref: '#/components/schemas/partyCode'
        billToCode:
          $ref: '#/components/schemas/siteCode'
        lastModifiedDate:
          $ref: '#/components/schemas/lastModifiedDate'
        lastModifiedBy:
          $ref: '#/components/schemas/lastModifiedBy'
      required:
        - subscriptionCode
        - customerSiteCode
  responses:
    CreateRetailCustomerResponseDTO:
      description: The retail customer creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateRetailCustomerResponseDTO'
          examples:
            createRetailCustomer:
              summary: Retail customer successfully created
              value:
                code: '10001111'
                partyCode: 10001643
                contactCode: 10613678
    CreatePartyResponseDTO:
      description: The party creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePartyResponseDTO'
          examples:
            createParty:
              summary: Party successfully created
              value:
                code: 100001
                functionalRef: B1234
                type: B2B
                active: true
                name: TRANSPORT NICOLAS
                lastModifiedDate: 2024-12-27:12:23:23
    PartiesExtendedResponseDTO:
      description: The parties extended response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartiesExtendedResponseDTO'
          examples:
            standardResponse:
              summary: Parties
              value:
                pagination:
                  next: /party-erm/v1/parties/extended?page=3&size=50
                  previous: /party-erm/v1/parties/extended?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                parties:
                  - code: 100001
                    name: EUROMASTER SERVICE ET MANAGEMENT
                    functionalRef: B60406111
                    type: B2B
                    active: true
                    membership: Association Charade
                    legalIdentifier:
                      siren: '824393151'
                      vatNumber: FR50824393151
                      nif: X9956748M
                    contacts:
                      - code: 100001
                        title: Mr
                        firstName: Firstname
                        lastName: Lastname
                        secondLastName: SecondLastName
                        nationalIdentificationNumber: 12345678E
                        email: firstname.lastname@company.com
                        phoneNumber: '+33473345678'
                        mobilePhoneNumber: '+33612345678'
                        birthDate: '1970-01-01'
                        communicationChannel:
                          sms:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                          email:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                          postal:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                        gdpr:
                          signed: true
                          signedDate: '2025-01-01'
                        references:
                          source: GENES
                          externalRef: '12345678'
                          countryCode: ES
                          lastModifiedDate: '2024-12-27T12:23:23'
                    sites:
                      - code: 100786
                        name: EUROMASTER KEPLER
                        legalIdentifier:
                          siret: '36252187900034'
                        functionalRef: B
                        active: true
                        addressLine1: 123 Main St Apt 4B
                        addressLine2: Anytown, CA 90210
                        addressLine3: USA
                        postalCode: '90210'
                        city: Anytown
                        subdivision: Subdivision
                        countryCode: FR
                        contact:
                          - code: 100001
                            title: Mr
                            firstName: Firstname
                            lastName: Lastname
                            secondLastName: SecondLastName
                            nationalIdentificationNumber: 12345678E
                            email: firstname.lastname@company.com
                            phoneNumber: '+33473345678'
                            mobilePhoneNumber: '+33612345678'
                            birthDate: '1970-01-01'
                            communicationChannel:
                              sms:
                                authorized: true
                                marketingConsent: true
                                consentDate: '1970-01-01'
                              email:
                                authorized: true
                                marketingConsent: true
                                consentDate: '1970-01-01'
                              postal:
                                authorized: true
                                marketingConsent: true
                                consentDate: '1970-01-01'
                            gdpr:
                              signed: true
                              signedDate: '2025-01-01'
                            references:
                              source: GENES
                              externalRef: '12345678'
                              countryCode: ES
                              lastModifiedDate: '2024-12-27T12:23:23'
                        references:
                          source: GENES
                          externalRef: '12345678'
                          countryCode: ES
                          lastModifiedDate: '2024-12-27T12:23:23'
                    references:
                      - source: GENES
                        externalRef: '12345678'
                        countryCode: ES
                        lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedDate: '2025-07-10T14:30:00'
                    lastModifiedBy: user1
    PartyExtendedResponseDTO:
      description: The party extended by code response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartyExtendedDTO'
          examples:
            standardResponse:
              summary: Party data successfully retrieved
              value:
                code: 100001
                name: EUROMASTER SERVICE ET MANAGEMENT
                functionalRef: B60406111
                type: B2B
                active: true
                membership: Association Charade
                legalIdentifier:
                  siren: '824393151'
                  vatNumber: FR50824393151
                  nif: X9956748M
                contacts:
                  - code: 100001
                    title: Mr
                    firstName: Firstname
                    lastName: Lastname
                    secondLastName: SecondLastName
                    nationalIdentificationNumber: 12345678E
                    email: firstname.lastname@company.com
                    phoneNumber: '+33473345678'
                    mobilePhoneNumber: '+33612345678'
                    birthDate: '1970-01-01'
                    communicationChannel:
                      sms:
                        authorized: true
                        marketingConsent: true
                        consentDate: '1970-01-01'
                      email:
                        authorized: true
                        marketingConsent: true
                        consentDate: '1970-01-01'
                      postal:
                        authorized: true
                        marketingConsent: true
                        consentDate: '1970-01-01'
                    gdpr:
                      signed: true
                      signedDate: '2025-01-01'
                    references:
                      source: GENES
                      externalRef: '12345678'
                      countryCode: ES
                      lastModifiedDate: '2024-12-27T12:23:23'
                sites:
                  - code: 100786
                    name: EUROMASTER KEPLER
                    legalIdentifier:
                      siret: '36252187900034'
                    functionalRef: B
                    active: true
                    addressLine1: 123 Main St Apt 4B
                    addressLine2: Anytown, CA 90210
                    addressLine3: USA
                    postalCode: '90210'
                    city: Anytown
                    subdivision: Subdivision
                    countryCode: FR
                    contact:
                      - code: 100001
                        title: Mr
                        firstName: Firstname
                        lastName: Lastname
                        secondLastName: SecondLastName
                        nationalIdentificationNumber: 12345678E
                        email: firstname.lastname@company.com
                        phoneNumber: '+33473345678'
                        mobilePhoneNumber: '+33612345678'
                        birthDate: '1970-01-01'
                        communicationChannel:
                          sms:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                          email:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                          postal:
                            authorized: true
                            marketingConsent: true
                            consentDate: '1970-01-01'
                        gdpr:
                          signed: true
                          signedDate: '2025-01-01'
                        references:
                          source: GENES
                          externalRef: '12345678'
                          countryCode: ES
                          lastModifiedDate: '2024-12-27T12:23:23'
                    references:
                      source: GENES
                      externalRef: '12345678'
                      countryCode: ES
                      lastModifiedDate: '2024-12-27T12:23:23'
                references:
                  - source: GENES
                    externalRef: '12345678'
                    countryCode: ES
                    lastModifiedDate: '2024-12-27T12:23:23'
                lastModifiedDate: '2025-07-10T14:30:00'
                lastModifiedBy: user1
    PartiesResponseDTO:
      description: The parties response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartiesResponseDTO'
          examples:
            standardResponse:
              summary: Parties
              value:
                pagination:
                  next: /party-erm/v1/parties?page=3&size=50
                  previous: /party-erm/v1/parties?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                parties:
                  - code: '100001'
                    functionalRef: B1234
                    type: B2C
                    active: true
                    name: Michelin
                    lastModifiedDate: 2024-12-27:12:23:23
                    references:
                      - source: GENES
                        externalRef: '12345678'
                        countryCode: ES
                        lastModifiedDate: '2024-12-27T12:23:23'
    PartyResponseDTO:
      description: The requested party response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartyResponseDTO'
          examples:
            getParty:
              summary: Party successfully retrieved
              value:
                code: 1020202
                name: SARL BTP PRADELS
                functionalRef: B1234
                type: B2B
                active: true
                membership: Association Charade
                legalIdentifier:
                  siren: '824393151'
                  nif: X9956748M
                  VATNumber: FR50824393151
                lastModifiedDate: '2024-12-27T12:23:23'
                lastModifiedBy: user1
    UpdatePartyResponseDTO:
      description: The party updated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdatePartyResponseDTO'
          examples:
            updateParty:
              summary: Party successfully updated
              value:
                code: 100001
                functionalRef: B1234
                type: B2B
                active: true
                name: TRANSPORT NICOLAS
                lastModifiedDate: 2024-12-27:12:23:23
    SearchPartiesResponseDTO:
      description: The search parties response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SearchPartiesResponseDTO'
          examples:
            standardResponse:
              summary: Parties
              value:
                - code: 100001
                  name: TRANSPORT NICOLAS
                - code: 100006
                  name: TRANSPORT XXX
    SitesResponseDTO:
      description: The sites response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SitesResponseDTO'
          examples:
            standardResponse:
              summary: Sites
              value:
                pagination:
                  next: /party-erm/v1/sites?page=3&size=50
                  previous: /party-erm/v1/sites?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                sites:
                  - partyCode: 100001
                    code: 100023
                    functionalRef: B1234
                    active: true
                    name: Euromaster Kepler
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '42697'
                    city: Solingen
                    subdivision: null
                    countryCode: DE
                    lastModifiedDate: 2024-12-27:12:23:23
                    references:
                      - source: ES_EQUITY
                        externalRef: '20831238'
                        countryCode: ES
                        lastModifiedDate: 2024-12-27:12:23:23
    CreateSiteResponseDTO:
      description: The site creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSiteResponseDTO'
          examples:
            createSite:
              summary: Site successfully created
              value:
                code: 100023
                partyCode: 1000032
                functionalRef: B1234
                active: true
                name: Euromaster Kepler
                addressLine1: Industrichone
                addressLine2: null
                addressLine3: null
                postalCode: '42697'
                city: Solingen
                subdivision: null
                countryCode: DE
                lastModifiedDate: 2024-12-27:12:23:23
    UpdateSiteResponseDTO:
      description: The site updated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSiteResponseDTO'
          examples:
            updateSite:
              summary: Site successfully updated
              value:
                code: 100023
                partyCode: 1000032
                functionalRef: B1234
                active: true
                name: Euromaster Kepler
                addressLine1: Industrichone
                addressLine2: null
                addressLine3: null
                postalCode: '42697'
                city: Solingen
                subdivision: null
                countryCode: DE
                lastModifiedDate: 2024-12-27:12:23:23
    CreatePartyExternalResponseDTO:
      description: The party external creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePartyExternalResponseDTO'
          examples:
            CreateSiteExternal:
              summary: Party successfully created
              value:
                code: 10001111
    CreateSiteExternalResponseDTO:
      description: The site external creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSiteExternalResponseDTO'
          examples:
            CreateSiteExternal:
              summary: Site successfully created
              value:
                code: 10001111
    GetSiteResponseDTO:
      description: The requested site response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SiteResponseDTO'
          examples:
            getSite:
              summary: Site successfully retrieved
              value:
                code: 100023
                partyCode: 1000032
                functionalRef: B1234
                active: true
                name: Euromaster Kepler
                addressLine1: Industrichone
                addressLine2: null
                addressLine3: null
                postalCode: '42697'
                city: Solingen
                subdivision: null
                countryCode: DE
                lastModifiedDate: 2024-12-27:12:23:23
    GetInspectorCustomersSiteResponseDTO:
      description: The requested inspector customer site response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartySiteResponseDTO'
          examples:
            getInspectorCustomersSite:
              summary: Site successfully retrieved
              value:
                code: 100023
                partyCode: 1000032
                functionalRef: B1234
                active: true
                name: Euromaster Kepler
                addressLine1: Industrichone
                addressLine2: null
                addressLine3: null
                postalCode: '42697'
                city: Solingen
                subdivision: null
                countryCode: DE
                legalIdentifier:
                  siret: '36252187900034'
                lastModifiedDate: 2024-12-27:12:23:23
                lastModifiedBy: user@email.com
    PartySitesPaginatedResponseDTO:
      description: The requested sites paginated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartySitesPaginatedResponseDTO'
          examples:
            getSite:
              summary: Sites successfully retrieved
              value:
                pagination:
                  next: /party-erm/v1/parties/me/sites?page=2&size=50
                  previous: /party-erm/v1/parties/me/sites?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                sites:
                  - code: 100023
                    partyCode: 1000032
                    functionalRef: B1234
                    name: Euromaster Kepler
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '42697'
                    city: Solingen
                    subdivision: Castelló
                    countryCode: ES
                    legalIdentifier:
                      siret: '36252187900034'
                    lastModifiedDate: '2024-12-27T12:23:23'
                  - code: 100024
                    partyCode: 1000033
                    functionalRef: B1234
                    name: Euromaster Neumarkt
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '92318'
                    city: Neumarkt
                    subdivision: Castelló
                    countryCode: ES
                    legalIdentifier:
                      siret: '36252187900034'
                    lastModifiedDate: '2024-12-27T12:23:23'
    GetPartySitesResponseDTO:
      description: The requested sites response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartySitesResponseDTO'
          examples:
            getSite:
              summary: Sites successfully retrieved
              value:
                - code: 100023
                  partyCode: 1000032
                  functionalRef: B1234
                  name: Euromaster Kepler
                  active: true
                  addressLine1: Industrichone
                  addressLine2: null
                  addressLine3: null
                  postalCode: '42697'
                  city: Solingen
                  subdivision: Castelló
                  countryCode: ES
                  legalIdentifier:
                    siret: '36252187900034'
                  lastModifiedDate: '2024-12-27T12:23:23'
                - code: 100024
                  partyCode: 1000033
                  functionalRef: B1234
                  name: Euromaster Neumarkt
                  active: true
                  addressLine1: Industrichone
                  addressLine2: null
                  addressLine3: null
                  postalCode: '92318'
                  city: Neumarkt
                  subdivision: Castelló
                  countryCode: ES
                  legalIdentifier:
                    siret: '36252187900034'
                  lastModifiedDate: '2024-12-27T12:23:23'
    GetOffersResponseDTO:
      description: Offers data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetOffersResponseDTO'
          examples:
            getOffers:
              summary: standardResponse
              value:
                - code: 100000
                  active: true
                  name: Master Care+
                  category: CUSTOMER
                  partyType: B2B
                  type: PROSPECTING
                  vehicleCategory: TRUCK
                  lastModifiedDate: '2024-12-27T12:23:23'
                  lastModifiedBy: user1
                - code: 100001
                  active: true
                  name: Master Premium
                  category: CUSTOMER
                  partyType: B2B
                  type: TRANSACTIONAL
                  vehicleCategory: TRUCK
                  lastModifiedDate: '2024-12-27T12:23:23'
                  lastModifiedBy: user2
    GetOfferResponseDTO:
      description: The requested offer response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetOfferResponseDTO'
          examples:
            getOffer:
              summary: Offer successfully retrieved
              value:
                code: 100001
                active: true
                name: Master Premium
                category: CUSTOMER
                partyType: B2B
                type: TRANSACTIONAL
                vehicleCategory: TRUCK
                lastModifiedDate: '2024-12-27T12:23:23'
                lastModifiedBy: user2
    GetCountriesReferentialResponseDTO:
      description: Countries Referential
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetCountriesReferentialResponseDTO'
          examples:
            standardResponse:
              value:
                - code: FR
                  name: France
    CreateSubscriptionResponseDTO:
      description: The subscription creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSubscriptionResponseDTO'
          examples:
            createSubscription:
              summary: Subscription successfully created
              value:
                code: 100023
                name: Subscription Name
                active: true
                contractorCode: 900000
                customerCode: 900001
                offerCode: 100000
                startDate: '2024-03-01'
                endDate: '2026-03-01'
                inspectionFrequency: 90
                pressure: true
                resale: false
                nonResale: false
                requiredPO: false
                glAccount: 607
                vatType: FRD - DEBIT FR
                commercialAgreement: offreSmall_MCP1
                paymentType: CASH
                disputeContactCode: 102762
                accountingContactCode: 105162
                purchasingContactCode: 109201
                businessOwnerContactCode: 107202
                lines:
                  - customerSiteCode: 900000
                    inspectionServiceProviderCode: 900002
                  - customerSiteCode: 900001
                    inspectionServiceProviderCode: 900003
                lastModifiedDate: '2024-12-27T12:23:23'
                lastModifiedBy: user1
    SubscriptionsResponseDTO:
      description: The subscriptions response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SubscriptionsResponseDTO'
          examples:
            standardResponse:
              summary: Subscriptions
              value:
                pagination:
                  next: /party-erm/v1/subscriptions?page=3&size=50
                  previous: /party-erm/v1/subscriptions?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                subscriptions:
                  - code: 100023
                    name: Subscription Name
                    active: true
                    contractorCode: 900000
                    customerCode: 900001
                    offerCode: 100000
                    startDate: '2024-03-01'
                    endDate: '2026-03-01'
                    inspectionFrequency: 90
                    pressure: true
                    resale: false
                    nonResale: false
                    requiredPO: false
                    glAccount: 607
                    vatType: FRD - DEBIT FR
                    commercialAgreement: offreSmall_MCP1
                    paymentType: CASH
                    disputeContactCode: 102762
                    accountingContactCode: 105162
                    purchasingContactCode: 109201
                    businessOwnerContactCode: 107202
                    lines:
                      - customerSiteCode: 900000
                        inspectionServiceProviderCode: 900002
                      - customerSiteCode: 900001
                        inspectionServiceProviderCode: 900003
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user1
    GetSubscriptionResponseDTO:
      description: The requested subscription response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSubscriptionResponseDTO'
          examples:
            getSubscription:
              summary: Subscription successfully retrieved
              value:
                code: 100023
                contractorCode: 900000
                customerCode: 900001
                offerCode: 100000
                startDate: '2024-03-01'
                endDate: '2026-03-01'
                active: true
                inspectionFrequency: 90
                pressure: true
                lastModifiedDate: '2024-12-27T12:23:23'
    SubscriptionsAsCustomerResponseDTO:
      description: A list of customer's subscriptions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SubscriptionsAsCustomerResponseDTO'
          examples:
            standardResponse:
              summary: Subscriptions
              value:
                pagination:
                  next: /party-erm/v1/subscriptions-as-customer?page=3&size=50
                  previous: /party-erm/v1/subscriptions-as-customer?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                subscriptions:
                  - code: 100023
                    active: true
                    contractorCode: 900000
                    customerCode: 900001
                    offerCode: 100000
                    startDate: '2024-03-01'
                    endDate: '2026-03-01'
                    inspectionFrequency: 90
                    pressure: true
                    resale: false
                    nonResale: false
                    requiredPO: false
                    glAccount: 607
                    commercialAgreement: offreSmall_MCP1
                    paymentType: CASH
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user1
    SubscriptionsAsContractorResponseDTO:
      description: A list of contractor's subscriptions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SubscriptionsAsContractorResponseDTO'
          examples:
            standardResponse:
              summary: Subscriptions
              value:
                pagination:
                  next: /party-erm/v1/subscriptions-as-contractor?page=3&size=50
                  previous: /party-erm/v1/subscriptions-as-contractor?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                subscriptions:
                  - code: 100023
                    active: true
                    contractorCode: 900000
                    customerCode: 900001
                    offerCode: 100000
                    startDate: '2024-03-01'
                    endDate: '2026-03-01'
                    inspectionFrequency: 90
                    pressure: true
                    resale: false
                    nonResale: false
                    requiredPO: false
                    glAccount: 607
                    commercialAgreement: offreSmall_MCP1
                    paymentType: CASH
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user1
    LinesFromSubscriptionAsCustomerResponseDTO:
      description: A list of subscription's lines
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/LinesFromSubscriptionAsCustomerResponseDTO'
          examples:
            standardResponse:
              summary: Lines
              value:
                pagination:
                  next: /subscriptions-as-customer/100001/lines?page=3&size=50
                  previous: /subscriptions-as-customer/100001/lines?page=1&size=50
                  pageTotal: 3
                  totalElements: 125
                lines:
                  - customerSiteCode: 100001
                    inspectionServiceProviderCode: 100003
                    billToCode: 100005
                    lastModifiedDate: '2025-07-10T14:30:00'
                    lastModifiedBy: user1
    CommerialAgreementFromSubscriptionAsCustomerResponseDTO:
      description: A pdf of a commercial agreement
      content:
        application/pdf:
          schema:
            $ref: >-
              #/components/schemas/CommerialAgreementFromSubscriptionAsCustomerResponseDTO
    GetUserResponseDTO:
      description: The requested user response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UserDTO'
          examples:
            getUser:
              summary: User successfully retrieved
              value:
                code: 100001
                userName: pierre.martin@email.com
                firstName: Pierre
                lastName: Martin
                active: true
                language: fr-FR
                roles:
                  - code: INSPECTOR
                  - code: CONTRACTOR
                partyCode: 1000726
                lastModifiedDate: '2024-12-27T12:23:23'
    UsersResponseDTO:
      description: The requested users response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UsersResponseDTO'
          examples:
            getUsers:
              summary: Users successfully retrieved
              value:
                pagination:
                  next: /party-erm/v1/parties/extended?page=3&size=50
                  previous: /party-erm/v1/parties/extended?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                users:
                  - code: 100001
                    userName: pierre.martin@email.com
                    firstName: Pierre
                    lastName: Martin
                    active: true
                    language: fr-FR
                    roles:
                      - code: INSPECTOR
                      - code: CONTRACTOR
                    partyCode: 1000726
                    lastModifiedDate: '2024-12-27T12:23:23'
    UpdateSubscriptionResponseDTO:
      description: The updated subscription response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSubscriptionResponseDTO'
          examples:
            updateSubscription:
              summary: Subscription successfully updated
              value:
                code: 1000000
                name: Subscription Name
                active: true
                contractorCode: 1000000
                customerCode: 1000001
                offerCode: 1000002
                startDate: '2024-03-01'
                endDate: '2026-03-01'
                inspectionFrequency: 90
                pressure: true
                resale: false
                nonResale: false
                requiredPO: false
                glAccount: 607
                vatType: FRD - DEBIT FR
                commercialAgreement: offreSmall_MCP1
                paymentType: CASH
                disputeContactCode: 102762
                accountingContactCode: 105162
                purchasingContactCode: 109201
                businessOwnerContactCode: 107202
                lastModifiedDate: '2024-12-27T12:23:23'
                lastModifiedBy: user1
    CreateSubscriptionLineResponseDTO:
      description: The lines to subscription creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreateSubscriptionLineResponseDTO'
          examples:
            createSubscriptionLine:
              summary: Lines to subscription successfully created
              value:
                customerSiteCode: 10001111
                inspectionServiceProviderCode: 10002222
    UpdateSubscriptionLineResponseDTO:
      description: The subscription's line updated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateSubscriptionLineResponseDTO'
          examples:
            createSubscriptionLine:
              summary: Lines to subscription successfully updated
              value:
                customerSiteCode: 10001111
                inspectionServiceProviderCode: 10002222
    GetLanguagesReferentialResponseDTO:
      description: Languages Referential
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetLanguagesReferentialResponseDTO'
          examples:
            standardResponse:
              value:
                - code: fr-FR
                  name: French
                - code: en-US
                  name: English
    GetBankAccountsResponseDTO:
      description: The requested bank account response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BankAccountsResponseDTO'
          examples:
            getBankAccount:
              summary: Bank account successfully retrieved
              value:
                owner: John Doe
                bankName: Bank
                bankKey: '1234'
                countryCode: FR
                number: '123456789'
                iban: FR123456789
                controlKey: '1234'
                bic: BANK000FR
    CreatePartyContactExternalResponseDTO:
      description: The contact external creation response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/CreatePartyContactExternalResponseDTO'
          examples:
            createContactExternal:
              summary: Contact successfully created
              value:
                code: 10001111
    GetMyContactsResponseDTO:
      description: The requested contact response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetMyContactsResponseDTO'
          examples:
            createContactExternal:
              summary: Contact successfully created
              value:
                pagination:
                  next: /party-erm/v1/parties/me/contacts?page=3&size=50
                  previous: /party-erm/v1/parties/me/contacts?page=1&size=50
                  pageTotal: '1'
                  totalElements: '125'
                contacts:
                  - code: '100111'
                    title: M
                    firstName: Rémi
                    lastName: PRADELS
                    secondLastName: null
                    nationalIdentificationNumber: 12345678E
                    email: remi.pradels@gmail.com
                    phoneNumber: null
                    mobilePhoneNumber: '0682616339'
                    birthDate: null
                    communicationChannel:
                      sms:
                        authorized: true
                        marketingConsent: true
                        consentDate: '2024-09-10'
                      email:
                        authorized: true
                        marketingConsent: true
                        consentDate: '2024-09-11'
                      postal:
                        authorized: true
                        marketingConsent: true
                        consentDate: '2024-09-12'
                    gdpr:
                      signed: null
                      signedDate: null
                    lastModifiedDate: 2024-12-27:12:23:23
                    lastModifiedBy: florent.buhot@euromaster.com
    GetMyPartyUsersResponseDTO:
      description: The requested users paginated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetMyPartyUsersResponseDTO'
          examples:
            getMyUsers:
              summary: Users successfully retrieved
              value:
                pagination:
                  next: /party-erm/v1/parties/me/users?page=3&size=50
                  previous: /party-erm/v1/parties/me/users?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                users:
                  - code: 100001
                    userName: firstname.lastname@company.com
                    firstName: Firstname
                    lastName: Lastname
                    active: true
                    language: fr-FR
                    partyCode: 100001
                    roles:
                      - code: INSPECTOR
                      - code: TECHNICIAN
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user1
                  - code: 100002
                    userName: firstname.lastname@company.com
                    firstName: Firstname
                    lastName: Lastname
                    active: true
                    language: fr-FR
                    partyCode: 100001
                    roles:
                      - code: INSPECTOR
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user2
    SubscriptionCodeNotFoundDTO:
      description: Subscription not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidSubscriptionCode:
              summary: The Subscription cannot be found
              value:
                errors:
                  - error: The Subscription code XXABCXX cannot be found
                    property: subscriptionCode
    OfferCodeNotFoundDTO:
      description: Offer not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidOfferCode:
              summary: The Offer cannot be found
              value:
                errors:
                  - error: The offer code XXABCXX cannot be found
                    property: code
    PartyCodeNotFoundDTO:
      description: Party not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidParty:
              summary: The party cannot be found
              value:
                errors:
                  - error: The party code XXABCXX cannot be found
                    property: partyCode
    MyPartyNotFoundDTO:
      description: Party not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            userNotFound:
              summary: The user cannot be found
              value:
                errors:
                  - error: The user cannot be found
                    property: clientId
            partyNotFound:
              summary: The user's party cannot be found
              value:
                errors:
                  - error: The user's party cannot be found
                    property: clientId
    SiteCodeNotFoundDTO:
      description: Site not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidSiteCode:
              summary: The Site cannot be found
              value:
                errors:
                  - error: The site code XXABCXX cannot be found
                    property: siteCode
    UserNotFoundDTO:
      description: User not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidSubscriptionCode:
              summary: The user cannot be found
              value:
                errors:
                  - error: No user for your okta token
                    property: clientId
    UserCodeNotFoundDTO:
      description: User not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResourceNotFoundDTO'
          examples:
            invalidSubscriptionCode:
              summary: The User cannot be found
              value:
                errors:
                  - error: The user code XXABCXX cannot be found
                    property: userCode
    UpdateUserResponseDTO:
      description: The updated user response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UpdateUserResponseDTO'
          examples:
            updateUser:
              summary: User successfully updated
              value:
                code: 1000000
    UnauthorizedDTO:
      description: The requester is not recognized by our system.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnauthorizedDTO'
          examples:
            Missing client id:
              summary: Missing client id
              value:
                errors:
                  - error: The client id is missing
                    property: clientid
            Bad credentials:
              summary: The credentials are wrong
              value:
                errors:
                  - error: The credentials are wrong
                    property: Authorization
            Missing credentials:
              summary: The credentials are missing
              value:
                errors:
                  - error: The credentials are missing
                    property: Authorization
    ForbiddenDTO:
      description: The requester is not allowed to access the requested resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenDTO'
          examples:
            User not allowed client id:
              summary: User not allowed client id
              value:
                errors:
                  - error: The user is not allowed
                    property: clientid
            User not allowed oauth2:
              summary: User not allowed oauth2
              value:
                errors:
                  - error: The user is not allowed
                    property: JWTToken
            '':
              summary: Authorization refused
              value:
                errors:
                  - error: The user is not allowed to perform this operation
                    property: clientid
    InternalErrorDTO:
      description: An internal error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalErrorDTO'
          examples:
            internalError:
              summary: An internal error occurred
              value:
                errors:
                  - error: >-
                      An internal error occurred, please try again later. Thank
                      you for your understanding
    SearchInspectorCustomersResponseDTO:
      description: The search inspector customers response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SearchInspectorCustomersResponseDTO'
          examples:
            standardResponse:
              summary: Inspector Customers
              value:
                - code: 100001
                  name: EUROMASTER SERVICE ET MANAGEMENT
                - code: 100006
                  name: TRANSPORT NICOLAS
    GetInspectorCustomersSitesResponseDTO:
      description: The requested sites paginated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartySitesPaginatedResponseDTO'
          examples:
            getSite:
              summary: Sites successfully retrieved
              value:
                pagination:
                  next: >-
                    /party-erm/v1/inspector-customers/1000000/sites?page=2&size=50
                  previous: >-
                    /party-erm/v1/inspector-customers/1000000/sites?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                sites:
                  - code: 100023
                    name: Euromaster Kepler
                    legalIdentifier:
                      siret: '36252187900034'
                    partyCode: 1000032
                    functionalRef: B1234
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '42697'
                    city: Solingen
                    subdivision: Castelló
                    countryCode: ES
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user@email.com
                  - code: 100024
                    name: Euromaster Neumarkt
                    legalIdentifier:
                      siret: '36252187900034'
                    partyCode: 1000033
                    functionalRef: B1234
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '92318'
                    city: Neumarkt
                    subdivision: Castelló
                    countryCode: ES
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user@email.com
    SearchCustomersResponseDTO:
      description: The search customers response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SearchCustomersResponseDTO'
          examples:
            standardResponse:
              summary: Customers
              value:
                - code: 100001
                  name: EUROMASTER SERVICE ET MANAGEMENT
                - code: 100006
                  name: TRANSPORT NICOLAS
    GetCustomersSitesResponseDTO:
      description: The requested sites paginated response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartySitesPaginatedResponseDTO'
          examples:
            getSite:
              summary: Sites successfully retrieved
              value:
                pagination:
                  next: /party-erm/v1/customers/1000000/sites?page=2&size=50
                  previous: /party-erm/v1/customers/1000000/sites?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                sites:
                  - code: 100023
                    name: Euromaster Kepler
                    legalIdentifier:
                      siret: '36252187900034'
                    partyCode: 1000032
                    functionalRef: B1234
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '42697'
                    city: Solingen
                    subdivision: Castelló
                    countryCode: ES
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user@email.com
                  - code: 100024
                    name: Euromaster Neumarkt
                    legalIdentifier:
                      siret: '36252187900034'
                    partyCode: 1000033
                    functionalRef: B1234
                    active: true
                    addressLine1: Industrichone
                    addressLine2: null
                    addressLine3: null
                    postalCode: '92318'
                    city: Neumarkt
                    subdivision: Castelló
                    countryCode: ES
                    lastModifiedDate: '2024-12-27T12:23:23'
                    lastModifiedBy: user@email.com
    GetSubscriptionLinesAsContractorResponseDTO:
      description: The response for getting subscription lines as a contractor
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetSubscriptionLinesAsContractorResponseDTO'
          examples:
            standardResponse:
              summary: Subscription lines retrieved successfully
              value:
                pagination:
                  next: >-
                    /party-erm/v1/subscriptions-as-contractor/100001/lines?page=3&size=50
                  previous: >-
                    /party-erm/v1/subscriptions-as-contractor/100001/lines?page=1&size=50
                  pageTotal: '3'
                  totalElements: '125'
                lines:
                  - customerSiteCode: 100001
                    inspectionServiceProviderCode: 100003
                    billToCode: 100005
                    lastModifiedDate: '2025-07-10T14:30:00'
                    lastModifiedBy: user1
    SearchSuppliersResponseDTO:
      description: The search suppliers response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SearchSuppliersResponseDTO'
          examples:
            standardResponse:
              summary: Suppliers
              value:
                - code: 100001
                  name: EUROMASTER SERVICE ET MANAGEMENT
                - code: 100006
                  name: TRANSPORT XXX
    SubscriptionLinesResponseDTO:
      description: A list of subscription's lines
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SubscriptionLinesResponseDTO'
          examples:
            getSubscriptionLines:
              summary: Subscription lines retrieved successfully
              value:
                pagination:
                  next: /party-erm/v1/subscriptions/lines?pageNumber=3&pageSize=10
                  previous: /party-erm/v1/subscriptions/lines?pageNumber=1&pageSize=10
                  pageTotal: '3'
                  totalElements: '35'
                subscriptionLines:
                  - subscriptionCode: 100001
                    customerSiteCode: 100001
                    inspectionServiceProviderCode: 100003
                    billToCode: 100005
                    lastModifiedDate: '2025-07-10T14:30:00'
                    lastModifiedBy: user1
