Retrieves a list of quotes associated with a specific sales representative, filtered by month/year or custom date range. Optionally filters on the earliest deposit payment date.
curl -X GET \
-H "Accept: application/json" \
"https://api.dev.spenda.co/api/Spenda/Data/reports/quotes-by-sales-rep?salesRepUserID=37667&useCustomRange=false&fromDate=Wed Oct 01 00:00:00 UTC 2025&toDate=Fri Oct 31 00:00:00 UTC 2025&month=10&year=2025&filterOnDepositEarliestPaymentDateTime=false&filterOnApprovedDateTime=false"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ReportsApi;
import java.io.File;
import java.util.*;
public class ReportsApiExample {
public static void main(String[] args) {
// Create an instance of the API class
ReportsApi apiInstance = new ReportsApi();
Integer salesRepUserID = 37667; // Integer | The unique identifier for the sales representative.
Boolean useCustomRange = false; // Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
date fromDate = Wed Oct 01 00:00:00 UTC 2025; // date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
date toDate = Fri Oct 31 00:00:00 UTC 2025; // date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
Integer month = 10; // Integer | Month for the report period (1–12). Used when `useCustomRange` = false.
Integer year = 2025; // Integer | Year for the report period. Used when `useCustomRange` = false.
Boolean filterOnDepositEarliestPaymentDateTime = false; // Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date.
Boolean filterOnApprovedDateTime = false; // Boolean | Set to 1 to filter results using quote approved date instead of report date.
try {
Reports_GetQuotesBySalesRep_200_response result = apiInstance.reportsGetQuotesBySalesRep(salesRepUserID, useCustomRange, fromDate, toDate, month, year, filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReportsApi#reportsGetQuotesBySalesRep");
e.printStackTrace();
}
}
}
import 'package:openapi/api.dart';
final api_instance = DefaultApi();
final Integer salesRepUserID = new Integer(); // Integer | The unique identifier for the sales representative.
final Boolean useCustomRange = new Boolean(); // Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
final date fromDate = new date(); // date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
final date toDate = new date(); // date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
final Integer month = new Integer(); // Integer | Month for the report period (1–12). Used when `useCustomRange` = false.
final Integer year = new Integer(); // Integer | Year for the report period. Used when `useCustomRange` = false.
final Boolean filterOnDepositEarliestPaymentDateTime = new Boolean(); // Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date.
final Boolean filterOnApprovedDateTime = new Boolean(); // Boolean | Set to 1 to filter results using quote approved date instead of report date.
try {
final result = await api_instance.reportsGetQuotesBySalesRep(salesRepUserID, useCustomRange, fromDate, toDate, month, year, filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime);
print(result);
} catch (e) {
print('Exception when calling DefaultApi->reportsGetQuotesBySalesRep: $e\n');
}
import org.openapitools.client.api.ReportsApi;
public class ReportsApiExample {
public static void main(String[] args) {
ReportsApi apiInstance = new ReportsApi();
Integer salesRepUserID = 37667; // Integer | The unique identifier for the sales representative.
Boolean useCustomRange = false; // Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
date fromDate = Wed Oct 01 00:00:00 UTC 2025; // date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
date toDate = Fri Oct 31 00:00:00 UTC 2025; // date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
Integer month = 10; // Integer | Month for the report period (1–12). Used when `useCustomRange` = false.
Integer year = 2025; // Integer | Year for the report period. Used when `useCustomRange` = false.
Boolean filterOnDepositEarliestPaymentDateTime = false; // Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date.
Boolean filterOnApprovedDateTime = false; // Boolean | Set to 1 to filter results using quote approved date instead of report date.
try {
Reports_GetQuotesBySalesRep_200_response result = apiInstance.reportsGetQuotesBySalesRep(salesRepUserID, useCustomRange, fromDate, toDate, month, year, filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ReportsApi#reportsGetQuotesBySalesRep");
e.printStackTrace();
}
}
}
// Create an instance of the API class
ReportsApi *apiInstance = [[ReportsApi alloc] init];
Integer *salesRepUserID = 37667; // The unique identifier for the sales representative. (optional) (default to null)
Boolean *useCustomRange = false; // Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`. (optional) (default to null)
date *fromDate = Wed Oct 01 00:00:00 UTC 2025; // Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
date *toDate = Fri Oct 31 00:00:00 UTC 2025; // End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
Integer *month = 10; // Month for the report period (1–12). Used when `useCustomRange` = false. (optional) (default to null)
Integer *year = 2025; // Year for the report period. Used when `useCustomRange` = false. (optional) (default to null)
Boolean *filterOnDepositEarliestPaymentDateTime = false; // Set to 1 to filter results using the earliest deposit payment date instead of report date. (optional) (default to null)
Boolean *filterOnApprovedDateTime = false; // Set to 1 to filter results using quote approved date instead of report date. (optional) (default to null)
// Reports-GetQuotesBySalesRep
[apiInstance reportsGetQuotesBySalesRepWith:salesRepUserID
useCustomRange:useCustomRange
fromDate:fromDate
toDate:toDate
month:month
year:year
filterOnDepositEarliestPaymentDateTime:filterOnDepositEarliestPaymentDateTime
filterOnApprovedDateTime:filterOnApprovedDateTime
completionHandler: ^(Reports_GetQuotesBySalesRep_200_response output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var SpendaServicesData = require('spenda_services_data');
// Create an instance of the API class
var api = new SpendaServicesData.ReportsApi()
var opts = {
'salesRepUserID': 37667, // {Integer} The unique identifier for the sales representative.
'useCustomRange': false, // {Boolean} Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
'fromDate': Wed Oct 01 00:00:00 UTC 2025, // {date} Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
'toDate': Fri Oct 31 00:00:00 UTC 2025, // {date} End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
'month': 10, // {Integer} Month for the report period (1–12). Used when `useCustomRange` = false.
'year': 2025, // {Integer} Year for the report period. Used when `useCustomRange` = false.
'filterOnDepositEarliestPaymentDateTime': false, // {Boolean} Set to 1 to filter results using the earliest deposit payment date instead of report date.
'filterOnApprovedDateTime': false // {Boolean} Set to 1 to filter results using quote approved date instead of report date.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.reportsGetQuotesBySalesRep(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class reportsGetQuotesBySalesRepExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new ReportsApi();
var salesRepUserID = 37667; // Integer | The unique identifier for the sales representative. (optional) (default to null)
var useCustomRange = false; // Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`. (optional) (default to null)
var fromDate = Wed Oct 01 00:00:00 UTC 2025; // date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
var toDate = Fri Oct 31 00:00:00 UTC 2025; // date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
var month = 10; // Integer | Month for the report period (1–12). Used when `useCustomRange` = false. (optional) (default to null)
var year = 2025; // Integer | Year for the report period. Used when `useCustomRange` = false. (optional) (default to null)
var filterOnDepositEarliestPaymentDateTime = false; // Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date. (optional) (default to null)
var filterOnApprovedDateTime = false; // Boolean | Set to 1 to filter results using quote approved date instead of report date. (optional) (default to null)
try {
// Reports-GetQuotesBySalesRep
Reports_GetQuotesBySalesRep_200_response result = apiInstance.reportsGetQuotesBySalesRep(salesRepUserID, useCustomRange, fromDate, toDate, month, year, filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling ReportsApi.reportsGetQuotesBySalesRep: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ReportsApi();
$salesRepUserID = 37667; // Integer | The unique identifier for the sales representative.
$useCustomRange = false; // Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
$fromDate = Wed Oct 01 00:00:00 UTC 2025; // date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
$toDate = Fri Oct 31 00:00:00 UTC 2025; // date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
$month = 10; // Integer | Month for the report period (1–12). Used when `useCustomRange` = false.
$year = 2025; // Integer | Year for the report period. Used when `useCustomRange` = false.
$filterOnDepositEarliestPaymentDateTime = false; // Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date.
$filterOnApprovedDateTime = false; // Boolean | Set to 1 to filter results using quote approved date instead of report date.
try {
$result = $api_instance->reportsGetQuotesBySalesRep($salesRepUserID, $useCustomRange, $fromDate, $toDate, $month, $year, $filterOnDepositEarliestPaymentDateTime, $filterOnApprovedDateTime);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ReportsApi->reportsGetQuotesBySalesRep: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ReportsApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ReportsApi->new();
my $salesRepUserID = 37667; # Integer | The unique identifier for the sales representative.
my $useCustomRange = false; # Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`.
my $fromDate = Wed Oct 01 00:00:00 UTC 2025; # date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
my $toDate = Fri Oct 31 00:00:00 UTC 2025; # date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true.
my $month = 10; # Integer | Month for the report period (1–12). Used when `useCustomRange` = false.
my $year = 2025; # Integer | Year for the report period. Used when `useCustomRange` = false.
my $filterOnDepositEarliestPaymentDateTime = false; # Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date.
my $filterOnApprovedDateTime = false; # Boolean | Set to 1 to filter results using quote approved date instead of report date.
eval {
my $result = $api_instance->reportsGetQuotesBySalesRep(salesRepUserID => $salesRepUserID, useCustomRange => $useCustomRange, fromDate => $fromDate, toDate => $toDate, month => $month, year => $year, filterOnDepositEarliestPaymentDateTime => $filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime => $filterOnApprovedDateTime);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ReportsApi->reportsGetQuotesBySalesRep: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.ReportsApi()
salesRepUserID = 37667 # Integer | The unique identifier for the sales representative. (optional) (default to null)
useCustomRange = false # Boolean | Set to 1 to use custom date range (`fromDate` / `toDate`) instead of `month` / `year`. (optional) (default to null)
fromDate = Wed Oct 01 00:00:00 UTC 2025 # date | Start date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
toDate = Fri Oct 31 00:00:00 UTC 2025 # date | End date for the report range (ISO 8601 format: YYYY-MM-DD). Used only when `useCustomRange` = true. (optional) (default to null)
month = 10 # Integer | Month for the report period (1–12). Used when `useCustomRange` = false. (optional) (default to null)
year = 2025 # Integer | Year for the report period. Used when `useCustomRange` = false. (optional) (default to null)
filterOnDepositEarliestPaymentDateTime = false # Boolean | Set to 1 to filter results using the earliest deposit payment date instead of report date. (optional) (default to null)
filterOnApprovedDateTime = false # Boolean | Set to 1 to filter results using quote approved date instead of report date. (optional) (default to null)
try:
# Reports-GetQuotesBySalesRep
api_response = api_instance.reports_get_quotes_by_sales_rep(salesRepUserID=salesRepUserID, useCustomRange=useCustomRange, fromDate=fromDate, toDate=toDate, month=month, year=year, filterOnDepositEarliestPaymentDateTime=filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime=filterOnApprovedDateTime)
pprint(api_response)
except ApiException as e:
print("Exception when calling ReportsApi->reportsGetQuotesBySalesRep: %s\n" % e)
extern crate ReportsApi;
pub fn main() {
let salesRepUserID = 37667; // Integer
let useCustomRange = false; // Boolean
let fromDate = Wed Oct 01 00:00:00 UTC 2025; // date
let toDate = Fri Oct 31 00:00:00 UTC 2025; // date
let month = 10; // Integer
let year = 2025; // Integer
let filterOnDepositEarliestPaymentDateTime = false; // Boolean
let filterOnApprovedDateTime = false; // Boolean
let mut context = ReportsApi::Context::default();
let result = client.reportsGetQuotesBySalesRep(salesRepUserID, useCustomRange, fromDate, toDate, month, year, filterOnDepositEarliestPaymentDateTime, filterOnApprovedDateTime, &context).wait();
println!("{:?}", result);
}