Skip to content
YutaiDocs
GET /v1/statusGet API key

API reference / API reference

Confirm one fulfilment waiting on this distributor

One call of the distributor API, read from the interface description Yutai publishes. Every sample answer on this page is simulated: no real holder's data stands behind it. The formats every value travels in are the identifiers page's.

View as .md

The call

POST/v1/fulfilments/{id}/confirmCallable today

The key presents the claims.write scope.

The parameters

id
Required. The fulfilment's own id, the one the poll's answer carried: a ful_ prefixed ULID. It sits in the call's address.

The body

venueReference
Required. The reference the credit carries: the words the distributor can point back at in its own records.

What it answers

The fulfilment's own facts after the confirm: the claim it opens beside, the benefit it credits and the instant it was opened, the credited state, the distributor's own reference for the credit and the instant the confirm recorded. Nothing personal rides the answer.

  • fulfilmentId

    The fulfilment's own opaque id, the address its confirm answers at.

    Required. A string.

  • claimId

    The claim this fulfilment opens beside, by its own opaque id.

    Required. A string.

  • benefitId

    The benefit this fulfilment credits, by its own opaque id.

    Required. A string.

  • benefitName

    The benefit's name as the programme carries it, so a fulfilment reads without a second lookup.

    Required. A string. It carries at least 1 and at most 128 characters.

  • state

    Where the fulfilment stands in plain words: waiting on the venue until its confirm lands, then credited by the venue.

    Required. A string that is one of the values below.

    • waiting on the venue
    • credited by the venue
  • createdAt

    The instant the fulfilment was opened, the moment the credit began waiting on the venue.

    Required. An instant in the ISO 8601 form.

  • venueReference

    The venue's own reference for the credit, one to the stored maximum characters; present only once credited.

    Optional. A string. It carries at least 1 and at most 256 characters.

  • confirmedAt

    The instant the venue's confirm was recorded; present only once the row is credited by the venue.

    Optional. An instant in the ISO 8601 form.

The errors

Every refused call answers one object with one field, message: the plain sentence that says what did not happen. The sentence carries 1 to 512 characters, so a refusal never carries an id, a code or an exception's text.

The errors the call for POST /v1/fulfilments/{id}/confirm answers
StatusWhat it answers
400The request body could not be read.
401The key is missing, malformed, unknown, revoked or expired.
403The key does not carry the scope, or the fulfilment was already confirmed: the confirm that stands is the one that landed first. The call is also refused with 403, nothing read, when the distributor is paused, suspended or closed, when the key is paused, or when the key presents from an origin it does not allow.
404No fulfilment answers this id under this distributor's key: an unknown id, or one another distributor's key recorded. The answer is the same for both, so no fulfilment id can be probed.
429The key made too many calls this minute. The Retry-After header names the seconds until the next window opens. Nothing was read.
500The read failed inside Yutai. Nothing was changed.