components:
  schemas:
    AddressBook:
      description: Customer addressbook
      properties:
        city:
          description: Address book city
          example: Paris
          type: string
        country:
          description: Address book country code iso 2
          example: FR
          type: string
        phoneNumber:
          description: Address book phone number
          example: '0612345678'
          maxLength: 50
          minLength: 0
          type: string
        state:
          description: Address book state
          example: France
          type: string
        streetAddress:
          description: Address book street address
          example: 1 rue de la paix
          maxLength: 150
          minLength: 1
          type: string
        zipCode:
          description: Address book zipCode
          example: 75001
          format: int64
          type: integer
      required:
        - city
        - country
        - phoneNumber
        - streetAddress
        - zipCode
      type: object
    BlackListRequest:
      properties:
        createDate:
          deprecated: true
          format: date-time
          type: string
        customerId:
          type: string
        dbVersion:
          format: int64
          type: integer
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        modelVersion:
          deprecated: true
          type: string
        originalId:
          type: string
          writeOnly: true
        signedData:
          description: Signed data to be blacklisted
          type: string
        updateDate:
          deprecated: true
          format: date-time
          type: string
      required:
        - signedData
      type: object
    BlackListedSignedData:
      properties:
        clear:
          type: string
        createDate:
          deprecated: true
          format: date-time
          type: string
        customerId:
          type: string
        dbVersion:
          format: int64
          type: integer
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        modelVersion:
          deprecated: true
          type: string
        originalId:
          type: string
          writeOnly: true
        reason:
          type: string
        signature:
          type: string
        updateDate:
          deprecated: true
          format: date-time
          type: string
      type: object
    Customer:
      properties:
        addressBook:
          $ref: '#/components/schemas/AddressBook'
        authorizedCustomers:
          items:
            type: string
          type: array
          uniqueItems: true
        availableAdditionalPaymentTypes:
          deprecated: true
          items:
            deprecated: true
            type: string
          type: array
        availableLocales:
          description: Available locales
          items:
            description: Available locales
            type: string
          type: array
          uniqueItems: true
        bannerEmail:
          description: Banner email
          type: string
        blackListedCountries:
          description: List of countries not authorized for this customer
          example: '[AF,AX]'
          items:
            description: List of countries not authorized for this customer
            example: '[AF,AX]'
            type: string
          type: array
        blackListedPaymentTypes:
          deprecated: true
          items:
            deprecated: true
            type: string
          type: array
        cancelPeriod:
          description: Cancel period (Day)
          example: 30
          format: int32
          minimum: 0
          type: integer
        createDate:
          deprecated: true
          format: date-time
          type: string
        createInvoice:
          description: Create the invoice as part of the order processing
          type: boolean
        dbVersion:
          format: int64
          type: integer
        defaultFraudPoints:
          description: Default fraud points
          example: 100
          format: int32
          maximum: 9999
          minimum: -9999
          type: integer
        defaultOnboardingProperties:
          $ref: '#/components/schemas/DefaultOnboardingProperties'
        email:
          description: Customer email
          example: joe.doe@nexway.com
          maxLength: 150
          minLength: 1
          type: string
        features:
          $ref: '#/components/schemas/Features'
        fulfillments:
          additionalProperties:
            description: Map of customer fulfillments
            example: '{"fulfilmentName"  "fulfillmentName"}'
            type: string
          description: Map of customer fulfillments
          example: '{"fulfilmentName"  "fulfillmentName"}'
          type: object
        iamClient:
          $ref: '#/components/schemas/IamClient'
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        legalEntityId:
          description: Legal Entity of the customer
          type: string
        localizedPaymentDescriptors:
          additionalProperties:
            description: Payment descriptors
            type: string
          description: Payment descriptors
          type: object
        localizedZendeskGuideUrls:
          additionalProperties:
            type: string
          type: object
        logo:
          description: Logo
          example: https://www.domain.com/logo.png
          type: string
        modelVersion:
          deprecated: true
          type: string
        multiplePaymentsValidityDuration:
          description: multiple payments validity duration
          example: 30
          format: int64
          maximum: 90
          type: integer
        name:
          description: Customer name (company name)
          example: My company name
          maxLength: 150
          minLength: 1
          type: string
        onboardingGuideUrl:
          description: GuideUrl
          example: https://www.domain.com/guide.pdf
          type: string
        onboardingManager:
          type: boolean
        onboardingTermsUrl:
          description: TermsUrl
          example: https://www.domain.com/terms.pdf
          type: string
        originalId:
          type: string
          writeOnly: true
        paymentServiceConfiguration:
          $ref: '#/components/schemas/PaymentServiceConfiguration'
        paymentVendor:
          deprecated: true
          type: string
        promoteOneClickPayment:
          deprecated: true
          type: boolean
        quoteSubscriptionValidityDuration:
          description: quote subscription payment validity duration
          example: 30
          format: int64
          maximum: 90
          type: integer
        quoteValidityDuration:
          description: quote payment validity duration
          example: 30
          format: int64
          maximum: 90
          type: integer
        remittableId:
          type: string
        retryPaymentValidityDuration:
          description: Retry payment validity duration
          example: 30
          format: int64
          maximum: 90
          type: integer
        sendOrderConfirmationEmail:
          description: >-
            Send the confirmation email to the end user as part of the order
            processing
          type: boolean
        status:
          description: Customer status
          enum:
            - TRIAL
            - RUNNING
          example: TRIAL,RUNNING
          type: string
        subscriptionUpgradeAuthorized:
          description: is subscription upgrade authorized on this customer
          type: boolean
        subscriptionUpgradeConfiguration:
          $ref: '#/components/schemas/SubscriptionUpgradeConfiguration'
        subscriptions:
          additionalProperties:
            description: Customer subscriptions
            type: string
          description: Customer subscriptions
          type: object
        type:
          deprecated: true
          description: Type of customer
          enum:
            - PUBLISHER
            - RESELLER
          example: PUBLISHER,RESELLER
          readOnly: true
          type: string
        updateDate:
          deprecated: true
          format: date-time
          type: string
        vatNumber:
          description: Customer vat number
          example: FR47852256666666666666666
          maxLength: 50
          minLength: 0
          type: string
        zendeskBrandId:
          type: string
      required:
        - email
        - features
        - iamClient
        - name
        - subscriptionUpgradeConfiguration
        - vatNumber
      type: object
    DefaultOnboardingProperties:
      description: Default onboarding properties
      properties:
        customerStatus:
          type: string
        designs:
          $ref: '#/components/schemas/Designs'
        features:
          $ref: '#/components/schemas/Features'
        paymentServiceConfiguration:
          $ref: '#/components/schemas/PaymentServiceConfiguration'
        realmTemplate:
          type: string
        role:
          type: string
      type: object
    Design:
      properties:
        fontRef:
          $ref: '#/components/schemas/DesignRef'
        i18nRef:
          $ref: '#/components/schemas/I18nDesignRef'
        layoutRef:
          $ref: '#/components/schemas/DesignRef'
        themeRef:
          $ref: '#/components/schemas/DesignRef'
      type: object
    DesignRef:
      properties:
        customerId:
          type: string
        name:
          type: string
      type: object
    Designs:
      properties:
        checkout:
          $ref: '#/components/schemas/Design'
        endUserPortal:
          $ref: '#/components/schemas/Design'
        resellerCheckout:
          $ref: '#/components/schemas/Design'
      type: object
    Document:
      additionalProperties:
        type: object
      properties:
        empty:
          type: boolean
      type: object
    ExceptionDetail:
      properties:
        errorType:
          type: string
        resourceDisplayName:
          type: string
        resourceId:
          type: string
        resourceType:
          type: string
        specific:
          type: object
      type: object
    Features:
      properties:
        connectManagement:
          type: boolean
        createInvoice:
          type: boolean
        onboardingManagement:
          type: boolean
        productManagement:
          type: boolean
        remittanceManagement:
          type: boolean
        remotePriceAllowed:
          type: boolean
        resellerManagement:
          type: boolean
        sellOnBehalf:
          type: boolean
        seller:
          type: boolean
        sendOrderConfirmationEmail:
          type: boolean
        sgOrdersManagement:
          type: boolean
        subscriptionUpgradeAuthorized:
          type: boolean
        usingBillingPlan:
          type: boolean
        usingCurrencyConversion:
          type: boolean
        usingFulfillmentV1:
          type: boolean
      type: object
    I18nDesignRef:
      properties:
        customerId:
          type: string
        name:
          type: string
      type: object
    IamClient:
      description: iam client information
      properties:
        clientSecret:
          description: Customer auth client secret
          example: 0f8a68f4-3947-42d4-bb7a-628dce40515a
          type: string
        realmName:
          description: Customer realm name
          example: abcdefghi1609946930636
          type: string
        realmPublicKey:
          description: Customer auth public key
          example: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwvOOUnZ...
          type: string
        secretKeys:
          description: Client secret list
          items:
            $ref: '#/components/schemas/SecretKey'
          type: array
          uniqueItems: true
      readOnly: true
      required:
        - realmName
      type: object
    LinkDefinition:
      properties:
        baseLink:
          description: 'link definition base link '
          example: https://my-beautiful.site/path/to/honey
          type: string
        queryParameters:
          additionalProperties:
            $ref: '#/components/schemas/QueryParameter'
          description: 'list of useful parameters to generate the activation link '
          example: >-
            "queryParameters": { "param1": { "type": "STATIC", "value":
            "staticval1" }, "param2": { "type": "STATIC", "value": "staticval2"
            }, "ac": { "type": "DYNAMIC_ENCRYPTED", "value": "ACTIVATION_CODE"
            }, "param3": { "type": "LINK", value: { "base":
            "https://my-ugly.site/path/to/cement", "queryParameters": {
            "someparam1": { "type": "STATIC", "value": "staticval1" }, "email":
            { "type": "DYNAMIC_ENCRYPTED", "value": "email" } } } }
          type: object
      required:
        - baseLink
        - queryParameters
      type: object
    MidTermUpgrade:
      properties:
        enable:
          type: boolean
        mandatoryRemotePrice:
          type: boolean
        overrideExpirationDate:
          type: boolean
      type: object
    NormalizeException:
      properties:
        details:
          items:
            $ref: '#/components/schemas/ExceptionDetail'
          type: array
        error:
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        timestamp:
          format: int64
          type: integer
      type: object
    Pageable:
      properties:
        page:
          format: int32
          minimum: 0
          type: integer
        size:
          format: int32
          minimum: 1
          type: integer
        sort:
          items:
            type: string
          type: array
      type: object
    PaymentServiceConfiguration:
      properties:
        availableAdditionalPaymentTypes:
          description: List of available payment types authorized for this customer
          items:
            description: List of available payment types authorized for this customer
            type: string
          type: array
        blackListedPaymentTypes:
          description: List of payment types not authorized for this customer
          items:
            description: List of payment types not authorized for this customer
            type: string
          type: array
        forcedPaymentTypes:
          description: List of forced payment types for this customer
          example: sepa, payal
          items:
            description: List of forced payment types for this customer
            example: sepa, payal
            type: string
          type: array
        maxPaymentsParts:
          description: Maximum payments parts
          example: 3
          format: int32
          maximum: 4
          minimum: 1
          type: integer
        minPaymentAmountInPercent:
          description: Minimum payment amount in percent
          example: 70
          format: int32
          maximum: 100
          minimum: 10
          type: integer
        paymentVendor:
          description: Payment vendor
          example: Nexway
          type: string
        promoteOneClickPayment:
          description: Promote one-click payment
          type: boolean
        signedPartialAmountRequired:
          description: Signed partial amount required
          example: true
          type: boolean
      type: object
    Provider:
      description: >-
        The provider collection stores the providers data like query params used
        in activationLink feature
      properties:
        createDate:
          deprecated: true
          format: date-time
          type: string
        customerId:
          type: string
        dbVersion:
          format: int64
          type: integer
        id:
          deprecated: true
          type: string
        lastUpdateReason:
          type: string
        linkDefinition:
          $ref: '#/components/schemas/LinkDefinition'
        modelVersion:
          deprecated: true
          type: string
        name:
          description: Provider name
          example: My provider name
          type: string
        originalId:
          type: string
          writeOnly: true
        updateDate:
          deprecated: true
          format: date-time
          type: string
      required:
        - linkDefinition
        - name
      type: object
    PublicCustomer:
      properties:
        blackListedPaymentTypes:
          items:
            type: string
          type: array
        forcedPaymentTypes:
          items:
            type: string
          type: array
        fulfillments:
          additionalProperties:
            type: string
          type: object
        id:
          type: string
        localizedZendeskGuideUrls:
          additionalProperties:
            type: string
          type: object
        logo:
          type: string
        name:
          type: string
        onboardingEnabled:
          type: boolean
        onboardingGuideUrl:
          type: string
        onboardingTermsUrl:
          type: string
        status:
          type: string
        subscriptions:
          additionalProperties:
            type: string
          type: object
        usingBillingPlan:
          type: boolean
        usingFulfillmentV1:
          type: boolean
      type: object
    QueryParameter:
      description: 'list of useful parameters to generate the activation link '
      example: >-
        "queryParameters": { "param1": { "type": "STATIC", "value": "staticval1"
        }, "param2": { "type": "STATIC", "value": "staticval2" }, "ac": {
        "type": "DYNAMIC_ENCRYPTED", "value": "ACTIVATION_CODE" }, "param3": {
        "type": "LINK", value: { "base": "https://my-ugly.site/path/to/cement",
        "queryParameters": { "someparam1": { "type": "STATIC", "value":
        "staticval1" }, "email": { "type": "DYNAMIC_ENCRYPTED", "value": "email"
        } } } }
      properties:
        type:
          description: parameter type
          enum:
            - STATIC
            - DYNAMIC
            - DYNAMIC_ENCRYPTED
            - LINK
            - STATIC
            - DYNAMIC
            - DYNAMIC_ENCRYPTED
            - LINK
          type: string
        value:
          description: >-
            gven value to the query parameter, can be a text value or a query
            parameter json value
          example: >-
            "value": "staticval1" or "someparam1": { "type": "STATIC", "value":
            "staticval1" },
          type: object
      required:
        - type
        - value
      type: object
    RecapEntry:
      properties:
        count:
          format: int32
          type: integer
        targetValue:
          type: string
      type: object
    Remittable:
      properties:
        customerId:
          type: string
        details:
          $ref: '#/components/schemas/RemittanceAccount'
        name:
          description: Customer name of this Remittable
          readOnly: true
          type: string
        parentRemittableId:
          description: >-
            Id of parent remittable, used to link with the partner payment
            account
          type: string
        vendor:
          type: string
      type: object
    RemittanceAccount:
      description: Details of remittance account, used by the partner payment account
      type: object
    SearchResultBlackListedSignedData:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BlackListedSignedData'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultCustomer:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Customer'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultDocument:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Document'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultObject:
      properties:
        items:
          items:
            type: object
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultProvider:
      properties:
        items:
          items:
            $ref: '#/components/schemas/Provider'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultPublicCustomer:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PublicCustomer'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SearchResultRecapEntry:
      properties:
        items:
          items:
            $ref: '#/components/schemas/RecapEntry'
          type: array
        last:
          type: boolean
        number:
          format: int32
          type: integer
        size:
          format: int32
          type: integer
        totalItems:
          format: int64
          type: integer
        totalPages:
          format: int32
          type: integer
      type: object
    SecretKey:
      description: Client secret list
      properties:
        createDate:
          description: Creation date of this secret
          format: date-time
          type: string
        secret:
          description: Secret key, used to authenticate by customer identity
          type: string
      type: object
    SignedRequest:
      properties:
        signedData:
          description: Signed data to verify and decode
          type: string
      required:
        - signedData
      type: object
    SignedResponse:
      properties:
        originalData:
          description: Original data
          readOnly: true
          type: object
        signedData:
          description: Signed data
          readOnly: true
          type: string
      type: object
    SubscriptionUpgradeConfiguration:
      description: Mid-term upgrade configuration
      properties:
        midTermUpgrade:
          $ref: '#/components/schemas/MidTermUpgrade'
      readOnly: true
      type: object
  securitySchemes:
    Bearer:
      bearerFormat: JWT
      description: Enter Bearer token
      scheme: bearer
      type: http
info:
  description: API to manage customers
  license:
    name: Nexway License Version 1.0
  title: Customer
  version: '1.0'
openapi: 3.0.1
paths:
  /customers:
    get:
      operationId: getItems
      parameters:
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
        - description: >-
            Return selected fields only (multiple occurrences allowed for
            selecting multiple fields)
          example: vatNumber,addressBook,fulfillments,...
          in: query
          name: target
          required: false
          schema:
            type: string
        - description: Filter customer by its exact email
          example: example@example.com
          in: query
          name: email
          schema:
            type: string
        - description: Filter customer by its exact vatNumber
          example: FRXX999999999
          in: query
          name: vatNumber
          schema:
            type: string
        - description: Filter customer by its addressBook country (code iso 2)
          example: USA
          in: query
          name: addressBook.country
          schema:
            type: string
        - description: 'Filter customer by its addressBook streetAddress '
          example: 1009
          in: query
          name: addressBook.streetAddress
          schema:
            type: string
        - description: 'Filter customer by its addressBook city '
          example: Brooklyn
          in: query
          name: addressBook.city
          schema:
            type: string
        - description: 'Filter customer by its addressBook state '
          example: New York
          in: query
          name: addressBook.state
          schema:
            type: string
        - description: 'Filter customer by its addressBook zipCode '
          example: 11208
          in: query
          name: addressBook.zipCode
          schema:
            format: int64
            type: integer
        - description: 'Filter customer by its addressBook phoneNumber '
          example: 9172457546
          in: query
          name: addressBook.phoneNumber
          schema:
            type: string
        - description: Filter customer by its exact customer status
          examples:
            RUNNING:
              description: Customer status is RUNNING
              value: RUNNING
            TRIAL:
              description: Customer status is TRIAL
              value: TRIAL
          in: query
          name: status
          schema:
            enum:
              - TRIAL
              - RUNNING
            type: string
        - description: Minimum number of days before cancel
          example: 15
          in: query
          name: cancelPeriod
          schema:
            format: int32
            type: integer
        - description: Banner email
          example: A Banner Email
          in: query
          name: bannerEmail
          schema:
            type: string
        - description: Retry payment validity duration. Max 90 days
          example: 30
          in: query
          name: retryPaymentValidityDuration
          schema:
            format: int64
            type: integer
        - description: Quote validity duration. Max 90 days
          example: 30
          in: query
          name: quoteValidityDuration
          schema:
            format: int64
            type: integer
        - description: Quote Subscription validity duration. Max 90 days
          example: 30
          in: query
          name: quoteSubscriptionValidityDuration
          schema:
            format: int64
            type: integer
        - description: Multiple payments validity duration. Max 90 days
          example: 30
          in: query
          name: multiplePaymentsValidityDuration
          schema:
            format: int64
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultCustomer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get items
      tags:
        - Customer
      x-operationWeight: '300'
    post:
      operationId: createItem
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create an item
      tags:
        - Customer
      x-operationWeight: '300'
  /customers/blacklistedsigneddata:
    get:
      operationId: getItems_2
      parameters:
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
        - in: query
          name: target
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultBlackListedSignedData'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get items
      tags:
        - BlackedSignedData
      x-operationWeight: '300'
    post:
      operationId: createItem_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlackListRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlackListedSignedData'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create an item
      tags:
        - BlackedSignedData
      x-operationWeight: '300'
  /customers/blacklistedsigneddata/distinct:
    get:
      operationId: distinct_2
      parameters:
        - in: query
          name: target
          required: false
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get distinct values for a given field
      tags:
        - BlackedSignedData
      x-operationWeight: '100'
  /customers/blacklistedsigneddata/recap:
    get:
      operationId: recap_2
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get recap quantities for a given field
      tags:
        - BlackedSignedData
      x-operationWeight: '150'
  /customers/blacklistedsigneddata/remove:
    post:
      description: >-
        Remove a blacklisted signed data for authenticated customer or given
        customer id
      operationId: removeBlackListedSignedData
      parameters:
        - description: Customer id
          example: 1ce58d01-3ad6-4614-9dbd-088fef63ac85
          in: query
          name: customerId
          required: false
          schema:
            type: string
        - description: Reason of request
          example: A reason of remove blacklisted signed data
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlackListRequest'
        required: true
      responses:
        '200':
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Remove blacklisted signed data
      tags:
        - BlackedSignedData
      x-operationWeight: '800'
      x-privateApi: 'true'
  /customers/blacklistedsigneddata/unwind:
    get:
      operationId: unwind_2
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Search unwind for a given field
      tags:
        - BlackedSignedData
      x-operationWeight: '150'
  /customers/blacklistedsigneddata/{id}:
    delete:
      operationId: deleteItem_2
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Delete item
      tags:
        - BlackedSignedData
      x-operationWeight: '500'
    get:
      operationId: getItem_2
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlackListedSignedData'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get item
      tags:
        - BlackedSignedData
      x-operationWeight: '200'
    put:
      operationId: updateItem_2
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlackListedSignedData'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlackListedSignedData'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Update item
      tags:
        - BlackedSignedData
      x-operationWeight: '400'
  /customers/distinct:
    get:
      operationId: distinct_1
      parameters:
        - in: query
          name: target
          required: false
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get distinct values for a given field
      tags:
        - Customer
      x-operationWeight: '100'
  /customers/my:
    get:
      description: Get my customer using my JWT
      operationId: getMy_1
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCustomer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get my customer
      tags:
        - Customer
      x-operationWeight: '210'
  /customers/name/{name}:
    get:
      deprecated: true
      description: Get a customer by name
      operationId: getCustomerByName
      parameters:
        - description: Customer name
          example: A customer name
          in: path
          name: name
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get a customer by name
      tags:
        - Customer
      x-operationWeight: '210'
  /customers/providers:
    get:
      operationId: getItems_1
      parameters:
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
        - in: query
          name: target
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultProvider'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get items
      tags:
        - Provider
      x-operationWeight: '300'
    post:
      operationId: createItem_1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Provider'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create an item
      tags:
        - Provider
      x-operationWeight: '300'
  /customers/providers/distinct:
    get:
      operationId: distinct
      parameters:
        - in: query
          name: target
          required: false
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultObject'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get distinct values for a given field
      tags:
        - Provider
      x-operationWeight: '100'
  /customers/providers/recap:
    get:
      operationId: recap_1
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get recap quantities for a given field
      tags:
        - Provider
      x-operationWeight: '150'
  /customers/providers/unwind:
    get:
      operationId: unwind_1
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Search unwind for a given field
      tags:
        - Provider
      x-operationWeight: '150'
  /customers/providers/{id}:
    delete:
      operationId: deleteItem_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Delete item
      tags:
        - Provider
      x-operationWeight: '500'
    get:
      operationId: getItem_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get item
      tags:
        - Provider
      x-operationWeight: '200'
    put:
      operationId: updateItem_1
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Provider'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Provider'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Update item
      tags:
        - Provider
      x-operationWeight: '400'
  /customers/public:
    get:
      description: >-
        Get customers with public access, by list of customer id or customer
        name, can not process id and name search at the same time
      operationId: getMine
      parameters:
        - description: Pageable parameter, such size, page
          example: page=1&size=150
          in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - description: List of customer id
          example: id1,id2,id3
          in: query
          name: id
          required: false
          schema:
            type: string
        - description: Name of customer
          example: A customer name
          in: query
          name: name
          required: false
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultPublicCustomer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get customers by customer IDs or customer name
      tags:
        - Customer
      x-operationWeight: '210'
  /customers/public/{id}/verify:
    post:
      description: Verify for given customer id, if the signed data is valid or not
      operationId: verifySignedData
      parameters:
        - description: Customer id
          example: 72fbb274-a6f2-4ba6-a74e-00a97cbd6c29
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignedRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
            text/plain:
              schema:
                type: object
          description: The signature is valid, no alteration
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: The signature is invalid
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Verify the signed data
      tags:
        - Customer
      x-operationWeight: '200'
  /customers/public/{pathOrId}:
    get:
      description: Get a customer with public access, by customer realm name or id
      operationId: getMy
      parameters:
        - description: Customer realm name or id
          example: 7d180bdd-3d82-41f5-8159-f0ab22ffb266 or A customer realm name
          in: path
          name: pathOrId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCustomer'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get a customer
      tags:
        - Customer
      x-operationWeight: '210'
  /customers/realm/{name}:
    get:
      deprecated: true
      description: Get a customer by realm name
      operationId: getCustomerByRealmName
      parameters:
        - description: Customer realm name
          example: A customer realm name
          in: path
          name: name
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get a customer by realm name
      tags:
        - Customer
      x-operationWeight: '220'
  /customers/recap:
    get:
      operationId: recap
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultRecapEntry'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get recap quantities for a given field
      tags:
        - Customer
      x-operationWeight: '150'
  /customers/sign:
    post:
      description: Sign data for the authenticated (by JWT) customer
      operationId: signWithJWT
      parameters:
        - description: Customer id
          example: d174b90c-1857-4646-86c9-6c9ef3bb41fb
          in: query
          name: customerId
          required: false
          schema:
            type: string
        - description: >-
            Max limit of Base64 encoded signed data, if the length of encoded
            signed data is longer than max or the sign is persist, then return
            SignedResponse with sign data and `SIGNED-` concatenated by
            PersistedSignedData id
          example: 200
          in: query
          name: max
          required: false
          schema:
            format: int32
            type: integer
        - description: >-
            If persist is true or the length of Base64 encoded signed data is
            longer than max, then return SignedResponse with sign data and
            `SIGNED-` concatenated by PersistedSignedData id
          example: true
          in: query
          name: persist
          required: false
          schema:
            type: boolean
        - description: Content type of request
          examples:
            application/json:
              description: application/json
              value: application/json
            text/plain:
              description: text/plain
              value: text/plain
          in: header
          name: Content-Type
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
          text/plain:
            schema:
              type: string
        description: data to sign
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignedResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Sign data with JWT
      tags:
        - Customer
      x-operationWeight: '650'
  /customers/unwind:
    get:
      operationId: unwind
      parameters:
        - in: query
          name: target
          required: true
          schema:
            type: string
        - in: query
          name: pageable
          required: true
          schema:
            $ref: '#/components/schemas/Pageable'
        - in: query
          name: predicate
          required: true
          schema:
            type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResultDocument'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Search unwind for a given field
      tags:
        - Customer
      x-operationWeight: '150'
  /customers/verify:
    post:
      description: >-
        Check for the authenticated customer with JWT, whether the signed data
        is valid or not
      operationId: verifySignedDataWithJWT
      parameters:
        - description: Customer id
          example: 0c379646-f594-46dd-81b3-9e0368649432
          in: query
          name: customerId
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SignedRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
            text/plain:
              schema:
                type: object
          description: The signature is valid, no alteration
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: The signature is invalid
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
            text/plain:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Verify the signed data with JWT
      tags:
        - Customer
      x-operationWeight: '400'
  /customers/{customerId}/sign:
    post:
      description: Sign data for the given customer id
      operationId: signData
      parameters:
        - description: Customer id
          example: 630da7a8-83f0-4cba-ba87-25f10680fdc9
          in: path
          name: customerId
          required: true
          schema:
            type: string
        - description: >-
            Max limit of Base64 encoded signed data, if the length of encoded
            signed data is longer than max or the sign is persist, then return
            SignedResponse with sign data and `SIGNED-` concatenated by
            PersistedSignedData id
          example: 200
          in: query
          name: max
          required: false
          schema:
            format: int32
            type: integer
        - description: >-
            If persist is true or the length of encoded signed data is longer
            than max, then return SignedResponse with sign data and `SIGNED-`
            concatenated by PersistedSignedData id
          example: true
          in: query
          name: persist
          required: false
          schema:
            type: boolean
        - description: Content type of request
          examples:
            application/json:
              description: application/json
              value: application/json
            text/plain:
              description: text/plain
              value: text/plain
          in: header
          name: Content-Type
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
          text/plain:
            schema:
              type: string
        description: data to sign
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SignedResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Sign data
      tags:
        - Customer
      x-operationWeight: '600'
  /customers/{id}:
    delete:
      operationId: deleteItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '204':
          content:
            application/json:
              schema:
                type: object
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Delete item
      tags:
        - Customer
      x-operationWeight: '500'
    get:
      operationId: getItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Get item
      tags:
        - Customer
      x-operationWeight: '200'
    put:
      operationId: updateItem
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
          description: Success
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Update item
      tags:
        - Customer
      x-operationWeight: '400'
  /customers/{id}/remittanceAccount:
    post:
      description: Create an Account Holder for the given customer id
      operationId: createRemittable
      parameters:
        - description: Customer id
          example: 57bb3a89-0561-4cfc-a109-3122eb16441a
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Request reason
          example: A reason of create the account holder
          in: query
          name: reason
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Remittable'
        required: true
      responses:
        '201':
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Create an Account Holder
      tags:
        - Customer
      x-operationWeight: '800'
      x-privateApi: 'true'
  /customers/{id}/secret:
    post:
      description: Generate an additional secret key for the given customer id
      operationId: generateSecretKey
      parameters:
        - description: Customer id
          example: 8ed1d919-75bb-445b-8e57-26f6263fd72d
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Request reason
          example: A generate secret key reason
          in: query
          name: reason
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Generate an additional secret key
      tags:
        - Customer
      x-operationWeight: '600'
      x-privateApi: 'true'
  /customers/{id}/secret/{secret}:
    delete:
      description: Delete a secret key for the given customer id
      operationId: deleteSecretKey
      parameters:
        - description: Customer id
          example: 8d95d991-b6d6-4a80-b335-4b8e28a60728
          in: path
          name: id
          required: true
          schema:
            type: string
        - description: Customer secret
          example: A secret key
          in: path
          name: secret
          required: true
          schema:
            type: string
        - description: Reason of request
          example: A reason of delete the secret key
          in: query
          name: reason
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
        '204':
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NormalizeException'
          description: Failure
      summary: Delete a secret key
      tags:
        - Customer
      x-operationWeight: '700'
      x-privateApi: 'true'
security:
  - Bearer:
      - read
      - write
servers:
  - description: Generated server url
    url: https://api.nexway.store
