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

# Retrieve global state

> Retrieve server sent events for global state



## OpenAPI

````yaml https://openapi.commercengine.io/ce-admin.json get /store/sse/global-state
openapi: 3.1.0
info:
  title: CE Admin APIs
  version: '1.0'
  summary: Comprehensive admin interface for managing your e-commerce platform
  description: >-
    Complete administrative API suite for Commerce Engine, providing powerful
    tools to manage products, orders, customers, inventory, analytics, and
    system configuration. Designed for administrators and backend integrations
    requiring full platform control.
  license:
    name: All Rights Reserved
    url: https://www.commercengine.io/contact-us
  contact:
    email: support@commercengine.io
    url: https://www.commercengine.io/contact-us
    name: Support
servers:
  - url: https://staging.api.commercengine.io/api/v1/{store_id}/admin
    description: Staging Server
    variables:
      store_id:
        default: store_id
        description: Store ID
  - url: https://prod.api.commercengine.io/api/v1/{store_id}/admin
    description: Prod Server
    variables:
      store_id:
        default: store_id
        description: Store ID
security:
  - Authorization: []
tags:
  - name: Analytics
    description: Analytics
  - name: Catalog
    description: Catalog
  - name: Coupons & promotions
    description: Coupons & promotions
  - name: Customers
    description: Customers
  - name: Filter Options
    description: Filter Options
  - name: Inventories
    description: Inventories
  - name: Marketplace
    description: Marketplace
  - name: Marketplace Catalog
    description: Marketplace Catalog
  - name: Media Gallery
    description: Media Gallery
  - name: Metrics
    description: Metrics
  - name: Orders
    description: Orders
  - name: Payments
    description: Payments
  - name: Payouts
    description: Payouts
  - name: POS
    description: POS
  - name: POSAdmin
    description: Admin endpoints to be used as proxy in pos
  - name: Segments
    description: Segments
  - name: Shipping
    description: Shipping
  - name: SSE
    description: SSE
  - name: Store
    description: Store
  - name: Webhooks
    description: Webhooks
paths:
  /store/sse/global-state:
    parameters: []
    get:
      tags:
        - SSE
      summary: Retrieve global state
      description: Retrieve server sent events for global state
      operationId: get-global-state
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  event_name:
                    type: string
                  data:
                    $ref: '#/components/schemas/StoreConfig'
