(spendData)
- getBankFees - Get bank fees
- getPayableAttachments - Get payables attachments
- getPayables - Get payables
- getSettlements - Get settlements
- getWalletLoads - Get wallet loads
- getWalletSummary - Get wallet summaries
Returns a list of bank fees
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { GetBankFeesSecurity } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetBankFeesSecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getBankFees({
settlementIds: [
"<value>",
],
sort: "+createdAt",
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetBankFeesRequest | ✔️ | The request object to use for the request. |
security |
operations.GetBankFeesSecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetBankFeesResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |
Get attachments
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { GetPayableAttachmentsSecurity } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetPayableAttachmentsSecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getPayableAttachments({
payableId: "<value>",
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetPayableAttachmentsRequest | ✔️ | The request object to use for the request. |
security |
operations.GetPayableAttachmentsSecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetPayableAttachmentsResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |
GET payables endpoint
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { BookkeepingStatus, GetPayablesSecurity } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetPayablesSecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getPayables({
bookkeepingStatus: [
BookkeepingStatus.Exported,
],
ids: [
"<value>",
],
sort: "-createdAt,+payableDate",
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetPayablesRequest | ✔️ | The request object to use for the request. |
security |
operations.GetPayablesSecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetPayablesResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |
Get settlements
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { GetSettlementsSecurity, PaidFrom, State } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetSettlementsSecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getSettlements({
ids: [
"<value>",
],
paidFrom: [
PaidFrom.SpendeskAccount,
],
sort: "+createdAt",
state: [
State.Exported,
],
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetSettlementsRequest | ✔️ | The request object to use for the request. |
security |
operations.GetSettlementsSecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetSettlementsResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |
Get wallet loads
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { GetWalletLoadsSecurity } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetWalletLoadsSecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getWalletLoads({
sort: "+createdAt",
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetWalletLoadsRequest | ✔️ | The request object to use for the request. |
security |
operations.GetWalletLoadsSecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetWalletLoadsResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |
Get wallet summary
import { SpendeskPublicAPI } from "Spendesk-Public-API";
import { GetWalletSummarySecurity } from "Spendesk-Public-API/dist/sdk/models/operations";
async function run() {
const sdk = new SpendeskPublicAPI();
const operationSecurity: GetWalletSummarySecurity = {
authorizationCodeFlow: "<YOUR_AUTHORIZATION_CODE_FLOW_HERE>",
};
const res = await sdk.spendData.getWalletSummary({
ids: [
"<value>",
],
}, operationSecurity);
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.GetWalletSummaryRequest | ✔️ | The request object to use for the request. |
security |
operations.GetWalletSummarySecurity | ✔️ | The security requirements to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.GetWalletSummaryResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.ErrorT | 400,401,403,404,429,500 | application/json |
errors.SDKError | 4xx-5xx | / |