# Get stats for an org or paypoint GET https://api-sandbox.payabli.com/api/Statistic/basic/{mode}/{freq}/{level}/{entryId} Retrieves the basic statistics for an organization or a paypoint, for a given time period, grouped by a particular frequency. Reference: https://docs.payabli.com/developers/api-reference/get-basic-statistics-for-a-paypoint-or-organization ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Basic statistics for a paypoint or organization version: endpoint_statistic.BasicStats paths: /Statistic/basic/{mode}/{freq}/{level}/{entryId}: get: operationId: basic-stats summary: Get Basic statistics for a paypoint or organization description: >- Retrieves the basic statistics for an organization or a paypoint, for a given time period, grouped by a particular frequency. tags: - - subpackage_statistic parameters: - name: mode in: path description: |- Mode for the request. Allowed values: - `custom` - Allows you to set a custom date range - `ytd` - Year To Date - `mtd` - Month To Date - `wtd` - Week To Date - `today` - All current day - `m12` - Last 12 months - `d30` - Last 30 days - `h24` - Last 24 hours - `lasty` - Last Year - `lastm` - Last Month - `lastw` - Last Week - `yesterday` - Last Day required: true schema: type: string - name: freq in: path description: |- Frequency to group series. Allowed values: - `m` - monthly - `w` - weekly - `d` - daily - `h` - hourly For example, `w` groups the results by week. required: true schema: type: string - name: level in: path description: |- The entry level for the request: - 0 for Organization - 2 for Paypoint required: true schema: type: integer - name: entryId in: path description: Identifier in Payabli for the entity. required: true schema: type: integer format: int64 - name: endDate in: query description: |- Used with `custom` mode. The end date for the range. Valid formats: - YYYY-mm-dd - YYYY/mm/dd - mm-dd-YYYY - mm/dd/YYYY required: false schema: type: string - name: parameters in: query description: List of parameters. required: false schema: type: object additionalProperties: type: string - name: startDate in: query description: |- Used with `custom` mode. The start date for the range. Valid formats: - YYYY-mm-dd - YYYY/mm/dd - mm-dd-YYYY - mm/dd/YYYY required: false schema: type: string - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: >- #/components/schemas/type_statistic:StatBasicExtendedQueryRecord '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_statistic:StatBasicExtendedQueryRecord: type: object properties: statX: type: string description: The time window based on the mode and frequency used for the query. outCustomers: type: integer description: Number of active vendors. outNewCustomers: type: integer description: Number of new vendors. outTransactions: type: integer description: Outbound (payout) transactions count. outSubscriptionsPaid: type: integer description: Recurring outbound (payout) transactions count. outCardTransactions: type: integer description: Outbound (payout) pCard transactions count. outVCardTransactions: type: integer description: Outbound (payout) vCard transactions count. outACHTransactions: type: integer description: Outbound (payout) ACH transactions count. outCheckTransactions: type: integer description: Outbound (payout) check transactions count. outPendingMethodTransactions: type: integer description: Outbound (payout) Managed Payables transactions count. outTransactionsVolume: type: number format: double description: Outbound (payout) volume. outSubscriptionsPaidVolume: type: number format: double description: Recurring outbound (payout) volume. outCardVolume: type: number format: double description: Outbound (payout) pCard transactions volume. outVCardVolume: type: number format: double description: Outbound (payout) vCard transactions volume. outACHVolume: type: number format: double description: Outbound (payout) ACH transactions volume. outCheckVolume: type: number format: double description: Outbound (payout) check transactions volume. outPendingMethodVolume: type: number format: double description: Outbound (payout) Managed Payables volume. inTransactions: type: integer description: Inbound transactions count. inSubscriptionsPaid: type: integer description: Inbound recurring transactions count. inCustomers: type: integer description: Number of active customers. inNewCustomers: type: integer description: Number of new customers. inCardTransactions: type: integer description: Inbound card transactions count. inACHTransactions: type: integer description: Inbound ACH transactions count. inCheckTransactions: type: integer description: Inbound check transactions count. inCashTransactions: type: integer description: Inbound cash transactions count. inWalletTransactions: type: integer description: Inbound wallet transactions count. inCardChargeBacks: type: integer description: Inbound card chargebacks and returns count. inACHReturns: type: integer description: Inbound ACH returns count. inTransactionsVolume: type: number format: double description: Inbound volume. inSubscriptionsPaidVolume: type: number format: double description: Inbound recurring payments volume. inCardVolume: type: number format: double description: Inbound card volume. inACHVolume: type: number format: double description: Inbound ACH volume. inCheckVolume: type: number format: double description: Inbound check volume. inCashVolume: type: number format: double description: Inbound cash volume recognized. inWalletVolume: type: number format: double description: Inbound wallet transactions. inCardChargeBackVolume: type: number format: double description: Inbound Card chargebacks and returns volume. inACHReturnsVolume: type: number format: double description: Inbound ACH returns volume. required: - statX - outCustomers - outNewCustomers - outTransactions - outSubscriptionsPaid - outCardTransactions - outVCardTransactions - outACHTransactions - outCheckTransactions - outPendingMethodTransactions - outTransactionsVolume - outSubscriptionsPaidVolume - outCardVolume - outVCardVolume - outACHVolume - outCheckVolume - outPendingMethodVolume - inTransactions - inSubscriptionsPaid - inCustomers - inNewCustomers - inCardTransactions - inACHTransactions - inCheckTransactions - inCashTransactions - inWalletTransactions - inCardChargeBacks - inACHReturns - inTransactionsVolume - inSubscriptionsPaidVolume - inCardVolume - inACHVolume - inCheckVolume - inCashVolume - inWalletVolume - inCardChargeBackVolume - inACHReturnsVolume ``` ## SDK Code Examples ```python BasicStatsExample from payabli import payabli client = payabli( api_key="YOUR_API_KEY", ) client.statistic.basic_stats( entry_id=1000000, freq="m", level=1, mode="ytd", end_date="2025-11-01", start_date="2025-11-30", ) ``` ```typescript BasicStatsExample import { PayabliClient } from "@payabli/sdk-node"; const client = new PayabliClient({ apiKey: "YOUR_API_KEY" }); await client.statistic.basicStats("ytd", "m", 1, 1000000, { endDate: "2025-11-01", startDate: "2025-11-30" }); ``` ```go BasicStatsExample 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.Statistic.BasicStats( context.TODO(), 1000000, "m", 1, "ytd", &sdkgo.BasicStatsRequest{ EndDate: sdkgo.String( "2025-11-01", ), StartDate: sdkgo.String( "2025-11-30", ), }, ) ``` ```csharp BasicStatsExample using PayabliApi; var client = new PayabliApiClient("API_KEY"); await client.Statistic.BasicStatsAsync( 1000000, "m", 1, "ytd", new BasicStatsRequest { EndDate = "2025-11-01", StartDate = "2025-11-30" } ); ``` ```ruby BasicStatsExample require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30") 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 BasicStatsExample HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30") .header("requestToken", "") .asString(); ``` ```php BasicStatsExample request('GET', 'https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift BasicStatsExample import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Statistic/basic/ytd/m/1/1000000?endDate=2025-11-01&startDate=2025-11-30")! 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() ```