# List vendors by organization GET https://api-sandbox.payabli.com/api/Query/vendors/org/{orgId} Retrieve a list of vendors 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/vendor/get-list-of-vendors-for-organization ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get list of vendors for organization version: endpoint_query.ListVendorsOrg paths: /Query/vendors/org/{orgId}: get: operationId: list-vendors-org summary: Get list of vendors for organization description: >- Retrieve a list of vendors 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: - - subpackage_query parameters: - name: orgId in: path description: The numeric identifier for organization, assigned by Payabli. required: true schema: type: integer - name: exportFormat in: query required: false schema: $ref: '#/components/schemas/type_: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 **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 won't be 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 See [Filters and Conditions Reference](/developers/developer-guides/pay-ops-reporting-engine-overview#filters-and-conditions-reference) for help. List of field names accepted: - `method` (in, nin, eq, ne) - `enrollmentStatus` (in,nin, eq, ne) - `status` (in, nin, eq, ne) - `vendorNumber` (ct, nct, eq, ne) - `name` (ct, nct, eq, ne) - `ein` (ct, nct, eq, ne) - `phone` (ct, nct, eq, ne) - `email` (ct, nct, eq, ne) - `address` (ct, nct, eq, ne) - `city` (ct, nct, eq, ne) - `state` (ct, nct, eq, ne) - `country` (ct, nct, eq, ne) - `zip` (ct, nct, eq, ne) - `mcc` (ct, nct, eq, ne) - `locationCode` (ct, nct, eq, ne) - `paypointLegal` (ne, eq, ct, nct) - `paypointDba` (ne, eq, ct, nct) - `parentOrgId` (ne, eq, nin, in) - `orgName` (ne, eq, ct, nct) 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 separated by "|" - nin => not inside array separated by "|" 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: `netAmount(gt)=20` returns all records with a `netAmount` greater than 20.00 required: false schema: type: object additionalProperties: type: string - 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 required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:QueryResponseVendors' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:ExportFormat: type: string enum: - description: Comma-separated values file value: csv - description: Excel spreadsheet file value: xlsx type_:AdditionalData: type: object additionalProperties: type: object additionalProperties: description: Any type type_:AddressNullable: type: string type_:AddressAddtlNullable: type: string type_:BankName: type: string type_:RoutingAccount: type: string type_:AccountNumber: type: string type_:TypeAccount: type: string enum: - value: Checking - value: Savings type_:BankAccountHolderName: type: string type_:BankAccountHolderType: type: string enum: - value: Personal - value: Business type_:BillingDataResponse: type: object properties: id: type: integer description: The bank's ID in Payabli. accountId: description: Any type nickname: type: string bankName: $ref: '#/components/schemas/type_:BankName' routingAccount: $ref: '#/components/schemas/type_:RoutingAccount' accountNumber: $ref: '#/components/schemas/type_:AccountNumber' typeAccount: $ref: '#/components/schemas/type_:TypeAccount' bankAccountHolderName: $ref: '#/components/schemas/type_:BankAccountHolderName' bankAccountHolderType: $ref: '#/components/schemas/type_: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 type_:CityNullable: type: string type_:Email: type: string format: email type_:ContactsResponse: type: object properties: ContactEmail: $ref: '#/components/schemas/type_:Email' description: Contact email address. ContactName: type: string description: Contact name. ContactPhone: type: string description: Contact phone number. ContactTitle: type: string description: Contact title. type_:CreatedAt: type: string format: date-time type_:Ein: type: string type_:EnrollmentStatus: type: string type_:ExternalPaypointId: type: string type_:InternalReferenceId: type: integer format: int64 type_:LastModified: type: string format: date-time type_:Mcc: type: string type_:OrgParentName: type: string type_:OrgParentId: type: integer format: int64 type_:PayeeName: type: string type_:VendorPaymentMethodString: type: string type_:Dbaname: type: string type_:Entrypointfield: type: string type_:Legalname: type: string type_:Remitaddress1: type: string type_:Remitaddress2: type: string type_:Remitcity: type: string type_:Remitcountry: type: string type_:RemitEmail: type: string format: email type_:Remitstate: type: string type_:Remitzip: type: string type_:StateNullable: type: string type_: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: type: - string - 'null' ABA: type: - string - 'null' PostalCode: type: - string - 'null' MethodType: type: - string - 'null' LastUpdated: type: - string - 'null' format: date-time CardUpdatedOn: type: - string - 'null' format: date-time required: - IdPmethod - Method - Descriptor - MaskedAccount - ExpDate - HolderName - AchSecCode - AchHolderType - IsValidatedACH - BIN - binData - ABA - PostalCode - MethodType - LastUpdated - CardUpdatedOn type_: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 type_:Vendorid: type: integer type_:VendorNumber: type: string type_:Vendorstatus: type: integer type_:Zip: type: string type_:VendorQueryRecord: type: object properties: additionalData: $ref: '#/components/schemas/type_:AdditionalData' Address1: $ref: '#/components/schemas/type_:AddressNullable' Address2: $ref: '#/components/schemas/type_:AddressAddtlNullable' BillingData: $ref: '#/components/schemas/type_:BillingDataResponse' City: $ref: '#/components/schemas/type_:CityNullable' Contacts: $ref: '#/components/schemas/type_:ContactsResponse' Country: type: string CreatedDate: $ref: '#/components/schemas/type_:CreatedAt' customerVendorAccount: type: string customField1: type: string customField2: type: string EIN: $ref: '#/components/schemas/type_:Ein' Email: $ref: '#/components/schemas/type_:Email' EnrollmentStatus: $ref: '#/components/schemas/type_:EnrollmentStatus' externalPaypointID: $ref: '#/components/schemas/type_:ExternalPaypointId' InternalReferenceId: $ref: '#/components/schemas/type_:InternalReferenceId' LastUpdated: $ref: '#/components/schemas/type_:LastModified' LocationCode: type: string Mcc: $ref: '#/components/schemas/type_:Mcc' Name1: type: string Name2: type: string ParentOrgName: $ref: '#/components/schemas/type_:OrgParentName' ParentOrgId: $ref: '#/components/schemas/type_:OrgParentId' payeeName1: $ref: '#/components/schemas/type_:PayeeName' payeeName2: $ref: '#/components/schemas/type_:PayeeName' PaymentMethod: $ref: '#/components/schemas/type_:VendorPaymentMethodString' PaypointDbaname: $ref: '#/components/schemas/type_:Dbaname' PaypointEntryname: $ref: '#/components/schemas/type_:Entrypointfield' PaypointLegalname: $ref: '#/components/schemas/type_:Legalname' Phone: type: string remitAddress1: $ref: '#/components/schemas/type_:Remitaddress1' remitAddress2: $ref: '#/components/schemas/type_:Remitaddress2' remitCity: $ref: '#/components/schemas/type_:Remitcity' remitCountry: $ref: '#/components/schemas/type_:Remitcountry' RemitEmail: $ref: '#/components/schemas/type_:RemitEmail' remitState: $ref: '#/components/schemas/type_:Remitstate' remitZip: $ref: '#/components/schemas/type_:Remitzip' State: $ref: '#/components/schemas/type_:StateNullable' StoredMethods: type: array items: $ref: '#/components/schemas/type_:VendorResponseStoredMethod' Summary: $ref: '#/components/schemas/type_:VendorSummary' VendorId: $ref: '#/components/schemas/type_:Vendorid' VendorNumber: $ref: '#/components/schemas/type_:VendorNumber' VendorStatus: $ref: '#/components/schemas/type_:Vendorstatus' Zip: $ref: '#/components/schemas/type_:Zip' type_:PageIdentifier: type: string type_:Pagesize: type: integer type_:Totalrecords: type: integer type_:QuerySummary: type: object properties: pageIdentifier: $ref: '#/components/schemas/type_:PageIdentifier' pageSize: $ref: '#/components/schemas/type_:Pagesize' totalAmount: type: number format: double description: Total amount for the records. totalNetAmount: type: number format: double description: Total net amount for the records. totalPages: $ref: '#/components/schemas/type_:Totalrecords' totalRecords: $ref: '#/components/schemas/type_:Totalrecords' type_:QueryResponseVendors: type: object properties: Records: type: array items: $ref: '#/components/schemas/type_:VendorQueryRecord' Summary: $ref: '#/components/schemas/type_:QuerySummary' ``` ## SDK Code Examples ```python An example response for vendor queries from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.query.list_vendors_org( org_id=123, from_record=251, limit_record=0, sort_by="desc(field_name)", ) ``` ```typescript An example response for vendor queries import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.query.listVendorsOrg(123, { fromRecord: 251, limitRecord: 0, sortBy: "desc(field_name)" }); ``` ```go An example response for vendor queries import ( context "context" option "github.com/payabli/sdk-go/option" sdkgo "github.com/payabli/sdk-go" sdkgoclient "github.com/payabli/sdk-go/client" ) client := sdkgoclient.NewClient( option.WithApiKey( "", ), ) response, err := client.Query.ListVendorsOrg( context.TODO(), 123, &sdkgo.ListVendorsOrgRequest{ FromRecord: sdkgo.Int( 251, ), LimitRecord: sdkgo.Int( 0, ), SortBy: sdkgo.String( "desc(field_name)", ), }, ) ``` ```csharp An example response for vendor queries using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Query.ListVendorsOrgAsync( 123, new ListVendorsOrgRequest { FromRecord = 251, LimitRecord = 0, SortBy = "desc(field_name)", } ); ``` ```ruby An example response for vendor queries require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Query/vendors/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 An example response for vendor queries HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Query/vendors/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29") .header("requestToken", "") .asString(); ``` ```php An example response for vendor queries request('GET', 'https://api-sandbox.payabli.com/api/Query/vendors/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift An example response for vendor queries import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/vendors/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() ```