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

# Get session shop info

> Get "Your shop API" information for a session: the shop customer matching the contact's email and their last 5
orders, plus returns waiting for a teammate. Empty when no shop API is connected.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /sessions/{sessionId}/shop
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /sessions/{sessionId}/shop:
    get:
      tags:
        - Session
      summary: Get session shop info
      description: >-
        Get "Your shop API" information for a session: the shop customer
        matching the contact's email and their last 5

        orders, plus returns waiting for a teammate. Empty when no shop API is
        connected.
      operationId: FindSessionShopInfo
      parameters:
        - in: path
          name: sessionId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CommercePanel'
                  - $ref: '#/components/schemas/Record_string.any_'
      security:
        - jwt: []
components:
  schemas:
    CommercePanel:
      properties:
        provider:
          $ref: '#/components/schemas/CommerceProviderKey'
        label:
          type: string
        customer:
          properties:
            adminUrl:
              type: string
            since:
              type: string
            totalSpent:
              type: string
            ordersCount:
              type: number
              format: double
            email:
              type: string
            name:
              type: string
          type: object
          nullable: true
        orders:
          items:
            $ref: '#/components/schemas/CommercePanelOrder'
          type: array
        pendingReturns:
          items:
            properties:
              expiresAt:
                type: string
                format: date-time
              createdAt:
                type: string
                format: date-time
              requestedBy:
                type: string
              summary:
                type: string
              id:
                type: string
            required:
              - expiresAt
              - createdAt
              - requestedBy
              - summary
              - id
            type: object
          type: array
        error:
          type: string
      required:
        - provider
        - label
        - customer
        - orders
        - pendingReturns
      type: object
      additionalProperties: false
    Record_string.any_:
      properties: {}
      type: object
      description: Construct a type with a set of properties K of type T
    CommerceProviderKey:
      type: string
      enum:
        - custom
        - woocommerce
        - shopify
    CommercePanelOrder:
      properties:
        id:
          type: string
        number:
          type: string
        status:
          type: string
        statusTone:
          type: string
        date:
          type: string
        total:
          type: string
        items:
          type: number
          format: double
        carrier:
          type: string
        trackingNumber:
          type: string
        trackingUrl:
          type: string
        adminUrl:
          type: string
        lines:
          items:
            $ref: '#/components/schemas/ReturnType_typeofpanelLineOf_'
          type: array
          description: >-
            Shopify panel (the Gleap Shopify app): lines, totals, returns and
            the actions a teammate may run.
        subtotal:
          type: string
        shippingTotal:
          type: string
        discountTotal:
          type: string
        statusUrl:
          type: string
        returns:
          items:
            properties:
              status:
                type: string
              name:
                type: string
            required:
              - status
            type: object
          type: array
        ownership:
          $ref: '#/components/schemas/OrderOwnership'
          description: >-
            How the order is tied to the contact: the signed-in Shopify
            customer, or the contact's email.
        actions:
          items:
            $ref: '#/components/schemas/OrderAction'
          type: array
      required:
        - id
        - number
        - status
        - statusTone
        - items
      type: object
      additionalProperties: false
    ReturnType_typeofpanelLineOf_:
      properties:
        variantId:
          type: string
        price:
          type: string
        image:
          type: string
        quantity:
          type: number
          format: double
        variant:
          type: string
        title:
          type: string
        id:
          type: string
      required:
        - variantId
        - price
        - image
        - quantity
        - variant
        - title
        - id
      type: object
      description: Obtain the return type of a function type
    OrderOwnership:
      type: string
      enum:
        - verified
        - email
        - none
    OrderAction:
      type: string
      enum:
        - refund
        - cancel_order
        - create_return
        - update_shipping_address
        - send_status_link
        - send_discount
        - send_cart_link
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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