---
title: "Place a shop order"
method: POST
path: "/v1/orders"
tags: ["Shop"]
---

# Place a shop order

`POST /v1/orders`

## Request

- Base URL: `https://api.nogpets.com`
- URL: `https://api.nogpets.com/v1/orders`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.nogpets.com/oauth/authorize`, token URL `https://api.nogpets.com/oauth/token`, scopes: `orders:write`)
  - HTTP bearer

Reprices, checks stock, and places the order. Card → PENDING_PAYMENT with a `payUrl`
(the order's page with a Pay button). Cash (only add-ons to the person's own cash
booking, `visit`) needs `confirm: true`.

## Request body

- OrderRequest
  - `items` OrderItem[], required
    - `productId` string, required
    - `variantId` string
    - `qty` integer, required
  - `shippingMethod` string, required
  - `postalCode` string
  - `bookingId` string
  - `discountCode` string
  - `shipTo` ShipTo
    - `line1` string, required
    - `suburb` string
    - `city` string, required
    - `province` string
    - `postalCode` string, required
    - `notes` string
  - `paymentMethod` 'CARD' | 'CASH'
  - `confirm` boolean: Cash only: true once the person said yes.

## Response `201`

The order

- OrderResult
  - `orderId` string, required
  - `number` string, required
  - `status` string, required
  - `totalCents` integer, required
  - `total` string, required
  - `payUrl` string, uri, nullable, required: The order's page; a Pay button while unpaid.
  - `next` string, required

## Other responses

- `400`: The input is wrong (`INVALID_ARGUMENT`, or a pricing code such as `ONE_PRIMARY`, `PET_TYPE`, `UNKNOWN_SERVICE`).
- `401`: No token, or it's expired or revoked. The `WWW-Authenticate` header points at the resource metadata.
- `403`: The token lacks a scope (`INSUFFICIENT_SCOPE`, with `details.scope`).
- `409`: A rule said no: `NO_COVERAGE`, `NO_AVAILABILITY`, `SLOT_TAKEN`, `TOO_LATE`, `CONFIRM_REQUIRED` (with `details.summary`), `NOTHING_TO_PAY`, `SHOP_OFF`, `STOCK`, `SHIPPING`, `DISCOUNT`, `CASH`, `FAILED_PRECONDITION`; business sign-up: `UNDER_REVIEW`, `APPROVED`, `NOT_READY`, `TOO_MANY`, `LISTING_TAKEN`, `PAYFAST_ZA_ONLY`. `NO_COVERAGE` carries `details.leadId`, `details.message` (tell the person) and `details.next`.
- `429`: Too many requests (`RATE_LIMIT`). `Retry-After` says when to try again.

---

[API](https://skmtc.dev/nogpets/apis/nogpets-api.md) · [All operations](https://skmtc.dev/nogpets/apis/nogpets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nogpets/apis/nogpets-api/revisions/a202c1012173?raw)
