Fulfillment Manager API · tenders

What a gift card code is good for

POST /gift-cards/check

What a gift card code is good for, before it pays: the card's last four, currency, balance, status and expiry, and refusal (disabled, expired) when it can pay nothing today.

The code travels in the body, never a URL. A code matching no card is 404 GiftCardNotFound and counts against the caller: ten such in fifteen minutes and every code is refused for fifteen (429 GiftCardAttemptsLocked, with retryAfterSeconds). Appends nothing: a lookup, whose misses are kept for the lockout and not as facts. No idempotency key: a lookup changes nothing, so a retry answers the same (or counts another miss).

Access

Requires payments:read or payments:write.

Any one of these scopes is enough.

How scopes come from roles: Scopes and roles. Getting a token: Authentication and app tokens.

Retries

No idempotency key: a lookup changes nothing, so a retry answers the same (or counts another miss).

Why every write carries a key: Idempotency and retries.

Facts appended

None. This call records nothing in a journal.

What a fact is: Facts and the journal.

AI agent tool

No agent tool. checking a gift card takes its code, a bearer secret typed at the till or by the customer, never into a chat; the admin's payment dialog and hosted pages check it

Connecting an agent: AI agents.

Example

curl
curl -X POST 'https://fulfillment.getmanifold.io/gift-cards/check' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "code": "7H2D-9QXR-W4NB-K7QM"
}'
JavaScript (fetch)
const response = await fetch("https://fulfillment.getmanifold.io/gift-cards/check", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "code": "7H2D-9QXR-W4NB-K7QM"
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "code": "7H2D-9QXR-W4NB-K7QM"
}
Response · 200 · application/json
{
  "giftCardId": "gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e",
  "last4": "K7QM",
  "currency": "AUD",
  "balanceCents": 5000,
  "status": "active",
  "expiresOn": "2029-10-21"
}

The panel writes this call in other languages. It does not send it: Manifold's APIs do not take calls from a web page on another site, so run the call from your own code or terminal. The whole API as OpenAPI: fulfillment-manager.openapi.json. Base URL https://fulfillment.getmanifold.io.

Errors

Every refusal is a status and a JSON body whose _tag names it. A refused call changes nothing.

401

RefusalWhat it meansWhat to do
Unauthorized reason The token is missing, expired or not one Manifold issued.Get a fresh token and send the call again.
TokenAlreadyUsed tokenId A single-use app token was already spent.Mint a new token for this call.

402

RefusalWhat it meansWhat to do
SubscriptionRequired status The organization's subscription has lapsed, so writes are refused.An owner settles billing. Reads still work meanwhile.

403

RefusalWhat it meansWhat to do
TenantRequired userId The token names no organization.Choose the organization, then get a new token.
ScopeRequired required The token's roles do not grant the scope this call needs.Ask an owner or admin for a role that grants it.

404

RefusalWhat it meansWhat to do
GiftCardNotFound giftCardId No such record in this organization.Check the id in the path or the body.

409

RefusalWhat it meansWhat to do
MirroredFromSource source This area is fed by your source system until the organization goes live.Make the change in the source system, or go live first.

429

RefusalWhat it meansWhat to do
GiftCardAttemptsLocked retryAfterSeconds The request was refused, and nothing changed.Nothing changed.

503

RefusalWhat it meansWhat to do
RequestLogUnavailable tokenId, reason The service could not record the request, so it did nothing.Send the same request again shortly.

How refusals work everywhere: Errors.

Used in