> 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 invoices by paypoint

GET https://api-sandbox.payabli.com/api/Query/invoices/{entry}

Returns a list of invoices for an entrypoint. 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/invoice/get-list-of-invoices-for-an-entrypoint

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `entry` (string, required) — The paypoint's entrypoint identifier. [Learn more](/developers/api-reference/api-overview#entrypoint-vs-entry)

### Query parameters

- `exportFormat` (enum, optional) — Export format for file downloads. When specified, returns data as a file instead of JSON.
  - Allowed values: `csv`, `xlsx`
- `fromRecord` (integer, optional, default: 0) — The number of records to skip before starting to collect the result set.
- `limitRecord` (integer, optional, default: 20) — Max number of records to return for the query. Use `0` or negative value to return all records.
- `parameters` (map from string to string, optional) — Collection of field names, conditions, and values used to filter the query See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help. Accepted field names: - `invoiceDate` (gt, ge, lt, le, eq, ne) - `dueDate` (gt, ge, lt, le, eq, ne) - `sentDate` (gt, ge, lt, le, eq, ne) - `frequency` (in, nin,ne, eq) - `invoiceType` (eq, ne) - `payTerms` (in, nin, eq, ne) - `paypointId` (ne, eq) - `totalAmount` (gt, ge, lt, le, eq, ne) - `paidAmount` (gt, ge, lt, le, eq, ne) - `status` (in, nin, eq, ne) - `invoiceNumber` (ct, nct, eq, ne) - `purchaseOrder` (ct, nct, eq, ne) - `itemProductCode` (ct, nct) - `itemDescription` (ct, nct) - `customerFirstname` (ct, nct, eq, ne) - `customerLastname` (ct, nct, eq, ne) - `customerName` (ct, nct) - `customerId` (eq, ne) - `customerNumber` (ct, nct, eq, ne) - `customerCompanyname` (ct, nct, eq, ne) - `customerAddress` (ct, nct, eq, ne) - `customerCity` (ct, nct, eq, ne) - `customerZip` (ct, nct, eq, ne) - `customerState` (ct, nct, eq, ne) - `customerCountry` (ct, nct, eq, ne) - `customerPhone` (ct, nct, eq, ne) - `customerEmail` (ct, nct, eq, ne) - `customerShippingAddress` (ct, nct, eq, ne) - `customerShippingCity` (ct, nct, eq, ne) - `customerShippingZip` (ct, nct, eq, ne) - `customerShippingState` (ct, nct, eq, ne) - `customerShippingCountry` (ct, nct, eq, ne) - `orgId` (eq) - `paylinkId` (ne, eq) - `paypointLegal` (ne, eq, ct, nct) - `paypointDba` (ne, eq, ct, nct) - `orgName` (ne, eq, ct, nct) - `additional-xxx` (ne, eq, ct, nct) where xxx is the additional field name Accepted comparison operators - 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 Accepted parameters: - 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
- `sortBy` (string, optional) — 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`.

## Response

### 200

Success. Fields marked optional may return `null` if not set.

- `Records` (list of object, required)
  - `invoiceId` (long, required) — Identifier of invoice.
  - `customerId` (long, required) — The Payabli-generated unique ID for the customer.
  - `paypointId` (long, required) — The paypoint's ID. Note that this is different than the entryname.
  - `invoiceNumber` (string, required) — Invoice number. Identifies the invoice under a paypoint.
  - `invoiceDate` (date, required, nullable) — Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
  - `invoiceDueDate` (date, required, nullable) — Invoice due date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
  - `invoiceSentDate` (date, required, nullable) — Invoice sent date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY.
  - `invoiceEndDate` (date, required, nullable) — The end date for a scheduled invoice cycle (`invoiceType` = 1).
  - `lastPaymentDate` (datetime, required, nullable) — Timestamp of last payment.
  - `createdAt` (datetime, required) — Timestamp of when record was created, in UTC.
  - `invoiceStatus` (integer, required) — Invoice status code.
  - `invoiceType` (integer, required) — Invoice type. Value `0` is for single/one-time invoices, `1` for scheduled invoices.
  - `frequency` (enum, required) — Frequency of scheduled invoice.
    - Allowed values: `onetime`, `weekly`, `every2weeks`, `every6months`, `monthly`, `every3months`, `annually`, `firstofmonth`, `fifteenthofmonth`, `endofmonth`
  - `paymentTerms` (enum, required) — Payment terms for invoice. If no terms are defined, then response data for this field defaults to `NET30`.
    - Allowed values: `PIA`, `CIA`, `UR`, `NET10`, `NET20`, `NET30`, `NET45`, `NET60`, `NET90`, `EOM`, `MFI`, `5MFI`, `10MFI`, `15MFI`, `20MFI`, `2/10NET30`, `UF`, `10UF`, `20UF`, `25UF`, `50UF`
  - `termsConditions` (string, required, nullable) — Custom terms and conditions included in the invoice.
  - `notes` (string, required, nullable) — Invoice notes.
  - `invoiceAmount` (double, required) — The invoice amount.
  - `invoicePaidAmount` (double, required) — Amount partially paid to the invoice.
  - `purchaseOrder` (string, required, nullable) — Purchase order number.
  - `firstName` (string, required) — First name of the recipient of the invoice.
  - `lastName` (string, required) — Last name of the recipient of the invoice.
  - `company` (string, required, nullable) — Company name of the recipient of the invoice.
  - `shippingAddress1` (string, required) — The shipping address.
  - `shippingAddress2` (string, required) — Additional line for shipping address.
  - `shippingCity` (string, required) — Shipping city.
  - `shippingState` (string, required) — Shipping state or province.
  - `shippingZip` (string, required) — Shipping ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: `37615-1234` or `37615`.
  - `shippingFromZip` (string, required) — Sender shipping ZIP code.
  - `shippingCountry` (string, required) — Shipping address country.
  - `shippingEmail` (string, required) — Shipping recipient's contact email address.
  - `shippingPhone` (string, required) — Recipient phone number.
  - `summaryCommodityCode` (string, required, nullable) — Commodity code.
  - `items` (list of object, required) — Array of line items included in the invoice.
    - `itemCategories` (list of string, optional) — Array of tags classifying item or product.
    - `itemCommodityCode` (string, optional) — Item or product commodity code. Max length of 250 characters.
    - `itemCost` (double, optional) — Item or product price per unit.
    - `itemDescription` (string, optional) — Item or product description. Max length of 250 characters.
    - `itemMode` (integer, optional) — 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` (string, optional) — Item or product code. Max length of 250 characters.
    - `itemProductName` (string, optional) — Item or product name. Max length of 250 characters.
    - `itemQty` (integer, optional) — Quantity of item or product.
    - `itemTaxAmount` (double, optional) — Tax amount applied to item or product.
    - `itemTaxRate` (double, optional) — Tax rate applied to item or product.
    - `itemTotalAmount` (double, optional) — Per-line total for this item (unit cost times quantity). Distinct from the invoice's overall total, `invoiceAmount`. Required on invoice line items.
    - `itemUnitOfMeasure` (string, optional) — Unit of measurement. Max length of 100 characters.
  - `Customer` (object, required) — Customer information.
    - `AdditionalData` (map from string to string, required, nullable) — 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. ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
    - `BillingAddress1` (string, required, nullable) — Billing address.
    - `BillingAddress2` (string, required, nullable) — Additional line for the billing address.
    - `BillingCity` (string, required, nullable) — Billing city.
    - `BillingCountry` (string, required, nullable) — Billing address country.
    - `BillingEmail` (string, required, nullable) — Email address.
    - `BillingPhone` (string, required, nullable) — Phone number.
    - `BillingState` (string, required, nullable) — Billing state. Must be a 2-letter state code for addresses in the US.
    - `BillingZip` (string, required, nullable) — Customer's billing ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: "37615-1234" or "37615".
    - `CompanyName` (string, required, nullable) — Customer's company name.
    - `customerId` (long, required, nullable) — The Payabli-generated unique ID for the customer.
    - `CustomerNumber` (string, required, nullable) — User-provided unique identifier for the customer. This is typically the customer ID from your own system.
    - `customerStatus` (integer, required, nullable) — Customer status. This is used to determine if the customer is active or inactive.
    - `FirstName` (string, required, nullable) — Customer/Payor first name.
    - `Identifiers` (list of string, required, nullable) — List of fields acting as customer identifiers, to be used instead of CustomerNumber.
    - `LastName` (string, required, nullable) — Customer/Payor last name.
    - `ShippingAddress1` (string, required, nullable) — The shipping address.
    - `ShippingAddress2` (string, required, nullable) — Additional line for shipping address.
    - `ShippingCity` (string, required, nullable) — Shipping city.
    - `ShippingCountry` (string, required, nullable) — Shipping address country.
    - `ShippingState` (string, required, nullable) — Shipping state or province.
    - `ShippingZip` (string, required, nullable) — Shipping ZIP code. For Pay In functions, this field supports 5-digit and 9-digit ZIP codes and alphanumeric Canadian postal codes. For example: `37615-1234` or `37615`.
  - `paylinkId` (string, required)
  - `scheduledOptions` (object, required, nullable) — Object with options for scheduled invoices.
    - `includePaylink` (boolean, optional) — Flag to indicate if the scheduled invoice includes a payment link.
    - `includePdf` (boolean, optional) — Flag to indicate if the scheduled invoice includes a PDF version of invoice
  - `PaypointLegalname` (string, required) — Paypoint's legal name.
  - `PaypointDbaname` (string, required) — Paypoint's DBA name.
  - `PaypointEntryname` (string, required) — Paypoint's entryname.
  - `ParentOrgId` (long, required) — Organization ID. Unique identifier assigned to an org by Payabli.
  - `ParentOrgName` (string, required) — The name of the parent organization.
  - `AdditionalData` (map from string to any, required, nullable) — Custom list of key:value pairs. This field is used to store any data related to the invoice or for your system.
  - `DocumentsRef` (object, required, nullable) — Object containing attachments associated to the invoice.
    - `filelist` (list of object, optional) — Array of objects describing files contained in the ZIP file.
      - `originalName` (string, optional) — Original filename
      - `zipName` (string, optional) — Filename assigned to zipped file. This is the name to use for reference in the API functions to get files in attachments.
      - `descriptor` (string, optional) — Descriptor of the file.
    - `zipfile` (string, optional) — Zip file containing attachments.
  - `externalPaypointID` (string, required) — A custom identifier for the paypoint, if applicable.
  - `pageIdentifier` (string, required, nullable) — Auxiliary validation used internally by payment pages and components.
  - `tax` (double, optional) — Tax rate in percent applied to the invoice.
  - `discount` (double, optional) — Discount applied to the invoice.
  - `freightAmount` (double, optional) — Freight/shipping amount.
  - `dutyAmount` (double, optional) — Duty amount.
  - `billEvents` (list of object, optional) — Array of event objects with information related to events associated to the invoice.
    - `description` (string, optional) — Event description.
    - `eventTime` (datetime, optional) — Event timestamp, in UTC.
    - `extraData` (string, optional, nullable) — Extra data.
    - `refData` (string, optional) — Reference data.
    - `source` (string, optional) — The event source.
