> ## Documentation Index
> Fetch the complete documentation index at: https://help.atlas.kitchen/llms.txt
> Use this file to discover all available pages before exploring further.

# Get channel

> Returns merchant config, outlets with service hours, referral program, and point program. Creates a new session if `X-Session-Id` is not provided.



## OpenAPI

````yaml get /channel
openapi: 3.1.0
info:
  title: Atlas Storefront API
  version: 1.0.0
  description: ''
servers:
  - url: https://api.atlas.kitchen/storefronts/v1
    description: Storefront API
security:
  - channelId: []
    sessionId: []
tags:
  - name: Introduction
    description: >
      The Atlas Storefront API powers online ordering for food and beverage
      merchants. Each merchant on Atlas operates one or more **outlets**
      (physical locations), each with its own menus, service hours, delivery
      zones, and payment processing.


      This API lets you build a complete ordering experience on top of Atlas:


      - **Browse** a merchant's menus with sections, items, modifiers, and
      real-time stock

      - **Build** a cart with configurable items, promo codes, and loyalty
      points

      - **Pay** via a hosted payment page with real-time confirmation

      - **Confirm** orders with a single API call after payment


      ### How it works


      Every merchant has a **channel** — a unique identifier representing their
      storefront (website, app, kiosk, etc.). The channel determines which
      outlets, menus, and branding the diner sees. You receive a channel ID when
      a merchant is onboarded.


      The API is stateless from your perspective. You pass the channel ID, the
      API gives you a session, and from there you can browse menus, build a
      cart, and check out — all without user accounts or login.


      ### Conventions


      **Monetary values** — All monetary fields (`price_cents`, `subtotal`,
      `total`, `tax`, `delivery_fee`, etc.) are integers in **minor currency
      units** (e.g. cents). `1580` = $15.80 SGD.


      **Timeslots** — Time values (`timeslot_start`, `timeslot_end`,
      `service_start`, `service_end`) are in **seconds since midnight**. `36000`
      = 10:00 AM.


      **Errors** — All errors follow a consistent structure:

      ```json

      {
        "type": "Invalid Parameter",
        "message": "Human-readable description",
        "details": [
          { "field": "item_id", "message": "must exist" }
        ]
      }

      ```
  - name: Authentication
    description: >
      ### Channel ID


      Every request must include an `X-Channel-Id` header. This identifies which
      merchant's storefront you're accessing — it determines the outlets, menus,
      branding, and payment configuration the diner sees.


      You receive the channel ID when a merchant is onboarded to Atlas. It is a
      fixed identifier, not a secret.


      ### Sessions


      The API automatically creates a session on your first request and returns
      it in the `X-Session-Id` response header. This session tracks the diner's
      cart.


      ```bash

      # First request — only X-Channel-Id needed

      curl -sD - https://api.example.com/storefronts/v1/channel \
        -H "X-Channel-Id: your-channel-id"
      ```


      ```

      # Response header — save this

      X-Session-Id: b7ac755d301dc5d23c790ccd7bb6dadf

      ```


      Include both headers on all subsequent requests:


      | Header | What it is | Where it comes from |

      |--------|-----------|-------------------|

      | `X-Channel-Id` | Merchant's storefront identifier | Provided during
      onboarding |

      | `X-Session-Id` | Diner's session (tracks cart) | Auto-created, returned
      in first response header |


      Sessions are lightweight — they hold a reference to the diner's active
      cart. When an order is placed, the session gets a new empty cart
      automatically.
  - name: Checkout Flow
    description: >
      The complete ordering flow from menu to confirmed order:


      <img src="/checkout-flow.svg" alt="Checkout Flow"
      style="width:100%;max-width:100%" />


      ### After payment


      Once the diner completes payment on the hosted page and is redirected back
      to your app, call `POST /cart/order`.


      This endpoint validates the payment **in real-time** — it makes a
      synchronous call to the payment processor to check status. It does **not**
      depend on webhooks.


      - **Payment succeeded** → cart converts to a confirmed order, full order
      object returned

      - **Payment not completed** → `422` with `"Insufficient payment made to
      the cart"`


      No polling needed. No webhook waiting. Just one call.
  - name: Channel
    description: >
      Retrieve merchant configuration, outlet details, service hours, delivery
      fees, and content (announcements, banners, popups).


      Start here — `GET /channel` gives you the outlets you can order from,
      including their coordinates, service hours, and delivery fee structure.
  - name: Menu
    description: >
      Browse menus for a specific outlet and serving date. Returns the full
      catalog: sections, items with prices, configurable items with modifier
      groups, stock levels, timeslots, and availability.


      ### How menus are structured


      ```

      Menu

      ├── sections[]           → categories (Mains, Sides, Drinks)

      │   ├── products[]       → item IDs + display_order

      │   └── sub_sections[]   → nested categories

      └── products{}           → full item details keyed by ID
          ├── price_cents
          ├── is_configurable
          └── item_modifier_groups[]  → modifier groups with options
      ```


      Use `sections[].products[].id` to look up full item details in the
      `products{}` map.
  - name: Cart
    description: >
      Manage the shopping cart — create, configure, add/remove items, apply
      promos, and review pricing.


      ### Cart lifecycle


      1. `POST /cart` — create empty cart

      2. `PATCH /cart` — set outlet, fulfilment type, timeslot, contact details

      3. `POST /cart/items` — add items (with optional modifiers via
      `sub_items`)

      4. `GET /cart/payment_breakdown` — review subtotal, tax, fees, discounts

      5. `POST /cart/validation` — verify cart is ready for checkout


      ### Adding items with modifiers


      For configurable items (`is_configurable: true`), pass modifiers as
      `sub_items`:


      ```json

      {
        "item_id": 1,
        "quantity": 2,
        "sub_items": [
          {
            "item_id": 2,
            "modifier_id": 1,
            "item_modifier_group_id": 1,
            "quantity": 1
          }
        ]
      }

      ```


      Get `modifier_id` and `item_modifier_group_id` from the menu's
      `item_modifier_groups`.
  - name: Payment
    description: >
      Create a payment intent to generate a hosted payment page URL.


      ### Flow


      1. Call `POST /payment_intents` → receive `atlas_pay_url`

      2. Redirect the diner to `atlas_pay_url`

      3. Diner enters payment details and pays

      4. Diner is redirected back to your app

      5. Call `POST /cart/order` to confirm (see **Order**)


      If a pending payment intent already exists for the same cart amount, the
      existing one is returned instead of creating a duplicate.
  - name: Order
    description: >
      Convert a paid cart into a confirmed order.


      Call `POST /cart/order` after the diner completes payment. This endpoint:


      1. Validates the cart (items, timeslot, minimum order)

      2. Checks payment status **in real-time** against the payment processor

      3. Converts the cart to a confirmed order


      On success, returns the full order object. The session automatically gets
      a fresh empty cart for the next order.


      If called before payment completes, returns `422` with a clear error
      message.
