Read one routing policy
/ routing-policies/ {id}Return one policy whole, rules in evaluation order. It is the same object the list answers with, so an editor opened from a row renders without a second read of anything.
A policy belonging to another environment answers
404resource_missing, identical to an identifier that exists nowhere.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting.
/v2 operation. With a /v1 key, call Get a routing policy (Legacy v1) instead.Parameters
Path
- idstring <uuid>required
The routing policy being addressed. A value that is not a UUID answers
422parameter_invalidnamingid.
Headers
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it.
Responses
The policy resolved.
- idstring <uuid>required
The policy's opaque identifier.
- objectstringrequired
The object's type, always
routing_policy. - environment_idstring <uuid>required
The environment this policy is scoped to. A policy is a property of one scope: the same name may exist in a sandbox and in live, and the two are different policies.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - namestringrequired
What the policy is called, and how a deposit address references it. Lowercase snake_case, a leading letter, 3–64 characters, and unique inside the environment.
- is_defaultbooleanrequired
Whether this is the environment's default, which every deposit address without an explicit link settles by. At most one policy per environment carries it, and it is read-only: it is never accepted on a create or an update.
Show full descriptionShow less
The default is the policy provisioned with the environment. No write here moves it: a create never takes it, an edit keeps it, and the default itself is not deleted, so the deposit addresses that settle by it never lose it. Its name and its rules are edited like any other policy's.
Show 3 more fieldsShow fewer fields
The rules in evaluation order. A policy holding none is legal and matches nothing, so a deposit address linked to it settles at its own destination. That is not the same as having no policy: an address with none inherits the environment's default policy and its rules.
What a rule matches an inbound deposit on.
Show full descriptionShow less
At least one of the network or the asset is pinned, and the three legal forms in descending specificity are network and asset (a concrete token on a chain), network alone (a per-chain catch-all), and asset alone (that asset arriving on any chain).
Every member is present; one a rule does not pin is
null.Where a matched deposit settles. It is either a named treasury or an inline address, never both: a request carrying members of both forms answers
422.Show full descriptionShow less
A treasury destination is dereferenced at settlement time, so rotating the treasury's address propagates to every rule naming it. An inline destination pins the address itself and does not.
Every member is present; one the chosen form does not use is
null, sotreasuryalone tells a client which form it is reading.
- created_atstring <date-time>required
When the policy was created. RFC3339 UTC,
Zsuffixed. The list is ordered on it, newest first. - updated_atstring <date-time>required
When the policy was last edited. It equals
created_aton one never edited.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 404resource_missingNo such object
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 429rate_limitedToo many requests