components:
  schemas:
    AbacusStateFilter:
      additionalProperties: false
      properties:
        action_name:
          default: null
          nullable: true
          type: string
        action_status:
          default: null
          enum:
          - init
          - running
          - error
          - complete
          - approved
          - rejected
          - null
          nullable: true
          type: string
        message:
          default: null
          nullable: true
          type: string
      type: object
    AccountPayeeKycNotificationOutput:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_kyc_notification_id:
          minimum: 0
          type: integer
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        entity_reference_id:
          maxLength: 36
          minLength: 1
          type: string
        entity_reference_type_id:
          minimum: 0
          type: integer
        file_upload_link:
          maxLength: 1000
          minLength: 1
          type: string
        last_modified:
          format: date-time
          type: string
        last_modified_by:
          type: string
        possible_sub_requirement_types:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_type_id:
          minimum: 0
          type: integer
        sub_requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        sub_requirement_status_id:
          minimum: 0
          type: integer
      required:
      - account_payee_id
      - account_payee_kyc_notification_id
      - file_upload_link
      type: object
    BankDetailsDetailed:
      additionalProperties: false
      properties:
        account_payee_id:
          type: string
        address:
          $ref: '#/components/schemas/PayoneerWhitelabelAddress'
        company:
          $ref: '#/components/schemas/Company'
        contact:
          $ref: '#/components/schemas/Contact'
        modified_at:
          type: string
        payoneer_client_reference_id:
          type: string
        payout_method:
          $ref: '#/components/schemas/PaymentMethod'
        type:
          enum:
          - INDIVIDUAL
          - COMPANY
          type: string
      required:
      - account_payee_id
      - address
      - modified_at
      - payoneer_client_reference_id
      - payout_method
      - type
      type: object
    BankDetailsInput:
      additionalProperties: false
      properties:
        address:
          $ref: '#/components/schemas/PayoneerWhitelabelAddress'
        company:
          $ref: '#/components/schemas/Company'
        contact:
          $ref: '#/components/schemas/Contact'
        payout_method:
          $ref: '#/components/schemas/PaymentMethod'
        type:
          enum:
          - INDIVIDUAL
          - COMPANY
          type: string
      required:
      - address
      - payout_method
      - type
      type: object
    BankFieldDetail:
      additionalProperties: false
      properties:
        name:
          type: string
        value:
          type: string
      required:
      - name
      - value
      type: object
    Company:
      additionalProperties: false
      properties:
        name:
          maxLength: 100
          minLength: 2
          type: string
      required:
      - name
      type: object
    Contact:
      additionalProperties: false
      properties:
        date_of_birth:
          nullable: true
          pattern: ^\d{4}-\d{2}-\d{2}$
          type: string
        email:
          format: email
          nullable: true
          type: string
        first_name:
          maxLength: 26
          minLength: 2
          nullable: true
          type: string
        last_name:
          maxLength: 26
          minLength: 2
          nullable: true
          type: string
        phone:
          nullable: true
          pattern: ^[0-9]\d{1,12}$
          type: string
        phone_country:
          nullable: true
          pattern: ^[A-Z]{2}$
          type: string
      type: object
    CreateKnrDetailsSchema:
      example:
        sap_vendor_id: 123
        w_form:
          w_form_expiry: '2022-11-21T17:51:32Z'
          w_form_type: W9
      properties:
        sap_vendor_id:
          description: Sap vendor id
          type: number
        w_form_expiry:
          description: W Form expiry date
          type: string
        w_form_type:
          description: W-Form type
          type: string
      title: Schema for creating knr details for payee
      type: object
    CreatePayoneerMassPayoutsSchema:
      example:
        account_payee_id: '123'
        amount: 1000
        client_reference_id: '456'
        currency: USD
        description: Information about Payout
      properties:
        account_payee_id:
          description: The payee's ID
          type: string
        amount:
          description: The amount to pay
          type: number
        client_reference_id:
          description: The client's reference ID
          type: string
        currency:
          description: The currency for the payouts
          type: string
        description:
          description: The mass payouts' description (Provided description will be
            overridden by the account payment description if it exists)
          type: string
      title: Creates Payoneer mass payouts
      type: object
    CreatePayoneerRegistrationLink:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        payee:
          $ref: '#/components/schemas/PayoneerPayee'
        payoneer_program_id:
          minimum: 0
          type: integer
        payoneer_session_id:
          minLength: 1
          type: string
      required:
      - account_payee_id
      - payoneer_program_id
      type: object
    CreatePayoneerRegistrationLinkResponse:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        registration_link:
          minLength: 1
          type: string
      required:
      - account_payee_id
      - registration_link
      type: object
    CreatePayoneerRegistrationLinkResponseSchema:
      example:
        account_payee_id: 123
        payoneer_session_id: 123SessionId456
        registration_link: http://payouts.sandbox.payoneer.com/partners/lp.aspx?token=7293f06a1d524e6f80a4f0f414b0f0962010B7745A
        token: 7293f06a1d524e6f80a4f0f414b0f0962010B7745A
      properties:
        account_payee_id:
          description: The payee's ID
          type: integer
        payoneer_session_id:
          description: The session id generated for this payee
          type: string
        registration_link:
          description: The Payoneer registration link for this payee
          type: string
        token:
          description: The token returned by Payoneer
          type: string
      title: Payoneer create registration link response body
      type: object
    CreatePayoneerRegistrationLinkSchema:
      example:
        account_payee_id: 123
        payee:
          email: johndoe@fakeemail.com
          first_name: John
          last_name: Doe
        payoneer_program_id: 456
      properties:
        account_payee_id:
          description: The payee's ID
          type: integer
        payee:
          properties:
            email:
              description: The Payee email to use on Payoneer registration
              type: string
            first_name:
              description: The Payee first name to use on Payoneer registration
              type: string
            last_name:
              description: The Payee last name to use on Payoneer registration
              type: string
          type: object
        payoneer_program_id:
          description: The Payoneer program id to use on registration
          type: integer
        payoneer_session_id:
          description: The Payoneer session id to use on registration
          type: string
      title: Payoneer create registration link POST request body
      type: object
    CreateTaxDetailsSchema:
      example:
        address:
          address1: Down the line street
          address2: Alternative address
          city: New York
          country_code: USA
          province: Quebec
          zip: '10001'
        country_of_tax_residence_code: USA
        vat_number: '821018768'
      properties:
        address:
          properties:
            address1:
              description: Payee's address for tax purposes
              type: string
            address2:
              description: Payee's address for tax purposes
              type: string
            city:
              description: Payee's city for tax purposes
              type: string
            country_code:
              description: Payee's country code for tax purposes
              type: string
            province:
              description: Payee's province for tax purposes
              type: string
            zip:
              description: Payee's zip code for tax purposes
              type: string
          type: object
        country_of_tax_residence_code:
          description: Country code where Payee has tax residence
          type: string
        is_vat_registered:
          description: VAT registration flag  (relevant for ES taxes)
          type: boolean
        local_tax_id:
          description: Local tax ID (relevant for ES taxes)
          type: string
        vat_number:
          description: The Payee's VAT ID
          type: string
      title: Schema for creating tax details for a VAT/nonVAT registered payee
      type: object
    DataloadKnrDetailsResponseSchema:
      properties:
        data:
          $ref: '#/components/schemas/PayeeKnrInfoDetailSchema'
      title: Dataload response array error item
      type: object
    DataloadTaxDetailsRequestSchema:
      example:
        account_payee_id: 1
        revision: asdKHAkhbas-a98kHBASKDasd-asd
      properties:
        accountPayeeId:
          description: The payee's ID
          type: integer
        revision:
          description: payee's details document revision id
          type: string
      title: Dataload request array item
      type: object
    DataloadTaxDetailsResponseErrorSchema:
      example:
        error: You do not have access to this resource!
      properties:
        error:
          description: payee's details document revision id
          type: string
      title: Dataload response array error item
      type: object
    DataloadTaxDetailsResponseSchema:
      properties:
        data:
          $ref: '#/components/schemas/PayeeTaxInfoDetailSchema'
      title: Dataload response array error item
      type: object
    DataloaderEntry:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/Payee'
        error:
          type: string
      type: object
    DataloaderEntry1:
      additionalProperties: false
      properties:
        data:
          anyOf:
          - nullable: true
            type: object
          - $ref: '#/components/schemas/TaxWithholdingOverride'
      type: object
    FilterParamsPost:
      additionalProperties: false
      properties:
        account_payee_ids:
          items:
            minimum: 0
            type: integer
          type: array
        expiration_date_end:
          format: date
          type: string
        expiration_date_start:
          format: date
          type: string
        is_active:
          type: boolean
      type: object
    GetPayeeStatusResponse:
      properties:
        result:
          properties:
            account_id:
              type: string
            payout_method:
              properties:
                currency:
                  type: string
                type:
                  type: string
              type: object
            registration_date:
              type: string
            status:
              properties:
                description:
                  type: string
                type:
                  type: number
              type: object
          type: object
      title: Get payee status response
      type: object
    MigrationAddress:
      additionalProperties: false
      properties:
        address_1:
          nullable: true
          type: string
        address_2:
          nullable: true
          type: string
        city:
          nullable: true
          type: string
        country_code:
          nullable: true
          type: string
        province:
          nullable: true
          type: string
        zip:
          nullable: true
          type: string
      type: object
    MigrationBankDetailsDetailed:
      additionalProperties: false
      properties:
        account_payee_id:
          type: string
        address:
          $ref: '#/components/schemas/MigrationAddress'
        company:
          $ref: '#/components/schemas/MigrationCompany'
        contact:
          $ref: '#/components/schemas/MigrationContact'
        modified_at:
          type: string
        payoneer_client_reference_id:
          type: string
        payout_method:
          $ref: '#/components/schemas/MigrationPaymentMethod'
        type:
          enum:
          - INDIVIDUAL
          - COMPANY
          type: string
      required:
      - account_payee_id
      - address
      - modified_at
      - payoneer_client_reference_id
      - payout_method
      - type
      type: object
    MigrationBankDetailsInput:
      additionalProperties: false
      properties:
        address:
          $ref: '#/components/schemas/MigrationAddress'
        company:
          $ref: '#/components/schemas/MigrationCompany'
        contact:
          $ref: '#/components/schemas/MigrationContact'
        payout_method:
          $ref: '#/components/schemas/MigrationPaymentMethod'
        type:
          enum:
          - INDIVIDUAL
          - COMPANY
          type: string
      required:
      - address
      - payout_method
      - type
      type: object
    MigrationCompany:
      additionalProperties: false
      properties:
        name:
          nullable: true
          type: string
      type: object
    MigrationContact:
      additionalProperties: false
      properties:
        date_of_birth:
          nullable: true
          type: string
        email:
          format: email
          nullable: true
          type: string
        first_name:
          nullable: true
          type: string
        last_name:
          nullable: true
          type: string
        phone:
          nullable: true
          type: string
        phone_country:
          nullable: true
          type: string
      type: object
    MigrationPaymentMethod:
      additionalProperties: false
      properties:
        bank_account_type:
          nullable: true
          type: string
        bank_field_details:
          items:
            $ref: '#/components/schemas/BankFieldDetail'
          type: array
        country:
          nullable: true
          type: string
        currency:
          nullable: true
          type: string
      required:
      - bank_field_details
      type: object
    MovePayoneerProgramResponse:
      properties:
        result:
          example:
            adopted_payee_id: test5972600
            adopted_to_partner_id: 123456
            date_adopted: '2021-03-24T14:45:43-04:00'
            payee_id: test5972600
          properties:
            adopted_payee_id:
              type: string
            adopted_to_partner_id:
              type: number
            date_adopted:
              type: string
            payee_id:
              type: string
          type: object
      title: MOve Payoneer program response from service
      type: object
    MovePayoneerProgramSchema:
      properties:
        existing_payoneer_program_id:
          description: Existing payoneer program id
          type: number
        new_payoneer_program_id:
          description: New payoneer program id
          type: number
      title: Move Payoneer Program request data
      type: object
    Payee:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        last_modified:
          format: date-time
          type: string
        last_modified_by:
          type: string
        payee_id:
          minimum: 0
          type: integer
        payee_name:
          type: string
        payee_type:
          enum:
          - collaborator
          type: string
        payoneer_assigned_id:
          minimum: 0
          type: integer
        payoneer_client_reference_id:
          type: string
        payoneer_program_id:
          minimum: 0
          type: integer
        reference_payment_type_id:
          minimum: 0
          type: integer
      required:
      - payee_id
      - payee_type
      - payoneer_client_reference_id
      - payoneer_program_id
      - reference_payment_type_id
      type: object
    PayeeCollaborator:
      additionalProperties: false
      properties:
        account_id:
          minimum: 0
          type: integer
        collaborator_id:
          minimum: 0
          type: integer
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        last_modified:
          format: date-time
          type: string
        last_modified_by:
          type: string
        payee_collaborator_id:
          minimum: 0
          type: integer
        payee_id:
          minimum: 0
          type: integer
      required:
      - account_id
      - collaborator_id
      - payee_collaborator_id
      - payee_id
      type: object
    PayeeCollaboratorFilter:
      additionalProperties: false
      properties:
        limit:
          default: 100
          maximum: 300
          minimum: 1
          type: integer
        offset:
          default: 0
          minimum: 0
          type: integer
        payee_ids:
          items:
            minimum: 0
            type: integer
          type: array
      type: object
    PayeeCollaboratorPaginated:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/PayeeCollaborator'
          type: array
        total_count:
          minimum: 0
          type: integer
      required:
      - items
      - total_count
      type: object
    PayeeCreate:
      additionalProperties: false
      properties:
        collaborator_id:
          minimum: 0
          type: integer
        reference_payment_type_id:
          minimum: 0
          type: integer
      required:
      - collaborator_id
      - reference_payment_type_id
      type: object
    PayeeDataloader:
      additionalProperties: false
      properties:
        collaborator_ids:
          items:
            minimum: 0
            type: integer
          type: array
        payoneer_client_reference_ids:
          items:
            type: string
          type: array
      type: object
    PayeeDataloaderOutput:
      additionalProperties: false
      properties:
        payees:
          items:
            $ref: '#/components/schemas/DataloaderEntry'
          type: array
      required:
      - payees
      type: object
    PayeeKnrDetailsRevision:
      example:
        account_payee_id: 1
        revision: asdKHAkhbas-a98kHBASKDasd-asd
      properties:
        account_payee_id:
          description: Id of a payee
          type: number
        revision:
          description: id of revision
          type: string
      title: Tax information details
      type: object
    PayeeKnrInfoDetailSchema:
      example:
        account_payee_id: 1
        sap_vendor_id: 123
        w_form:
          w_form_expiry: '2022-11-21T17:51:32Z'
          w_form_type: W9
      properties:
        account_payee_id:
          description: Id of a payee
          type: number
        sap_vendor_id:
          description: Sap vendor id
          type: number
        w_form:
          properties:
            w_form_expiry:
              description: W Form expiry date
              type: string
            w_form_type:
              description: W-Form type
              type: string
          type: object
      title: Knr information details
      type: object
    PayeeKycNotification:
      additionalProperties: false
      properties:
        entity_reference_id:
          maxLength: 36
          minLength: 1
          type: string
        entity_reference_type_id:
          minimum: 0
          type: integer
        file_upload_link:
          maxLength: 1000
          minLength: 1
          type: string
        possible_sub_requirement_types:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_type_id:
          minimum: 0
          type: integer
        sub_requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        sub_requirement_status_id:
          minimum: 0
          type: integer
      required:
      - file_upload_link
      type: object
    PayeeKycNotificationDataloader:
      additionalProperties: false
      properties:
        payee_ids:
          items:
            minimum: 0
            type: integer
          type: array
      required:
      - payee_ids
      type: object
    PayeeKycNotificationDataloaderOutput:
      additionalProperties: false
      properties:
        payee_kyc_notifications:
          items:
            $ref: '#/components/schemas/PayeeKycNotificationEntryDataloaderOutput'
          type: array
      required:
      - payee_kyc_notifications
      type: object
    PayeeKycNotificationEntryDataloaderOutput:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/PayeeKycNotificationOutput'
        error:
          type: string
      type: object
    PayeeKycNotificationOutput:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        entity_reference_id:
          maxLength: 36
          minLength: 1
          type: string
        entity_reference_type_id:
          minimum: 0
          type: integer
        file_upload_link:
          maxLength: 1000
          minLength: 1
          type: string
        last_modified:
          format: date-time
          type: string
        last_modified_by:
          type: string
        payee_id:
          minimum: 0
          type: integer
        payee_kyc_notification_id:
          minimum: 0
          type: integer
        possible_sub_requirement_types:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        requirement_type_id:
          minimum: 0
          type: integer
        sub_requirement_id:
          maxLength: 1000
          minLength: 1
          type: string
        sub_requirement_status_id:
          minimum: 0
          type: integer
      required:
      - file_upload_link
      - payee_id
      - payee_kyc_notification_id
      type: object
    PayeePaginated:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/Payee'
          type: array
        total_count:
          minimum: 0
          type: integer
      required:
      - items
      - total_count
      type: object
    PayeePaginatedFilter:
      additionalProperties: false
      properties:
        abacus_states:
          default: null
          items:
            $ref: '#/components/schemas/AbacusStateFilter'
          nullable: true
          type: array
        account_ids:
          default: null
          items:
            minimum: 0
            type: integer
          nullable: true
          type: array
        limit:
          default: 100
          maximum: 300
          minimum: 1
          type: integer
        offset:
          default: 0
          minimum: 0
          type: integer
        payoneer_program_ids:
          default: null
          items:
            minimum: 0
            type: integer
          nullable: true
          type: array
        requires_review:
          nullable: true
          type: boolean
        search_term:
          default: null
          nullable: true
          type: string
      type: object
    PayeePayoneerDetailsResponseSchema:
      properties:
        payee_name:
          type: string
      required:
      - payee_name
      title: Payee Payoneer details response
      type: object
    PayeeRegistrationFormat:
      additionalProperties: false
      properties:
        bank_account_type:
          type: string
        bank_country:
          type: string
        bank_currency:
          type: string
        fields:
          $ref: '#/components/schemas/PayeeRegistrationFormatFields'
        type:
          type: string
      type: object
    PayeeRegistrationFormatDependentOptions:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/PayeeRegistrationFormatDependentOptionsItem'
          type: array
      type: object
    PayeeRegistrationFormatDependentOptionsItem:
      additionalProperties: false
      properties:
        name:
          type: string
        options:
          $ref: '#/components/schemas/PayeeRegistrationFormatOptions'
      type: object
    PayeeRegistrationFormatFields:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/PayeeRegistrationFormatItem'
          type: array
      type: object
    PayeeRegistrationFormatItem:
      additionalProperties: false
      properties:
        dependent_options:
          $ref: '#/components/schemas/PayeeRegistrationFormatDependentOptions'
        dependent_options_contains_others:
          type: boolean
        description:
          type: string
        field_id:
          type: integer
        field_name:
          type: string
        field_type:
          type: string
        label:
          type: string
        max_length:
          type: integer
        min_length:
          type: integer
        options:
          $ref: '#/components/schemas/PayeeRegistrationFormatOptions'
        options_contains_other:
          type: boolean
        parent_field_id:
          type: integer
        parent_list_item:
          type: string
        regex:
          type: string
        required:
          type: boolean
        watermark:
          type: string
      type: object
    PayeeRegistrationFormatOptions:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/PayeeRegistrationFormatOptionsItem'
          type: array
      type: object
    PayeeRegistrationFormatOptionsItem:
      additionalProperties: false
      properties:
        description:
          type: string
        value:
          type: string
      type: object
    PayeeTaxInfoDetailSchema:
      example:
        account_payee_id: 1
        address:
          address1: Down the line street
          address2: Some Alternative address
          city: New York
          country_of_tax_residence_code: USA
          province: Quebec
          zip: '10001'
        vat_number: '821018768'
      properties:
        account_payee_id:
          description: Id of a payee
          type: number
        address:
          properties:
            address1:
              description: Payee's address for tax purposes
              type: string
            address2:
              description: Payee's address for tax purposes
              type: string
            city:
              description: Payee's city for tax purposes
              type: string
            country_code:
              description: Payee's country code for tax purposes
              type: string
            province:
              description: Payee's province for tax purposes
              type: string
            zip:
              description: Payee's zip code for tax purposes
              type: string
          type: object
        country_of_tax_residence_code:
          description: Country code where Payee has tax residence
          type: string
        local_tax_id:
          description: Local tax ID (relevant for ES taxes)
          type: string
        vat_number:
          description: The Payee's VAT ID
          type: string
      title: Tax information details
      type: object
    PaymentMethod:
      additionalProperties: false
      properties:
        bank_account_type:
          enum:
          - PERSONAL
          - COMPANY
          type: string
        bank_field_details:
          items:
            $ref: '#/components/schemas/BankFieldDetail'
          type: array
        country:
          pattern: ^[A-Z]{2}$
          type: string
        currency:
          pattern: ^[A-Z]{3}$
          type: string
      required:
      - bank_account_type
      - bank_field_details
      - country
      - currency
      type: object
    PayoneerPayee:
      additionalProperties: false
      properties:
        email:
          minLength: 1
          type: string
        first_name:
          minLength: 1
          type: string
        last_name:
          minLength: 1
          type: string
      required:
      - email
      - first_name
      - last_name
      type: object
    PayoneerStatusResponse:
      additionalProperties: false
      properties:
        status_code:
          type: integer
        status_desc:
          type: string
      required:
      - status_code
      - status_desc
      type: object
    PayoneerWhitelabelAddress:
      additionalProperties: false
      properties:
        address_1:
          maxLength: 40
          minLength: 1
          type: string
        address_2:
          maxLength: 40
          nullable: true
          type: string
        city:
          maxLength: 40
          minLength: 1
          type: string
        country_code:
          type: string
        province:
          type: string
        zip:
          maxLength: 10
          minLength: 3
          type: string
      required:
      - address_1
      - city
      - country_code
      - zip
      type: object
    ReleasePayoneerProgram:
      additionalProperties: false
      properties:
        payoneer_program_id:
          minimum: 0
          nullable: true
          type: integer
      type: object
    ReleasePayoneerProgramResponse:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
      required:
      - account_payee_id
      type: object
    ResyncPaymentReadinessSchema:
      example:
        account_payee_id: 1
      properties:
        account_payee_id:
          description: Id of a payee
          type: number
      title: Resync payment readiness response
      type: object
    TaxFormInfo:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          nullable: true
          type: string
        last_modified:
          format: date-time
          type: string
        signed_date:
          format: date
          nullable: true
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - tax_form_type
      type: object
    TaxFormInfoDetailsOutput:
      additionalProperties: false
      properties:
        items:
          items:
            oneOf:
            - $ref: '#/components/schemas/USTaxFormW9'
            - $ref: '#/components/schemas/USTaxFormW8BEN'
            - $ref: '#/components/schemas/USTaxFormW8BENE'
            - $ref: '#/components/schemas/USTaxFormW8IMY'
            - $ref: '#/components/schemas/USTaxFormW8ECI'
          type: array
        total_count:
          minimum: 0
          type: integer
      required:
      - items
      - total_count
      type: object
    TaxFormInfoOutput:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/TaxFormInfo'
          type: array
        total_count:
          minimum: 0
          type: integer
      required:
      - items
      - total_count
      type: object
    TaxWithholdingOverride:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        certificate_expiration_date:
          format: date
          type: string
        created_at:
          format: date-time
          type: string
        created_by:
          type: string
        last_modified:
          format: date-time
          type: string
        last_modified_by:
          type: string
        message:
          type: string
        rate_override:
          type: number
        tax_withholding_override_id:
          minimum: 0
          type: integer
      required:
      - account_payee_id
      - tax_withholding_override_id
      type: object
    TaxWithholdingOverrideCreate:
      additionalProperties: false
      properties:
        certificate_expiration_date:
          format: date
          nullable: true
          type: string
        message:
          minLength: 1
          nullable: true
          type: string
        rate_override:
          maximum: '100'
          minimum: '0'
          type: number
      type: object
    TaxWithholdingOverrideDataloader:
      additionalProperties: false
      properties:
        account_payee_ids:
          items:
            minimum: 0
            type: integer
          type: array
      required:
      - account_payee_ids
      type: object
    TaxWithholdingOverrideDataloaderOutput:
      additionalProperties: false
      properties:
        items:
          items:
            $ref: '#/components/schemas/DataloaderEntry1'
          type: array
      type: object
    USTaxFormW8BEN:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          type: string
        last_modified:
          format: date-time
          type: string
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      type: object
    USTaxFormW8BEN1:
      additionalProperties: false
      properties:
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
      required:
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      type: object
    USTaxFormW8BENE:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          type: string
        last_modified:
          format: date-time
          type: string
        lob:
          nullable: true
          type: string
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW8BENE1:
      additionalProperties: false
      properties:
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        lob:
          nullable: true
          type: string
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW8ECI:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          type: string
        last_modified:
          format: date-time
          type: string
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW8ECI1:
      additionalProperties: false
      properties:
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW8IMY:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          type: string
        last_modified:
          format: date-time
          type: string
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW8IMY1:
      additionalProperties: false
      properties:
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        signed_date:
          format: date
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tax_treaty_claim:
          type: boolean
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
        type_of_entity:
          type: string
      required:
      - account_payee_tax_form_info_id
      - signed_date
      - tax_form_type
      - tax_id_country
      - tax_name
      - tax_treaty_claim
      - tin
      - tin_type
      - type_of_entity
      type: object
    USTaxFormW9:
      additionalProperties: false
      properties:
        account_payee_id:
          minimum: 0
          type: integer
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        expiration_date:
          format: date
          nullable: true
          type: string
        last_modified:
          format: date-time
          type: string
        signed_date:
          format: date
          nullable: true
          type: string
        tax_classification:
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
      required:
      - account_payee_id
      - account_payee_tax_form_info_id
      - tax_classification
      - tax_form_type
      - tax_id_country
      - tax_name
      - tin
      - tin_type
      type: object
    USTaxFormW91:
      additionalProperties: false
      properties:
        account_payee_tax_form_info_id:
          minimum: 0
          readOnly: true
          type: integer
        signed_date:
          format: date
          nullable: true
          type: string
        tax_classification:
          type: string
        tax_form_type:
          enum:
          - W9
          - W8BEN
          - W8BEN-E
          - W8IMY
          - W8ECI
          type: string
        tax_id_country:
          type: string
        tax_name:
          type: string
        tin:
          nullable: true
          type: string
        tin_type:
          nullable: true
          type: string
      required:
      - account_payee_tax_form_info_id
      - tax_classification
      - tax_form_type
      - tax_id_country
      - tax_name
      - tin
      - tin_type
      type: object