paths:
  /channel:
    get:
      tags:
        - Channel
      summary: Get channel
      description: >-
        Returns merchant config, outlets with service hours, referral program,
        and point program. Creates a new session if `X-Session-Id` is not
        provided.
      operationId: getChannel
      responses:
        '200':
          description: Channel configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelResponse'
              example:
                config:
                  country: SG
                  tax_rates:
                    default: 0
                  currency: SGD
                  features:
                    use_dish_notes_on_item: false
                    hide_cutlery_required: false
                    show_language_selector: false
                    push_disabled_sections_to_bottom: false
                  tax_inclusive_prices: false
                  time_zone: Asia/Singapore
                  ui_definitions: []
                outlets:
                  - id: 1
                    name: Aviato Burger - McNair
                    description: Aviato Burger at 51 McNair Road
                    uen: T09LL0001B
                    address: 51 McNair Rd, Singapore
                    postal_code: '328539'
                    contact_number: '+6598871122'
                    coordinates:
                      longitude: 103.858
                      latitude: 1.32
                    general_service_hours:
                      delivery:
                        - day_of_week: 0
                          closed: false
                          service_hours:
                            - name: Lunch Service
                              service_start: 32400
                              service_end: 50400
                              lead_time: 3600
                              service_range: 9:00AM–2:00PM
                            - name: Dinner Service
                              service_start: 57600
                              service_end: 79200
                              lead_time: 3600
                              service_range: 4:00PM–10:00PM
                      pickup:
                        - day_of_week: 0
                          closed: false
                          service_hours:
                            - name: Lunch Service
                              service_start: 32400
                              service_end: 50400
                              lead_time: 3600
                              service_range: 9:00AM–2:00PM
                    special_hours: []
                    delivery_fee_config: null
                referral: null
                point_program: null
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - channelId: []
components:
  schemas:
    ChannelResponse:
      type: object
      properties:
        config:
          $ref: '#/components/schemas/MerchantConfig'
        outlets:
          type: array
          items:
            $ref: '#/components/schemas/Outlet'
        referral:
          $ref: '#/components/schemas/Referral'
        point_program:
          $ref: '#/components/schemas/PointProgram'
    MerchantConfig:
      type: object
      properties:
        country:
          type: string
          example: SG
        currency:
          type: string
          example: SGD
        time_zone:
          type: string
          example: Asia/Singapore
        tax_rates:
          type: object
          additionalProperties:
            type: number
          example:
            default: 0
        tax_inclusive_prices:
          type: boolean
          example: false
        features:
          type: object
          properties:
            use_dish_notes_on_item:
              type: boolean
              example: false
            hide_cutlery_required:
              type: boolean
              example: false
            show_language_selector:
              type: boolean
              example: false
            push_disabled_sections_to_bottom:
              type: boolean
              example: false
        ui_definitions:
          type: array
          items:
            type: object
          example: []
    Outlet:
      type: object
      properties:
        id:
          type: integer
          example: 1
        name:
          type: string
          example: Aviato Burger - McNair
        description:
          type: string
          example: Aviato Burger at 51 McNair Road
        uen:
          type: string
          example: T09LL0001B
        address:
          type: string
          example: 51 McNair Rd, Singapore
        postal_code:
          type: string
          example: '328539'
        contact_number:
          type: string
          example: '+6598871122'
        coordinates:
          type: object
          properties:
            longitude:
              type: number
              format: double
              example: 103.858
            latitude:
              type: number
              format: double
              example: 1.32
        delivery_fee_config:
          $ref: '#/components/schemas/DeliveryFeeConfig'
        general_service_hours:
          $ref: '#/components/schemas/ServiceHoursByFulfilment'
        special_hours:
          type: array
          items:
            $ref: '#/components/schemas/SpecialHours'
          example: []
    Referral:
      type: object
      nullable: true
      properties:
        id:
          type: integer
        label:
          type: string
        sidebar_label:
          type: string
        description:
          type: string
        short_description:
          type: string
        terms:
          type: string
    PointProgram:
      type: object
      nullable: true
      properties:
        label:
          type: string
        is_custom_currency:
          type: boolean
        currency_value_in_cents:
          type: integer
        currency_names:
          type: object
        colors:
          type: object
        currency_icon_url:
          type: string
        banner_image_url:
          type: string
        outlets:
          type: array
          items:
            type: integer
    Error:
      type: object
      properties:
        type:
          type: string
          example: Invalid Parameter
        message:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
    DeliveryFeeConfig:
      type: object
      properties:
        base_distance:
          type: number
        base_rate:
          type: integer
        per_km_rate:
          type: integer
        delivery_fee_waiver_cart_value:
          type: integer
        tiers:
          type: array
          items:
            type: object
            properties:
              base_distance:
                type: number
              max_distance:
                type: number
              base_rate:
                type: integer
              per_km_rate:
                type: integer
        subsidy_tiers:
          type: array
          items:
            type: object
            properties:
              subsidy_value:
                type: integer
              subsidy_value_type:
                type: string
                enum:
                  - PERCENTAGE
                  - FIXED_AMOUNT
              minimum_order_value:
                type: integer
              maximum_order_value:
                type: integer
    ServiceHoursByFulfilment:
      type: object
      properties:
        delivery:
          type: array
          items:
            $ref: '#/components/schemas/DayServiceHours'
        pickup:
          type: array
          items:
            $ref: '#/components/schemas/DayServiceHours'
    SpecialHours:
      type: object
      properties:
        name:
          type: string
        message:
          type: string
        closed:
          type: boolean
        as_usual_hours:
          type: boolean
        start_date:
          type: string
          format: date
        end_date:
          type: string
          format: date
        service_hours:
          type: array
          items:
            $ref: '#/components/schemas/ServiceHour'
    DayServiceHours:
      type: object
      properties:
        day_of_week:
          type: integer
          description: 0 = Sunday, 6 = Saturday
          example: 0
        closed:
          type: boolean
          example: false
        message:
          type: string
          nullable: true
        service_hours:
          type: array
          items:
            $ref: '#/components/schemas/ServiceHour'
    ServiceHour:
      type: object
      properties:
        name:
          type: string
          example: Lunch Service
        service_start:
          type: integer
          description: Seconds since midnight
          example: 32400
        service_end:
          type: integer
          description: Seconds since midnight
          example: 50400
        service_range:
          type: string
          example: 9:00AM–2:00PM
        lead_time:
          type: integer
          description: Seconds
          example: 3600
        timeslots:
          type: array
          items:
            $ref: '#/components/schemas/Timeslot'
    Timeslot:
      type: object
      properties:
        type:
          type: string
          enum:
            - asap
            - available_timeslots
          example: available_timeslots
        seconds_start:
          type: integer
          example: 34200
        seconds_end:
          type: integer
          example: 36000
        range:
          type: string
          example: 9:30AM–10:00AM
        available_before:
          type: integer
          description: Unix timestamp
          example: 1776384000
        available_from:
          type: integer
          description: Unix timestamp
          example: 1775145600
  responses:
    Unauthorized:
      description: Missing or invalid X-Channel-Id or X-Session-Id
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    channelId:
      type: apiKey
      in: header
      name: X-Channel-Id
      description: Merchant storefront identifier. Provided during onboarding.
    sessionId:
      type: apiKey
      in: header
      name: X-Session-Id
      description: >-
        Diner session identifier. Created by `GET /channel` and returned in the
        `X-Session-Id` response header.

````