- `Summary` (object, required)
  - `pageIdentifier` (string, optional) — Auxiliary validation used internally by payment pages and components.
  - `pageSize` (integer, optional) — Number of records on each response page.
  - `totalAmount` (double, optional) — Total amount for the records.
  - `totalNetAmount` (double, optional) — Total net amount for the records.
  - `totalPages` (integer, optional) — Total number of records in response.
  - `totalRecords` (integer, optional) — Total number of records in response.

## Examples

**Response**

```json
{
  "Records": [
    {
      "invoiceId": 3674,
      "customerId": 4440,
      "paypointId": 3040,
      "invoiceNumber": "INV-2345",
      "invoiceDate": "2025-03-05",
      "invoiceDueDate": "2025-03-05",
      "invoiceSentDate": "2025-03-05",
      "invoiceEndDate": "2025-03-05",
      "lastPaymentDate": null,
      "createdAt": "2024-03-05T18:08:45Z",
      "invoiceStatus": 1,
      "invoiceType": 0,
      "frequency": "onetime",
      "paymentTerms": "NET30",
      "termsConditions": null,
      "notes": null,
      "invoiceAmount": 50,
      "invoicePaidAmount": 0,
      "purchaseOrder": null,
      "firstName": "Amirah",
      "lastName": "Tan",
      "company": null,
      "shippingAddress1": "1234 Rainier Ave",
      "shippingAddress2": "Apt 567",
      "shippingCity": "Seattle",
      "shippingState": "WA",
      "shippingZip": "98101",
      "shippingFromZip": "",
      "shippingCountry": "US",
      "shippingEmail": "amirah.tan@example.com",
      "shippingPhone": "",
      "summaryCommodityCode": null,
      "items": [
        {
          "itemCost": 50,
          "itemDescription": "service",
          "itemProductName": "Internet",
          "itemQty": 1
        }
      ],
      "Customer": {
        "AdditionalData": {
          "key1": "value",
          "key2": "value",
          "key3": "value"
        },
        "BillingPhone": "1234567890",
        "customerId": 4440
      },
      "paylinkId": "2325-XXXXXXX-90b1-4598-b6c7-44cdcbf495d7-1234",
      "scheduledOptions": null,
      "PaypointLegalname": "Emerald City LLC",
      "PaypointDbaname": "Emerald City Trading",
      "PaypointEntryname": "47a30009s",
      "ParentOrgId": 123,
      "ParentOrgName": "Emerald Enterprises",
      "AdditionalData": null,
      "DocumentsRef": null,
      "externalPaypointID": "seattletrade01-10",
      "pageIdentifier": null,
      "tax": 0,
      "discount": 0,
      "freightAmount": 0,
      "dutyAmount": 0,
      "billEvents": [
        {
          "description": "Invoice created",
          "eventTime": "2024-03-05T23:08:45Z",
          "refData": "00-802fa578504a7af6f3dd890a3802f7ef-61b4bedXXXX1234"
        }
      ]
    }
  ],
  "Summary": {
    "pageIdentifier": "null",
    "pageSize": 20,
    "totalAmount": 77.22,
    "totalNetAmount": 77.22,
    "totalPages": 2,
    "totalRecords": 2
  }
}
```

