Skip to main content
The Place Orders pattern creates direct-fulfillment orders through the V3 orders API. A single POST /v3/orders call creates an order that Snappy fulfills and ships to the recipient — no two-step gift/claim flow required.

Prerequisites

  • API key with orders:create scope
  • A configured billing method under the ordering account
  • accountId, billingMethodId, and variantId ready

Pre-flight: validate the address

Before placing an order, run the recipient’s address through Snappy’s validation endpoint. This catches undeliverable addresses before the order is created.
JavaScript
For address autocomplete as the user types, use GET /v3/orders/addresses/autocomplete?filter[address]=...&filter[country]=US.

Place the order

The account is scoped via header, not body:
JavaScript
Python

Idempotency

The idempotencyKey (top-level field, 1–120 chars) makes retries safe. Sending the same key twice returns the original order — no duplicate, no double charge. Derive from stable identifiers:
JavaScript
Reuse the same key on all retry attempts for the same order.

Cancel an order

Orders can only be canceled before fulfillment begins. Check status on the order before attempting cancellation.

Bulk placement

For placing multiple orders (e.g., a batch send), use bounded concurrency to stay within rate limits:
JavaScript

Swag orders

Swag orders use the same POST /v3/orders endpoint but require:
  • Snappy-Account-Id header (same as standard orders)
  • A variantId from a swag product (fetched with filter[catalog]=swag)
No additional fields are needed — the swag context is inferred from the variant.

Failure table

Last modified on July 27, 2026