components:
  schemas:
    StoreConfig:
      title: StoreConfig
      type: object
      properties:
        is_kyc_enabled:
          type: boolean
          default: false
        is_customer_group_enabled:
          type: boolean
          default: false
        is_loyalty_program_enabled:
          type: boolean
          default: false
        tax:
          $ref: '#/components/schemas/TaxConfig'
        shipping:
          $ref: '#/components/schemas/ShippingConfig'
        customer_groups:
          type: array
          items:
            $ref: '#/components/schemas/CustomerGroup'
          readOnly: true
        kyc_documents:
          type: array
          items:
            $ref: '#/components/schemas/KycDocumentConfig'
          readOnly: true
        brand:
          $ref: '#/components/schemas/Brand'
        subscription:
          $ref: '#/components/schemas/SubscriptionSetting'
        general:
          $ref: '#/components/schemas/StoreGeneralConfig'
        currency:
          $ref: '#/components/schemas/Currency'
          readOnly: true
        credit_line:
          $ref: '#/components/schemas/CreditLineConfig'
        payout:
          $ref: '#/components/schemas/PayoutConfig'
      x-tags:
        - Store
    TaxConfig:
      title: TaxConfig
      type: object
      properties:
        tax_type:
          enum:
            - GST
        taxable_location:
          enum:
            - shipping-address
            - billing-address
        is_product_price_include_tax:
          description: >-
            This field indicates whether the product prices, handling charges
            already include applicable taxes.


            - If set to true, the product prices are inclusive of tax, meaning
            no additional tax will be added during checkout.


            - If set to false, taxes are excluded from the listed prices and
            will be calculated and added separately at checkout.
          type: boolean
        is_shipping_price_include_tax:
          description: >-
            This field indicates whether the shipping prices already include
            applicable taxes.


            - If set to true, the shipping prices are inclusive of tax, meaning
            no additional tax will be added during checkout.


            - If set to false, taxes are excluded from the listed prices and
            will be calculated and added separately at checkout.
          type: boolean
        is_tax_apply_after_discount:
          type: boolean
        is_discount_apply_after_tax:
          type: boolean
        shipping_tax_rate:
          type: number
        handling_charge_tax_rate:
          description: >-
            This represents the tax rate percentage applied specifically to
            handling charge in shipping. A handling charge is an additional fee
            applied to cover the costs associated with preparing, packaging, and
            processing an order for shipment or delivery.
          type: number
      x-tags:
        - Store
    ShippingConfig:
      title: ShippingConfig
      type: object
      properties:
        packaging_optimisation_logic:
          description: |-
            - cost - the lowest cost of shipment
            - bins_utilization - max. utilization inside packing spaces
            - bins_number - the smallest possible number of packing spaces
          enum:
            - cost
            - bins_utilization
            - bins_number
        location_priority:
          enum:
            - manual
            - distance
            - inventory
        warehouse_id:
          description: >-
            optional. required only if location_priority = manual. Value should
            be array of warehouses ids.
          type:
            - array
            - 'null'
          items:
            type: string
        approval_option:
          default: auto
          enum:
            - auto
            - manual
        shipping_option:
          default: auto
          enum:
            - auto
            - manual
        default_weight:
          description: >-
            Specifies the default weight (in kilograms) used to calculate
            shipping costs when product packing details are missing. This value
            ensures that shipping estimates can still be generated in the
            absence of product packing information.
          type: number
      x-tags:
        - Store
    CustomerGroup:
      title: CustomerGroup
      type: object
      required:
        - name
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
          readOnly: true
        description:
          type:
            - string
            - 'null'
        is_default:
          description: first record will be treated as default if not changed.
          type: boolean
        active:
          type: boolean
          default: true
      x-tags:
        - Store
    KycDocumentConfig:
      title: KycDocumentConfig
      type: object
      required:
        - document_type
        - title
        - is_mandatory
        - is_attachment_required
        - verification_type
      properties:
        id:
          type: string
          readOnly: true
        document_type:
          enum:
            - gst
            - pan
            - other
        title:
          type: string
        description:
          type:
            - string
            - 'null'
        active:
          type: boolean
          default: true
        is_mandatory:
          type: boolean
        is_attachment_required:
          type: boolean
        verification_type:
          enum:
            - auto
            - manual
      x-tags:
        - Store
    Brand:
      title: Brand
      type: object
      properties:
        name:
          description: brand name. it will be used in emails and other communications.
          type: string
        logo_url:
          type: string
          readOnly: true
        file_id:
          description: for attaching logo image from media gallery.
          type: string
          writeOnly: true
        social_media_links:
          description: "json object having key - value pair.\r\n\r\nexample - {\"facebook\": \"www.facebook.com/commecengine\"}"
          type: object
          additionalProperties:
            type: string
      x-tags:
        - Store
    SubscriptionSetting:
      title: SubscriptionSetting
      type: object
      required:
        - charge_automatically
        - retry_and_dunning
        - pause_during_trial
        - pause_when_past_due
        - pause_indefinitely
        - skip_next_interval
      properties:
        charge_automatically:
          type: boolean
        retry_and_dunning:
          type: boolean
        retry_and_dunning_rules:
          type:
            - array
            - 'null'
          items:
            type: object
            required:
              - days
              - retry_payment
              - send_notification
            properties:
              days:
                description: days after first payment failure
                type: integer
              retry_payment:
                type: boolean
              send_notification:
                type: boolean
        retry_final_step_action:
          description: send null value for no action.
          enum:
            - mark-as-unpaid
            - cancel-subscription
        pause_during_trial:
          type: boolean
        pause_when_past_due:
          type: boolean
        pause_indefinitely:
          type: boolean
        skip_next_interval:
          type: boolean
        skip_next_interval_threshold:
          description: days before next shipment. required if skip_next_interval = true
          type: integer
          default: 0
      x-tags:
        - Store
    StoreGeneralConfig:
      title: StoreGeneralConfig
      type: object
      properties:
        order_number_prefix:
          description: >-
            Prefix prepended to generated order numbers for identification or
            branding.
          type: string
          maxLength: 4
          minLength: 2
        currency_code:
          description: >-
            ISO 4217 currency code used for store prices and payments (e.g. INR,
            USD).
          type: string
          maxLength: 3
          minLength: 3
      x-tags:
        - Store
    Currency:
      title: Currency
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        symbol:
          type: string
      x-tags:
        - Store
    CreditLineConfig:
      title: CreditLineConfig
      type: object
      required:
        - is_enabled
        - customer_eligibility
        - total_credit_limit
        - payment_method_slugs
      properties:
        is_enabled:
          description: >-
            Enables the credit line feature for the store. When `false`,
            customers cannot place orders using their credit line.
          type: boolean
          default: false
        customer_eligibility:
          description: >-
            Controls which customers can access the credit line.


            - `all` - every customer is eligible.

            - `specific` - only customers who have been individually approved
            are eligible.
          enum:
            - specific
            - all
        total_credit_limit:
          description: >-
            Default spending limit assigned to a customer when their credit line
            is approved.
          type: number
        mandate_per_order_limit:
          description: >-
            (Optional) Default upper cap on the mandate amount issued to a
            customer. Must be greater than or equal to `total_credit_limit`. If
            not provided, `total_credit_limit` will be automatically assigned as
            the mandate per order limit.
          type: number
        credit_period:
          description: >-
            Credit period in days. If not provided, the credit period will be
            automatically assigned as 21 days.
          type: number
          default: 21
        payment_method_slugs:
          description: Array of payment method slugs to be used for the credit line.
          type: array
          items:
            type: string
          writeOnly: true
        payment_methods:
          description: Payment methods to be used for the credit line.
          type: array
          items:
            $ref: '#/components/schemas/ManualPaymentMethod'
          readOnly: true
      x-tags:
        - Store
    PayoutConfig:
      title: PayoutConfig
      type: object
      required:
        - payment_option
        - payment_methods
      properties:
        payment_option:
          description: >-
            Controls how seller payouts are disbursed.


            - `auto` - payout batches are settled through the connected payment
            providers listed in `payment_methods`.


            - `manual` - payouts are settled outside the platform, so no
            provider is linked and `payment_methods` is empty.
          enum:
            - auto
            - manual
        payment_methods:
          description: >-
            Payment providers used to settle payout batches. When writing, send
            only `slug` and `is_default` for each entry; the response returns
            each fully expanded `PayoutPaymentMethod`. Send an empty array when
            `payment_option` is `manual`.
          type: array
          items:
            $ref: '#/components/schemas/PayoutPaymentMethod'
      x-tags:
        - Store
    ManualPaymentMethod:
      title: ManualPaymentMethod
      type: object
      required:
        - name
        - description
        - payment_instructions
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
        slug:
          type: string
        description:
          type: string
        used_in_credit_line:
          description: >-
            `true` when the option is linked in the store credit-line payment
            method configuration.
          type: boolean
          readOnly: true
        is_connected:
          description: Derived from `status`. `true` when `status` is `active`.
          type: boolean
          readOnly: true
        payment_instructions:
          type: string
        status:
          enum:
            - active
            - inactive
          readOnly: true
        created_at:
          type: string
          readOnly: true
        modified_at:
          type: string
          readOnly: true
      x-tags:
        - Store
    PayoutPaymentMethod:
      title: PayoutPaymentMethod
      type: object
      required:
        - slug
      properties:
        id:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        slug:
          description: >-
            Slug of the payment provider to pay out through, for example
            `juspay` or `icici-cib`. The only identifier required when writing
            the payout configuration.
          type: string
        description:
          type: string
          readOnly: true
        status:
          enum:
            - active
            - inactive
          readOnly: true
        type:
          description: >-
            `auto` for connected payment service providers; `manual` for
            store-defined payment methods.
          enum:
            - auto
            - manual
          readOnly: true
        used_in_payout:
          description: >-
            `true` when the provider is linked in the store payout
            configuration.
          type: boolean
          readOnly: true
        is_default:
          description: >-
            Marks the provider used to settle payout batches by default. Exactly
            one entry should be `true` when `payment_option` is `auto`.
          type: boolean
          default: false
        logo_dark:
          type:
            - string
            - 'null'
          readOnly: true
        logo_light:
          type:
            - string
            - 'null'
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
      x-tags:
        - Store
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````