Ramp: Create a fund
Ramp fund.postFundCreation: arguments, response, policy and SDK examples.
← Fund operations · Get started
Operation ramp.post_fund_creation
Provider route: POST /developer/v1/funds. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/ramp with npm, or alter-sdk-ramp with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { RampIntegration } from "@alter-ai/ramp";
async function execute(input: Parameters<RampIntegration["fund"]["postFundCreation"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new RampIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.fund.postFundCreation(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_ramp import RampIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = RampIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.fund.post_fund_creation(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
headers | object | Optional | Additional keys: not allowed |
headers.X-Idempotency-Key | string | Optional | Maximum length: 255 Minimum length: 1 |
body | Model | Required within parent | Expand Create a fund — request body — body |
Referenced models: Create a fund — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Fetch a fund — response body |
Referenced models: Fetch a fund — response body
Schemas
Section titled “Schemas”6 more schemas are linked from the tables above, on the schema pages.
Create a fund — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
accounting_rules | array | Optional | Accounting rules for the fund. |
accounting_rules[] | Model | Each item | Expand Create a fund — request body — body accounting rules item |
display_name | string | Optional | Display name of the fund. |
is_exempt_from_policy_agent | boolean | Optional | Whether this fund is exempt from policy agent review. Default: false |
is_shareable | boolean | Optional | Whether the fund is shareable among multiple users. Default: false |
permitted_spend_types | Model | Optional | Expand Create a fund — request body — body permitted spend types Permitted spend types for the fund. |
spend_program_id | string | Optional | The ID of the associated spend program. Format: uuid |
spending_restrictions | Model | Optional | Expand Create a fund — request body — body spending restrictions Spending restrictions for the fund. If spend_program_id is provided and this field is omitted, the fund inherits the program's spending restrictions. |
user_id | string | Required within parent | Unique identifier of the fund owner. Format: uuid |
Referenced models: Create a fund — request body — body accounting rules item, Create a fund — request body — body permitted spend types, Create a fund — request body — body spending restrictions
Fetch a fund — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
balance | JSON | Required within parent | |
balance (anyOf 1) | Model | Alternative | Expand Fetch a fund — response body — balance cleared, pending, total Current balance of the fund. Read only: true |
balance (anyOf 2) | null | Alternative | |
cards | array | Required within parent | Cards linked to this fund. |
cards[] | Model | Each item | Expand Fetch a fund — response body — cards item |
created_at | string | Required within parent | Time at which the fund was created, in ISO 8601 format. Format: date-time |
display_name | string | Required within parent | Display name of the fund. |
entity_id | JSON | Required within parent | |
entity_id (anyOf 1) | string | Alternative | Associated business entity of the fund. Format: uuid |
entity_id (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier of the fund. Format: uuid |
is_exempt_from_policy_agent | boolean | Required within parent | Whether this fund is exempt from policy agent review. |
is_shareable | boolean | Required within parent | Whether this fund is shareable among multiple users. |
members | array | Required within parent | Members who can spend from the fund. |
members[] | Model | Each item | Expand Fetch a fund — response body — members item |
overrides_spend_program | boolean | Required within parent | Whether the fund's settings override those of its spend program. |
permitted_spend_types | Model | Required within parent | Expand Fetch a fund — response body — permitted spend types Permitted spend types for this fund. |
spend_program_id | JSON | Required within parent | |
spend_program_id (anyOf 1) | string | Alternative | Unique identifier of the associated spend program. Format: uuid |
spend_program_id (anyOf 2) | null | Alternative | |
spending_restrictions | JSON | Required within parent | |
spending_restrictions (anyOf 1) | Model | Alternative | Expand Fetch a fund — response body — spending_restrictions / interval: ANNUAL, DAILY, MONTHLY, QUARTERLY, TERTIARY, TOTAL, WEEKLY, YEARLY Spending restrictions on this fund. Read only: true |
spending_restrictions (anyOf 2) | null | Alternative | |
state | string | Required within parent | Current state of the fund: ACTIVE, SUSPENDED, or TERMINATED. Known values: ACTIVE, ARCHIVED, SUSPENDED, TERMINATED Read only: true |
suspension | JSON | Required within parent | |
suspension (anyOf 1) | Model | Alternative | Expand Fetch a fund — response body — suspension suspended at, suspended by ramp, suspended by user id Suspension details at the fund level, or null if the fund is not suspended. Read only: true |
suspension (anyOf 2) | null | Alternative |
Referenced models: Fetch a fund — response body — cards item, Fetch a fund — response body — members item, Fetch a fund — response body — permitted spend types, Fetch a fund — response body — suspension suspended at, suspended by ramp, suspended by user id, Fetch a fund — response body — balance cleared, pending, total, Fetch a fund — response body — spending_restrictions / interval: ANNUAL, DAILY, MONTHLY, QUARTERLY, TERTIARY, TOTAL, WEEKLY, YEARLY
Create a fund — request body — body accounting rules item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
field_id | string | Required within parent | UUID of the accounting field. Format: uuid |
field_option_id | string | Required within parent | UUID of the accounting field option. Format: uuid |
Create a fund — request body — body permitted spend types
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
physical_card | boolean | Required within parent | Whether the user's physical card can be linked to this fund. |
reimbursements | boolean | Required within parent | Whether reimbursements can be submitted against this fund. |
virtual_card | boolean | Required within parent | Whether virtual cards can be linked to this fund. |
Create a fund — request body — body spending restrictions
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
allowed_category_codes | array | Optional | List of allowed Ramp category codes. |
allowed_category_codes[] | integer | Each item | One of: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 5, 6, 7, 8, 9 |
allowed_vendor_ids | array | Optional | List of allowed vendor IDs. |
allowed_vendor_ids[] | string | Each item | Format: uuid |
blocked_category_codes | array | Optional | List of blocked Ramp category codes. |
blocked_category_codes[] | integer | Each item | One of: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 23, 24, 25, 26, 27, 28, 29, 3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 4, 40, 41, 42, 43, 44, 5, 6, 7, 8, 9 |
blocked_mcc_codes | array | Optional | |
blocked_mcc_codes[] | string | Each item | |
blocked_vendor_ids | array | Optional | List of blocked vendor IDs. |
blocked_vendor_ids[] | string | Each item | Format: uuid |
convert_to_entity_currency | boolean | Optional | Convert limits to the currency of the fund's entity at Ramp's daily rate. Not supported for fixed-amount spend programs. Default: false |
interval | string | Required within parent | Time interval to apply limit to. One of: ANNUAL, DAILY, MONTHLY, QUARTERLY, TERTIARY, TOTAL, WEEKLY, YEARLY |
limit | Model | Required within parent | Expand Create a fund — request body — body spending restrictions limit Total amount limit per interval denominated in the smallest currency unit (e.g. cents for USD). |
lock_date | JSON | Optional | |
lock_date (anyOf 1) | string | Alternative | Date to automatically suspend the fund. If lock date has passed, set to a future date or to null to unsuspend. Format: date-time |
lock_date (anyOf 2) | null | Alternative | |
transaction_amount_limit | Model | Optional | Expand Create a fund — request body — body spending restrictions limit Max amount per transaction denominated in the smallest currency unit (e.g. cents for USD). |
Referenced models: Create a fund — request body — body spending restrictions limit
Fetch a fund — response body — cards item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
card_id | string | Required within parent | Unique identifier of the card. Format: uuid |
created_at | string | Required within parent | Time the card was created. Format: date-time |
display_name | string | Required within parent | Display name of the card. |
expiration | string | Required within parent | Expiration date in MMYY format. Redacted if the card has not been activated. Read only: true |
last_four | string | Required within parent | Last four digits of the card number. Redacted if the card has not been activated. Read only: true |
user_id | string | Required within parent | Unique identifier of the cardholder. Format: uuid |
Fetch a fund — response body — permitted spend types
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
physical_card_enabled | boolean | Required within parent | Whether the user's physical card can be linked to this fund. |
reimbursements_enabled | boolean | Required within parent | Whether reimbursements can be submitted against this fund. |
virtual_card_enabled | boolean | Required within parent | Whether virtual cards can be linked to this fund. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: ramp.post_fund_creation. Catalog operation: post_fund_creation. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["funds:write"]