---
title: "Edit Offer"
method: PATCH
path: "/api/v1/commerce/offers/{code}"
tags: ["commerce", "commerce"]
---

# Edit Offer

`PATCH /api/v1/commerce/offers/{code}`

## Request

- Base URL: `https://app.goodleads.club` (the document declares no server; this is the origin it was published from)
- URL: `https://app.goodleads.club/api/v1/commerce/offers/{code}`
- Auth: API key in header `X-API-Key`

Extend, shorten, re-cap, bind or annotate a code. Null clears; absent keeps.

## Path parameters

- `code` string, required

## Request body

- OfferPatch: Change the terms. A field sent as null CLEARS it (an uncapped, open-ended or unbound code); a field left out is untouched. `unit_cents` is not editable — a different price is a different deal, so mint a new code.
  - `cap_records` integer, nullable
  - `cap_cents` integer, nullable
  - `bound_email` string, nullable
  - `expires_at` string, date-time, nullable
  - `expires_in_days` integer, nullable
  - `note` string, nullable

## Response `200`

Successful Response

- OfferRow
  - `code` string, required
  - `unit_cents` integer, required
  - `status` string, required
  - `rule` string, required
  - `cap_records` integer, nullable, required
  - `cap_cents` integer, nullable, required
  - `remaining_records` integer, nullable, required
  - `remaining_cents` integer, nullable, required
  - `redeemed_records` integer, required
  - `redeemed_cents` integer, required
  - `bound_email` string, nullable, required
  - `expires_at` string, date-time, nullable, required
  - `revoked_at` string, date-time, nullable, required
  - `note` string, nullable, required
  - `created_at` string, date-time, nullable, required
  - `orders` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodleads/apis/formation-gtm-api.md) · [All operations](https://skmtc.dev/goodleads/apis/formation-gtm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodleads/apis/formation-gtm-api/revisions/2068d13a82cf?raw)
