List a settlement's attempts
/ settlements/ {id}/ attemptsReturn every attempt to carry this settlement's deposit to its destination, as a list answered whole, {object, data, has_more, url} with has_more always false, OLDEST ATTEMPT FIRST, the way a webhook event's deliveries are listed. Attempt 1 is the original dispatch, and every retry after it counts up, Stridge's and a person's alike. This is where the outcome of POST /settlements/{id}/retry is read back.
The order is deliberate and is an exception to this contract's newest-first default: an attempt history is a sequence of retries, and reading it in the order it happened is the only order that explains it. The newest attempt's number is on the settlement, as retry.attempts.
The list is not paged: the attempts are kept on the settlement and read with it, and there is one per dispatch and retry, so it takes no limit and no cursor. status is the one filter. Any other query parameter answers 400 parameter_unknown naming it, and a value outside its schema answers 422 parameter_invalid naming it.
A settlement belonging to another environment answers the same 404 resource_missing as one that exists nowhere.
A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting: nothing is served for a sandbox until its reset finishes.
Parameters
Path
- idstring <uuid>required
The settlement whose attempts are listed. A value that is not a UUID answers
422parameter_invalidnamingid.
Query
- statusstringoptionalenum pending · success · failed · awaiting_credit
Only attempts with this
status.
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 page of attempts.
- objectstringrequiredenum list
The object's type, always
list. - objectstringrequired
The object's type, always
settlement_attempt. - settlement_idstring <uuid>required
The settlement this attempt was carrying.
- environment_idstring <uuid>required
The environment the settlement belongs to.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own still says which side of the boundary it came from. - attempt_numberinteger <int32>required
Which attempt this was, counting from one, the original dispatch.
- automaticbooleanrequired
truefor an attempt Stridge made on its own,falsefor one a person made withPOST /settlements/{id}/retry. - statusstringrequiredenum pending · success · failed · awaiting_credit
How the attempt went.
pendinghas not ended;successcarried the deposit to its destination, which a completion arriving after a failure also reports;faileddid not, which is what a retry exists to fix, and is also how an attempt a refund interrupted ends.Show full descriptionShow less
awaiting_creditis a retry waiting for the workspace's gas credit: it runs once credit arrives, and spends no retry meanwhile. - errorstring | nullrequired
Why a failed attempt failed, or
nullon every attempt that has not. Developer documentation, not user copy. - created_atstring <date-time>required
When the attempt started. RFC3339 UTC,
Zsuffixed. - updated_atstring <date-time>required
When the attempt's status last changed. It equals
created_aton an attempt that has not moved.
- objectstringrequired
- has_morebooleanrequired
Always
false. The list is answered whole, so there is no other page. - urlstringrequired
The path the list is read at.
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