Mercury: Get SAFE by ID
Mercury safes.getSafeRequest: arguments, response, policy and SDK examples.
← Safes operations · Get started
Operation mercury.getsaferequest
Provider route: GET /safes/{safeRequestId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/mercury with npm, or alter-sdk-mercury with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { MercuryIntegration } from "@alter-ai/mercury";
async function execute(input: Parameters<MercuryIntegration["safes"]["getSafeRequest"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new MercuryIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.safes.getSafeRequest(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_mercury import MercuryIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = MercuryIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.safes.get_safe_request(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.safeRequestId | string | Required within parent | ID for the SAFE request Format: uuid |
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 Get SAFE by ID — response body |
Referenced models: Get SAFE by ID — response body
Schemas
Section titled “Schemas”Get SAFE by ID — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A summary of a SAFE request. |
canceledAt | JSON | Optional | |
canceledAt (anyOf 1) | JSON | Alternative | |
canceledAt (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
canceledAt (anyOf 2) | null | Alternative | |
discountRate | JSON | Optional | |
discountRate (anyOf 1) | JSON | Alternative | |
discountRate (anyOf 1) (anyOf 1) | number | Alternative | Multiple of: 0.01 |
discountRate (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
discountRate (anyOf 2) | null | Alternative | |
documentUrl | string | Required within parent | |
expiresAt | JSON | Required within parent | |
expiresAt (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
governingState | JSON | Optional | |
governingState (anyOf 1) | JSON | Alternative | |
governingState (anyOf 1) (allOf 1) | string | All variants apply | Known values: AL, AK, AZ, AR, CA, CO, CT, DE, DC, FL, GA, HI, ID, IL, IN, IA, KS, KY, LA, ME, MD, MA, MI, MN, MS, MO, MT, NE, NV, NH, NJ, NM, NY, NC, ND, OH, OK, OR, PA, RI, SC, SD, TN, TX, UT, VT, VA, WA, WV, WI, WY |
governingState (anyOf 2) | null | Alternative | |
id | JSON | Required within parent | |
id (allOf 1) | string | All variants apply | ID for the SAFE request Format: uuid |
includesMostFavoredNationClause | boolean | Required within parent | |
includesProRataRightsLetter | boolean | Required within parent | |
investmentAmount | JSON | Required within parent | |
investmentAmount (allOf 1) | Model | All variants apply | Expand Request to send money — response body — amount value |
investmentDate | JSON | Required within parent | |
investmentDate (allOf 1) | string | All variants apply | Format: date |
investor | JSON | Required within parent | |
investor (allOf 1) | Model | All variants apply | Expand Get SAFE by ID — response body — investor Details about the investor buying the equity |
organization | JSON | Required within parent | |
organization (allOf 1) | Model | All variants apply | Expand Get SAFE by ID — response body — organization Details about the organization selling the equity |
paidAt | JSON | Optional | |
paidAt (anyOf 1) | JSON | Alternative | |
paidAt (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
paidAt (anyOf 2) | null | Alternative | |
signedByInvestorAt | JSON | Optional | |
signedByInvestorAt (anyOf 1) | JSON | Alternative | |
signedByInvestorAt (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
signedByInvestorAt (anyOf 2) | null | Alternative | |
signedByOwnerAt | JSON | Optional | |
signedByOwnerAt (anyOf 1) | JSON | Alternative | |
signedByOwnerAt (anyOf 1) (allOf 1) | string | All variants apply | Format: yyyy-mm-ddThh:MM:ssZ |
signedByOwnerAt (anyOf 2) | null | Alternative | |
valuationCap | JSON | Optional | |
valuationCap (anyOf 1) | JSON | Alternative | |
valuationCap (anyOf 1) (allOf 1) | Model | All variants apply | Expand Request to send money — response body — amount value |
valuationCap (anyOf 2) | null | Alternative | |
valuationType | JSON | Required within parent | |
valuationType (allOf 1) | string | All variants apply | Known values: PreMoney, PostMoney, NoValuation |
Referenced models: Get SAFE by ID — response body — investor Details about the investor buying the equity, Get SAFE by ID — response body — organization Details about the organization selling the equity, Request to send money — response body — amount value
Get SAFE by ID — response body — investor Details about the investor buying the equity
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the investor buying the equity. |
additionalBylines | JSON | Optional | |
additionalBylines (anyOf 1) | string | Alternative | Maximum length: 299 Minimum length: 1 |
additionalBylines (anyOf 2) | null | Alternative | |
address | JSON | Optional | |
address (anyOf 1) | string | Alternative | Maximum length: 299 Minimum length: 1 |
address (anyOf 2) | null | Alternative | |
investorType | JSON | Required within parent | |
investorType (allOf 1) | string | All variants apply | Known values: SafeRequestInvestorTypeIndividual, SafeRequestInvestorTypeVentureFund, SafeRequestInvestorTypeOther |
legalEntityName | string | Required within parent | Maximum length: 299 Minimum length: 1 |
signatoryEmail | JSON | Required within parent | |
signatoryEmail (allOf 1) | string | All variants apply | |
signatoryName | string | Required within parent | Maximum length: 5000 Minimum length: 1 |
signatoryTitle | JSON | Optional | |
signatoryTitle (anyOf 1) | string | Alternative | Maximum length: 299 Minimum length: 1 |
signatoryTitle (anyOf 2) | null | Alternative |
Get SAFE by ID — response body — organization Details about the organization selling the equity
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Details about the organization selling the equity |
legalEntityName | string | Required within parent | Maximum length: 299 Minimum length: 1 |
signatoryEmail | JSON | Required within parent | |
signatoryEmail (allOf 1) | string | All variants apply | |
signatoryName | string | Required within parent | Maximum length: 5000 Minimum length: 1 |
signatoryTitle | string | Required within parent | Maximum length: 299 Minimum length: 1 |
Request to send money — response body — amount value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | number | Alternative | A positive dollar amount with at least 1 cent. Format: double Minimum: 0.01 |
$ (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: mercury.getsaferequest. Catalog operation: mercury:getSafeRequest. 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.