SpendLimits
Defined in: src/budgets/client.gen.ts:249
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SpendLimits(
_core):SpendLimits
Defined in: src/budgets/client.gen.ts:250
Parameters
Section titled “Parameters”Returns
Section titled “Returns”SpendLimits
Methods
Section titled “Methods”archive()
Section titled “archive()”archive(
id,options?):Promise<void>
Defined in: src/budgets/client.gen.ts:259
Archive a Spend Limit
Archives a Spend Limit, making it unusable for future expenses and removing it from the UI
POST /v2/spend_limits/{id}/archive — requires OAuth scope: budgets
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>
create()
Section titled “create()”create(
body,options?):Promise<{account_id:string;authorization_settings?: {authorization_type:"HARD"|"SOFT";base_limit: {amount:number;currency:string|null; };limit_buffer_percentage?:number|null;limit_with_increases: {amount:number;currency:string|null; };rollover_refresh_rate:"OFF"|"NEVER"|"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"; } |null;authorization_visibility:"PUBLIC"|"PRIVATE";auto_create_limit_cards_setting:"DISABLED"|"ALL_MEMBERS";auto_transfer_cards_setting:"DISABLED"|"ENABLED";current_period_balance?: {amount_spent?: {amount:number;currency:string|null; } |null;end_date?:string|null;end_time?:string|null;rollover_amount?: {amount:number;currency:string|null; } |null;start_date?:string|null;start_time?:string|null; } |null;department_id?:string|null;description?:string|null;end_date?:string|null;end_time_utc?:string|null;expense_policy_id:string;expense_visibility:"PRIVATE"|"SHARED";id:string;legal_entity_id?:string|null;limit_approval_policy_id?:string|null;limit_increase_request_policy_id?:string|null;limit_increase_setting:"DISABLED"|"ENABLED";member_user_ids:string[];merchant_category_controls?: {allowed_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null;blocked_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null; } |null;name:string;owner_user_ids:string[];parent_budget_id?:string|null;period_recurrence_type:"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"|"ONE_TIME"|"PER_WEEK";spend_type:"BUDGET_PROVISIONED_CARDS_ONLY"|"NON_BUDGET_PROVISIONED_CARDS_ALLOWED";start_date?:string|null;start_time_utc?:string|null;status:"ACTIVE"|"ARCHIVED"|"DELETED"|"EXPIRED";transaction_limit?: {amount:number;currency:string|null; } |null; }>
Defined in: src/budgets/client.gen.ts:278
Create Spend Limit
Creates a Spend Limit
POST /v2/spend_limits — requires OAuth scope: budgets
Sends an Idempotency-Key header: options.idempotencyKey, or an auto-generated UUID.
Parameters
Section titled “Parameters”authorization_settings
Section titled “authorization_settings”{ authorization_type: "HARD" | "SOFT"; base_limit: { amount: number; currency: string | null; }; limit_buffer_percentage?: number | null; rollover_refresh_rate: "OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR"; }
authorization_settings.authorization_type
Section titled “authorization_settings.authorization_type”"HARD" | "SOFT"
authorization_settings.base_limit
Section titled “authorization_settings.base_limit”{ amount: number; currency: string | null; }
authorization_settings.base_limit.amount
Section titled “authorization_settings.base_limit.amount”number
Format: int64
Description
The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.
Example
700authorization_settings.base_limit.currency
Section titled “authorization_settings.base_limit.currency”string | null
Description
The type of currency, in ISO 4217 format.
Default
USDExample
USDauthorization_settings.limit_buffer_percentage?
Section titled “authorization_settings.limit_buffer_percentage?”number | null
Format: int32
Description
The percentage of flexible buffer on the limit as a 0-100 integer.
authorization_settings.rollover_refresh_rate
Section titled “authorization_settings.rollover_refresh_rate”"OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR"
authorization_visibility
Section titled “authorization_visibility”"PUBLIC" | "PRIVATE"
auto_create_limit_cards_setting
Section titled “auto_create_limit_cards_setting”"DISABLED" | "ALL_MEMBERS"
auto_transfer_cards_setting
Section titled “auto_transfer_cards_setting”"DISABLED" | "ENABLED"
department_id?
Section titled “department_id?”string | null
Description
The department ID to which Spend Limit expenses will be attributed.
description?
Section titled “description?”string | null
Description
Description of what the Spend Limit is used for.
end_date?
Section titled “end_date?”string | null
Format: date
Description
The date when the Spend Limit should expire.
expense_policy_id
Section titled “expense_policy_id”string
Description
The ID of the expense policy corresponding to this Spend Limit.
expense_visibility
Section titled “expense_visibility”"PRIVATE" | "SHARED"
legal_entity_id?
Section titled “legal_entity_id?”string | null
Description
The legal entity ID to which Spend Limit expenses will be attributed. If not set, expenses will be attributed to the spending user’s entity.
limit_approval_policy_id?
Section titled “limit_approval_policy_id?”string | null
Description
The ID of the policy for limit increase approval requests. Meant to replace limit_increase_request_policy_id.
limit_increase_request_policy_id?
Section titled “limit_increase_request_policy_id?”string | null
Description
The ID of the policy for limit increase requests for this Spend Limit.
limit_increase_setting
Section titled “limit_increase_setting”"DISABLED" | "ENABLED"
member_user_ids?
Section titled “member_user_ids?”string[] | null
Description
User IDs of the members of the Spend Limit.
string
Description
Name for the Spend Limit.
owner_user_ids?
Section titled “owner_user_ids?”string[] | null
Description
User IDs of the owners of the Spend Limit.
parent_budget_id?
Section titled “parent_budget_id?”string | null
Description
ID of parent Budget.
period_recurrence_type
Section titled “period_recurrence_type”"PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | "ONE_TIME" | "PER_WEEK"
spend_type
Section titled “spend_type”"BUDGET_PROVISIONED_CARDS_ONLY" | "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"
start_date?
Section titled “start_date?”string | null
Format: date
Description
The date when the Spend Limit should start counting.
transaction_limit?
Section titled “transaction_limit?”{ amount: number; currency: string | null; } | null
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ account_id: string; authorization_settings?: { authorization_type: "HARD" | "SOFT"; base_limit: { amount: number; currency: string | null; }; limit_buffer_percentage?: number | null; limit_with_increases: { amount: number; currency: string | null; }; rollover_refresh_rate: "OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR"; } | null; authorization_visibility: "PUBLIC" | "PRIVATE"; auto_create_limit_cards_setting: "DISABLED" | "ALL_MEMBERS"; auto_transfer_cards_setting: "DISABLED" | "ENABLED"; current_period_balance?: { amount_spent?: { amount: number; currency: string | null; } | null; end_date?: string | null; end_time?: string | null; rollover_amount?: { amount: number; currency: string | null; } | null; start_date?: string | null; start_time?: string | null; } | null; department_id?: string | null; description?: string | null; end_date?: string | null; end_time_utc?: string | null; expense_policy_id: string; expense_visibility: "PRIVATE" | "SHARED"; id: string; legal_entity_id?: string | null; limit_approval_policy_id?: string | null; limit_increase_request_policy_id?: string | null; limit_increase_setting: "DISABLED" | "ENABLED"; member_user_ids: string[]; merchant_category_controls?: { allowed_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; blocked_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; } | null; name: string; owner_user_ids: string[]; parent_budget_id?: string | null; period_recurrence_type: "PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | "ONE_TIME" | "PER_WEEK"; spend_type: "BUDGET_PROVISIONED_CARDS_ONLY" | "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"; start_date?: string | null; start_time_utc?: string | null; status: "ACTIVE" | "ARCHIVED" | "DELETED" | "EXPIRED"; transaction_limit?: { amount: number; currency: string | null; } | null; }>
get(
id,options?):Promise<{account_id:string;authorization_settings?: {authorization_type:"HARD"|"SOFT";base_limit: {amount:number;currency:string|null; };limit_buffer_percentage?:number|null;limit_with_increases: {amount:number;currency:string|null; };rollover_refresh_rate:"OFF"|"NEVER"|"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"; } |null;authorization_visibility:"PUBLIC"|"PRIVATE";auto_create_limit_cards_setting:"DISABLED"|"ALL_MEMBERS";auto_transfer_cards_setting:"DISABLED"|"ENABLED";current_period_balance?: {amount_spent?: {amount:number;currency:string|null; } |null;end_date?:string|null;end_time?:string|null;rollover_amount?: {amount:number;currency:string|null; } |null;start_date?:string|null;start_time?:string|null; } |null;department_id?:string|null;description?:string|null;end_date?:string|null;end_time_utc?:string|null;expense_policy_id:string;expense_visibility:"PRIVATE"|"SHARED";id:string;legal_entity_id?:string|null;limit_approval_policy_id?:string|null;limit_increase_request_policy_id?:string|null;limit_increase_setting:"DISABLED"|"ENABLED";member_user_ids:string[];merchant_category_controls?: {allowed_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null;blocked_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null; } |null;name:string;owner_user_ids:string[];parent_budget_id?:string|null;period_recurrence_type:"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"|"ONE_TIME"|"PER_WEEK";spend_type:"BUDGET_PROVISIONED_CARDS_ONLY"|"NON_BUDGET_PROVISIONED_CARDS_ALLOWED";start_date?:string|null;start_time_utc?:string|null;status:"ACTIVE"|"ARCHIVED"|"DELETED"|"EXPIRED";transaction_limit?: {amount:number;currency:string|null; } |null; }>
Defined in: src/budgets/client.gen.ts:298
Get Spend Limit
Retrieves a Spend Limit by ID
GET /v2/spend_limits/{id} — requires OAuth scope: budgets.readonly, budgets
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ account_id: string; authorization_settings?: { authorization_type: "HARD" | "SOFT"; base_limit: { amount: number; currency: string | null; }; limit_buffer_percentage?: number | null; limit_with_increases: { amount: number; currency: string | null; }; rollover_refresh_rate: "OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR"; } | null; authorization_visibility: "PUBLIC" | "PRIVATE"; auto_create_limit_cards_setting: "DISABLED" | "ALL_MEMBERS"; auto_transfer_cards_setting: "DISABLED" | "ENABLED"; current_period_balance?: { amount_spent?: { amount: number; currency: string | null; } | null; end_date?: string | null; end_time?: string | null; rollover_amount?: { amount: number; currency: string | null; } | null; start_date?: string | null; start_time?: string | null; } | null; department_id?: string | null; description?: string | null; end_date?: string | null; end_time_utc?: string | null; expense_policy_id: string; expense_visibility: "PRIVATE" | "SHARED"; id: string; legal_entity_id?: string | null; limit_approval_policy_id?: string | null; limit_increase_request_policy_id?: string | null; limit_increase_setting: "DISABLED" | "ENABLED"; member_user_ids: string[]; merchant_category_controls?: { allowed_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; blocked_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; } | null; name: string; owner_user_ids: string[]; parent_budget_id?: string | null; period_recurrence_type: "PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | "ONE_TIME" | "PER_WEEK"; spend_type: "BUDGET_PROVISIONED_CARDS_ONLY" | "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"; start_date?: string | null; start_time_utc?: string | null; status: "ACTIVE" | "ARCHIVED" | "DELETED" | "EXPIRED"; transaction_limit?: { amount: number; currency: string | null; } | null; }>
list()
Section titled “list()”list(
query?,options?):PagePromise<{items:object[];next_cursor?:string|null; }>
Defined in: src/budgets/client.gen.ts:317
List Spend Limits
Retrieves a list of Spend Limits
GET /v2/spend_limits — requires OAuth scope: budgets.readonly, budgets
Await for a single page, or for await to iterate items across all pages.
Parameters
Section titled “Parameters”query?
Section titled “query?”cursor?
Section titled “cursor?”string | null
limit?
Section titled “limit?”number | null
member_user_id[]?
Section titled “member_user_id[]?”string[] | null
options?
Section titled “options?”Returns
Section titled “Returns”PagePromise<{ items: object[]; next_cursor?: string | null; }>
update()
Section titled “update()”update(
id,body,options?):Promise<{account_id:string;authorization_settings?: {authorization_type:"HARD"|"SOFT";base_limit: {amount:number;currency:string|null; };limit_buffer_percentage?:number|null;limit_with_increases: {amount:number;currency:string|null; };rollover_refresh_rate:"OFF"|"NEVER"|"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"; } |null;authorization_visibility:"PUBLIC"|"PRIVATE";auto_create_limit_cards_setting:"DISABLED"|"ALL_MEMBERS";auto_transfer_cards_setting:"DISABLED"|"ENABLED";current_period_balance?: {amount_spent?: {amount:number;currency:string|null; } |null;end_date?:string|null;end_time?:string|null;rollover_amount?: {amount:number;currency:string|null; } |null;start_date?:string|null;start_time?:string|null; } |null;department_id?:string|null;description?:string|null;end_date?:string|null;end_time_utc?:string|null;expense_policy_id:string;expense_visibility:"PRIVATE"|"SHARED";id:string;legal_entity_id?:string|null;limit_approval_policy_id?:string|null;limit_increase_request_policy_id?:string|null;limit_increase_setting:"DISABLED"|"ENABLED";member_user_ids:string[];merchant_category_controls?: {allowed_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null;blocked_merchant_categories?: ("ADVERTISING_MARKETING"|"GROCERY"|"TELEPHONY"|"OFFICE_SUPPLIES"|"PRIVATE_AIR_TRAVEL"|"CLOTHING"|"CAR_RENTAL"|"VEHICLE_EXPENSES"|"RESTAURANTS"|"GAMBLING"|"FLOWERS"|"ELECTRONICS"|"LEGAL_SERVICES"|"UTILITIES"|"FURNITURE"|"BARS_NIGHTLIFE"|"LAUNDRY"|"EVENT_EXPENSES"|"SHIPPING"|"OTHER_TRAVEL_EXPENSES"|"CHARITY"|"SOFTWARE"|"LODGING"|"FACILITIES_EXPENSES"|"SERVERS"|"CONFERENCES"|"FOOD_DELIVERY"|"RENT"|"AIRLINE_EXPENSES"|"OTHER_BUSINESS_EXPENSES"|"BANK_FINANCIAL_FEES"|"BOOKS_NEWSPAPERS"|"CONSULTANT_CONTRACTOR"|"CORPORATE_INSURANCE"|"DIGITAL_GOODS"|"LICENSES_TAXES"|"GAS_FUEL"|"GENERAL_MERCHANDISE"|"MEDICAL"|"MEMBERSHIPS_CLUBS"|"PARKING_EXPENSES"|"POLITICAL_DONATIONS"|"PUBLIC_TRANSPORTATION"|"RECURRING_SOFTWARE_SAAS"|"RIDESHARE_TAXI"|"TOLL_BRIDGE_FEES"|"TRAINING_EDUCATION"|"TRAVEL")[] |null; } |null;name:string;owner_user_ids:string[];parent_budget_id?:string|null;period_recurrence_type:"PER_MONTH"|"PER_QUARTER"|"PER_YEAR"|"ONE_TIME"|"PER_WEEK";spend_type:"BUDGET_PROVISIONED_CARDS_ONLY"|"NON_BUDGET_PROVISIONED_CARDS_ALLOWED";start_date?:string|null;start_time_utc?:string|null;status:"ACTIVE"|"ARCHIVED"|"DELETED"|"EXPIRED";transaction_limit?: {amount:number;currency:string|null; } |null; }>
Defined in: src/budgets/client.gen.ts:336
Update Spend Limit
Updates a Spend Limit
PUT /v2/spend_limits/{id} — requires OAuth scope: budgets
Sends an Idempotency-Key header: options.idempotencyKey, or an auto-generated UUID.
Parameters
Section titled “Parameters”string
authorization_settings?
Section titled “authorization_settings?”{ authorization_type?: "HARD" | "SOFT" | null; base_limit?: { amount: number; currency: string | null; } | null; limit_buffer_percentage?: number | null; rollover_refresh_rate?: "OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | null; } | null
authorization_visibility?
Section titled “authorization_visibility?”"PUBLIC" | "PRIVATE" | null
auto_create_limit_cards_setting?
Section titled “auto_create_limit_cards_setting?”"DISABLED" | "ALL_MEMBERS" | null
auto_transfer_cards_setting?
Section titled “auto_transfer_cards_setting?”"DISABLED" | "ENABLED" | null
department_id?
Section titled “department_id?”string | null
Description
The department ID to which Spend Limit expenses will be attributed.
description?
Section titled “description?”string | null
Description
Description of what the Spend Limit is used for.
end_date?
Section titled “end_date?”string | null
Format: date
Description
The date when the Spend Limit should expire.
expense_policy_id?
Section titled “expense_policy_id?”string | null
Description
The ID of the expense policy corresponding to this Spend Limit.
expense_visibility?
Section titled “expense_visibility?”"PRIVATE" | "SHARED" | null
legal_entity_id?
Section titled “legal_entity_id?”string | null
Description
The legal entity ID to which Spend Limit expenses will be attributed. If not set, expenses will be attributed to the spending user’s entity.
limit_approval_policy_id?
Section titled “limit_approval_policy_id?”string | null
Description
The ID of the policy for limit increase approval requests. Meant to replace limit_increase_request_policy_id.
limit_increase_request_policy_id?
Section titled “limit_increase_request_policy_id?”string | null
Description
The ID of the policy for limit increase requests for this Spend Limit.
limit_increase_setting?
Section titled “limit_increase_setting?”"DISABLED" | "ENABLED" | null
member_user_ids?
Section titled “member_user_ids?”string[] | null
Description
User IDs of the members of the Spend Limit.
merchant_category_controls?
Section titled “merchant_category_controls?”{ allowed_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; blocked_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; } | null
string | null
Description
Name for the Spend Limit.
owner_user_ids?
Section titled “owner_user_ids?”string[] | null
Description
User IDs of the owners of the Spend Limit.
period_recurrence_type?
Section titled “period_recurrence_type?”"PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | "ONE_TIME" | "PER_WEEK" | null
set_end_date_null?
Section titled “set_end_date_null?”boolean | null
Description
Set the date when the Spend Limit should expire to null.
set_start_date_null?
Section titled “set_start_date_null?”boolean | null
Description
Set the date when the Spend Limit should start counting to null.
set_transaction_limit_null?
Section titled “set_transaction_limit_null?”boolean | null
Description
Set the transaction limit that this Spend Limit will enforce to null.
spend_type?
Section titled “spend_type?”"BUDGET_PROVISIONED_CARDS_ONLY" | "NON_BUDGET_PROVISIONED_CARDS_ALLOWED" | null
start_date?
Section titled “start_date?”string | null
Format: date
Description
The date when the Spend Limit should start counting.
status?
Section titled “status?”"ACTIVE" | "ARCHIVED" | "DELETED" | "EXPIRED" | null
transaction_limit?
Section titled “transaction_limit?”{ amount: number; currency: string | null; } | null
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{ account_id: string; authorization_settings?: { authorization_type: "HARD" | "SOFT"; base_limit: { amount: number; currency: string | null; }; limit_buffer_percentage?: number | null; limit_with_increases: { amount: number; currency: string | null; }; rollover_refresh_rate: "OFF" | "NEVER" | "PER_MONTH" | "PER_QUARTER" | "PER_YEAR"; } | null; authorization_visibility: "PUBLIC" | "PRIVATE"; auto_create_limit_cards_setting: "DISABLED" | "ALL_MEMBERS"; auto_transfer_cards_setting: "DISABLED" | "ENABLED"; current_period_balance?: { amount_spent?: { amount: number; currency: string | null; } | null; end_date?: string | null; end_time?: string | null; rollover_amount?: { amount: number; currency: string | null; } | null; start_date?: string | null; start_time?: string | null; } | null; department_id?: string | null; description?: string | null; end_date?: string | null; end_time_utc?: string | null; expense_policy_id: string; expense_visibility: "PRIVATE" | "SHARED"; id: string; legal_entity_id?: string | null; limit_approval_policy_id?: string | null; limit_increase_request_policy_id?: string | null; limit_increase_setting: "DISABLED" | "ENABLED"; member_user_ids: string[]; merchant_category_controls?: { allowed_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; blocked_merchant_categories?: ("ADVERTISING_MARKETING" | "GROCERY" | "TELEPHONY" | "OFFICE_SUPPLIES" | "PRIVATE_AIR_TRAVEL" | "CLOTHING" | "CAR_RENTAL" | "VEHICLE_EXPENSES" | "RESTAURANTS" | "GAMBLING" | "FLOWERS" | "ELECTRONICS" | "LEGAL_SERVICES" | "UTILITIES" | "FURNITURE" | "BARS_NIGHTLIFE" | "LAUNDRY" | "EVENT_EXPENSES" | "SHIPPING" | "OTHER_TRAVEL_EXPENSES" | "CHARITY" | "SOFTWARE" | "LODGING" | "FACILITIES_EXPENSES" | "SERVERS" | "CONFERENCES" | "FOOD_DELIVERY" | "RENT" | "AIRLINE_EXPENSES" | "OTHER_BUSINESS_EXPENSES" | "BANK_FINANCIAL_FEES" | "BOOKS_NEWSPAPERS" | "CONSULTANT_CONTRACTOR" | "CORPORATE_INSURANCE" | "DIGITAL_GOODS" | "LICENSES_TAXES" | "GAS_FUEL" | "GENERAL_MERCHANDISE" | "MEDICAL" | "MEMBERSHIPS_CLUBS" | "PARKING_EXPENSES" | "POLITICAL_DONATIONS" | "PUBLIC_TRANSPORTATION" | "RECURRING_SOFTWARE_SAAS" | "RIDESHARE_TAXI" | "TOLL_BRIDGE_FEES" | "TRAINING_EDUCATION" | "TRAVEL")[] | null; } | null; name: string; owner_user_ids: string[]; parent_budget_id?: string | null; period_recurrence_type: "PER_MONTH" | "PER_QUARTER" | "PER_YEAR" | "ONE_TIME" | "PER_WEEK"; spend_type: "BUDGET_PROVISIONED_CARDS_ONLY" | "NON_BUDGET_PROVISIONED_CARDS_ALLOWED"; start_date?: string | null; start_time_utc?: string | null; status: "ACTIVE" | "ARCHIVED" | "DELETED" | "EXPIRED"; transaction_limit?: { amount: number; currency: string | null; } | null; }>