Place your first wholesale order
Problem
You have an API key from the FazerCards panel and want to confirm the full path — pick a product, place an order, retrieve the code — in under five minutes.
Solution
List gift card categories with `GET /giftcards`, then the offers of one category with `GET /giftcards/cards?category_id=…` — each offer has a `card_id`, `price_usd` and `stock`. Place the order with `POST /giftcards/order` (`category_id`, `card_id`, `quantity`) and an `Idempotency-Key` header. Instant products come back with status `completed` and the codes in `order.cards`; otherwise the order is `processing` and you read it later with `GET /orders/{order_id}`. Webhooks (next recipe) replace polling in production.
# 1. Gift card categories (cursor-paginated)
curl -s "https://api.fzr.cards/api/v2/giftcards?limit=50" \
-H "X-Api-Key: $FAZER_API_KEY" | jq '.items[0]'
# 2. Offers of one category: card_id, price_usd, stock
curl -s "https://api.fzr.cards/api/v2/giftcards/cards?category_id=$CATEGORY_ID" \
-H "X-Api-Key: $FAZER_API_KEY" | jq '.offers[0]'
# 3. Place the order
curl -s -X POST "https://api.fzr.cards/api/v2/giftcards/order" \
-H "X-Api-Key: $FAZER_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"category_id\":\"$CATEGORY_ID\",\"card_id\":\"$CARD_ID\",\"quantity\":1}"
# 4. Order status + codes
curl -s "https://api.fzr.cards/api/v2/orders/$ORDER_ID" \
-H "X-Api-Key: $FAZER_API_KEY" | jq '.order | {status, cards}'