Orders

Invalidate Gift Card

Changed on

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.

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

Response

The gift card was invalidated.

Example response

{
  "data": {
    "id": 2668662,
    "status": "In Transit",
    "delivery_date": "2025-09-15",
    "failure": "USPS lists address as 'no-stat' - address is unlikely to receive mail.",
    "recipient": {
      "name": "Tobias Example",
      "company": "thanks.io",
      "address": "12345 Main Street",
      "address2": "Apartment 1",
      "city": "Any Town",
      "province": "KS",
      "postal_code": "12345",
      "country": "US",
      "email": "tobias@example.com",
      "phone": "5555555555",
      "custom1": "Unique Info",
      "custom2": "For example a product code or customer ID",
      "absentee_address": "742 Evergreen Terrace, Springfield, IL 62704"
    },
    "giftcard": {
      "brand": "amazonus",
      "amount": 2500
    },
    "preview": {
      "front": "https://cdn.thanks.io/orders/items/proofs/front-example.png",
      "back": "https://cdn.thanks.io/orders/items/proofs/back-example.png"
    },
    "created_at": "2025-09-08T16:05:12.000000Z"
  }
}

Changes

    • info

      added the optional property // to the response with the status

    • warning

      removed the optional property // from the response with the status