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

# Import a gift card

> Imports a card EatNow keeps the register of: it can be redeemed in the restaurant and online at once, and EatNow never contacts its holder. `external_ref` makes the call idempotent: replaying it returns the card with `result: matched`. Requires `GIFT_CARDS_ISSUE` and the restaurant's gift cards module.



## OpenAPI

````yaml https://app.eat-now.io/api/partner/v1/openapi.json post /api/partner/v1/gift-cards
openapi: 3.0.3
info:
  title: EatNow Partner API
  version: v1
  description: >-
    Version 1 of the EatNow partner API.


    This API is designed for trusted partner integrations that need
    restaurant-scoped access to availability, reservation management, and
    operational reference data.


    Authentication

    - Use `Authorization: Bearer <token>` with a partner API token created from
    the EatNow dashboard.

    - Access is controlled by credential scopes and each request is resolved to
    a single restaurant.


    Base URL

    - The server URL in this document is the canonical base URL for the current
    environment.


    Errors

    - Endpoint errors use `error.code`, `error.message`, and `error.request_id`.
    Errors raised before the endpoint, including rate limiting, may use another
    format.

    - Validation, authentication, authorization, conflicts, and not-found cases
    all use the same top-level error shape.


    Rate limits

    - An API key may send 300 requests per minute: past that, `429 RATE_LIMITED`
    with `Retry-After`, in seconds. The partner route rule also allows 600
    requests per minute per client IP. Back off on 429. When present,
    x-ratelimit-reset is an epoch timestamp in milliseconds.


    Public endpoints

    - `GET /api/partner/v1` and `GET /api/partner/v1/openapi.json` are public.

    - All business endpoints require Bearer authentication.
servers:
  - url: https://app.eat-now.io
security: []
tags:
  - name: Meta
    description: Platform metadata and schema endpoints
  - name: Authentication
    description: Credential validation and auth context endpoints
  - name: Availability
    description: Bookable slot search and exact slot validation
  - name: Catalog
    description: Reference data for restaurant tables, rooms, prescribers, and discounts
  - name: Reservations
    description: Reservation lookup, search, update, and cancellation
  - name: Customers
    description: >-
      Customer (CRM) records, independent of reservations: list, sync, create,
      update
  - name: Activities
    description: 'Booked activities (spa, excursions…): read and incremental sync'
  - name: Activity catalog
    description: >-
      Activity products, their slots and staff: what a reseller reads before it
      books
  - name: Gift cards
    description: >-
      Import and manage your own gift cards, or check and redeem any code at a
      till
  - name: Webhooks
    description: >-
      Webhook endpoints a key subscribes to V1 events (reservations, customers,
      activities, gift cards)
  - name: Missed Calls
    description: Report missed calls and trigger WhatsApp follow-up templates
externalDocs:
  description: Integration guides, authentication, errors, and webhook reference
  url: https://docs.eat-now.io/api-reference/introduction
