Big Commerce Current Customer

BigCommerce Current Customer is a leading e-commerce platform that enables businesses to create and manage online stores. With a range of customizable templates and powerful features, customers can easily set up their online storefronts, upload products, process payments, and track sales and analytics. The platform also offers marketing tools, integration options with popular third-party apps, and 24/7 customer support to help businesses succeed in the competitive online marketplace.

OpenAPI Specification

current-customer-openapi-original.yml Raw ↑
openapi: 3.0.1
info:
  title: BigCommerce Current Customer
  description: >-
    Identify logged-in customers securely via JavaScript.


    [Learn more about the current customer
    API](/docs/start/authentication/current-customer).


    For info about API accounts, see our [Guide to API
    Accounts](/docs/start/authentication/api-accounts).
        
    For info about authenticating BigCommerce APIs, see [Authentication and
    Example Requests](/docs/start/authentication#client-id).


    > #### Note

    > * Substitute your storefront domain for `yourstore.example.com`. 

    > * The Send a Test Request feature is not currently supported for this
    endpoint.
  version: ''
servers:
  - url: https://{store_domain}
    variables:
      store_domain:
        default: your_store.example.com
        description: >-
          The [URL
          authority](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#authority)
          of the storefront.
tags:
  - name: Current Customers
paths:
  /customer/current.jwt:
    get:
      tags:
        - Current Customers
      summary: BigCommerce Get Current Customer
      description: >-
        Identify logged-in customers securely via JavaScript.


        > #### Note

        > The Send a Test Request feature is not currently supported for this
        endpoint.
      operationId: getCurrentCustomer
      parameters:
        - name: app_client_id
          in: query
          required: true
          description: >-
            This is your applicationʼs client ID, which is obtained during
            application registration in the Developer Portal.
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  customer:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique numeric ID of the customer.
                        example: 4927
                      email:
                        type: string
                        description: Email address of the customer.
                        example: [email protected]
                      group_id:
                        type: string
                        description: The group to which the customer belongs.
                        example: '"6"'
                  iss:
                    type: string
                    description: Indicates the token’s issuer.
                    example: '"bc/apps"'
                  sub:
                    type: string
                    description: The subject of the JWT - same as `store_hash`.
                    example: '"abc123"'
                  iat:
                    type: integer
                    description: >-
                      Time when the token was issued. This is a numeric value
                      indicating the number of seconds since the [Unix
                      epoch](https://en.wikipedia.org/wiki/Unix_time).
                    example: 1480831863
                  exp:
                    type: integer
                    description: >-
                      Time when the token expires. The token usually expires
                      after 15 minutes. This is a numeric value indicating the
                      number of seconds since the [Unix
                      epoch](https://en.wikipedia.org/wiki/Unix_time).
                    example: 1480832763
                  version:
                    type: integer
                    description: Version of the Current Customer JWT
                    example: 1
                  aud:
                    type: string
                    description: >-
                      The "aud" (audience) claim identifies the recipients that
                      the JWT is intended for. This should match the *App Client
                      ID* and the `application_id`.
                    example: '"6sv16tfx3j5gsopm42ss5dd67g2srvq"'
                  application_id:
                    type: string
                    example: '"6sv16tasdgr2b5hs5dd67g2srvq"'
                    description: The client ID created when the token was generated.
                  store_hash:
                    type: string
                    description: The store’s unique identifier on the BigCommerce platform.
                  operation:
                    type: string
                    description: Must contain the string “current_customer”.
                    example: '"current_customer"'
              example:
                customer:
                  id: 4927
                  email: [email protected]
                  group_id: '6'
                iss: bc/apps
                sub: abc123
                iat: 1480831863
                exp: 1480832763
                version: 1
                aud: 6sv16tfx3j5gsopm42ss5dd67g2srvq
                application_id: 6sv16tasdgr2b5hs5dd67g2srvq
                store_hash: abc123
                operation: current_customer
components: {}