**SDK Code**

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

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.invoice.listInvoices("8cfec329267", {
        fromRecord: 251,
        limitRecord: 0,
        sortBy: "desc(field_name)",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.invoice.list_invoices(
    entry="8cfec329267",
    from_record=251,
    limit_record=0,
    sort_by="desc(field_name)",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.invoice.requests.ListInvoicesRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.invoice().listInvoices(
            "8cfec329267",
            ListInvoicesRequest
                .builder()
                .fromRecord(251)
                .limitRecord(0)
                .sortBy("desc(field_name)")
                .build()
        );
    }
}
```

```ruby
require "payabli"

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

client.invoice.list_invoices(
  entry: "8cfec329267",
  from_record: 251,
  limit_record: 0,
  sort_by: "desc(field_name)"
)

```

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

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.Invoice.ListInvoicesAsync(
            entry: "8cfec329267",
            request: new ListInvoicesRequest {
                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.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.ListInvoicesRequest{
        FromRecord: payabli.Int(
            251,
        ),
        LimitRecord: payabli.Int(
            0,
        ),
        SortBy: payabli.String(
            "desc(field_name)",
        ),
    }
    client.Invoice.ListInvoices(
        context.TODO(),
        "8cfec329267",
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\Invoice\Requests\ListInvoicesRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->invoice->listInvoices(
    '8cfec329267',
    new ListInvoicesRequest([
        'fromRecord' => 251,
        'limitRecord' => 0,
        'sortBy' => 'desc(field_name)',
    ]),
);

```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/invoices/8cfec329267?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()
```