recordRegistryFulfillment
mutation · in the family Selling
What it does
Record that a registry item was bought — the gift is covered.
Staff: record ONE purchase fact against a registry item: immutable once recorded; the registry must be non-doomed; the item active; the order in-tenant + non-doomed; the named line's variant must equal the item's variant; over-fulfillment records legally (remaining floors 0). Requires the unrestricted capability. Template class (the capture tier — hand-derived v22).
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Selling — Ringing sales, serving customers and issuing invoices.
Roles that may call it:
- Owner
- Manager
- Associate Manager
- Sales Associate
- Cashier
- An API key whose scope allows
api:recordRegistryFulfillment
What happens
The registry’s fulfilment story updates so others do not double-buy.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
input | RecordRegistryFulfillmentInput RecordRegistryFulfillmentInput! | yes | Fulfillment record input. |
Returns
RegistryFulfillment RegistryFulfillment! — One recorded purchase against a registry item. Purchased qty per item = Σ these rows' qty; remaining = max(0, desired − purchased) — over-fulfillment records legally.
Example request
mutation ExampleRecordRegistryFulfillment($input: RecordRegistryFulfillmentInput!) {
recordRegistryFulfillment(input: $input) {
id
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
registryItemId
orderId
orderLineNo
qty
purchaserConsumerId
}
}Variables:
{
"input": {
"registryId": "01900000-0000-7000-8000-3255b1ae0000",
"registryItemId": "01900000-0000-7000-8000-21c97c6d0000",
"orderId": "01900000-0000-7000-8000-18e782370000",
"orderLineNo": 1,
"qty": 1,
"purchaserConsumerId": "01900000-0000-7000-8000-168ef9fc0000"
}
}Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"recordRegistryFulfillment": {
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"parentId": "01900000-0000-7000-8000-eacdfcfd0000",
"rootId": "01900000-0000-7000-8000-a1295a650000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-53c6eea90000",
"registryItemId": "01900000-0000-7000-8000-21c97c6d0000",
"orderId": "01900000-0000-7000-8000-18e782370000",
"orderLineNo": 1,
"qty": 1,
"purchaserConsumerId": "01900000-0000-7000-8000-168ef9fc0000"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)CONFLICT/*— The record’s state, or a change made in the meantime, does not allow this; the codes are on the CONFLICT page. (CONFLICT)VALIDATION/VERSION_REQUIRED— The request did not say which app version it came from. Retry: no. (VALIDATION)