> ## 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.

# Get auth context

> Validates the Bearer token and returns the authenticated restaurant and credential context. This is the quickest way for a partner to verify which restaurant and scopes a token maps to before calling business endpoints.



## OpenAPI

````yaml https://app.eat-now.io/api/partner/v1/openapi.json get /api/partner/v1/me
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

    - Errors follow a consistent envelope with `error.code`, `error.message`,
    and `error.request_id`.

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


    Rate limits

    - Partner API traffic is rate limited. Clients should treat `429` responses
    as retryable and back off accordingly.


    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: Missed Calls
    description: Report missed calls and trigger WhatsApp follow-up templates
paths:
  /api/partner/v1/me:
    get:
      tags:
        - Authentication
      summary: Get auth context
      description: >-
        Validates the Bearer token and returns the authenticated restaurant and
        credential context. This is the quickest way for a partner to verify
        which restaurant and scopes a token maps to before calling business
        endpoints.
      operationId: getPartnerCredentialContext
      responses:
        '200':
          description: Authenticated credential context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiAuthMeResponse'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
        '403':
          description: Scope is insufficient
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerApiError'
      security:
        - PartnerBearerToken: []
components:
  schemas:
    PartnerApiAuthMeResponse:
      type: object
      properties:
        version:
          type: string
          enum:
            - v1
        restaurant:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            timezone:
              type: string
          required:
            - id
            - name
            - timezone
          description: >-
            Restaurant context resolved from the authenticated partner
            credential.
        credential:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            key_prefix:
              type: string
            scopes:
              type: array
              items:
                $ref: '#/components/schemas/PartnerApiScope'
            last_used_at:
              type: string
              nullable: true
              format: date-time
            expires_at:
              type: string
              nullable: true
              format: date-time
          required:
            - id
            - name
            - key_prefix
            - scopes
            - last_used_at
            - expires_at
          description: Authenticated partner credential metadata, including granted scopes.
      required:
        - version
        - restaurant
        - credential
    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
    PartnerApiScope:
      type: string
      enum:
        - CATALOG_READ
        - AVAILABILITY_READ
        - RESERVATIONS_READ
        - RESERVATIONS_READ_SENSITIVE
        - RESERVATIONS_WRITE
        - RESERVATIONS_FORCE_INSERT
        - RESERVATIONS_FORCE_CONFIRM
        - RESERVATIONS_CANCEL
        - WEBHOOKS_WRITE
        - MISSED_CALLS_WRITE
    PartnerApiErrorCode:
      type: string
      enum:
        - AUTHENTICATION_REQUIRED
        - INVALID_AUTHENTICATION
        - INSUFFICIENT_SCOPE
        - VALIDATION_ERROR
        - RESOURCE_NOT_FOUND
        - RESOURCE_CONFLICT
        - 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

````