---
title: "Invalidate Gift Card"
method: PUT
path: "/order-items/{orderItemId}/invalidate-giftcard"
tags: ["Orders"]
---

# Invalidate Gift Card

`PUT /order-items/{orderItemId}/invalidate-giftcard`

## Request

- Base URL: `https://api.thanks.io/api/v2`
- URL: `https://api.thanks.io/api/v2/order-items/{orderItemId}/invalidate-giftcard`
- Auth: HTTP bearer

Invalidate the gift card on a mailed piece so it can no longer be redeemed, for example when a card was sent by mistake. This does the same as the **Invalidate** button on the Order Details page, and it can't be undone. `PATCH` is accepted as well as `PUT`.

Only an unredeemed card that hasn't already been invalidated can be invalidated. The order must belong to the authenticated account.

The response is the updated order item, in the same shape as List Order Items. The redemption code, claim link and rendered card image are never returned.

## Response `200`

The gift card was invalidated.

- object
  - `data` OrderItem: A single mail piece within an order — one recipient's postcard, letter, notecard, magnacard or gift card.
    - `id` integer: ID of the order item. This is the same identifier carried by order item webhook events.
    - `status` 'Processing' | 'Printed' | 'In Transit' | 'In Local Area' | 'Processed for Delivery' | 'Delivered' | 'Re-routed' | 'Returned to Sender' | 'Failed': Current delivery status of this piece.
    - `delivery_date` string, date, nullable: Date the piece was delivered, or `null` if it has not been delivered yet.
    - `scans` integer: Number of times this piece's QR code has been scanned.
    - `failure` string, nullable: Reason the piece could not be mailed or delivered, or `null` if there was no failure.
    - `recipient` object: Recipient details as submitted with the order — the mailing address plus the ten custom fields.
      - `name` string, nullable
      - `company` string, nullable
      - `address` string, nullable
      - `address2` string, nullable
      - `city` string, nullable
      - `province` string, nullable: State or Province
      - `postal_code` string, nullable
      - `country` string, nullable
      - `email` string, nullable
      - `phone` string, nullable
      - `custom1` string, nullable: Custom field 1 as submitted with the order.
      - `custom2` string, nullable: Custom field 2 as submitted with the order.
      - `custom3` string, nullable: Custom field 3 as submitted with the order.
      - `custom4` string, nullable: Custom field 4 as submitted with the order.
      - `custom5` string, nullable: Custom field 5 as submitted with the order.
      - `custom6` string, nullable: Custom field 6 as submitted with the order.
      - `custom7` string, nullable: Custom field 7 as submitted with the order.
      - `custom8` string, nullable: Custom field 8 as submitted with the order.
      - `custom9` string, nullable: Custom field 9 as submitted with the order.
      - `custom10` string, nullable: Custom field 10 as submitted with the order.
      - `absentee_address` string, nullable: The absentee (property) address as it was when this piece was sent, or null. Mail was delivered to `address`.
    - `giftcard` object, nullable: Present only on gift card orders. `null` when the gift card for this piece has not been issued yet. The redemption code, claim link and rendered card image are never returned.
      - `brand` string: Brand code of the gift card.
      - `amount` integer: Face value of the gift card in cents.
      - `redeemed_at` string, date-time, nullable: When the recipient redeemed the gift card, or `null` if it has not been redeemed.
      - `invalidated_at` string, date-time, nullable: When the gift card was invalidated, or `null` if it has not been. An invalidated gift card can no longer be redeemed.
    - `preview` object: The rendered proof of this recipient's piece, personalized with their name, address and custom fields. Each value is `null` until the piece has been rendered, which happens shortly after the order is placed, and stays `null` for a piece that failed before rendering. Absent on gift card orders: the rendered card carries the redemption code, so it is never returned.
      - `front` string, uri, nullable: Image of the front of the piece. For a letter or windowless letter, the first page.
      - `back` string, uri, nullable: Image of the back of the piece. Postcards and magnacards only; `null` for other mailer types.
      - `pdf` string, uri, nullable: PDF proof of the full piece. Letters, windowless letters and notecards only; `null` for other mailer types.
    - `created_at` string, date-time

## Other responses

- `401`: The access token is missing or invalid, or the order belongs to another account.
- `404`: Resource not found
- `422`: The gift card can't be invalidated: it was already redeemed or invalidated, the item isn't on a gift card order, or the item has no gift card.

## Changes

- **2026-10-19** `bbe02ffe74f3`: 1 info
  - added the optional property `data/recipient/absentee_address` to the response with the `200` status
- **2026-10-18** `c10cfeb34552`: 1 warning
  - removed the optional property `data/recipient/absentee_address` from the response with the `200` status
- **2026-10-17** `10023a95b079`: 1 info
  - added the optional property `data/recipient/absentee_address` to the response with the `200` status
- **2026-10-09** `c76fc453c7ca`: 1 info
  - added the optional property `data/preview` to the response with the `200` status
- **2026-09-28** `f2de8d244db2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/thanks-io/apis/thanks-io-api/changes/order-items/:orderItemId/invalidate-giftcard/put.md)

---

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