Skip to navigation

Create an asset policy

Creates an asset policy as a proposal a second user approves (asset-policies:propose); its amounts are decimal strings, each encoded at its own scale — the gateway consults no reference data, so an asset this member does not hold refuses nothing here (an amount with no assetId, 400). A second live policy for the asset refuses 409 DUPLICATE_POLICY.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

Idempotency-KeystringRequired

Required on every write: a URL-safe string of 1 to 64 characters from [A-Za-z0-9._~-] (a UUID fits), scoped to you. It names one operation on one record, ever: a retry replays the stored outcome (Idempotent-Replay: true) or attaches to the live one, and reuse on another record refuses 409 IDEMPOTENCY_KEY_REUSED. Missing or malformed, 400.

Request

This endpoint expects an object.
assetIdintegerRequired
assetPolicyIdintegerOptional

0 = create.

expectedVersionstring or nullOptionalformat: "^-?[0-9]+$"
int64 as a decimal JSON string
maxTicketAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or "0" = unset (the 0 sentinel)

approvalThresholdAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or "0" = unset (the 0 sentinel)

reconciliationToleranceAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

money (a Decimal on the wire): a decimal string on input, encoded at its own scale — the fractional digits sent, trailing zeros dropped, at most 18. The edge consults no reference data: a value finer than its record is the platform's to judge, not the edge's to refuse; absent, null or "0" = unset (the 0 sentinel)

openingGraceNsstring or nullOptionalformat: "^-?[0-9]+$"
int64 as a decimal JSON string

Response

The asset policy as the platform now holds it after the write — the same row the read serves, with the answering change's position, the row's ETag and, on a replayed key, Idempotent-Replay.

assetIdinteger

Refdata reference — carried, not resolved here.

assetPolicyIdinteger
Sticky entity key.
globalSequencestringformat: "^[0-9]+$"

The position as a decimal string — the last change this member had applied, orders and balance readings included.

orgIdinteger

Owner-stamped.

pendingTransitionenum

ACTIVATE, AMEND or RETIRE; NONE otherwise. NONE is the unset sentinel: outputs only — as input, omit the field instead; explicit NONE refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as NONE, never as an error; as input an unknown name refuses 400 — the parse is strict

statusenum

UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict

Allowed values:
versionstringformat: "^-?[0-9]+$"

The row's version — monotonic per record, bumped on every change; served as the ETag and taken by If-Match. int64 as a decimal JSON string

approvalThresholdAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

Transfers at or above this amount require an approval; 0 = every transfer requires approval (the fail-safe reading). money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset

maxTicketAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

Per-transfer ticket cap; 0 = no cap. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset

openingGraceNsstring or nullOptionalformat: "^-?[0-9]+$"

The activation grace window, held as sequenced state so every member derives the same ledger from it; 0 = no window — no observation auto-posts opening equity (the strict reading). int64 as a decimal JSON string

pendingByUserIdinteger or nullOptional

The user whose proposal is pending, so an approver is checked to be someone else; 0 when nothing is pending.

reconciliationToleranceAmountstring or nullOptionalformat: "^-?[0-9]+(\.[0-9]+)?$"<=64 characters

The tolerance a reconciliation comparison allows; 0 = an exact match is required (fail-safe: tighter and noisier, never looser). money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset

unscaledbooleanOptionalDeprecated

Never present since 0.3.3: every money value on this API states its own scale on the wire — a policy amount or cap since 0.3.3, an order's and an execution's since 0.3.2, a balance's since 0.3.1 — so a row is never served raw, whether or not this member holds the asset or instrument it references. Kept, deprecated, so a client generated from 0.3.2 still compiles; it goes at the next major.

Errors

400
Create Asset Policies Request Bad Request Error
401
Create Asset Policies Request Unauthorized Error
403
Create Asset Policies Request Forbidden Error
409
Create Asset Policies Request Conflict Error
413
Create Asset Policies Request Content Too Large Error
422
Create Asset Policies Request Unprocessable Entity Error
429
Create Asset Policies Request Too Many Requests Error
500
Create Asset Policies Request Internal Server Error
503
Create Asset Policies Request Service Unavailable Error