Fulfillment Manager API · tenders

Issue a gift card by hand

POST /gift-cards

Issue a gift card by hand — a prize, a goodwill gesture — worth amountCents in currency, for an optional recipientId (a person or a company).

It expires at the end of expiresOn, else after the organization's giftCardExpiryMonths, else never. Answers the card and its code — the one answer that ever carries it: no read shows it again, only its last four. The books post it as store credit given against gift card liability. Appends fulfillment.gift-card-issued. giftCardId (a caller-minted gcd_…) is required and is the idempotency key: the code is derived from it, so a retry with the same id answers the same card and the same code and issues nothing.

Access

Requires payments:write.

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

Retries

giftCardId (a caller-minted gcd_…) is required and is the idempotency key: the code is derived from it, so a retry with the same id answers the same card and the same code and issues nothing.

A retry with the same key answers 201, with what the first call recorded.

Why every write carries a key: Idempotency and retries.

Facts appended

  • fulfillment.gift-card-issued

What a fact is: Facts and the journal.

AI agent tool

No agent tool. issuing a gift card answers its code once — a bearer secret that belongs on the card or in the recipient's mail, never in a chat transcript; it is issued in the admin

Connecting an agent: AI agents.

Example

curl
curl -X POST 'https://fulfillment.getmanifold.io/gift-cards' \
  -H "Authorization: Bearer $MANIFOLD_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "giftCardId": "gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e",
  "amountCents": 5000,
  "currency": "AUD",
  "expiresOn": "2029-10-21",
  "recipientId": "psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90",
  "note": "Birthday raffle prize"
}'
JavaScript (fetch)
const response = await fetch("https://fulfillment.getmanifold.io/gift-cards", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.MANIFOLD_TOKEN}`, "Content-Type": "application/json" },
  body: JSON.stringify({
    "giftCardId": "gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e",
    "amountCents": 5000,
    "currency": "AUD",
    "expiresOn": "2029-10-21",
    "recipientId": "psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90",
    "note": "Birthday raffle prize"
  }),
});
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
const answer = await response.json();
Request body · application/json
{
  "giftCardId": "gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e",
  "amountCents": 5000,
  "currency": "AUD",
  "expiresOn": "2029-10-21",
  "recipientId": "psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90",
  "note": "Birthday raffle prize"
}
Response · 201 · application/json
{
  "card": {
    "id": "gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e",
    "last4": "K7QM",
    "currency": "AUD",
    "initialCents": 5000,
    "balanceCents": 5000,
    "status": "active",
    "expiresOn": "2029-10-21",
    "recipientId": "psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90",
    "note": "Birthday raffle prize",
    "issuedAt": "2026-10-21T03:02:11.000Z",
    "entries": [
      {
        "kind": "issued",
        "amountCents": 5000,
        "at": "2026-10-21T03:02:11.000Z"
      }
    ]
  },
  "code": "7H2D-9QXR-W4NB-K7QM"
}

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.

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.

502

RefusalWhat it meansWhat to do
InventoryUnavailable reason The inventory service did not answer, so nothing changed.Send the same request again, with the same key.

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, with the same key.

How refusals work everywhere: Errors.

Used in