> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://beta-docs.payabli.com/api-reference/invoice/get-list-of-invoices-for-an-organization/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server. # List invoices by organization GET https://api-sandbox.payabli.com/api/Query/invoices/org/{orgId} Returns a list of invoices for an org. Use filters to limit results. Reference: https://beta-docs.payabli.com/api-reference/invoice/get-list-of-invoices-for-an-organization ## Authentication - `requestToken` header (required) — API Key authentication via header ## Servers - `https://api-sandbox.payabli.com/api` (Sandbox, default) - `https://api.payabli.com/api` (Production) ## Request ### Path parameters - `orgId` (integer, required) — The numeric identifier for organization, assigned by Payabli. ### Query parameters - `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](/developer-guides/reporting-filters-and-conditions-reference) for help. List of field names accepted: - 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 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 - `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 - `Records` (list of QueryInvoiceResponseRecordsItem, optional) - `Summary` (QuerySummary, optional) ## Errors ### 400 Bad Request Error Bad request/ invalid data - `any` ### 401 Unauthorized Error Unauthorized request. - `any` ### 500 Internal Server Error Internal API Error - `any` ### 503 Service Unavailable Error Database connection error - `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure. - `responseData` (map from string to any, optional) — The object containing the response data. - `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'. ## Types ### QueryInvoiceResponseRecordsItem - `AdditionalData` (map from string to any, optional) — Custom list of key:value pairs. This field is used to store any data related to the invoice or for your system. - `billEvents` (list of GeneralEvents, optional) — Array of event objects with information related to events associated to the invoice. - `company` (string, optional) — Company name of the recipient of the invoice. - `createdAt` (datetime, optional) — Timestamp of when record was created, in UTC. - `Customer` (PayorData, optional) — Customer information. May be required, depending on the paypoint's settings. Required for subscriptions. See [PayorData object Model](/api-reference/schemas/payordata) for a complete reference. - `customerId` (long, optional) — The Payabli-generated unique ID for the customer. - `discount` (double, optional) — Discount applied to the invoice. - `DocumentsRef` (DocumentsRef, optional) — Object containing attachments associated to the invoice. - `dutyAmount` (double, optional) — Duty amount. - `externalPaypointID` (string, optional) — A custom identifier for the paypoint, if applicable. Like `entrypoint` is the Payabli identifier for the merchant, `externalPaypointId` is a custom field you can use to include the merchant's ID from your own systems. - `firstName` (string, optional) — First name of the recipient of the invoice. - `freightAmount` (double, optional) — Freight/shipping amount. - `frequency` (enum, optional) — Frequency of scheduled invoice. - Allowed values: `one-time`, `weekly`, `every2weeks`, `every6months`, `monthly`, `every3months`, `annually` - `invoiceAmount` (double, optional) — Invoice total amount. - `invoiceDate` (date, optional) — Invoice date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceDueDate` (date, optional) — Invoice due date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceEndDate` (date, optional) — The end date for a scheduled invoice cycle (`invoiceType` = 1). - `invoiceId` (long, optional) — Identifier of invoice. - `invoiceNumber` (string, optional) — Custom number identifying the bill or invoice. Must be unique in paypoint. - `invoicePaidAmount` (double, optional) — Amount partially paid to the invoice. - `invoiceSentDate` (date, optional) — Invoice sent date in any of the accepted formats: YYYY-MM-DD, MM/DD/YYYY. - `invoiceStatus` (integer, optional) — Status for invoice. The accepted status values are: - 0 draft - 1 active - 2 partially paid - 4 paid/complete - 99 cancelled - `invoiceType` (integer, optional) — Type of invoice. Only `0` for one-time invoices is currently supported. - `items` (list of BillItem, optional) — Array of line items included in the invoice. - `lastName` (string, optional) — Last name of the recipient of the invoice. - `lastPaymentDate` (datetime, optional) — Timestamp of last payment. - `notes` (string, optional) — Invoice notes. - `ParentOrgName` (string, optional) — The name of the parent organization. - `paylinkId` (string, optional) - `paymentTerms` (string, optional) — The payment terms for the invoice. If no terms were defined initially, then reponse data for this field will default to `N30`. - `PaypointDbaname` (string, optional) — Paypoint's DBA name. - `PaypointEntryname` (string, optional) — Paypoint's entryname. - `paypointId` (long, optional) — The paypoint's ID. Note that this is different than the entryname. - `PaypointLegalname` (string, optional) — Paypoint's legal name. - `purchaseOrder` (string, optional) — Purchase order number. - `scheduledOptions` (BillOptions, optional) — Object with options for scheduled invoices. - `shippingAddress1` (string, optional) — The shipping address. - `shippingAddress2` (string, optional) — Additional line for shipping address. - `shippingCity` (string, optional) — Shipping city. - `shippingCountry` (string, optional) — Shipping address country. - `shippingEmail` (string, optional) — Shipping recipient's contact email address. - `shippingFromZip` (string, optional) — Sender shipping ZIP code. - `shippingPhone` (string, optional) — Recipient phone number. - `shippingState` (string, optional) — Shipping state or province. - `shippingZip` (string, optional) — 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". - `summaryCommodityCode` (string, optional) — Commodity code. - `tax` (double, optional) — Tax rate in percent applied to the invoice. - `termsConditions` (string, optional) — Custom terms and conditions included in the invoice. ### QuerySummary - `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. ### GeneralEvents - `description` (string, optional) — Event description. - `eventTime` (datetime, optional) — Event timestamp, in UTC. - `extraData` (map from string to any, optional) — Extra data. - `refData` (string, optional) — Reference data. - `source` (string, optional) — The event source. ### PayorData Customer information. May be required, depending on the paypoint's settings. Required for subscriptions. See [PayorData object Model](/api-reference/schemas/payordata) for a complete reference. - `additionalData` (map from string to map from string to any, optional) — 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](/developer-guides/entities-custom-identifiers), pass those in this object. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ``` - `billingAddress1` (string, optional) — Billing address. - `billingAddress2` (string, optional) — Additional line for the billing address. - `billingCity` (string, optional) — Billing city. - `billingCountry` (string, optional) — Billing address country. - `billingEmail` (string, optional) — Email address. - `billingPhone` (string, optional) — Phone number. - `billingState` (string, optional) — Billing state. Must be 2-letter state code for address in US. - `billingZip` (string, optional) — 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". - `company` (string, optional) — Customer's company name. - `customerId` (long, optional) — The Payabli-generated unique ID for the customer. - `customerNumber` (string, optional) — User-provided unique identifier for the customer. This is typically the customer ID from your own system. - `firstName` (string, optional) — Customer/Payor first name. - `identifierFields` (list of string, optional) — List of fields acting as customer identifiers, to be used instead of CustomerNumber. - `lastName` (string, optional) — Customer/Payor last name. - `shippingAddress1` (string, optional) — The shipping address. - `shippingAddress2` (string, optional) — Additional line for shipping address. - `shippingCity` (string, optional) — Shipping city. - `shippingCountry` (string, optional) — Shipping address country. - `shippingState` (string, optional) — Shipping state or province. - `shippingZip` (string, optional) — 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". ### DocumentsRef - `filelist` (list of PairFiles, optional) — Array of objects describing files contained in zip file. - `zipfile` (string, optional) — Zip file containing attachments. ### BillItem - `itemCost` (double, required) — Item or product price per unit. - `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. - `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' common for both. - `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) — Total amount in item or product. - `itemUnitOfMeasure` (string, optional) — Unit of measurement. Max length of 100 characters. ### BillOptions - `includePaylink` (boolean, optional) — Flag to indicate if the scheduled invoice would include a paymentlink - `includePdf` (boolean, optional) — Flag to indicate if the scheduled invoice would include a PDF version of invoice ### PairFiles - `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. ## Examples **Response** ```json { "Records": [ { "billEvents": [ { "description": "Invoice created", "eventTime": "2024-03-05T23:08:45Z", "refData": "00-802fa578504a7af6f3dd890a3802f7ef-61b4bedXXXX1234" } ], "createdAt": "2024-03-05T18:08:45Z", "Customer": { "additionalData": { "key1": { "key": "value" }, "key2": { "key": "value" }, "key3": { "key": "value" } }, "billingPhone": "1234567890", "customerId": 1323 }, "customerId": 1323, "discount": 0, "dutyAmount": 0, "externalPaypointID": "seattletrade01-10", "firstName": "Amirah", "freightAmount": 0, "frequency": "one-time", "invoiceAmount": 50, "invoiceDate": "2025-03-05", "invoiceDueDate": "2025-03-05", "invoiceId": 3674, "invoiceNumber": "QA-1709680125", "invoicePaidAmount": 0, "invoiceStatus": 1, "invoiceType": 0, "items": [ { "itemCost": 50, "itemDescription": "service", "itemProductName": "Internet", "itemQty": 1 } ], "lastName": "Tan", "ParentOrgName": "Emerald Enterprises", "paylinkId": "3674-cf15b881-f276-4b69-bdc8-841b2d123XXXXXX", "paymentTerms": "N30", "PaypointDbaname": "Emerald City Trading", "PaypointEntryname": "47a30009s", "paypointId": 10, "PaypointLegalname": "Emerald City LLC", "shippingAddress1": "1234 Rainier Ave", "shippingAddress2": "Apt 567", "shippingCity": "Seattle", "shippingCountry": "US", "shippingEmail": "amirah.tan@example.com", "shippingFromZip": "", "shippingPhone": "", "shippingState": "WA", "shippingZip": "98101", "tax": 0 } ], "Summary": { "pageIdentifier": "null", "pageSize": 20, "totalAmount": 77.22, "totalNetAmount": 77.22, "totalPages": 2, "totalRecords": 2 } } ``` **SDK Code** ```python Example response for invoice queries. import requests url = "https://api-sandbox.payabli.com/api/Query/invoices/org/123" querystring = {"fromRecord":"251","limitRecord":"0","sortBy":"desc(field_name)"} headers = {"requestToken": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Example response for invoice queries. const url = 'https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29'; const options = {method: 'GET', headers: {requestToken: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Example response for invoice queries. package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("requestToken", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Example response for invoice queries. require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java Example response for invoice queries. import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29") .header("requestToken", "") .asString(); ``` ```php Example response for invoice queries. request('GET', 'https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```csharp Example response for invoice queries. using RestSharp; var client = new RestClient("https://api-sandbox.payabli.com/api/Query/invoices/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29"); var request = new RestRequest(Method.GET); request.AddHeader("requestToken", ""); IRestResponse response = client.Execute(request); ``` ```swift Example response for invoice queries. import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/invoices/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() ``` > If you're a software company, you're a payments company™