> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List bills by organization

GET https://api-sandbox.payabli.com/api/Query/bills/org/{orgId}

Retrieve a list of bills for an organization. Use filters to limit results. Include the `exportFormat` query parameter to return the results as a file instead of a JSON response.

Reference: https://docs.payabli.com/developers/api-reference/bill/get-list-of-bills-for-organization

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi-oas
  version: 1.0.0
paths:
  /Query/bills/org/{orgId}:
    get:
      operationId: ListBillsOrg
      summary: Get list of bills for organization
      description: >-
        Retrieve a list of bills for an organization. Use filters to limit
        results. Include the `exportFormat` query parameter to return the
        results as a file instead of a JSON response.
      tags:
        - Bill
      parameters:
        - name: orgId
          in: path
          description: The numeric identifier for organization, assigned by Payabli.
          required: true
          schema:
            type: integer
        - name: exportFormat
          in: query
          description: >-
            Export format for file downloads. When specified, returns data as a
            file instead of JSON.
          required: false
          schema:
            $ref: '#/components/schemas/ExportFormat'
        - name: fromRecord
          in: query
          description: >-
            The number of records to skip before starting to collect the result
            set.
          required: false
          schema:
            type: integer
            default: 0
        - name: limitRecord
          in: query
          description: >-
            Max number of records to return for the query. Use `0` or negative
            value to return all records.
          required: false
          schema:
            type: integer
            default: 20
        - name: parameters
          in: query
          description: >-
            Collection of field names, conditions, and values used to filter the
            query

            <Info>
              **You must remove `parameters=` from the request before you send it, otherwise Payabli will ignore the filters.**

              Because of a technical limitation, you can't make a request that includes filters from the API console on this page. The response isn't filtered. Instead, copy the request, remove `parameters=` and run the request in a different client.

              For example:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?parameters=totalAmount(gt)=1000&limitRecord=20

              should become:

              --url https://api-sandbox.payabli.com/api/Query/transactions/org/236?totalAmount(gt)=1000&limitRecord=20
            </Info>

            See [Filters and Conditions
            Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference)
            for help.


            List of field names accepted:

            - `frequency` (in, nin, ne, eq)

            - `method` (in, nin, eq, ne)

            - `event` (in, nin, eq, ne)

            - `target` (ct, nct, eq, ne)

            - `status` (eq, ne)

            - `parentOrgId` (ne, eq, nin, in)

            - `approvalUserId` (eq, ne)

            - `approvalUserEmail` (eq, ne)


            List of comparison accepted - enclosed between parentheses:

            - eq or empty => equal

            - gt => greater than

            - ge => greater or equal

            - lt => less than

            - le => less or equal

            - ne => not equal

            - ct => contains

            - nct => not contains

            - in => inside array

            - nin => not inside array


            List of parameters accepted:

            - limitRecord : max number of records for query (default="20", "0"
            or negative value for all)

            - fromRecord : initial record in query


            Example: totalAmount(gt)=20 return all records with totalAmount
            greater than 20.00
          required: false
          schema:
            type: object
            additionalProperties:
              type:
                - string
                - 'null'
        - name: sortBy
          in: query
          description: >-
            The field name to use for sorting results. Use `desc(field_name)` to
            sort descending by `field_name`, and use `asc(field_name)` to sort
            ascending by `field_name`.
          required: false
          schema:
            type: string
        - name: requestToken
          in: header
          description: >
            Long-lived API token sent in the `requestToken` header. See [API
            token authentication](/developers/api-tokens).
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillQueryResponse'
        '400':
          description: Bad request / invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
        '503':
          description: Database connection error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayabliErrorBody'
servers:
  - url: https://api-sandbox.payabli.com/api
    description: Sandbox
  - url: https://api.payabli.com/api
    description: Production