info:
  title: ows-payee API Specifications
  version: 1.0.0
openapi: 3.0.0
paths:
  /account-payee/knr-details-dataloader:
    post:
      requestBody:
        content:
          application/json:
            schema:
              description: List of knr details revisions
              items:
                anyOf:
                - $ref: '#/components/schemas/DataloadTaxDetailsRequestSchema'
                - $ref: '#/components/schemas/DataloadTaxDetailsRequestSchema'
              type: array
        description: Knr details ids and payee ids pairs
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: List of knr details revisions
                items:
                  anyOf:
                  - $ref: '#/components/schemas/DataloadKnrDetailsResponseSchema'
                  - $ref: '#/components/schemas/DataloadTaxDetailsResponseErrorSchema'
                type: array
          description: Success
        '400':
          description: Invalid or incomplete data in the request body
      summary: Dataload knr details by revision ids for a payee
  /account-payee/tax-details-dataloader:
    post:
      requestBody:
        content:
          application/json:
            schema:
              items:
                description: List of tax details revisions
                items:
                  $ref: '#/components/schemas/DataloadTaxDetailsRequestSchema'
                type: array
        description: Tax details ids and payee ids pairs
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                description: List of tax details revisions
                items:
                  anyOf:
                  - $ref: '#/components/schemas/DataloadTaxDetailsResponseSchema'
                  - $ref: '#/components/schemas/DataloadTaxDetailsResponseErrorSchema'
                type: array
          description: Success
        '400':
          description: Invalid or incomplete data in the request body
      summary: Dataload tax details by revision ids for a payee
  /account-payee/tax-form-info/bulk:
    post:
      description: Get account payee tax form information
      parameters:
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 300
          minimum: 1
          type: integer
      - in: query
        name: offset
        required: false
        schema:
          default: 0
          minimum: 0
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterParamsPost'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxFormInfoOutput'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - tax form
  /account-payee/tax-form-info/details/bulk:
    post:
      description: Get account payee tax form details
      parameters:
      - in: query
        name: limit
        required: false
        schema:
          default: 100
          maximum: 300
          minimum: 1
          type: integer
      - in: query
        name: offset
        required: false
        schema:
          default: 0
          minimum: 0
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterParamsPost'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxFormInfoDetailsOutput'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - tax form
  /account-payee/tax-form-info/{tax_form_info_id}:
    delete:
      description: Soft delete the tax form
      parameters:
      - in: path
        name: tax_form_info_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '204':
          content:
            application/json:
              schema: {}
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - tax form
  /account-payee/withholding-tax-override/dataloader:
    post:
      description: Get tax withholding override in bulk by account payee IDs.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxWithholdingOverrideDataloader'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxWithholdingOverrideDataloaderOutput'
          description: OK
      tags:
      - tax withholding override
  /account-payee/{account_payee_id}/bank-details:
    delete:
      description: Delete account payee bank details
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '204':
          content:
            application/json:
              schema: {}
          description: No Content
      tags:
      - bank details
    get:
      description: Get account payee bank details
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDetailsDetailed'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - bank details
    post:
      description: Save payee bank details
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MigrationBankDetailsInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationBankDetailsDetailed'
          description: OK
      tags:
      - bank details
  /account-payee/{account_payee_id}/knr-details:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeKnrInfoDetailSchema'
          description: Success
        '404':
          description: Knr details document not found for a given payee_account_id
      summary: Get knr information for a Payee
    post:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateKnrDetailsSchema'
        description: Creates knr details for a payee
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeKnrInfoDetailSchema'
          description: Success
        '400':
          description: Invalid or incomplete data in the request body
      summary: Create knr details for a payee
  /account-payee/{account_payee_id}/knr-details-history:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  items:
                    description: List of knr details revisions
                    items:
                      $ref: '#/components/schemas/PayeeKnrDetailsRevision'
                    type: array
                type: object
          description: Success
        '401':
          description: Invalid payee_account_id owner
      summary: Get knr details history for a Payee
  /account-payee/{account_payee_id}/kyc-notification:
    delete:
      description: Delete all payee KYC notifications
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '204':
          content:
            application/json:
              schema: {}
          description: No Content
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - kyc notification
    get:
      description: Get account payee latest kyc notification
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountPayeeKycNotificationOutput'
          description: OK
      tags:
      - kyc notification
    post:
      description: Create payee KYC notification
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeKycNotification'
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PayeeKycNotificationOutput'
                - $ref: '#/components/schemas/AccountPayeeKycNotificationOutput'
          description: Created
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - kyc notification
  /account-payee/{account_payee_id}/move-payoneer-program:
    post:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MovePayoneerProgramSchema'
        description: Programs ids
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MovePayoneerProgramResponse'
          description: Success
        '400':
          description: Invalid or incomplete data in the request body, or Payoneer
            request error
        '500':
          description: Internal server error, something unexpected happened
      summary: Move Payoneer program
  /account-payee/{account_payee_id}/payee-payoneer-details:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeePayoneerDetailsResponseSchema'
          description: Success
        '401':
          description: Invalid payee_account_id owner
        '500':
          description: Internal server error, something unexpected happened
      summary: Get payee Payoneer details.
  /account-payee/{account_payee_id}/payoneer-account:
    delete:
      description: Release payee from payoneer program
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleasePayoneerProgram'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePayoneerProgramResponse'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
      tags:
      - payee releasing
  /account-payee/{account_payee_id}/payoneer-status:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  status: INIT
                properties:
                  status:
                    description: Get payoneer account status
                    type: string
                type: object
          description: Success
        '401':
          description: Invalid payee_account_id owner
        '500':
          description: Internal server error, something unexpected happened
      summary: get payee payoneer account status.
  /account-payee/{account_payee_id}/program/{program_id}/payoneer-status:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      - description: id of payee
        in: path
        name: program_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetPayeeStatusResponse'
          description: Success
        '500':
          description: Internal server error, something unexpected happened
      summary: Get payee Payoneer payee status.
  /account-payee/{account_payee_id}/register-whitelabel-profile:
    post:
      description: Register whitelabel profile
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: OK
      tags:
      - bank details
  /account-payee/{account_payee_id}/reset-banking-states/:
    post:
      description: Reset banking states to INIT
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: OK
      tags:
      - bank details
  /account-payee/{account_payee_id}/resync-payment-readiness:
    post:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResyncPaymentReadinessSchema'
          description: Success
        '400':
          description: Invalid account_payee_id
      summary: Resync payment readiness
  /account-payee/{account_payee_id}/sync-whitelabel-profile:
    post:
      description: Sync account payee bank details
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankDetailsInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDetailsDetailed'
          description: OK
      tags:
      - bank details
  /account-payee/{account_payee_id}/tax-details:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeTaxInfoDetailSchema'
          description: Success
      summary: Get tax information for a Payee
    post:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaxDetailsSchema'
        description: Creates tax details for a payee
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeTaxInfoDetailSchema'
          description: Success
        '400':
          description: Invalid or incomplete data in the request body, or Payoneer
            request error
        '500':
          description: Internal server error, something unexpected happened
      summary: Create tax details for a payee
  /account-payee/{account_payee_id}/tax-details-history:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  items:
                    description: List of tax details revisions
                    items:
                      $ref: '#/components/schemas/PayeeKnrDetailsRevision'
                    type: array
                type: object
          description: Success
        '401':
          description: Invalid payee_account_id owner
      summary: Get tax details history for a Payee
  /account-payee/{account_payee_id}/tax-details/receipt:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/pdf:
              schema:
                format: binary
                type: string
          description: Success
      summary: Get tax information for a Payee as a PDF file. The file has the same
        data as PayeeTaxInfoDetailSchema.
  /account-payee/{account_payee_id}/tax-details/receipt-url:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  receipt_url: https://aws.s3.presigned.url.example.com
                properties:
                  receipt_url:
                    description: The S3 URL with the PDF file
                    type: string
                type: object
          description: Success
      summary: Get tax information for a Payee as a link to a PDF file in S3. Returns
        a link instead of the file so the response can be passed via GraphQL. The
        file has the same data as PayeeTaxInfoDetailSchema.
  /account-payee/{account_payee_id}/tax-details/validate:
    get:
      description: Validate tax details
      parameters:
      - in: query
        name: payment_entity_id
        required: false
        schema:
          minimum: 0
          nullable: true
          type: integer
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
      tags:
      - tax details
  /account-payee/{account_payee_id}/tax-form-info:
    post:
      description: Create or update the tax form
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
              - $ref: '#/components/schemas/USTaxFormW91'
              - $ref: '#/components/schemas/USTaxFormW8BEN1'
              - $ref: '#/components/schemas/USTaxFormW8BENE1'
              - $ref: '#/components/schemas/USTaxFormW8IMY1'
              - $ref: '#/components/schemas/USTaxFormW8ECI1'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/USTaxFormW9'
                - $ref: '#/components/schemas/USTaxFormW8BEN'
                - $ref: '#/components/schemas/USTaxFormW8BENE'
                - $ref: '#/components/schemas/USTaxFormW8IMY'
                - $ref: '#/components/schemas/USTaxFormW8ECI'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - tax form
  /account-payee/{account_payee_id}/tax-reset:
    delete:
      description: Reset tax data
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '204':
          content:
            application/json:
              schema: {}
          description: No Content
      tags:
      - tax reset
  /account-payee/{account_payee_id}/validate-session-id:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      - description: payoneer session id
        in: query
        name: session_id
        required: true
        schema:
          format: uuid
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  session_id_is_valid: true
                properties:
                  session_id_is_valid:
                    description: Is session id valid
                    type: boolean
                type: object
          description: Success
        '400':
          description: Invalid or incomplete data in request
        '401':
          description: Invalid payee_account_id owner
        '500':
          description: Internal server error, something unexpected happened
      summary: Validate payee payoneer session id.
  /account-payee/{account_payee_id}/wform:
    get:
      parameters:
      - description: id of payee
        in: path
        name: account_payee_id
        required: true
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                example:
                  country_of_tax_residency_code: USA
                  country_of_tax_treaty_code: USA
                  tax_form_type: W9 - Individual
                properties:
                  country_of_tax_residency_code:
                    description: Country of tax residence from wform
                    type: string
                  country_of_tax_treaty_code:
                    description: Country of tax treaty from wform
                    type: string
                  tax_form_type:
                    description: Wform type
                    type: string
                type: object
          description: Success
        '401':
          description: Invalid payee_account_id owner
        '404':
          description: Payee wform data missing
        '500':
          description: Internal server error, something unexpected happened
      summary: get payee payoneer wform status.
  /account-payee/{account_payee_id}/whitelabel/payee-registration/format:
    get:
      description: Get account payee bank details format
      parameters:
      - in: query
        name: bank_account_type
        required: true
        schema:
          enum:
          - PERSONAL
          - COMPANY
          type: string
      - in: query
        name: bank_country
        required: true
        schema:
          pattern: '[A-Z]{2}'
          type: string
      - in: query
        name: bank_currency
        required: true
        schema:
          pattern: '[A-Z]{3}'
          type: string
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeRegistrationFormat'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - payee registration
  /account-payee/{account_payee_id}/withholding-tax-override:
    post:
      description: Create or update tax withholding override for account payee.
      parameters:
      - in: path
        name: account_payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaxWithholdingOverrideCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaxWithholdingOverride'
          description: OK
      tags:
      - tax withholding override
  /hello/:
    get:
      responses:
        200:
          description: 200 OK
      summary: Check the health of the application.
  /payee-collaborator:
    post:
      description: Create collaborator payee
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeCreate'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payee'
          description: OK
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Payee'
          description: OK
      tags:
      - payee
  /payee-collaborators/bulk:
    post:
      description: Get collaborator payees in bulk
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeCollaboratorFilter'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeCollaboratorPaginated'
          description: OK
      tags:
      - payee
  /payee/dataloader:
    post:
      description: Get payees in bulk
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeDataloader'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeDataloaderOutput'
          description: OK
      tags:
      - payee
  /payee/kyc-notification/dataloader:
    post:
      description: Get payee latest kyc notification (dataloader)
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeKycNotificationDataloader'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeKycNotificationDataloaderOutput'
          description: OK
      tags:
      - kyc notification
  /payee/{payee_id}/bank-details:
    get:
      description: Get account payee bank details
      parameters:
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDetailsDetailed'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - bank details
  /payee/{payee_id}/kyc-notification:
    delete:
      description: Delete all payee KYC notifications
      parameters:
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '204':
          content:
            application/json:
              schema: {}
          description: No Content
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - kyc notification
    post:
      description: Create payee KYC notification
      parameters:
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeeKycNotification'
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                oneOf:
                - $ref: '#/components/schemas/PayeeKycNotificationOutput'
                - $ref: '#/components/schemas/AccountPayeeKycNotificationOutput'
          description: Created
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - kyc notification
  /payee/{payee_id}/payoneer-account:
    delete:
      description: Release payee from payoneer program
      parameters:
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleasePayoneerProgram'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePayoneerProgramResponse'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
        '404':
          content:
            application/json:
              schema: {}
          description: Not Found
      tags:
      - payee releasing
  /payee/{payee_id}/sync-whitelabel-profile:
    post:
      description: Sync account payee bank details
      parameters:
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankDetailsInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankDetailsDetailed'
          description: OK
      tags:
      - bank details
  /payee/{payee_id}/whitelabel/payee-registration/format:
    get:
      description: Get account payee bank details format
      parameters:
      - in: query
        name: bank_account_type
        required: true
        schema:
          enum:
          - PERSONAL
          - COMPANY
          type: string
      - in: query
        name: bank_country
        required: true
        schema:
          pattern: '[A-Z]{2}'
          type: string
      - in: query
        name: bank_currency
        required: true
        schema:
          pattern: '[A-Z]{3}'
          type: string
      - in: path
        name: payee_id
        required: true
        schema:
          format: int32
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeeRegistrationFormat'
          description: OK
        '400':
          content:
            application/json:
              schema: {}
          description: Bad Request
      tags:
      - payee registration
  /payees/bulk:
    post:
      description: Get payees in bulk
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PayeePaginatedFilter'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayeePaginated'
          description: OK
      tags:
      - payee
  /payoneer/programs/{program_id}/mass-payouts:
    post:
      parameters:
      - description: Payoneer program id of the program of the payouts
        in: path
        name: program_id
        required: true
        schema:
          type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayoneerMassPayoutsSchema'
        description: Creates Payoneer mass payouts
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePayoneerMassPayoutsSchema'
          description: Success
        '400':
          description: Invalid or incomplete data in the request body
        '500':
          description: Internal server error, something unexpected happened
      summary: Creates Payoneer mass payouts
  /payoneer/registration-link:
    post:
      description: Create registration link
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayoneerRegistrationLink'
        required: false
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePayoneerRegistrationLinkResponse'
          description: OK
      tags:
      - payee registration
  /payoneer_status:
    get:
      description: Get payoneer service status
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoneerStatusResponse'
          description: OK
      tags:
      - payoneer service status
servers:
- description: QA server
  url: https://qa-ows-payee.theorchard.io
