> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.nowbookit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /GiftCards/cancel

> Cancel a gift card by its card number.

Cancel a gift card by its card number. Fully redeemed cards cannot be cancelled.

<ParamField header="X-API-KEY" type="string" required>Your API key</ParamField>
<ParamField header="Content-Type" type="string" required>Must be `application/json`</ParamField>

<ParamField body="cardNumber" type="string" required>Gift card number. Format: `XXXXX-XXXXXXXX-XXXX`</ParamField>

<CodeGroup>
  ```shell curl theme={null}
  curl --location --request PATCH '[BASE_URL]/GiftCards/cancel' \
  --header 'X-API-KEY: your_api_key_here' \
  --header 'Content-Type: application/json' \
  --data '{ "cardNumber": "ABCDE-12345678-WXYZ" }'
  ```
</CodeGroup>

| Status | Description                                                     |
| ------ | --------------------------------------------------------------- |
| `200`  | Card cancelled                                                  |
| `304`  | `Card {cardNumber} is cancelled.` — already cancelled           |
| `400`  | `Card: {cardNumber} is fully redeemed and cannot be cancelled.` |
| `400`  | `No Venue Subscribed to your App.`                              |
| `401`  | X-API-KEY missing or invalid                                    |
| `404`  | `CardNumber` — Card not found                                   |
| `500`  | `Failed to retrieve card details.`                              |


## OpenAPI

````yaml PATCH /GiftCards/cancel
openapi: 3.0.4
info:
  title: NowBookIt IPOS Partner API
  description: >-
    REST API for integrating your POS or external system with NowBookIt's
    reservation, sales, and gift card platform.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://ipos.dev.nowbookit.com
    description: Development
  - url: https://ipos.nowbookit.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /GiftCards/cancel:
    patch:
      tags:
        - GiftCards
      summary: Cancel Gift Card
      operationId: cancelGiftCard
      parameters:
        - name: X-API-KEY
          in: header
          description: API Key authentication header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GiftCardCancelRequest'
      responses:
        '200':
          description: OK
        '304':
          description: Not Modified
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GiftCardCancelRequest:
      required:
        - cardNumber
      type: object
      properties:
        cardNumber:
          minLength: 1
          type: string
          description: 'The Gift Card Serial Number. Format: XXXXX-XXXXXXXX-XXXX'
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````