components:
  schemas:
    ExportFormat:
      type: string
      enum:
        - csv
        - xlsx
      description: |
        Export format for file downloads. When specified, returns data as a file
        instead of JSON.
      title: ExportFormat
    PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    Pagesize:
      type: integer
      description: Number of records on each response page.
      title: Pagesize
    Totalpages:
      type: integer
      description: Total number of pages in response.
      title: Totalpages
    Totalrecords:
      type: integer
      description: Total number of records in response.
      title: Totalrecords
    BillQueryResponseSummary:
      type: object
      properties:
        pageidentifier:
          $ref: '#/components/schemas/PageIdentifier'
        pageSize:
          $ref: '#/components/schemas/Pagesize'
        total2approval:
          type: integer
        totalactive:
          type: integer
        totalAmount:
          type: number
          format: double
          description: Total amount of bills in response.
        totalamount2approval:
          type: number
          format: double
        totalamountactive:
          type: number
          format: double
        totalamountapproved:
          type: number
          format: double
          description: The total amount of approved bills.
        totalamountcancel:
          type: number
          format: double
        totalamountdisapproved:
          type: number
          format: double
          description: The total amount of disapproved bills.
        totalamountintransit:
          type: number
          format: double
        totalamountoverdue:
          type: number
          format: double
          description: The total amount of bills that are overdue.
        totalamountpaid:
          type: number
          format: double
          description: The total amount of paid bills.
        totalamountsent2approval:
          type: number
          format: double
        totalapproved:
          type: integer
          description: The total number of bills that were approved.
        totalcancel:
          type: integer
        totaldisapproved:
          type: integer
          description: The number of bills that were disapproved.
        totalintransit:
          type: integer
        totaloverdue:
          type: integer
          description: The number of bills that are overdue.
        totalPages:
          $ref: '#/components/schemas/Totalpages'
        totalpaid:
          type: integer
          description: The total number of paid bills.
        totalRecords:
          $ref: '#/components/schemas/Totalrecords'
        totalsent2approval:
          type: integer
      title: BillQueryResponseSummary
    AccountingField:
      type: string
      description: Optional custom field.
      title: AccountingField
    Email:
      type: string
      format: email
      description: Email address.
      title: Email
    BillQueryRecord2BillApprovalsItem:
      type: object
      properties:
        approved:
          type: integer
          description: >-
            Indicates whether the bill has been approved. `0` is false, and `1`
            is true.
        approvedTime:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp of when the approval was made, in UTC.
        comments:
          type: string
          description: Additional comments on the approval.
        email:
          $ref: '#/components/schemas/Email'
          description: The approving user's email address.
        Id:
          type: integer
          format: int64
          description: The approving user's ID.
      required:
        - approvedTime
      title: BillQueryRecord2BillApprovalsItem
    Source:
      type: string
      description: Custom identifier to indicate the transaction or request source.
      title: Source
    GeneralEvents:
      type: object
      properties:
        description:
          type: string
          description: Event description.
        eventTime:
          type: string
          format: date-time
          description: Event timestamp, in UTC.
        extraData:
          type:
            - string
            - 'null'
          description: Extra data.
        refData:
          type: string
          description: Reference data.
        source:
          $ref: '#/components/schemas/Source'
          description: The event source.
      title: GeneralEvents
    ItemCommodityCode:
      type: string
      description: Item or product commodity code. Max length of 250 characters.
      title: ItemCommodityCode
    ItemDescription:
      type: string
      description: Item or product description. Max length of 250 characters.
      title: ItemDescription
    ItemProductCode:
      type: string
      description: Item or product code. Max length of 250 characters.
      title: ItemProductCode
    ItemProductName:
      type: string
      description: Item or product name. Max length of 250 characters.
      title: ItemProductName
    ItemUnitofMeasure:
      type: string
      description: Unit of measurement. Max length of 100 characters.
      title: ItemUnitofMeasure
    BillItem:
      type: object
      properties:
        itemCategories:
          type: array
          items:
            type: string
          description: Array of tags classifying item or product.
        itemCommodityCode:
          $ref: '#/components/schemas/ItemCommodityCode'
        itemCost:
          type: number
          format: double
          description: Item or product price per unit.
        itemDescription:
          $ref: '#/components/schemas/ItemDescription'
        itemMode:
          type: integer
          description: >
            Internal class of item or product: value `0` is only for invoices,

            `1` for bills, and `2` is common for both. Required on invoice line

            items — invoice creation fails with `Invalid item data` if it's
            omitted.
        itemProductCode:
          $ref: '#/components/schemas/ItemProductCode'
        itemProductName:
          $ref: '#/components/schemas/ItemProductName'
        itemQty:
          type: integer
          description: Quantity of item or product.
        itemTaxAmount:
          type: number
          format: double
          description: Tax amount applied to item or product.
        itemTaxRate:
          type: number
          format: double
          description: Tax rate applied to item or product.
        itemTotalAmount:
          type: number
          format: double
          description: >
            Per-line total for this item (unit cost times quantity). Distinct
            from

            the invoice's overall total, `invoiceAmount`. Required on invoice
            line items.
        itemUnitOfMeasure:
          $ref: '#/components/schemas/ItemUnitofMeasure'
      title: BillItem
    CreatedAt:
      type: string
      format: date-time
      description: Timestamp of when record was created, in UTC.
      title: CreatedAt
    ExternalPaypointId:
      type: string
      description: |
        A custom identifier for the paypoint, if applicable.
      title: ExternalPaypointId
    Frequency:
      type: string
      enum:
        - onetime
        - weekly
        - every2weeks
        - every6months
        - monthly
        - every3months
        - annually
        - firstofmonth
        - fifteenthofmonth
        - endofmonth
      description: >
        Frequency for operation. The `firstofmonth`, `fifteenthofmonth`, and
        `endofmonth` values are only valid on subscriptions — they aren't
        accepted by other endpoints (such as invoice scheduling) that use this
        enum.
      title: Frequency
    OrgParentName:
      type: string
      description: The name of the parent organization.
      title: OrgParentName
    PaymentIdString:
      type: string
      description: |
        The unique transaction ID. This value is a string representation of a
        long integer.
      title: PaymentIdString
    BillQueryRecord2PaymentMethod:
      type: string
      enum:
        - vcard
        - ach
        - check
        - card
        - managed
      description: Preferred payment method used.
      title: BillQueryRecord2PaymentMethod
    Dbaname:
      type: string
      description: |
        The alternate or common name that this business is doing business under,
        usually referred to as a DBA name.
      title: Dbaname
    Legalname:
      type: string
      description: Business legal name.
      title: Legalname
    Billstatus:
      type: integer
      description: |
        The bill's status. Values are:

        - `-99`: deleted or canceled
        - `1`: Active
        - `2`: Sent to approval
        - `5`: Partially approved
        - `11`: Rejected
        - `20`: Approved
        - `50`: Payment in transit
        - `100`: Paid
      title: Billstatus
    Terms:
      type: string
      enum:
        - PIA
        - CIA
        - UR
        - NET10
        - NET20
        - NET30
        - NET45
        - NET60
        - NET90
        - EOM
        - MFI
        - 5MFI
        - 10MFI
        - 15MFI
        - 20MFI
        - 2/10NET30
        - UF
        - 10UF
        - 20UF
        - 25UF
        - 50UF
      description: >
        Payment terms for invoice. If no terms are defined, then response data
        for

        this field defaults to `NET30`.
      title: Terms
    Comments:
      type: string
      description: Any comment or description.
      title: Comments
    AdditionalData:
      type: object
      additionalProperties:
        type: object
        additionalProperties:
          description: Any type
      description: >
        Custom dictionary of key:value pairs. You can use this field to store
        any

        data related to the object or for your system. If you are using

        [custom identifiers](/developers/developer-guides/entities-customers),

        pass those in this object. Max length for a value is 100 characters.

        Example usage:


        ```json

        {
          "additionalData": {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3"
          }
        }

        ```
      title: AdditionalData
    AddressNullable:
      type: string
      description: The address.
      title: AddressNullable
    AddressAddtlNullable:
      type: string
      description: Additional line for the address.
      title: AddressAddtlNullable
    AccountId:
      type: string
      description: Custom identifier for payment connector.
      title: AccountId
    BankName:
      type: string
      description: Name of bank for account.
      title: BankName
    RoutingAccount:
      type: string
      description: Routing number of bank account.
      title: RoutingAccount
    AccountNumber:
      type: string
      description: >-
        Account number for bank account. This value is returned masked in
        responses.
      title: AccountNumber
    TypeAccount:
      type: string
      enum:
        - Checking
        - Savings
      description: 'Type of bank account: Checking or Savings.'
      title: TypeAccount
    BankAccountHolderName:
      type: string
      description: The accountholder's name.
      title: BankAccountHolderName
    BankAccountHolderType:
      type: string
      enum:
        - Personal
        - Business
      description: Describes whether the bank is a personal or business account.
      title: BankAccountHolderType
    BillingDataResponse:
      type: object
      properties:
        id:
          type: integer
          description: The bank's ID in Payabli.
        accountId:
          $ref: '#/components/schemas/AccountId'
          description: >-
            An identifier for the bank account. If not provided during creation
            or update, the system generates one in the format
            `acct-{first_digit}xxxxx{last_4_digits}` based on the account
            number. If a duplicate exists within the same service at the
            paypoint, a numeric suffix is appended, such as `-2`. This value is
            also used as the identifier for the bank account's associated
            payment connector.
        nickname:
          type: string
        bankName:
          $ref: '#/components/schemas/BankName'
        routingAccount:
          $ref: '#/components/schemas/RoutingAccount'
        accountNumber:
          $ref: '#/components/schemas/AccountNumber'
        typeAccount:
          $ref: '#/components/schemas/TypeAccount'
        bankAccountHolderName:
          $ref: '#/components/schemas/BankAccountHolderName'
        bankAccountHolderType:
          $ref: '#/components/schemas/BankAccountHolderType'
        bankAccountFunction:
          type: integer
          description: >-
            Describes whether the bank account is used for deposits or
            withdrawals in Payabli:
              - `0`: Deposit
              - `1`: Withdrawal
              - `2`: Deposit and withdrawal
        verified:
          type: boolean
        status:
          type: integer
        services:
          type: array
          items:
            description: Any type
        default:
          type: boolean
      required:
        - id
        - nickname
        - bankName
        - routingAccount
        - accountNumber
        - typeAccount
        - bankAccountHolderName
        - bankAccountHolderType
        - bankAccountFunction
        - verified
        - status
        - services
        - default
      title: BillingDataResponse
    CityNullable:
      type: string
      description: The city.
      title: CityNullable
    ContactsResponse:
      type: object
      properties:
        ContactEmail:
          $ref: '#/components/schemas/Email'
          description: Contact email address.
        ContactName:
          type: string
          description: Contact name.
        ContactPhone:
          type: string
          description: Contact phone number.
        ContactTitle:
          type: string
          description: Contact title.
      title: ContactsResponse
    Ein:
      type: string
      description: Business EIN or tax ID. This value is masked in API responses.
      title: Ein
    EnrollmentStatus:
      type: string
      description: Enrollment status of vendor in payables program.
      title: EnrollmentStatus
    InternalReferenceId:
      type: integer
      format: int64
      description: An internal reference ID.
      title: InternalReferenceId
    LastModified:
      type: string
      format: date-time
      description: Timestamp of when record was last updated, in UTC.
      title: LastModified
    Mcc:
      type: string
      description: >
        Business Merchant Category Code (MCC).

        [This
        resource](https://github.com/greggles/mcc-codes/blob/main/mcc_codes.csv)

        lists MCC codes.
      title: Mcc
    OrgParentId:
      type: integer
      format: int64
      description: The ID of the org's parent organization.
      title: OrgParentId
    PayeeName:
      type: string
      description: Alternative name used to receive paper check.
      title: PayeeName
    VendorPaymentMethodString:
      type: string
      description: |
        The vendor's preferred payment method. Can be one of:

        - `managed` — Managed payment method
        - `vcard` — Virtual card payment method
        - `check` — Check payment method
        - `ach` — ACH payment method
      title: VendorPaymentMethodString
    Entrypointfield:
      type: string
      description: The entrypoint identifier.
      title: Entrypointfield
    Remitaddress1:
      type: string
      description: >
        Remittance street address. Used for mailing paper checks. Required if
        any

        remittance address field is provided.
      title: Remitaddress1
    Remitaddress2:
      type: string
      description: |
        Remittance address additional line, such as a suite or unit number. Used
        for mailing paper checks. Always optional.
      title: Remitaddress2
    Remitcity:
      type: string
      description: |
        Remittance address city. Used for mailing paper checks. Required if any
        remittance address field is provided.
      title: Remitcity
    Remitcountry:
      type: string
      description: |
        Remittance address country. Used for mailing paper checks. Must be `US`
        or `CA`. Defaults to `US` if not provided.
      title: Remitcountry
    RemitEmail:
      type: string
      format: email
      description: |
        Remittance email address. Used for sending virtual cards and other
        information about payouts.
      title: RemitEmail
    Remitstate:
      type: string
      description: |
        Remittance address state or province. Used for mailing paper checks.
        Required if any remittance address field is provided. Must be a valid
        US state or Canadian province abbreviation.
      title: Remitstate
    Remitzip:
      type: string
      description: |
        Remittance address ZIP or postal code. Used for mailing paper checks.
        Required if any remittance address field is provided. For US addresses,
        use five digits or ZIP+4 format.
      title: Remitzip
    StateNullable:
      type: string
      description: The state or province.
      title: StateNullable
    BinData:
      type: object
      properties:
        binMatchedLength:
          type: string
          description: |-
            The number of characters from the beginning of the card number that
            were matched against a Bank Identification Number (BIN) or the Card
            Range table.
        binCardBrand:
          type: string
          description: |-
            The card brand. For example, Visa, Mastercard, American Express,
            Discover.
        binCardType:
          type: string
          description: |-
            The type of card: `Credit` or `Debit`. Case can vary between
            processors, so compare this value case-insensitively.
        binCardCategory:
          type: string
          description: >-
            The category of the card, which indicates the card product. For
            example: Standard, Gold, Platinum, etc. The binCardCategory for
            prepaid cards is marked `PREPAID`.
        binCardIssuer:
          type: string
          description: The name of the financial institution that issued the card.
        binCardIssuerCountry:
          type: string
          description: The issuing financial institution's country name.
        binCardIssuerCountryCodeA2:
          type: string
          description: >-
            The issuing financial institution's two-character ISO country code.
            See [this resource](https://www.iso.org/obp/ui/#search) for a list
            of codes.
        binCardIssuerCountryNumber:
          type: string
          description: >-
            The issuing financial institution's ISO standard numeric country
            code. See [this resource](https://www.iso.org/obp/ui/#search) for a
            list of codes.
        binCardIsRegulated:
          type: string
          description: Indicates whether the card is regulated.
        binCardUseCategory:
          type: string
          description: The use category classification for the card.
        binCardIssuerCountryCodeA3:
          type: string
          description: >-
            The issuing financial institution's three-character ISO country
            code.

            See [this resource](https://www.iso.org/obp/ui/#search) for a list
            of

            codes.
      description: >-
        Object containing information related to the card. This object is `null`

        unless the payment method is card. If the payment method is Apple Pay,
        the

        binData will be related to the DPAN (device primary account number), not

        the card connected to Apple Pay.
      title: BinData
    VendorResponseStoredMethod:
      type: object
      properties:
        IdPmethod:
          type:
            - string
            - 'null'
        Method:
          type:
            - string
            - 'null'
        Descriptor:
          type:
            - string
            - 'null'
        MaskedAccount:
          type:
            - string
            - 'null'
        ExpDate:
          type:
            - string
            - 'null'
        HolderName:
          type:
            - string
            - 'null'
        AchSecCode:
          type:
            - string
            - 'null'
        AchHolderType:
          type:
            - string
            - 'null'
        IsValidatedACH:
          type:
            - boolean
            - 'null'
        BIN:
          type:
            - string
            - 'null'
        binData:
          oneOf:
            - $ref: '#/components/schemas/BinData'
            - type: 'null'
        ABA:
          type:
            - string
            - 'null'
        PostalCode:
          type:
            - string
            - 'null'
        MethodType:
          type:
            - string
            - 'null'
        WalletType:
          type:
            - string
            - 'null'
          description: Digital wallet type if applicable.
        LastUpdated:
          type:
            - string
            - 'null'
          format: date-time
        CardUpdatedOn:
          type:
            - string
            - 'null'
          format: date-time
          description: Date and time the card was last updated.
      required:
        - IdPmethod
        - Method
        - Descriptor
        - MaskedAccount
        - ExpDate
        - HolderName
        - AchSecCode
        - AchHolderType
        - IsValidatedACH
        - BIN
        - binData
        - ABA
        - PostalCode
        - MethodType
        - WalletType
        - LastUpdated
        - CardUpdatedOn
      description: Stored payment method information
      title: VendorResponseStoredMethod
    VendorSummary:
      type: object
      properties:
        ActiveBills:
          type: integer
        PendingBills:
          type: integer
        InTransitBills:
          type: integer
        PaidBills:
          type: integer
        OverdueBills:
          type: integer
        ApprovedBills:
          type: integer
        DisapprovedBills:
          type: integer
        TotalBills:
          type: integer
        ActiveBillsAmount:
          type: number
          format: double
        PendingBillsAmount:
          type: number
          format: double
        InTransitBillsAmount:
          type: number
          format: double
        PaidBillsAmount:
          type: number
          format: double
        OverdueBillsAmount:
          type: number
          format: double
        ApprovedBillsAmount:
          type: number
          format: double
        DisapprovedBillsAmount:
          type: number
          format: double
        TotalBillsAmount:
          type: number
          format: double
      title: VendorSummary
    Vendorid:
      type: integer
      description: Payabli identifier for vendor record.
      title: Vendorid
    VendorNumber:
      type: string
      description: >
        Custom number identifying the vendor. Must be unique in paypoint. Can't
        be

        blank.
      title: VendorNumber
    Vendorstatus:
      type: integer
      description: |
        Vendor's status. Allowed values:

        - `0` Inactive
        - `1` Active
        - `-99` Deleted
      title: Vendorstatus
    Zip:
      type: string
      description: ZIP code for address.
      title: Zip
    VendorQueryRecord:
      type: object
      properties:
        additionalData:
          $ref: '#/components/schemas/AdditionalData'
        Address1:
          $ref: '#/components/schemas/AddressNullable'
        Address2:
          $ref: '#/components/schemas/AddressAddtlNullable'
        BillingData:
          $ref: '#/components/schemas/BillingDataResponse'
        City:
          $ref: '#/components/schemas/CityNullable'
        Contacts:
          type: array
          items:
            $ref: '#/components/schemas/ContactsResponse'
          description: Array of objects describing the vendor's contacts.
        Country:
          type: string
        CreatedDate:
          $ref: '#/components/schemas/CreatedAt'
        customerVendorAccount:
          type: string
        customField1:
          type: string
        customField2:
          type: string
        EIN:
          $ref: '#/components/schemas/Ein'
        Email:
          $ref: '#/components/schemas/Email'
        EnrollmentStatus:
          $ref: '#/components/schemas/EnrollmentStatus'
        externalPaypointID:
          $ref: '#/components/schemas/ExternalPaypointId'
        InternalReferenceId:
          $ref: '#/components/schemas/InternalReferenceId'
        LastUpdated:
          $ref: '#/components/schemas/LastModified'
        LocationCode:
          type: string
        Mcc:
          $ref: '#/components/schemas/Mcc'
        Name1:
          type: string
        Name2:
          type: string
        ParentOrgName:
          $ref: '#/components/schemas/OrgParentName'
        ParentOrgId:
          $ref: '#/components/schemas/OrgParentId'
        payeeName1:
          $ref: '#/components/schemas/PayeeName'
        payeeName2:
          $ref: '#/components/schemas/PayeeName'
        PaymentMethod:
          $ref: '#/components/schemas/VendorPaymentMethodString'
        PaypointDbaname:
          $ref: '#/components/schemas/Dbaname'
        PaypointEntryname:
          $ref: '#/components/schemas/Entrypointfield'
        PaypointLegalname:
          $ref: '#/components/schemas/Legalname'
        Phone:
          type: string
        remitAddress1:
          $ref: '#/components/schemas/Remitaddress1'
        remitAddress2:
          $ref: '#/components/schemas/Remitaddress2'
        remitCity:
          $ref: '#/components/schemas/Remitcity'
        remitCountry:
          $ref: '#/components/schemas/Remitcountry'
        RemitEmail:
          $ref: '#/components/schemas/RemitEmail'
        remitState:
          $ref: '#/components/schemas/Remitstate'
        remitZip:
          $ref: '#/components/schemas/Remitzip'
        State:
          $ref: '#/components/schemas/StateNullable'
        StoredMethods:
          type: array
          items:
            $ref: '#/components/schemas/VendorResponseStoredMethod'
        Summary:
          $ref: '#/components/schemas/VendorSummary'
        VendorId:
          $ref: '#/components/schemas/Vendorid'
        VendorNumber:
          $ref: '#/components/schemas/VendorNumber'
        VendorStatus:
          $ref: '#/components/schemas/Vendorstatus'
        Zip:
          $ref: '#/components/schemas/Zip'
        PaymentPortalUrl:
          type: string
          description: >-
            URL for the vendor's online payment portal, if known. Populated by
            the vendor enrichment pipeline.
        CardAccepted:
          type: string
          description: >-
            Whether the vendor accepts card payments. Values are `yes`, `no`, or
            `unable to determine`. Populated by the vendor enrichment pipeline.
        AchAccepted:
          type: string
          description: >-
            Whether the vendor accepts ACH payments. Values are `yes`, `no`, or
            `unable to determine`. Populated by the vendor enrichment pipeline.
        EnrichmentStatus:
          type: string
          description: >-
            Current enrichment state of the vendor. Values are `not_enriched`,
            `partially_enriched`, `fully_enriched`, or `fallback_applied`.
        EnrichedBy:
          type: string
          description: >-
            Which enrichment method resolved the vendor's payment acceptance
            info. Values are `invoice_scan`, `web_search`, `vendor_network`, or
            `manual`.
        EnrichedAt:
          type: string
          format: date-time
          description: When the vendor was last enriched (UTC).
        EnrichmentId:
          type: string
          description: Identifier for the enrichment request that last updated this vendor.
      title: VendorQueryRecord
    Netamountnullable:
      type: number
      format: double
      description: Net amount.
      title: Netamountnullable
    FeeAmount:
      type: number
      format: double
      description: Service fee or sub-charge applied.
      title: FeeAmount
    Orgid:
      type: integer
      format: int64
      description: Organization ID. Unique identifier assigned to an org by Payabli.
      title: Orgid
    FileContentFtype:
      type: string
      enum:
        - pdf
        - doc
        - docx
        - jpg
        - jpeg
        - png
        - gif
        - txt
      description: The MIME type of the file (if content is provided).
      title: FileContentFtype
    FileContent:
      type: object
      properties:
        fContent:
          type: string
          description: |
            Content of file, Base64-encoded. Ignored if `furl` is specified. Max
            upload size is 30 MB.
        filename:
          type: string
          description: The name of the attached file.
        ftype:
          $ref: '#/components/schemas/FileContentFtype'
        furl:
          type: string
          description: Optional URL provided to show or download the file remotely.
      description: Contains details about a file. Max upload size is 30 MB.
      title: FileContent
    Accountexp:
      type: string
      description: Expiration date of card used in transaction.
      title: Accountexp
    Accounttype:
      type: string
      description: Bank account type or card brand.
      title: Accounttype
    Accountzip:
      type: string
      description: ZIP code for card used in transaction.
      title: Accountzip
    Holdername:
      type: string
      description: The cardholder name.
      title: Holdername
    Initiator:
      type: string
      description: |
        The transaction's initiator. Indicates who initiated the transaction.
      title: Initiator
    Maskedaccount:
      type: string
      description: |
        Masked card or bank account used in transaction. In the case of Apple
        Pay, this is a masked DPAN (device primary account number).
      title: Maskedaccount
    Orderdescription:
      type: string
      description: Text description of the transaction.
      title: Orderdescription
    PaymentCategories:
      type: object
      properties:
        amount:
          type: number
          format: double
          description: Price/cost per unit of item or category.
        description:
          type: string
          description: Description of item or category
        label:
          type: string
          description: Name of item or category.
        qty:
          type: integer
          default: 1
          description: Quantity of item or category
      required:
        - amount
        - label
      title: PaymentCategories
    SplitFundingContent:
      type: object
      properties:
        accountId:
          type: string
          description: The accountId for the account the split should be sent to.
        amount:
          type: number
          format: double
          description: Amount from the transaction to send to this recipient.
        description:
          type: string
          description: A description for the split.
        recipientEntryPoint:
          type: string
          description: The entrypoint the split should be sent to.
      title: SplitFundingContent
    SplitFunding:
      type: array
      items:
        $ref: '#/components/schemas/SplitFundingContent'
      description: >-
        Split funding instructions for the transaction. The total amount of the
        splits must match the total amount of the transaction.
      title: SplitFunding
    PaymentDetail:
      type: object
      properties:
        categories:
          type: array
          items:
            $ref: '#/components/schemas/PaymentCategories'
          description: >-
            Array of payment categories/line items describing the amount to be
            paid.

            **Note**: These categories are for information only and aren't
            validated against the total amount provided.
        checkImage:
          type: object
          additionalProperties:
            description: Any type
          description: Object containing image of paper check.
        checkNumber:
          type: string
          description: >-
            A check number to be used in the ach transaction. **Required** for
            payment method = 'check'.
        currency:
          type: string
          description: >-
            The currency for the transaction, `USD` or `CAD`. If your paypoint
            is configured for CAD, you must send the `CAD` value in this field,
            otherwise it defaults to USD, which will cause the transaction to
            fail.
        serviceFee:
          type: number
          format: double
          description: >-
            Service fee to be deducted from the total amount. This amount must
            be a number, percentages aren't accepted. If you are using a
            percentage-based fee schedule, you must calculate the value
            manually.
        splitFunding:
          $ref: '#/components/schemas/SplitFunding'
          description: >-
            Split funding instructions for the transaction. See [Split a
            Transaction](/developers/developer-guides/money-in-split-funding)
            for more.
        checkUniqueId:
          type: string
          description: >-
            Unique identifier for a processed check image. Required for RDC
            (Remote Deposit Capture) transactions where `achCode` is `BOC`. Use
            the `id` value from the [check
            processing](/developers/api-reference/moneyin/check-capture)
            response.
        totalAmount:
          type: number
          format: double
          description: >-
            Total amount to be charged. If a service fee is sent, then this
            amount should include the service fee."
      required:
        - totalAmount
      description: Details about the payment.
      title: PaymentDetail
    Sequence:
      type: string
      description: >
        The order of the transaction for cardholder-initiated transaction (CIT)

        and merchant-initiated transaction (MIT) purposes. This field is

        automatically detected and populated by Payabli.


        Available values:


        - `first`: The first use of the payment method. This is almost always
          a cardholder-initiated transaction.
        - `subsequent`: For merchant-initiated transactions after the first use
          of the payment method.

        See

        [Understanding CIT and MIT
        Indicators](/guides/pay-in-transactions-cit-mit-overview)

        for more information.
      title: Sequence
    Signaturedata:
      type: string
      title: Signaturedata
    Storedmethodid:
      type: string
      description: |
        Payabli identifier of a tokenized payment method. If this field is
        used in a request, the `method` field is overridden and the payment
        is made using the payment token.
      title: Storedmethodid
    StoredMethodUsageType:
      type: string
      description: >
        **Strongly recommended.** The usage type for the stored method, used

        for merchant-initiated transactions (MIT). If you don't specify a

        value, Payabli defaults to `unscheduled`.


        Available values:


        - `unscheduled`: One-time or otherwise not pre-scheduled.

        - `subscription`: Subscription payments. For example, monthly rental
          fees or ongoing service subscriptions.
        - `recurring`: Recurring payments per a set plan. For example,
          splitting an HOA special assessment over 6 monthly payments.

        See

        [Understanding CIT and MIT
        Indicators](/guides/pay-in-transactions-cit-mit-overview)

        for more information.
      title: StoredMethodUsageType
    QueryPaymentData:
      type: object
      properties:
        AccountExp:
          $ref: '#/components/schemas/Accountexp'
        accountId:
          $ref: '#/components/schemas/AccountId'
        AccountType:
          $ref: '#/components/schemas/Accounttype'
        AccountZip:
          $ref: '#/components/schemas/Accountzip'
        binData:
          $ref: '#/components/schemas/BinData'
        HolderName:
          $ref: '#/components/schemas/Holdername'
        Initiator:
          $ref: '#/components/schemas/Initiator'
        MaskedAccount:
          $ref: '#/components/schemas/Maskedaccount'
        orderDescription:
          $ref: '#/components/schemas/Orderdescription'
        paymentDetails:
          $ref: '#/components/schemas/PaymentDetail'
        Sequence:
          $ref: '#/components/schemas/Sequence'
        SignatureData:
          $ref: '#/components/schemas/Signaturedata'
        StoredId:
          $ref: '#/components/schemas/Storedmethodid'
          description: Identifier of stored payment method used in transaction.
        StoredMethodUsageType:
          $ref: '#/components/schemas/StoredMethodUsageType'
      title: QueryPaymentData
    InvoiceNumber:
      type: string
      description: Invoice number. Identifies the invoice under a paypoint.
      title: InvoiceNumber
    NetAmountstring:
      type: string
      description: Net amount owed in bill. Required when adding a bill.
      title: NetAmountstring
    AdditionalDataString:
      type: string
      description: >
        Custom dictionary of key:value pairs. You can use this field to store
        any

        data related to the object or for your system. Example usage:


        ```json

        {
          "additionalData": {
            "key1": "value1",
            "key2": "value2",
            "key3": "value3"
          }
        }

        ```
      title: AdditionalDataString
    Attachments:
      type: array
      items:
        $ref: '#/components/schemas/FileContent'
      description: >
        Array of `fileContent` objects with attached documents. Max upload size
        is

        30 MB.
      title: Attachments
    BillPayOutData:
      type: object
      properties:
        billId:
          type: integer
          format: int64
          description: Bill ID in Payabli.
        comments:
          $ref: '#/components/schemas/Comments'
          description: >-
            Any comments about bill. **For managed payouts, this field has a
            limit of 100 characters**.
        dueDate:
          type:
            - string
            - 'null'
          format: date
          description: Bill due date in format YYYY-MM-DD or MM/DD/YYYY.
        invoiceDate:
          type:
            - string
            - 'null'
          format: date
          description: Bill date in format YYYY-MM-DD or MM/DD/YYYY.
        invoiceNumber:
          $ref: '#/components/schemas/InvoiceNumber'
          description: >-
            Custom number identifying the bill. Must be unique in paypoint.
            **Required** for new bill and when `billId` isn't provided.
        netAmount:
          $ref: '#/components/schemas/NetAmountstring'
          description: Net Amount owed in bill. Required when adding a bill.
        discount:
          type: string
          description: Bill discount amount.
        Terms:
          $ref: '#/components/schemas/Terms'
          description: Description of payment terms.
        AccountingField1:
          $ref: '#/components/schemas/AccountingField'
        AccountingField2:
          $ref: '#/components/schemas/AccountingField'
        AdditionalData:
          $ref: '#/components/schemas/AdditionalDataString'
        attachments:
          $ref: '#/components/schemas/Attachments'
          description: >-
            Bill image attachment. Send the bill image as Base64-encoded string,
            or as a publicly accessible link. For full details on using this
            field with a payout authorization, see [the
            documentation](/developers/developer-guides/pay-out-manage-payouts).
      required:
        - dueDate
        - invoiceDate
      title: BillPayOutData
    QueryTransactionEventsEventData:
      oneOf:
        - type: object
          additionalProperties:
            description: Any type
        - type: string
      description: |
        Any data associated to the event received from processor. Contents vary
        by event type.
      title: QueryTransactionEventsEventData
    QueryTransactionEvents:
      type: object
      properties:
        EventData:
          $ref: '#/components/schemas/QueryTransactionEventsEventData'
          description: >-
            Any data associated to the event received from processor. Contents
            vary by event type.
        EventTime:
          type: string
          format: date-time
          description: Date and time of event.
        TransEvent:
          type: string
          description: >-
            Event descriptor. See [TransEvent
            Reference](/guides/pay-in-transevents-reference) for more details.
      title: QueryTransactionEvents
    Gatewayfield:
      type: string
      description: |
        The payment gateway used to process the transaction.
      title: Gatewayfield
    HasVcardTransactions:
      type: boolean
      description: |
        When `true`, indicates that the paypoint has vCard transactions.
      title: HasVcardTransactions
    IsSameDayACH:
      type: boolean
      description: |
        When `true`, this is a same-day ACH transaction.
      title: IsSameDayACH
    ScheduleId:
      type: integer
      format: int64
      description: ID of the recurring payment schedule associated with the transaction.
      title: ScheduleId
    SettlementStatusPayout:
      type: string
      description: >
        The settlement status of the payout transaction. See

        [Payout Transaction
        Statuses](/guides/pay-out-status-reference#payout-transaction-statuses)

        for a full reference.
      title: SettlementStatusPayout
    RiskFlagged:
      type: boolean
      description: Indicates if the transaction was flagged for risk.
      title: RiskFlagged
    RiskFlaggedOn:
      type: string
      format: date-time
      description: Timestamp when the transaction was flagged for risk.
      title: RiskFlaggedOn
    RiskStatus:
      type: string
      description: Current risk status of the transaction.
      title: RiskStatus
    RiskReason:
      type: string
      description: Reason for risk flagging.
      title: RiskReason
    RiskAction:
      type: string
      description: Action taken due to risk assessment.
      title: RiskAction
    RiskActionCode:
      type: integer
      description: Numeric code representing the risk action.
      title: RiskActionCode
    PayoutProgram:
      type: string
      description: >
        The payout program associated with the transaction: managed or
        on-demand.
      title: PayoutProgram
    TransactionOutQueryRecord:
      type: object
      properties:
        IdOut:
          type: integer
          format: int64
          description: Identifier of payout transaction.
        CreatedAt:
          $ref: '#/components/schemas/CreatedAt'
        Comments:
          $ref: '#/components/schemas/Comments'
          description: Any comment or description for payout transaction.
        Vendor:
          $ref: '#/components/schemas/VendorQueryRecord'
          description: Vendor related to the payout transaction.
        PaypointDbaname:
          $ref: '#/components/schemas/Dbaname'
        PaypointLegalname:
          $ref: '#/components/schemas/Legalname'
        Status:
          type: integer
          description: Internal status of transaction.
        LastUpdated:
          $ref: '#/components/schemas/LastModified'
          description: Timestamp when payment record was updated, in UTC.
        TotalAmount:
          type: number
          format: double
          description: Transaction total amount (including service fee or sub-charge).
        NetAmount:
          $ref: '#/components/schemas/Netamountnullable'
        FeeAmount:
          $ref: '#/components/schemas/FeeAmount'
        Source:
          $ref: '#/components/schemas/Source'
        ParentOrgName:
          $ref: '#/components/schemas/OrgParentName'
        ParentOrgId:
          $ref: '#/components/schemas/Orgid'
        BatchNumber:
          type: string
          description: The batch number for the payout transaction.
        PaymentStatus:
          type: string
          description: Status of payout transaction.
        PaymentMethod:
          type: string
          description: Method of payment applied to the transaction.
        CardToken:
          type: string
        CheckNumber:
          type: string
          description: Paper check number related to payout transaction.
        CheckData:
          $ref: '#/components/schemas/FileContent'
          description: Object referencing to paper check image.
        PaymentId:
          $ref: '#/components/schemas/PaymentIdString'
        PaymentData:
          $ref: '#/components/schemas/QueryPaymentData'
        Bills:
          type: array
          items:
            $ref: '#/components/schemas/BillPayOutData'
          description: Bills associated with this transaction.
        Events:
          type: array
          items:
            $ref: '#/components/schemas/QueryTransactionEvents'
          description: Events associated with this transaction.
        externalPaypointID:
          $ref: '#/components/schemas/ExternalPaypointId'
        EntryName:
          $ref: '#/components/schemas/Entrypointfield'
        Gateway:
          $ref: '#/components/schemas/Gatewayfield'
        BatchId:
          type: string
          description: ID of the batch the transaction belongs to.
        HasVcardTransactions:
          $ref: '#/components/schemas/HasVcardTransactions'
        IsSameDayACH:
          $ref: '#/components/schemas/IsSameDayACH'
        ScheduleId:
          $ref: '#/components/schemas/ScheduleId'
        SettlementStatus:
          $ref: '#/components/schemas/SettlementStatusPayout'
        RiskFlagged:
          $ref: '#/components/schemas/RiskFlagged'
        RiskFlaggedOn:
          $ref: '#/components/schemas/RiskFlaggedOn'
        RiskStatus:
          $ref: '#/components/schemas/RiskStatus'
        RiskReason:
          $ref: '#/components/schemas/RiskReason'
        RiskAction:
          $ref: '#/components/schemas/RiskAction'
        RiskActionCode:
          $ref: '#/components/schemas/RiskActionCode'
        PayoutProgram:
          $ref: '#/components/schemas/PayoutProgram'
      title: TransactionOutQueryRecord
    BillingData:
      type: object
      properties:
        accountNumber:
          type: string
          description: Account number for bank account.
        bankAccountFunction:
          type: integer
          description: >-
            Describes whether the bank account is used for deposits or
            withdrawals in Payabli:
              - `0`: Deposit
              - `1`: Withdrawal
              - `2`: Deposit and withdrawal
        bankAccountHolderName:
          $ref: '#/components/schemas/BankAccountHolderName'
        bankAccountHolderType:
          $ref: '#/components/schemas/BankAccountHolderType'
        bankName:
          $ref: '#/components/schemas/BankName'
        id:
          type: integer
          description: The bank's ID in Payabli.
        routingAccount:
          $ref: '#/components/schemas/RoutingAccount'
        typeAccount:
          $ref: '#/components/schemas/TypeAccount'
      title: BillingData
    Contacts:
      type: object
      properties:
        contactEmail:
          $ref: '#/components/schemas/Email'
          description: Contact email address.
        contactName:
          type: string
          description: Contact name.
        contactPhone:
          type: string
          description: Contact phone number.
        contactTitle:
          type: string
          description: Contact title.
        additionalData:
          $ref: '#/components/schemas/AdditionalDataString'
      title: Contacts
    ContactsField:
      type: array
      items:
        $ref: '#/components/schemas/Contacts'
      description: List of contacts.
      title: ContactsField
    LocationCode:
      type: string
      description: A location code used to identify the vendor's location.
      title: LocationCode
    VendorPaymentMethod:
      type: object
      properties:
        method:
          type: string
          description: Payment method type - "managed", "vcard", "check", or "ach"
        storedMethodId:
          type: string
          description: >-
            ID of the stored ACH payment method. Only applicable when method is
            "ach". Required when using a previously saved ACH method when the
            vendor has more than one saved method. See the [Payouts with saved
            ACH payment
            methods](/developers/developer-guides/pay-out-manage-payouts)
            section for more details.
      required:
        - method
      description: >-
        Payment method object to use for the payout.

        - `{ method: "managed" }` - Managed payment method

        - `{ method: "vcard" }` - Virtual card payment method

        - `{ method: "check" }` - Check payment method

        - `{ method: "ach", storedMethodId?: "..." }` - ACH payment method with
        optional stored method ID
      title: VendorPaymentMethod
    VendorOutData:
      type: object
      properties:
        additionalData:
          $ref: '#/components/schemas/AdditionalData'
        Address1:
          $ref: '#/components/schemas/AddressNullable'
          description: >-
            Vendor's street address. Allowed characters are letters, numbers,
            spaces, and `. ,
        Address2:
          $ref: '#/components/schemas/AddressAddtlNullable'
          description: >-
            Additional line for vendor's address, such as a suite or unit
            number.
        BillingData:
          $ref: '#/components/schemas/BillingData'
          description: Object containing vendor's bank information.
        City:
          type: string
          description: Vendor's city.
        Contacts:
          $ref: '#/components/schemas/ContactsField'
          description: Array of objects describing the vendor's contacts.
        Country:
          type: string
          description: Vendor's country. `US` or `CA`.
        customerVendorAccount:
          type: string
          description: Account number of paypoint in the vendor side.
        EIN:
          type: string
          description: >-
            EIN/Tax ID for vendor. Must be nine digits formatted as
            `XX-XXXXXXX`. In responses, this field is masked and looks like:
            `XXXXX6789`.
        Email:
          $ref: '#/components/schemas/Email'
          description: Vendor's email address. Required for vCard.
        InternalReferenceId:
          type: integer
          format: int64
          description: Internal identifier for global vendor account.
        LocationCode:
          $ref: '#/components/schemas/LocationCode'
        Mcc:
          $ref: '#/components/schemas/Mcc'
        Name1:
          type: string
          description: >-
            Primary name for vendor. Required for new vendor. Allowed characters
            are letters, numbers, spaces, and `. , ' & ( )
        Name2:
          type: string
          description: >-
            Secondary name for vendor. If provided, allowed characters are the
            same as `Name1`.
        payeeName1:
          $ref: '#/components/schemas/PayeeName'
        payeeName2:
          $ref: '#/components/schemas/PayeeName'
        PaymentMethod:
          $ref: '#/components/schemas/VendorPaymentMethod'
        Phone:
          type: string
          description: >-
            Vendor's phone number. Digits only when creating or updating a
            vendor.
        remitAddress1:
          $ref: '#/components/schemas/Remitaddress1'
        remitAddress2:
          $ref: '#/components/schemas/Remitaddress2'
        remitCity:
          $ref: '#/components/schemas/Remitcity'
        remitCountry:
          $ref: '#/components/schemas/Remitcountry'
        remitState:
          $ref: '#/components/schemas/Remitstate'
        remitZip:
          $ref: '#/components/schemas/Remitzip'
        State:
          type: string
          description: >-
            Vendor's state or province. Must be a valid US state or Canadian
            province abbreviation, depending on the `Country` value.
        VendorId:
          $ref: '#/components/schemas/Vendorid'
          description: >-
            Payabli identifier for vendor record. Required when `VendorNumber`
            isn't included.
        VendorNumber:
          $ref: '#/components/schemas/VendorNumber'
        VendorStatus:
          $ref: '#/components/schemas/Vendorstatus'
        Zip:
          type: string
          description: >-
            Vendor's ZIP or postal code. For US addresses, five digits (`12345`)
            or ZIP+4 format (`12345-6789`).
      required:
        - City
        - Country
        - EIN
        - Name1
        - Phone
        - State
        - Zip
      title: VendorOutData
    BillQueryRecord2:
      type: object
      properties:
        AccountingField1:
          oneOf:
            - $ref: '#/components/schemas/AccountingField'
            - type: 'null'
        AccountingField2:
          oneOf:
            - $ref: '#/components/schemas/AccountingField'
            - type: 'null'
        AdditionalData:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Additional data associated with the bill.
        BatchNumber:
          type:
            - string
            - 'null'
          description: Batch number associated with the bill.
        billApprovals:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BillQueryRecord2BillApprovalsItem'
        BillDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Bill creation date in one of the accepted formats: YYYY-MM-DD,
            MM/DD/YYYY.
        billEvents:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/GeneralEvents'
          description: Events associated with the bill.
        BillItems:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/BillItem'
          description: Array of items included in the bill.
        BillNumber:
          type:
            - string
            - 'null'
          description: Bill number.
        Comments:
          type:
            - string
            - 'null'
          description: Additional comments on the bill.
        CreatedAt:
          oneOf:
            - $ref: '#/components/schemas/CreatedAt'
            - type: 'null'
          description: Timestamp of when bill was created, in UTC.
        Discount:
          type:
            - number
            - 'null'
          format: double
          description: Discount amount applied to the bill.
        DocumentsRef:
          type:
            - string
            - 'null'
          description: Reference to documents associated with the bill.
        DueDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            Bill due date in one of the accepted formats: YYYY-MM-DD,
            MM/DD/YYYY.
        EndDate:
          type:
            - string
            - 'null'
          format: date
          description: End date for the bill.
        EntityID:
          type:
            - string
            - 'null'
          description: Entity identifier associated with the bill.
        externalPaypointID:
          oneOf:
            - $ref: '#/components/schemas/ExternalPaypointId'
            - type: 'null'
        Frequency:
          oneOf:
            - $ref: '#/components/schemas/Frequency'
            - type: 'null'
          description: Frequency for scheduled bills. Applied only in `Mode` = 1.
        IdBill:
          type:
            - integer
            - 'null'
          format: int64
          description: Identifier of the bill.
        LastUpdated:
          type:
            - string
            - 'null'
          format: date-time
          description: Timestamp of when bill was last updated, in UTC.
        LotNumber:
          type:
            - string
            - 'null'
          description: Lot number associated with the bill.
        Mode:
          type:
            - integer
            - 'null'
          description: >-
            Bill mode: value `0` for single/one-time bills, `1` for scheduled
            bills.
        NetAmount:
          type:
            - number
            - 'null'
          format: double
          description: Net amount of the bill.
        ParentOrgId:
          type:
            - integer
            - 'null'
          format: int64
          description: Parent organization identifier.
        ParentOrgName:
          oneOf:
            - $ref: '#/components/schemas/OrgParentName'
            - type: 'null'
        PaymentId:
          oneOf:
            - $ref: '#/components/schemas/PaymentIdString'
            - type: 'null'
        PaymentMethod:
          oneOf:
            - $ref: '#/components/schemas/BillQueryRecord2PaymentMethod'
            - type: 'null'
          description: Preferred payment method used.
        paylinkId:
          type:
            - string
            - 'null'
          description: Paylink identifier associated with the bill.
        PaypointDbaname:
          oneOf:
            - $ref: '#/components/schemas/Dbaname'
            - type: 'null'
          description: The paypoint's DBA name.
        PaypointEntryname:
          type:
            - string
            - 'null'
          description: Entry name of the paypoint.
        PaypointLegalname:
          oneOf:
            - $ref: '#/components/schemas/Legalname'
            - type: 'null'
          description: The paypoint's legal name.
        Source:
          type:
            - string
            - 'null'
          description: Source of the bill.
        Status:
          oneOf:
            - $ref: '#/components/schemas/Billstatus'
            - type: 'null'
        Terms:
          oneOf:
            - $ref: '#/components/schemas/Terms'
            - type: 'null'
          description: >-
            The payment terms for invoice. If no terms were defined initially,
            then response data for this field will default to `N30`.
        TotalAmount:
          type:
            - number
            - 'null'
          format: double
          description: Total amount of the bill including taxes and fees.
        Transaction:
          oneOf:
            - $ref: '#/components/schemas/TransactionOutQueryRecord'
            - type: 'null'
          description: MoneyOut transaction associated to the bill.
        Vendor:
          oneOf:
            - $ref: '#/components/schemas/VendorOutData'
            - type: 'null'
      required:
        - AccountingField1
        - AccountingField2
        - AdditionalData
        - BatchNumber
        - billApprovals
        - BillDate
        - billEvents
        - BillItems
        - BillNumber
        - Comments
        - CreatedAt
        - Discount
        - DocumentsRef
        - DueDate
        - EndDate
        - EntityID
        - externalPaypointID
        - Frequency
        - IdBill
        - LastUpdated
        - LotNumber
        - Mode
        - NetAmount
        - ParentOrgId
        - ParentOrgName
        - PaymentId
        - PaymentMethod
        - paylinkId
        - PaypointDbaname
        - PaypointEntryname
        - PaypointLegalname
        - Source
        - Status
        - Terms
        - TotalAmount
        - Transaction
        - Vendor
      title: BillQueryRecord2
    BillQueryResponse:
      type: object
      properties:
        Summary:
          $ref: '#/components/schemas/BillQueryResponseSummary'
          description: Summary statistics for the bill query response.
        Records:
          type: array
          items:
            $ref: '#/components/schemas/BillQueryRecord2'
          description: Array of bill records returned by the query.
      title: BillQueryResponse
    PayabliErrorBodyResponseData:
      type: object
      properties:
        explanation:
          type: string
          description: Human-readable explanation of what happened.
        todoAction:
          type: string
          description: Suggested resolution.
      description: Object with detailed error context.
      title: PayabliErrorBodyResponseData
    PayabliErrorBody:
      type: object
      properties:
        isSuccess:
          type: boolean
          description: Always `false` for error responses.
        responseCode:
          type: integer
          description: |
            Code for the response. Learn more in
            [API Response Codes](/developers/api-reference/api-responses).
        responseText:
          type: string
          description: Error text describing what went wrong.
        responseData:
          $ref: '#/components/schemas/PayabliErrorBodyResponseData'
          description: Object with detailed error context.
      required:
        - isSuccess
        - responseText
      description: |
        Shape returned by every Payabli API error response. The `responseData`
        object carries human-readable error context.
      title: PayabliErrorBody
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      in: header
      name: requestToken
      description: >
        Long-lived API token sent in the `requestToken` header. See [API token
        authentication](/developers/api-tokens).
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        OAuth2 Bearer access token from the client-credentials flow. See [OAuth
        authentication](/developers/oauth-authentication).

```

## Examples



**Response**

```json
{
  "Summary": {
    "pageidentifier": null,
    "pageSize": 20,
    "total2approval": 1,
    "totalactive": 1,
    "totalAmount": 1.1,
    "totalamount2approval": 1.1,
    "totalamountactive": 1.1,
    "totalamountapproved": 1.1,
    "totalamountcancel": 1.1,
    "totalamountdisapproved": 1.1,
    "totalamountintransit": 1.1,
    "totalamountoverdue": 1.1,
    "totalamountpaid": 1.1,
    "totalamountsent2approval": 1.1,
    "totalapproved": 1,
    "totalcancel": 1,
    "totaldisapproved": 1,
    "totalintransit": 1,
    "totaloverdue": 1,
    "totalPages": 1,
    "totalpaid": 1,
    "totalRecords": 2,
    "totalsent2approval": 1
  },
  "Records": [
    {
      "AdditionalData": null,
      "billApprovals": [
        {
          "approvedTime": "2024-03-13T15:54:27Z",
          "approved": 0,
          "email": "lisandra@example.com",
          "Id": 34
        },
        {
          "approvedTime": "2024-03-13T15:54:27Z",
          "approved": 0,
          "email": "jccastillo@example.com",
          "Id": 293
        }
      ],
      "BillDate": "2025-03-10",
      "billEvents": [
        {
          "description": "Created Bill",
          "eventTime": "2024-03-13T15:54:26Z",
          "refData": "00-45e1c2d8b53b72fafc4082f374e68753-ffea4ba4c2ce63ce-00"
        },
        {
          "description": "Sent to Approval",
          "eventTime": "2024-03-13T15:54:28Z",
          "refData": "00-086a951822211bc2eb1803ed64db9d4f-0f07e0e8c394e481-00"
        }
      ],
      "BillItems": [
        {
          "itemCommodityCode": "Commod-MI-2024031926",
          "itemCost": 200,
          "itemDescription": "Consultation price",
          "itemMode": 0,
          "itemProductCode": "Prod-MI-2024031926",
          "itemProductName": "Consultation",
          "itemQty": 1,
          "itemTaxAmount": 0,
          "itemTaxRate": 0,
          "itemTotalAmount": 200,
          "itemUnitOfMeasure": "per each"
        }
      ],
      "BillNumber": "MI-bill-2024031926",
      "Comments": "PAYBILL",
      "CreatedAt": "2024-03-13T15:54:26Z",
      "Discount": 0,
      "DocumentsRef": null,
      "DueDate": "2025-03-10",
      "EndDate": null,
      "EntityID": null,
      "externalPaypointID": "micasa-10",
      "Frequency": "onetime",
      "IdBill": 6104,
      "LastUpdated": "2024-03-13T10:54:26Z",
      "LotNumber": "LOT123",
      "Mode": 0,
      "NetAmount": 200,
      "ParentOrgId": 1001,
      "ParentOrgName": "Fitness Hub",
      "PaymentId": null,
      "PaymentMethod": null,
      "paylinkId": null,
      "PaypointDbaname": "MiCasa Sports",
      "PaypointEntryname": "micasa",
      "PaypointLegalname": "MiCasa Sports LLC",
      "Source": "web",
      "Status": 2,
      "Terms": "NET30",
      "TotalAmount": 200,
      "Transaction": null,
      "Vendor": {
        "City": "Detroit",
        "Country": "US",
        "EIN": "XXXXX6789",
        "Name1": "Gomez-Radulescu Industries",
        "Phone": "517-555-0123",
        "State": "MI",
        "Zip": "48201",
        "Address1": "1234 Liberdad St.",
        "Address2": "Suite 100",
        "BillingData": {
          "accountNumber": "12345XXXX",
          "bankAccountFunction": 0,
          "bankAccountHolderName": "Elena Gomez",
          "bankAccountHolderType": "Business",
          "bankName": "Michigan Savings Bank",
          "id": 0,
          "routingAccount": "072000326",
          "typeAccount": "Checking"
        },
        "Email": "elenag@industriesexample.com",
        "InternalReferenceId": 1215,
        "Mcc": "700",
        "Name2": "Elena",
        "VendorId": 456,
        "VendorNumber": "VEN-123",
        "VendorStatus": 1
      }
    }
  ]
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.bill.listBillsOrg(123, {
        fromRecord: 251,
        limitRecord: 0,
        sortBy: "desc(field_name)",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.bill.list_bills_org(
    org_id=123,
    from_record=251,
    limit_record=0,
    sort_by="desc(field_name)",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiOasClient;
import io.github.payabli.api.resources.bill.requests.ListBillsOrgRequest;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiOasClient client = PayabliPayabliApiOasClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.bill().listBillsOrg(
            123,
            ListBillsOrgRequest
                .builder()
                .fromRecord(251)
                .limitRecord(0)
                .sortBy("desc(field_name)")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.bill.list_bills_org(
  org_id: 123,
  from_record: 251,
  limit_record: 0,
  sort_by: "desc(field_name)"
)

```

```csharp
using PayabliPayabliApiOas;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiOasClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Bill.ListBillsOrgAsync(
            123,
            new ListBillsOrgRequest {
                FromRecord = 251,
                LimitRecord = 0,
                SortBy = "desc(field_name)"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := &payabli.ListBillsOrgRequest{
        FromRecord: payabli.Int(
            251,
        ),
        LimitRecord: payabli.Int(
            0,
        ),
        SortBy: payabli.String(
            "desc(field_name)",
        ),
    }
    client.Bill.ListBillsOrg(
        context.TODO(),
        123,
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Bill\Requests\ListBillsOrgRequest;

$client = new PayabliClient(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->bill->listBillsOrg(
    123,
    new ListBillsOrgRequest([
        'fromRecord' => 251,
        'limitRecord' => 0,
        'sortBy' => 'desc(field_name)',
    ]),
);

```

```swift
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/bills/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```