# List vcards by org
GET https://api-sandbox.payabli.com/api/Query/vcards/org/{orgId}
Retrieve a list of vcards (virtual credit cards) issued 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/query/get-list-of-virtual-cards-for-organization
## OpenAPI Specification
```yaml
openapi: 3.1.1
info:
title: Get list of virtual cards for an organization
version: endpoint_query.ListVcardsOrg
paths:
/Query/vcards/org/{orgId}:
get:
operationId: list-vcards-org
summary: Get list of virtual cards for an organization
description: >-
Retrieve a list of vcards (virtual credit cards) issued 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
List of field names accepted:
- `status` (in, nin, eq, ne)
- `createdAt` (gt, ge, lt, le, eq, ne)
- `cardToken` (ct, nct, eq, ne)
- `lastFour` (ct, nct, eq, ne)
- `expirationDate` (ct, nct, eq, ne)
- `payoutId` (ct, nct, eq, ne, in, nin)
- `vendorId` (ct, nct, eq, ne, in, nin)
- `miscData1` (ct, nct, eq, ne)
- `miscData2` (ct, nct, eq, ne)
- `currentUses` (gt, ge, lt, le, eq, ne)
- `amount` (gt, ge, lt, le, eq, ne)
- `balance` (gt, ge, lt, le, eq, ne)
- `paypointLegal` (ne, eq, ct, nct)
- `paypointDba` (ne, eq, ct, nct)
- `orgName` (ne, eq, ct, nct)
- `externalPaypointId` (ct, nct, eq, ne)
- `paypointId` (in, nin, 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 separated by "|"
- nin => not inside array separated by "|"
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_:VCardQueryResponse'
components:
schemas:
type_:ExportFormat:
type: string
enum:
- description: Comma-separated values file
value: csv
- description: Excel spreadsheet file
value: xlsx
type_:Totalpages:
type: integer
type_:Totalrecords:
type: integer
type_:PageIdentifier:
type: string
type_:Pagesize:
type: integer
type_:VCardSummary:
type: object
properties:
totalPages:
$ref: '#/components/schemas/type_:Totalpages'
totalRecords:
$ref: '#/components/schemas/type_:Totalrecords'
totalAmount:
type: number
format: double
description: Total amount for the records.
totalactive:
type: integer
description: Total number of active vCards.
totalamounteactive:
type: number
format: double
description: Total amount of active vCards.
totalbalanceactive:
type: number
format: double
description: Total balance of active vCards.
pageIdentifier:
$ref: '#/components/schemas/type_:PageIdentifier'
pageSize:
$ref: '#/components/schemas/type_:Pagesize'
required:
- totalPages
- totalRecords
- totalAmount
- totalactive
- totalamounteactive
- totalbalanceactive
type_:CreatedAt:
type: string
format: date-time
type_:LastModified:
type: string
format: date-time
type_:VendorNumber:
type: string
type_:Ein:
type: string
type_:Email:
type: string
format: email
type_:Mcc:
type: string
type_:LocationCode:
type: string
type_:AdditionalDataString:
type: string
type_:Contacts:
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.
additionalData:
$ref: '#/components/schemas/type_:AdditionalDataString'
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_:Vendorstatus:
type: integer
type_:EnrollmentStatus:
type: string
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_:Legalname:
type: string
type_:Dbaname:
type: string
type_:Entrypointfield:
type: string
type_:OrgParentName:
type: string
type_:Remitaddress1:
type: string
type_:Remitaddress2:
type: string
type_:Remitcity:
type: string
type_:Remitstate:
type: string
type_:Remitzip:
type: string
type_:Remitcountry:
type: string
type_:PayeeName:
type: string
type_:InternalReferenceId:
type: integer
format: int64
type_:AdditionalData:
type: object
additionalProperties:
type: object
additionalProperties:
description: Any type
type_:AssociatedVendor:
type: object
properties:
VendorNumber:
$ref: '#/components/schemas/type_:VendorNumber'
Name1:
type: string
description: Primary name for vendor.
Name2:
type: string
description: Secondary name for vendor.
EIN:
$ref: '#/components/schemas/type_:Ein'
Phone:
type: string
description: Vendor's phone number.
Email:
$ref: '#/components/schemas/type_:Email'
description: Vendor's email address.
Address1:
type: string
description: Vendor's address.
Address2:
type: string
description: Additional line for vendor's address.
City:
type: string
description: Vendor's city.
State:
type: string
description: Vendor's state.
Zip:
type: string
description: Vendor's postal code.
Country:
type: string
description: Vendor's country.
Mcc:
$ref: '#/components/schemas/type_:Mcc'
LocationCode:
$ref: '#/components/schemas/type_:LocationCode'
Contacts:
type: array
items:
$ref: '#/components/schemas/type_:Contacts'
description: Array of objects describing the vendor's contacts.
BillingData:
$ref: '#/components/schemas/type_:BillingDataResponse'
PaymentMethod:
type: string
VendorStatus:
$ref: '#/components/schemas/type_:Vendorstatus'
VendorId:
type: integer
EnrollmentStatus:
$ref: '#/components/schemas/type_:EnrollmentStatus'
Summary:
$ref: '#/components/schemas/type_:VendorSummary'
PaypointLegalname:
$ref: '#/components/schemas/type_:Legalname'
description: The paypoint's legal name.
PaypointDbaname:
$ref: '#/components/schemas/type_:Dbaname'
description: The paypoint's DBA name.
PaypointEntryname:
$ref: '#/components/schemas/type_:Entrypointfield'
description: Paypoint's entryname.
ParentOrgName:
$ref: '#/components/schemas/type_:OrgParentName'
CreatedDate:
$ref: '#/components/schemas/type_:CreatedAt'
LastUpdated:
$ref: '#/components/schemas/type_:LastModified'
remitAddress1:
$ref: '#/components/schemas/type_:Remitaddress1'
remitAddress2:
$ref: '#/components/schemas/type_:Remitaddress2'
remitCity:
$ref: '#/components/schemas/type_:Remitcity'
remitState:
$ref: '#/components/schemas/type_:Remitstate'
remitZip:
$ref: '#/components/schemas/type_:Remitzip'
remitCountry:
$ref: '#/components/schemas/type_:Remitcountry'
payeeName1:
$ref: '#/components/schemas/type_:PayeeName'
payeeName2:
$ref: '#/components/schemas/type_:PayeeName'
customField1:
type: string
customField2:
type: string
customerVendorAccount:
type: string
InternalReferenceId:
$ref: '#/components/schemas/type_:InternalReferenceId'
additionalData:
$ref: '#/components/schemas/type_:AdditionalData'
externalPaypointID:
type: string
type_:CustomerNumberNullable:
type: string
type_:CustomerStatus:
type: integer
type_:Shippingaddress:
type: string
type_:Shippingaddressadditional:
type: string
type_:Shippingcity:
type: string
type_:Shippingstate:
type: string
type_:Shippingzip:
type: string
type_:Shippingcountry:
type: string
type_:Timezone:
type: integer
type_:Identifierfields:
type: array
items:
type: string
type_:CustomerData:
type: object
properties:
customerNumber:
$ref: '#/components/schemas/type_:CustomerNumberNullable'
customerUsername:
type: string
description: Customer username for customer portal
customerPsw:
type: string
description: Customer password for customer portal
customerStatus:
$ref: '#/components/schemas/type_:CustomerStatus'
company:
type: string
description: Company name
firstname:
type: string
description: Customer first name
lastname:
type: string
description: Customer last name
phone:
type: string
description: Customer phone number
email:
$ref: '#/components/schemas/type_:Email'
description: Customer email address.
address:
type: string
description: Customer address
address1:
type: string
description: Additional customer address
city:
type: string
description: Customer city
state:
type: string
description: Customer State
zip:
type: string
description: Customer postal code
country:
type: string
description: >-
Customer country in ISO-3166-1 alpha 2 format. See
https://en.wikipedia.org/wiki/ISO_3166-1 for reference.
shippingAddress:
$ref: '#/components/schemas/type_:Shippingaddress'
shippingAddress1:
$ref: '#/components/schemas/type_:Shippingaddressadditional'
shippingCity:
$ref: '#/components/schemas/type_:Shippingcity'
shippingState:
$ref: '#/components/schemas/type_:Shippingstate'
shippingZip:
$ref: '#/components/schemas/type_:Shippingzip'
shippingCountry:
$ref: '#/components/schemas/type_:Shippingcountry'
balance:
type: number
format: double
description: Customer balance.
timeZone:
$ref: '#/components/schemas/type_:Timezone'
additionalFields:
type: object
additionalProperties:
type: string
description: Additional Custom fields in format "key":"value".
identifierFields:
$ref: '#/components/schemas/type_:Identifierfields'
createdAt:
$ref: '#/components/schemas/type_:CreatedAt'
type_:ExternalPaypointId:
type: string
type_:VCardRecord:
type: object
properties:
vcardSent:
type: boolean
description: When `true`, the vCard has been sent.
cardToken:
type: string
cardNumber:
type: string
description: The vCard number.
cvc:
type: string
description: The vCard CVC number.
expirationDate:
type: string
description: >-
Expiration date in format YYYY-MM-DD. The minimum time to expire is
3 months, maximum is 3 years. If not provided, the default is 6
months.
status:
type: string
amount:
type: number
format: double
description: The vCard amount.
currentBalance:
type: number
format: double
description: The vCard's current balance.
expenseLimit:
type: number
format: double
expenseLimitPeriod:
type: string
maxNumberOfUses:
type: integer
currentNumberOfUses:
type: integer
exactAmount:
type: boolean
mcc:
type: string
description: MCC assigned to vCard.
tcc:
type: string
description: TCC assigned to vCard.
misc1:
type: string
description: Custom field 1.
misc2:
type: string
description: Custom field 2.
dateCreated:
$ref: '#/components/schemas/type_:CreatedAt'
dateModified:
$ref: '#/components/schemas/type_:LastModified'
associatedVendor:
$ref: '#/components/schemas/type_:AssociatedVendor'
associatedCustomer:
$ref: '#/components/schemas/type_:CustomerData'
ParentOrgName:
$ref: '#/components/schemas/type_:OrgParentName'
PaypointDbaname:
$ref: '#/components/schemas/type_:Dbaname'
description: The paypoint's DBA name.
PaypointLegalname:
$ref: '#/components/schemas/type_:Legalname'
description: The paypoint's legal name.
PaypointEntryname:
$ref: '#/components/schemas/type_:Entrypointfield'
description: The paypoint's entry name (entrypoint).
externalPaypointID:
$ref: '#/components/schemas/type_:ExternalPaypointId'
paypointId:
type: integer
description: The paypoint's unique identifier.
type_:VCardQueryResponse:
type: object
properties:
Summary:
$ref: '#/components/schemas/type_:VCardSummary'
Records:
type: array
items:
$ref: '#/components/schemas/type_:VCardRecord'
```
## SDK Code Examples
```python ListVCardsOrg
from payabli import payabli
client = payabli(
api_key="YOUR_API_KEY",
)
client.query.list_vcards_org(
org_id=123,
from_record=251,
limit_record=0,
sort_by="desc(field_name)",
)
```
```typescript ListVCardsOrg
import { PayabliClient } from "@payabli/sdk-node";
const client = new PayabliClient({ apiKey: "YOUR_API_KEY" });
await client.query.listVcardsOrg(123, {
fromRecord: 251,
limitRecord: 0,
sortBy: "desc(field_name)"
});
```
```go ListVCardsOrg
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.ListVcardsOrg(
context.TODO(),
123,
&sdkgo.ListVcardsOrgRequest{
FromRecord: sdkgo.Int(
251,
),
LimitRecord: sdkgo.Int(
0,
),
SortBy: sdkgo.String(
"desc(field_name)",
),
},
)
```
```csharp ListVCardsOrg
using PayabliApi;
var client = new PayabliApiClient("API_KEY");
await client.Query.ListVcardsOrgAsync(
123,
new ListVcardsOrgRequest
{
FromRecord = 251,
LimitRecord = 0,
SortBy = "desc(field_name)",
}
);
```
```ruby ListVCardsOrg
require 'uri'
require 'net/http'
url = URI("https://api-sandbox.payabli.com/api/Query/vcards/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 ListVCardsOrg
HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Query/vcards/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29")
.header("requestToken", "")
.asString();
```
```php ListVCardsOrg
request('GET', 'https://api-sandbox.payabli.com/api/Query/vcards/org/123?fromRecord=251&limitRecord=0&sortBy=desc%28field_name%29', [
'headers' => [
'requestToken' => '',
],
]);
echo $response->getBody();
```
```swift ListVCardsOrg
import Foundation
let headers = ["requestToken": ""]
let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Query/vcards/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()
```