paths:
  /api/partner/v1/gift-cards:
    post:
      tags:
        - Gift cards
      summary: Import a gift card
      description: >-
        Imports a card EatNow keeps the register of: it can be redeemed in the
        restaurant and online at once, and EatNow never contacts its holder.
        `external_ref` makes the call idempotent: replaying it returns the card
        with `result: matched`. Requires `GIFT_CARDS_ISSUE` and the restaurant's
        gift cards module.
      operationId: createPartnerGiftCard
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PartnerApiGiftCardCreateRequest'
      responses:
        '200':
          description: Already imported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiGiftCardCreateResponse'
        '201':
          description: Card created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiGiftCardCreateResponse'
        '400':
          description: Request validation failed (see `error.details.issues`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '403':
          description: 'Scope is insufficient. Required: `GIFT_CARDS_ISSUE`.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '404':
          description: No such product or variant
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '409':
          description: >-
            `code_taken`, `ref_reused` or `wrong_currency`, in
            `error.details.reason`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '429':
          description: >-
            Rate limit exceeded: at most 300 requests per minute per API key
            (`RATE_LIMITED`, with a `Retry-After` header in seconds), and 600
            per minute per client IP for the partner route rule, whose
            middleware response may not use the PartnerApiError envelope or
            include request_id. Back off before retrying.
        '500':
          description: >-
            Unexpected server error. Preserve error.request_id for support.
            Before retrying a write, check whether it already succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
      security:
        - PartnerBearerToken: []
components:
  schemas:
    PartnerApiGiftCardCreateRequest:
      type: object
      properties:
        external_ref:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Your reference for this card, unique per application. Replaying a
            create with the same reference and the same card returns it; with
            another card, `409`.
        code:
          type: string
          minLength: 4
          maxLength: 64
          description: >-
            The code as your customers read it, kept as is. Unique within the
            restaurant, whatever its case or separators.
        type:
          type: string
          enum:
            - MONETARY
            - EXPERIENCE
          default: MONETARY
        amount:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Face value, in cents. An experience is consumed whole.
        currency:
          type: string
          minLength: 3
          maxLength: 3
          description: The restaurant's currency.
        label:
          type: string
          minLength: 1
          maxLength: 200
          description: 'Required on an experience: the name the team reads.'
        covers:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: 'Required on an experience: how many guests it covers.'
        product_id:
          type: string
          description: >-
            An experience tied to a product of the catalog can pay for it
            online. Without it, it is declared and consumed at the table.
        variant_id:
          type: string
          description: The product's variant.
        expires_on:
          type: string
          format: date
          description: 'Last valid day, at the restaurant. Omitted: it never expires.'
        holder_name:
          type: string
          minLength: 1
          maxLength: 200
      required:
        - external_ref
        - code
        - amount
        - currency
    PartnerApiGiftCardCreateResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PartnerApiGiftCard'
        result:
          type: string
          enum:
            - created
            - matched
          description: '`matched`: this reference already issued this card.'
      required:
        - data
        - result
    PartnerApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              $ref: '#/components/schemas/PartnerApiErrorCode'
            message:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties:
                nullable: true
          required:
            - code
            - message
            - request_id
      required:
        - error
    PartnerApiGiftCard:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - gift_card
        code:
          type: string
          nullable: true
          description: The whole code, for the card's issuer only; null otherwise.
        masked_code:
          type: string
          description: The code's last characters.
        external_ref:
          type: string
          nullable: true
          description: Your reference, for the card's issuer only; null otherwise.
        origin:
          type: string
          enum:
            - ONLINE
            - ON_SITE
            - EXTERNAL_API
        type:
          type: string
          enum:
            - MONETARY
            - EXPERIENCE
        status:
          type: string
          enum:
            - SCHEDULED
            - ACTIVE
            - PARTIALLY_USED
            - USED
            - EXPIRED
            - BLOCKED
            - CANCELED
          description: '`ACTIVE`, `PARTIALLY_USED` and `USED` follow the balance.'
        currency:
          type: string
        initial_amount:
          type: integer
          description: Face value, in cents.
        balance_amount:
          type: integer
          description: What is left, in cents.
        label:
          type: string
          nullable: true
          description: An experience's name.
        covers:
          type: integer
          nullable: true
          description: An experience's covers.
        expires_on:
          type: string
          nullable: true
          format: date
          description: Last valid day, at the restaurant.
        holder_name:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - object
        - code
        - masked_code
        - external_ref
        - origin
        - type
        - status
        - currency
        - initial_amount
        - balance_amount
        - label
        - covers
        - expires_on
        - holder_name
        - created_at
        - updated_at
    PartnerApiErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_AUTHENTICATION
        - INSUFFICIENT_SCOPE
        - FEATURE_NOT_ENABLED
        - RESTAURANT_SUSPENDED
        - VALIDATION_ERROR
        - RESOURCE_NOT_FOUND
        - RESOURCE_CONFLICT
        - PAYMENT_REQUIRED
        - RATE_LIMITED
        - INTERNAL_ERROR
  securitySchemes:
    PartnerBearerToken:
      type: http
      scheme: bearer
      bearerFormat: API Token
      description: >-
        Restaurant-scoped partner API token passed as `Authorization: Bearer
        <token>`.
      x-default: your_token_here

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.