ShopGo Authentication API

Obtain and test API keys

OpenAPI Specification

shopgo-authentication-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ShopGo Management Authentication API
  version: 1.1.0
  description: 'The ShopGo Management API exposes store setup and administration capabilities equivalent to the functions available through the ShopGo (Makane) merchant dashboard: order, payment, shipment, user, tenant and store-settings management for the MENA eCommerce SaaS platform. All requests and responses use application/json and are wrapped in a result/payload envelope. Authentication is via a dashboard user API key (X-API-KEY header) or a platform master key. This OpenAPI was faithfully generated by the API Evangelist enrichment pipeline from the provider''s published documentation at https://docs.shopgo.me — ShopGo does not publish a machine-readable spec.'
  contact:
    name: ShopGo (Makane)
    url: https://docs.shopgo.me
  x-generated-by: api-evangelist-enrichment
  x-generated-method: generated
  x-source: https://docs.shopgo.me/llms.txt
servers:
- url: https://api.shopgo.me
  description: Production
security:
- UserApiKey: []
tags:
- name: Authentication
  description: Obtain and test API keys
paths:
  /v1/management/auth/key:
    post:
      operationId: retrieveUserApiKey
      tags:
      - Authentication
      summary: Retrieve user API key
      description: Retrieve the API key of a dashboard user by email and password.
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                password:
                  type: string
              required:
              - email
              - password
      responses:
        '200':
          description: API key issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: success
                  payload:
                    type: object
                    properties:
                      api_key:
                        type: string
                      user_id:
                        type: string
                      tenant_id:
                        type: string
                      tenant:
                        $ref: '#/components/schemas/Tenant'
                      user:
                        $ref: '#/components/schemas/DashboardUser'
        '401':
          $ref: '#/components/responses/Error'
  /v1/management/auth/test:
    get:
      operationId: testAuthentication
      tags:
      - Authentication
      summary: Test authentication
      description: Test that an API key authenticates successfully.
      responses:
        '200':
          $ref: '#/components/responses/Success'
        '401':
          $ref: '#/components/responses/Error'
  /v1/platform/auth/test:
    get:
      operationId: testPlatformKey
      tags:
      - Authentication
      summary: Test platform API key
      responses:
        '200':
          description: Key valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: string
                    example: success
                  payload:
                    type: object
        '401':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Error:
      type: object
      description: Error envelope returned on non-2xx responses.
      properties:
        result:
          type: string
          example: error
        description:
          type: string
          description: explanation of what went wrong
    Tenant:
      type: object
      description: A ShopGo tenant (store) account.
    DashboardUser:
      type: object
      description: A ShopGo dashboard user (store owner or staff member).
  responses:
    Success:
      description: Successful operation
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                type: string
                example: success
              payload:
                type: object
    Error:
      description: Error (custom result/description envelope)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    UserApiKey:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Dashboard user API key (or platform master key)
    PlatformTenant:
      type: apiKey
      in: header
      name: X-TENANT-ID
      description: Target tenant identifier, required only when authenticating with a platform master key. X-TENANT-NAME may be used instead.