---
openapi: 3.0.1
info:
  title: Howmuch Store Admin API
  version: v1
  description: API documentation for Howmuch store admin application
  contact:
    name: Howmuch API Support
    email: support@howmuchpos.com
paths:
  "/shop_admin/activities":
    get:
      summary: List activities
      tags:
      - Activities
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: activities retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  activities:
                    type: array
                    items:
                      type: object
                      properties:
                        trackable_id:
                          type: integer
                        type:
                          type: string
                        action:
                          type: string
                        store_name:
                          type: string
                          nullable: true
                        user_name:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '302':
          description: redirect to login for unauthorized
  "/shop_admin/announcements/{announcement_id}/announcement_rules":
    parameters:
    - name: announcement_id
      in: path
      required: true
      description: Announcement ID
      schema:
        type: integer
    post:
      summary: Create an announcement rule
      tags:
      - Announcement Rules
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: announcement rule created
        '422':
          description: invalid announcement rule
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                announcement_rule:
                  type: object
                  properties:
                    type:
                      type: string
                      example: Spree::Announcement::Rules::GeoRadius
                    code:
                      type: string
                      example: GEO123
                    preferences:
                      type: object
                      example:
                        point: '{"lat":24.86,"lng":67.01}'
                        radius: 10
                  required:
                  - type
  "/shop_admin/announcements/{announcement_id}/announcement_rules/{id}":
    parameters:
    - name: announcement_id
      in: path
      required: true
      description: Announcement ID
      schema:
        type: integer
    - name: id
      in: path
      required: true
      description: Announcement Rule ID
      schema:
        type: integer
    delete:
      summary: Delete an announcement rule
      tags:
      - Announcement Rules
      security:
      - bearerAuth: []
      responses:
        '204':
          description: announcement rule deleted
        '404':
          description: announcement rule not found
        '401':
          description: unauthorized
  "/shop_admin/announcements":
    get:
      summary: List announcements
      tags:
      - Announcements
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      - name: status
        in: query
        required: false
        description: Filter by status
        schema:
          type: string
      responses:
        '200':
          description: announcements retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  announcements:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        title:
                          type: string
                          nullable: true
                        message:
                          type: string
                        status:
                          type: string
                          nullable: true
                        run_at:
                          type: string
                          format: date-time
                          nullable: true
                        announcement_type:
                          type: string
                          nullable: true
                        user_id:
                          type: integer
                          nullable: true
                        sidekiq_id:
                          type: integer
                          nullable: true
                        translations:
                          type: object
                          nullable: true
                        created_at:
                          type: string
                          format: date-time
                          nullable: true
                        updated_at:
                          type: string
                          format: date-time
                          nullable: true
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
    post:
      summary: Create an announcement
      tags:
      - Announcements
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: announcement created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                    nullable: true
                  message:
                    type: string
                  status:
                    type: string
                    nullable: true
                  run_at:
                    type: string
                    format: date-time
                    nullable: true
                  announcement_type:
                    type: string
                    nullable: true
                  user_id:
                    type: integer
                    nullable: true
                  sidekiq_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
                    nullable: true
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                announcement:
                  type: object
                  properties:
                    message:
                      type: string
                    store_ids:
                      type: array
                      items:
                        type: integer
                  required:
                  - message
  "/shop_admin/announcements/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Announcement ID
      schema:
        type: integer
    get:
      summary: Get an announcement
      tags:
      - Announcements
      security:
      - bearerAuth: []
      responses:
        '200':
          description: announcement retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                    nullable: true
                  message:
                    type: string
                  status:
                    type: string
                    nullable: true
                  run_at:
                    type: string
                    format: date-time
                    nullable: true
                  announcement_type:
                    type: string
                    nullable: true
                  user_id:
                    type: integer
                    nullable: true
                  sidekiq_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
                    nullable: true
        '404':
          description: announcement not found
        '401':
          description: unauthorized
    put:
      summary: Update an announcement
      tags:
      - Announcements
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: announcement updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                    nullable: true
                  message:
                    type: string
                  status:
                    type: string
                    nullable: true
                  run_at:
                    type: string
                    format: date-time
                    nullable: true
                  announcement_type:
                    type: string
                    nullable: true
                  user_id:
                    type: integer
                    nullable: true
                  sidekiq_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
                    nullable: true
        '404':
          description: announcement not found
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                announcement:
                  type: object
                  properties:
                    title:
                      type: string
                    message:
                      type: string
                    status:
                      type: string
                    run_at:
                      type: string
                      format: date-time
                    store_ids:
                      type: array
                      items:
                        type: integer
    delete:
      summary: Delete an announcement
      tags:
      - Announcements
      security:
      - bearerAuth: []
      responses:
        '204':
          description: announcement deleted
        '404':
          description: announcement not found
        '401':
          description: unauthorized
  "/shop_admin/cash_drawer_transactions":
    get:
      summary: List cash drawer transactions
      tags:
      - Cash Drawer Transactions
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: top_transactions
        in: query
        required: false
        description: Filter by time period (This week, Last week, This month, Last
          month, This year)
        schema:
          type: string
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: object
      responses:
        '200':
          description: cash drawer transactions retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  cash_drawer_transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        cash_drawer_id:
                          type: integer
                        transactionable_id:
                          type: integer
                        transactionable_type:
                          type: string
                        debit:
                          type:
                          - string
                          - 'null'
                        credit:
                          type:
                          - string
                          - 'null'
                        balance:
                          type:
                          - string
                          - 'null'
                        cash_drawer_amount_delta:
                          type:
                          - string
                          - 'null'
                        wallet_outstanding_balance_delta:
                          type:
                          - string
                          - 'null'
                        updated_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                        completed_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                        payment_id:
                          type:
                          - integer
                          - 'null'
                        data:
                          type: object
                        generated_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                        payment:
                          type:
                          - object
                          - 'null'
                        order:
                          type:
                          - object
                          - 'null'
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
  "/shop_admin/cash_drawers/{cash_drawer_id}/cash_drawer_transactions":
    parameters:
    - name: cash_drawer_id
      in: path
      required: true
      description: Cash Drawer ID
      schema:
        type: integer
    post:
      summary: Create a cash drawer transaction
      tags:
      - Cash Drawer Transactions
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: cash drawer transaction created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_drawer_transaction:
                  type: object
                  properties:
                    transaction_type:
                      type: string
                      enum:
                      - cash_in
                      - cash_out
                    payment_amount:
                      type: number
                    completed_at:
                      type: string
                      format: date-time
                      nullable: true
                  required:
                  - transaction_type
                  - payment_amount
              required:
              - cash_drawer_transaction
  "/shop_admin/cash_drawers":
    get:
      summary: List cash drawers
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: status
        in: query
        required: false
        description: Filter by status
        schema:
          type: string
      responses:
        '200':
          description: cash drawers retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    title:
                      type: string
                    amount:
                      type: string
                    store_id:
                      type: integer
                    credit_limit:
                      type: string
                    outstanding_credit_limit:
                      type: string
                    customer_id:
                      type: integer
                      nullable: true
                    cash_drawer_type:
                      type: string
                      nullable: true
                    store_user_id:
                      type: integer
                      nullable: true
                    translations:
                      type: object
                      additionalProperties: true
                    sales_member_id:
                      type: integer
                      nullable: true
                  required:
                  - id
                  - title
                  - amount
                  - store_id
        '401':
          description: unauthorized
    post:
      summary: Create a cash drawer
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: cash drawer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  amount:
                    type:
                    - string
                    - 'null'
                  store_id:
                    type: integer
                  credit_limit:
                    type: string
                  outstanding_credit_limit:
                    type: string
                  customer_id:
                    type: integer
                    nullable: true
                  cash_drawer_type:
                    type: string
                    nullable: true
                  store_user_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    additionalProperties: true
                  sales_member_id:
                    type: integer
                    nullable: true
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: invalid cash drawer
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_drawer:
                  type: object
                  properties:
                    title:
                      type: string
                    store_id:
                      type: integer
                    cash_drawer_type:
                      type: string
                      enum:
                      - general
                      - customer
                  required:
                  - title
                  - store_id
                  - cash_drawer_type
  "/shop_admin/cash_drawers/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Cash Drawer ID
      schema:
        type: integer
    get:
      summary: Get a cash drawer
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      responses:
        '200':
          description: cash drawer retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  amount:
                    type: string
                  store_id:
                    type: integer
                  credit_limit:
                    type: string
                  outstanding_credit_limit:
                    type: string
                  customer_id:
                    type: integer
                    nullable: true
                  cash_drawer_type:
                    type: string
                    nullable: true
                  store_user_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    additionalProperties: true
                  sales_member_id:
                    type: integer
                    nullable: true
        '404':
          description: cash drawer not found
        '401':
          description: unauthorized
    put:
      summary: Update a cash drawer
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: cash drawer updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  amount:
                    type: string
                  store_id:
                    type: integer
                  credit_limit:
                    type: string
                  outstanding_credit_limit:
                    type: string
                  customer_id:
                    type: integer
                    nullable: true
                  cash_drawer_type:
                    type: string
                    nullable: true
                  store_user_id:
                    type: integer
                    nullable: true
                  translations:
                    type: object
                    additionalProperties: true
                  sales_member_id:
                    type: integer
                    nullable: true
        '404':
          description: cash drawer not found
        '422':
          description: invalid cash drawer
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cash_drawer:
                  type: object
                  properties:
                    title:
                      type: string
                    closing_amount:
                      type: number
    delete:
      summary: Delete a cash drawer
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      responses:
        '204':
          description: cash drawer deleted
        '404':
          description: cash drawer not found
        '401':
          description: unauthorized
  "/shop_admin/cash_drawers/{id}/close":
    parameters:
    - name: id
      in: path
      required: true
      description: Cash Drawer ID
      schema:
        type: integer
    - name: closing_amount
      in: query
      required: true
      description: Closing amount
      schema:
        type: number
    post:
      summary: Close a cash drawer
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      responses:
        '200':
          description: cash drawer closed
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  title:
                    type: string
                  amount:
                    type: string
                  store_id:
                    type: integer
                  credit_limit:
                    type: string
                  outstanding_credit_limit:
                    type: string
                  customer_id:
                    type: integer
                    nullable: true
                  cash_drawer_type:
                    type: string
                    nullable: true
                  translations:
                    type: object
                    additionalProperties: true
                  sales_member_id:
                    type: integer
                    nullable: true
        '404':
          description: cash drawer not found
        '422':
          description: cannot close cash drawer
        '401':
          description: unauthorized
  "/shop_admin/cash_drawers/{id}/transactions":
    parameters:
    - name: id
      in: path
      required: true
      description: Cash Drawer ID
      schema:
        type: integer
    - name: page
      in: query
      required: false
      description: Page number
      schema:
        type: integer
    - name: per_page
      in: query
      required: false
      description: Items per page
      schema:
        type: integer
    get:
      summary: Get cash drawer transactions
      tags:
      - Cash Drawers
      security:
      - bearerAuth: []
      responses:
        '200':
          description: transactions retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        amount:
                          type: string
                        transaction_type:
                          type: string
                        description:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '404':
          description: cash drawer not found
        '401':
          description: unauthorized
  "/shop_admin/customer_returns":
    get:
      summary: List customer returns
      tags:
      - Customer Returns
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: object
      responses:
        '200':
          description: customer returns retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    number:
                      type: string
                    stock_location_id:
                      type: integer
                    store_id:
                      type: integer
        '401':
          description: unauthorized
  "/shop_admin/customer_returns/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Customer Return ID
      schema:
        type: integer
    get:
      summary: Get a customer return
      tags:
      - Customer Returns
      security:
      - bearerAuth: []
      responses:
        '200':
          description: customer return retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  stock_location_id:
                    type: integer
                  store_id:
                    type: integer
        '404':
          description: customer return not found
        '401':
          description: unauthorized
  "/shop_admin/customers":
    get:
      summary: List customers
      tags:
      - Customers
      security:
      - bearerAuth: []
      description: Returns a list of customers for the shop admin
      operationId: shop-admin-customers-list
      parameters:
      - name: page
        in: query
        description: Page number
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        example: 25
        schema:
          type: integer
      - name: q
        in: query
        description: Search query
        example: search term
        schema:
          type: string
      - name: email_cont
        in: query
        description: Filter by email
        example: john@example.com
        schema:
          type: string
      - name: first_name_cont
        in: query
        description: Filter by first name
        example: John
        schema:
          type: string
      responses:
        '200':
          description: Customers list retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  customers:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        phone:
                          type: string
                        email:
                          type: string
                        deleted_at:
                          type:
                          - string
                          - 'null'
                        store_id:
                          type: integer
                        user_id:
                          type:
                          - integer
                          - 'null'
                        first_name:
                          type:
                          - string
                          - 'null'
                        last_name:
                          type:
                          - string
                          - 'null'
                        cached_outstanding_balance:
                          type: string
                        cached_return_due:
                          type: string
                        newsletter_subscriber:
                          type:
                          - boolean
                          - 'null'
                        cnic:
                          type:
                          - string
                          - 'null'
                        address:
                          type:
                          - string
                          - 'null'
                        customer_type:
                          type: string
                        client_store_id:
                          type:
                          - integer
                          - 'null'
                        json_attributes:
                          type: object
                        loyalty_points:
                          type:
                          - integer
                          - 'null'
                        vat_number:
                          type:
                          - string
                          - 'null'
                        cr_number:
                          type:
                          - string
                          - 'null'
                        tax_number:
                          type:
                          - string
                          - 'null'
                        cash_drawer:
                          type:
                          - object
                          - 'null'
                        remaining_credit:
                          type:
                          - integer
                          - number
                        remaining_credit_limit:
                          type:
                          - integer
                          - number
                        display_name:
                          type: string
                        outstanding_order_balance:
                          type: string
                        outstanding_wallet_balance:
                          type:
                          - string
                          - integer
                        wallet_outstanding_balance:
                          type:
                          - string
                          - integer
                        sales_due:
                          type:
                          - string
                          - integer
                        sales_return_due:
                          type:
                          - string
                          - integer
                        unsettled_payments:
                          type: array
                          items:
                            type: object
                        addresses:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              firstname:
                                type: string
                              lastname:
                                type: string
                              address1:
                                type: string
                              address2:
                                type: string
                              city:
                                type: string
                              zipcode:
                                type: string
                              phone:
                                type: string
                              state_name:
                                type: string
                              alternative_phone:
                                type: string
                              company:
                                type: string
                              state_id:
                                type: integer
                              country_id:
                                type: integer
                              additional_number:
                                type: string
                              state:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                              country:
                                type: object
                                properties:
                                  country_id:
                                    type: integer
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  iso:
                                    type: string
                              is_required_geo_coordinates_invalid_only:
                                type: boolean
                              translations:
                                type: object
                  count:
                    type: integer
                  per_page:
                    type: integer
                  total_count:
                    type: integer
                  current_page:
                    type: integer
                  pages:
                    type: integer
    post:
      summary: Create customer
      tags:
      - Customers
      security:
      - bearerAuth: []
      description: Creates a new customer
      operationId: shop-admin-customers-create
      parameters: []
      responses:
        '201':
          description: Customer created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  phone:
                    type: string
                  email:
                    type: string
                  deleted_at:
                    type:
                    - string
                    - 'null'
                  store_id:
                    type: integer
                  user_id:
                    type:
                    - integer
                    - 'null'
                  first_name:
                    type:
                    - string
                    - 'null'
                  last_name:
                    type:
                    - string
                    - 'null'
                  cached_outstanding_balance:
                    type: string
                  cached_return_due:
                    type: string
                  newsletter_subscriber:
                    type:
                    - boolean
                    - 'null'
                  cnic:
                    type:
                    - string
                    - 'null'
                  address:
                    type:
                    - string
                    - 'null'
                  customer_type:
                    type: string
                  client_store_id:
                    type:
                    - integer
                    - 'null'
                  json_attributes:
                    type: object
                  loyalty_points:
                    type:
                    - integer
                    - 'null'
                  vat_number:
                    type:
                    - string
                    - 'null'
                  cr_number:
                    type:
                    - string
                    - 'null'
                  tax_number:
                    type:
                    - string
                    - 'null'
                  cash_drawer:
                    type:
                    - object
                    - 'null'
                  remaining_credit:
                    type:
                    - integer
                    - number
                  remaining_credit_limit:
                    type:
                    - integer
                    - number
                  display_name:
                    type: string
                  outstanding_order_balance:
                    type: string
                  outstanding_wallet_balance:
                    type:
                    - string
                    - integer
                  wallet_outstanding_balance:
                    type:
                    - string
                    - integer
                  sales_due:
                    type:
                    - string
                    - integer
                  sales_return_due:
                    type:
                    - string
                    - integer
                  unsettled_payments:
                    type: array
                    items:
                      type: object
                  addresses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        firstname:
                          type: string
                        lastname:
                          type: string
                        address1:
                          type: string
                        address2:
                          type: string
                        city:
                          type: string
                        zipcode:
                          type: string
                        phone:
                          type: string
                        state_name:
                          type: string
                        alternative_phone:
                          type: string
                        company:
                          type: string
                        state_id:
                          type: integer
                        country_id:
                          type: integer
                        additional_number:
                          type: string
                        state:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                        country:
                          type: object
                          properties:
                            country_id:
                              type: integer
                            id:
                              type: integer
                            name:
                              type: string
                            iso:
                              type: string
                        is_required_geo_coordinates_invalid_only:
                          type: boolean
                        translations:
                          type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: object
                  properties:
                    email:
                      type: string
                      example: newcustomer@example.com
                    first_name:
                      type: string
                      example: John
                    last_name:
                      type: string
                      example: Doe
                    phone:
                      type: string
                      example: "+923001234567"
                    date_of_birth:
                      type: string
                      example: '1990-01-01'
                    password:
                      type: string
                      example: password123
                    password_confirmation:
                      type: string
                      example: password123
                  required:
                  - email
                  - first_name
                  - last_name
  "/shop_admin/customers/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get customer
      tags:
      - Customers
      security:
      - bearerAuth: []
      description: Returns a specific customer
      operationId: shop-admin-customers-show
      responses:
        '200':
          description: Customer found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  phone:
                    type: string
                  email:
                    type: string
                  deleted_at:
                    type:
                    - string
                    - 'null'
                  store_id:
                    type: integer
                  user_id:
                    type:
                    - integer
                    - 'null'
                  first_name:
                    type:
                    - string
                    - 'null'
                  last_name:
                    type:
                    - string
                    - 'null'
                  cached_outstanding_balance:
                    type: string
                  cached_return_due:
                    type: string
                  newsletter_subscriber:
                    type:
                    - boolean
                    - 'null'
                  cnic:
                    type:
                    - string
                    - 'null'
                  address:
                    type:
                    - string
                    - 'null'
                  customer_type:
                    type: string
                  client_store_id:
                    type:
                    - integer
                    - 'null'
                  json_attributes:
                    type: object
                  loyalty_points:
                    type:
                    - integer
                    - 'null'
                  vat_number:
                    type:
                    - string
                    - 'null'
                  cr_number:
                    type:
                    - string
                    - 'null'
                  tax_number:
                    type:
                    - string
                    - 'null'
                  cash_drawer:
                    type:
                    - object
                    - 'null'
                  remaining_credit:
                    type:
                    - integer
                    - number
                  remaining_credit_limit:
                    type:
                    - integer
                    - number
                  display_name:
                    type: string
                  outstanding_order_balance:
                    type: string
                  outstanding_wallet_balance:
                    type:
                    - string
                    - integer
                  wallet_outstanding_balance:
                    type:
                    - string
                    - integer
                  sales_due:
                    type:
                    - string
                    - integer
                  sales_return_due:
                    type:
                    - string
                    - integer
                  unsettled_payments:
                    type: array
                    items:
                      type: object
                  addresses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        firstname:
                          type: string
                        lastname:
                          type: string
                        address1:
                          type: string
                        address2:
                          type: string
                        city:
                          type: string
                        zipcode:
                          type: string
                        phone:
                          type: string
                        state_name:
                          type: string
                        alternative_phone:
                          type: string
                        company:
                          type: string
                        state_id:
                          type: integer
                        country_id:
                          type: integer
                        additional_number:
                          type: string
                        state:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                        country:
                          type: object
                          properties:
                            country_id:
                              type: integer
                            id:
                              type: integer
                            name:
                              type: string
                            iso:
                              type: string
                        is_required_geo_coordinates_invalid_only:
                          type: boolean
                        translations:
                          type: object
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    patch:
      summary: Update customer
      tags:
      - Customers
      security:
      - bearerAuth: []
      description: Updates a specific customer
      operationId: shop-admin-customers-update
      parameters: []
      responses:
        '200':
          description: Customer updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  phone:
                    type: string
                  email:
                    type: string
                  deleted_at:
                    type:
                    - string
                    - 'null'
                  store_id:
                    type: integer
                  user_id:
                    type:
                    - integer
                    - 'null'
                  first_name:
                    type:
                    - string
                    - 'null'
                  last_name:
                    type:
                    - string
                    - 'null'
                  cached_outstanding_balance:
                    type: string
                  cached_return_due:
                    type: string
                  newsletter_subscriber:
                    type:
                    - boolean
                    - 'null'
                  cnic:
                    type:
                    - string
                    - 'null'
                  address:
                    type:
                    - string
                    - 'null'
                  customer_type:
                    type: string
                  client_store_id:
                    type:
                    - integer
                    - 'null'
                  json_attributes:
                    type: object
                  loyalty_points:
                    type:
                    - integer
                    - 'null'
                  vat_number:
                    type:
                    - string
                    - 'null'
                  cr_number:
                    type:
                    - string
                    - 'null'
                  tax_number:
                    type:
                    - string
                    - 'null'
                  cash_drawer:
                    type:
                    - object
                    - 'null'
                  remaining_credit:
                    type:
                    - integer
                    - number
                  remaining_credit_limit:
                    type:
                    - integer
                    - number
                  display_name:
                    type: string
                  outstanding_order_balance:
                    type: string
                  outstanding_wallet_balance:
                    type:
                    - string
                    - integer
                  wallet_outstanding_balance:
                    type:
                    - string
                    - integer
                  sales_due:
                    type:
                    - string
                    - integer
                  sales_return_due:
                    type:
                    - string
                    - integer
                  unsettled_payments:
                    type: array
                    items:
                      type: object
                  addresses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        firstname:
                          type: string
                        lastname:
                          type: string
                        address1:
                          type: string
                        address2:
                          type: string
                        city:
                          type: string
                        zipcode:
                          type: string
                        phone:
                          type: string
                        state_name:
                          type: string
                        alternative_phone:
                          type: string
                        company:
                          type: string
                        state_id:
                          type: integer
                        country_id:
                          type: integer
                        additional_number:
                          type: string
                        state:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                        country:
                          type: object
                          properties:
                            country_id:
                              type: integer
                            id:
                              type: integer
                            name:
                              type: string
                            iso:
                              type: string
                        is_required_geo_coordinates_invalid_only:
                          type: boolean
                        translations:
                          type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                customer:
                  type: object
                  properties:
                    first_name:
                      type: string
                      example: Jane
                    last_name:
                      type: string
                      example: Smith
                    phone:
                      type: string
                      example: "+923009876543"
                    date_of_birth:
                      type: string
                      example: '1985-05-15'
    delete:
      summary: Delete customer
      tags:
      - Customers
      security:
      - bearerAuth: []
      description: Deletes a specific customer
      operationId: shop-admin-customers-delete
      responses:
        '204':
          description: Customer deleted
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/deals":
    parameters:
    - name: store_id
      in: path
      required: true
      description: Store ID
      schema:
        type: integer
    get:
      summary: List deals
      tags:
      - Deals
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      - name: status
        in: query
        required: false
        description: Filter by status
        schema:
          type: string
      responses:
        '200':
          description: deals retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  deals:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        message:
                          type: string
                        promotion_id:
                          type: integer
                        start_date:
                          type: string
                          format: date-time
                        end_date:
                          type: string
                          format: date-time
                        status:
                          type: string
                        store_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
    post:
      summary: Create a deal
      tags:
      - Deals
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: deal created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  message:
                    type: string
                  sidekiq_id:
                    type: integer
                  status:
                    type: string
                  start_date:
                    type: string
                    format: date
                  end_date:
                    type: string
                    format: date
                    nullable: true
                  promotion_id:
                    type: integer
                  store_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  translations:
                    type: object
                    properties:
                      en:
                        type: object
                        properties:
                          message:
                            type: string
                  deals_message:
                    type: string
                  discount_available:
                    type: boolean
                  store:
                    type: object
                    properties:
                      type:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                      code:
                        type: string
                      default_currency:
                        type: string
                      shop:
                        type: string
                        nullable: true
        '422':
          description: invalid deal
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                deal:
                  type: object
                  properties:
                    message:
                      type: string
                    promotion_id:
                      type: integer
                    start_date:
                      type: string
                      format: date-time
                    end_date:
                      type: string
                      format: date-time
                  required:
                  - message
                  - promotion_id
  "/shop_admin/stores/{store_id}/deals/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      description: Store ID
      schema:
        type: integer
    - name: id
      in: path
      required: true
      description: Deal ID
      schema:
        type: integer
    get:
      summary: Get a deal
      tags:
      - Deals
      security:
      - bearerAuth: []
      responses:
        '200':
          description: deal retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  message:
                    type: string
                  sidekiq_id:
                    type: integer
                    nullable: true
                  status:
                    type: string
                  start_date:
                    type: string
                    format: date
                  end_date:
                    type: string
                    format: date
                    nullable: true
                  promotion_id:
                    type: integer
                  store_id:
                    type: integer
                  translations:
                    type: object
                    properties:
                      en:
                        type: object
                        properties:
                          message:
                            type: string
                  deals_message:
                    type: string
                  discount_available:
                    type: boolean
                  store:
                    type: object
                    properties:
                      type:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                      code:
                        type: string
                      default_currency:
                        type: string
                      shop:
                        type: string
                        nullable: true
        '404':
          description: deal not found
        '401':
          description: unauthorized
    put:
      summary: Update a deal
      tags:
      - Deals
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: deal updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  message:
                    type: string
                  sidekiq_id:
                    type: integer
                    nullable: true
                  status:
                    type: string
                  start_date:
                    type: string
                    format: date
                  end_date:
                    type: string
                    format: date
                    nullable: true
                  promotion_id:
                    type: integer
                  store_id:
                    type: integer
                  translations:
                    type: object
                    properties:
                      en:
                        type: object
                        properties:
                          message:
                            type: string
                  deals_message:
                    type: string
                  discount_available:
                    type: boolean
                  store:
                    type: object
                    properties:
                      type:
                        type: string
                        nullable: true
                      id:
                        type: integer
                      name:
                        type: string
                      code:
                        type: string
                      default_currency:
                        type: string
                      shop:
                        type: string
                        nullable: true
        '404':
          description: deal not found
        '422':
          description: invalid deal
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                deal:
                  type: object
                  properties:
                    message:
                      type: string
                    promotion_id:
                      type: integer
                    start_date:
                      type: string
                      format: date-time
                    end_date:
                      type: string
                      format: date-time
    delete:
      summary: Delete a deal
      tags:
      - Deals
      security:
      - bearerAuth: []
      responses:
        '204':
          description: deal deleted
        '404':
          description: deal not found
        '401':
          description: unauthorized
  "/shop_admin/departments":
    get:
      summary: List departments
      tags:
      - Departments
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: object
      responses:
        '200':
          description: departments retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  departments:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        description:
                          type: string
                        store_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
  "/shop_admin/departments/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Department ID
      schema:
        type: integer
    get:
      summary: Get a department
      tags:
      - Departments
      security:
      - bearerAuth: []
      responses:
        '200':
          description: department retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  description:
                    type: string
                  store_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '404':
          description: department not found
        '401':
          description: unauthorized
  "/shop_admin/expenses":
    get:
      summary: List expenses
      tags:
      - Expenses
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: object
      responses:
        '200':
          description: expenses retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  expenses:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        expense_date:
                          type: string
                          format: date
                        expense_for:
                          type: string
                        amount:
                          type: number
                        note:
                          type: string
                        store_id:
                          type: integer
                        user_id:
                          type: integer
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
  "/shop_admin/expenses/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Expense ID
      schema:
        type: integer
    get:
      summary: Get an expense
      tags:
      - Expenses
      security:
      - bearerAuth: []
      responses:
        '200':
          description: expense retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  expense:
                    type: object
                    properties:
                      id:
                        type: integer
                      expense_date:
                        type: string
                        format: date
                      expense_for:
                        type: string
                      amount:
                        type: number
                      note:
                        type: string
                      store_id:
                        type: integer
                      user_id:
                        type: integer
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
        '404':
          description: expense not found
        '401':
          description: unauthorized
  "/shop_admin/file_imports":
    get:
      summary: List file imports
      tags:
      - FileImports
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: file imports retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_imports:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        store_id:
                          type: integer
                        user_id:
                          type: integer
                        importer_name:
                          type: string
                        status:
                          type: string
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - store_id
                      - user_id
                      - importer_name
                      - status
                      - created_at
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
    post:
      summary: Create file import
      tags:
      - FileImports
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: file import created
        '401':
          description: unauthorized
        '422':
          description: invalid request
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                store_id:
                  type: integer
                importer_name:
                  type: string
                uploaded_file:
                  type: string
                  format: binary
              required:
              - store_id
              - importer_name
              - uploaded_file
  "/shop_admin/file_imports/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: FileImport ID
      schema:
        type: integer
    get:
      summary: Show file import
      tags:
      - FileImports
      security:
      - bearerAuth: []
      responses:
        '200':
          description: file import retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  store_id:
                    type: integer
                  user_id:
                    type: integer
                  importer_name:
                    type: string
                  status:
                    type: string
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                required:
                - id
                - store_id
                - user_id
                - importer_name
                - status
                - created_at
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/images":
    get:
      summary: List images
      tags:
      - Images
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: images retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  images:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        viewable_id:
                          type: integer
                        viewable_type:
                          type: string
                        attachment_file_name:
                          type: string
                        position:
                          type: integer
                        alt:
                          type: string
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - viewable_id
                      - viewable_type
                      - attachment_file_name
                      - position
                      - alt
                      - created_at
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/images/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Image ID
      schema:
        type: integer
    get:
      summary: Show image
      tags:
      - Images
      security:
      - bearerAuth: []
      responses:
        '200':
          description: image retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  viewable_id:
                    type: integer
                  viewable_type:
                    type: string
                  attachment_file_name:
                    type: string
                  position:
                    type: integer
                  alt:
                    type: string
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                required:
                - id
                - viewable_id
                - viewable_type
                - attachment_file_name
                - position
                - alt
                - created_at
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/incoming_orders":
    get:
      summary: List incoming orders
      tags:
      - IncomingOrders
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: incoming orders retrieved
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  incoming_orders:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: integer
                        store_id:
                          type: integer
                        user_id:
                          type: integer
                        number:
                          type: string
                        order_params:
                          type: string
                        order_errors:
                          type: string
                          nullable: true
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - store_id
                      - user_id
                      - number
                      - order_params
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/incoming_orders/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: IncomingOrder ID
      schema:
        type: integer
    get:
      summary: Show incoming order
      tags:
      - IncomingOrders
      security:
      - bearerAuth: []
      responses:
        '200':
          description: incoming order retrieved
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  store_id:
                    type: integer
                  user_id:
                    type: integer
                  number:
                    type: string
                  order_params:
                    type: string
                  order_errors:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                required:
                - id
                - store_id
                - user_id
                - number
                - order_params
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/invoices":
    get:
      summary: List invoices
      tags:
      - Invoices
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: invoices retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  invoices:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: integer
                        invoice_status:
                          type: string
                        start_date:
                          type: string
                          format: date_time
                        end_date:
                          type: string
                          format: date_time
                        currency:
                          type: string
                        invoiced_amount:
                          type: string
                        is_paid:
                          type: boolean
                        title:
                          type: string
                        applicable_tax:
                          type: number
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/invoices/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Invoice ID
      schema:
        type: integer
    get:
      summary: Show invoice
      tags:
      - Invoices
      security:
      - bearerAuth: []
      responses:
        '200':
          description: invoice retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  invoice_status:
                    type: string
                  start_date:
                    type: string
                    format: date_time
                  end_date:
                    type: string
                    format: date_time
                  currency:
                    type: string
                  invoiced_amount:
                    type: string
                  is_paid:
                    type: boolean
                  title:
                    type: string
                  applicable_tax:
                    type: number
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                additionalProperties: true
                required:
                - id
                - invoice_status
                - start_date
                - end_date
                - currency
                - invoiced_amount
                - is_paid
                - title
                - applicable_tax
                - created_at
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/item_purchases":
    get:
      summary: List item purchases
      tags:
      - ItemPurchases
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: item purchases retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  item_purchases:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        order_id:
                          type: integer
                        store_variant_id:
                          type: integer
                        quantity:
                          type: integer
                        price:
                          type: number
                        currency:
                          type: string
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - order_id
                      - store_variant_id
                      - quantity
                      - price
                      - currency
                      - created_at
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/line_items":
    get:
      summary: List line items
      tags:
      - LineItems
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: line items retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  line_items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        order_id:
                          type: integer
                        store_variant_id:
                          type: integer
                        quantity:
                          type: integer
                        price:
                          type: number
                        currency:
                          type: string
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - order_id
                      - store_variant_id
                      - quantity
                      - price
                      - currency
                      - created_at
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/line_items/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: LineItem ID
      schema:
        type: integer
    get:
      summary: Show line item
      tags:
      - LineItems
      security:
      - bearerAuth: []
      responses:
        '200':
          description: line item retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  order_id:
                    type: integer
                  store_variant_id:
                    type: integer
                  quantity:
                    type: integer
                  price:
                    type: number
                  currency:
                    type: string
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                required:
                - id
                - order_id
                - store_variant_id
                - quantity
                - price
                - currency
                - created_at
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/loans":
    get:
      summary: List loans
      tags:
      - Loans
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: loans retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  loans:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        payment_id:
                          type: integer
                        order_id:
                          type: integer
                        approved_at:
                          type: string
                          format: date_time
                          nullable: true
                        authorized_at:
                          type: string
                          format: date_time
                          nullable: true
                        captured_at:
                          type: string
                          format: date_time
                          nullable: true
                        canceled_at:
                          type: string
                          format: date_time
                          nullable: true
                        void_at:
                          type: string
                          format: date_time
                          nullable: true
                        created_at:
                          type: string
                          format: date_time
                        updated_at:
                          type: string
                          format: date_time
                      required:
                      - id
                      - payment_id
                      - order_id
                      - created_at
                      - updated_at
                  meta:
                    type: object
        '401':
          description: unauthorized
  "/shop_admin/loans/{id}":
    parameters:
    - name: id
      in: path
      required: true
      description: Loan ID
      schema:
        type: integer
    get:
      summary: Show loan
      tags:
      - Loans
      security:
      - bearerAuth: []
      responses:
        '200':
          description: loan retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  payment_id:
                    type: integer
                  order_id:
                    type: integer
                  approved_at:
                    type: string
                    format: date_time
                    nullable: true
                  authorized_at:
                    type: string
                    format: date_time
                    nullable: true
                  captured_at:
                    type: string
                    format: date_time
                    nullable: true
                  canceled_at:
                    type: string
                    format: date_time
                    nullable: true
                  void_at:
                    type: string
                    format: date_time
                    nullable: true
                  created_at:
                    type: string
                    format: date_time
                  updated_at:
                    type: string
                    format: date_time
                required:
                - id
                - payment_id
                - order_id
                - created_at
                - updated_at
        '404':
          description: not found
        '401':
          description: unauthorized
  "/shop_admin/notifications":
    get:
      summary: Show current user notification settings
      tags:
      - Notifications
      security:
      - bearerAuth: []
      responses:
        '200':
          description: notification settings retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create (set) notification settings
      tags:
      - Notifications
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: notification settings updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_id:
                  type: string
                device_token:
                  type: string
                  nullable: true
                settings:
                  type: object
                  properties:
                    notifications_push:
                      type: boolean
                    order_delivery_push:
                      type: boolean
                    notifications_whatsapp:
                      type: boolean
                    order_received_whatsapp:
                      type: boolean
                    order_accepted_whatsapp:
                      type: boolean
                    order_ready_whatsapp:
                      type: boolean
                    order_completed_whatsapp:
                      type: boolean
                    order_cancelled_whatsapp:
                      type: boolean
                    order_rejected_whatsapp:
                      type: boolean
              required:
              - store_id
              - settings
    put:
      summary: Update notification settings (without destroy)
      tags:
      - Notifications
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: notification settings updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_id:
                  type: string
                device_token:
                  type: string
                  nullable: true
                settings:
                  type: object
                  properties:
                    notifications_push:
                      type: boolean
                    order_delivery_push:
                      type: boolean
                    notifications_whatsapp:
                      type: boolean
                    order_received_whatsapp:
                      type: boolean
                    order_accepted_whatsapp:
                      type: boolean
                    order_ready_whatsapp:
                      type: boolean
                    order_completed_whatsapp:
                      type: boolean
                    order_cancelled_whatsapp:
                      type: boolean
                    order_rejected_whatsapp:
                      type: boolean
              required:
              - store_id
              - settings
  "/shop_admin/option_values":
    get:
      summary: List option values
      tags:
      - Option Values
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: option values retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create option value
      tags:
      - Option Values
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: option value created
        '401':
          description: unauthorized
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                presentation:
                  type: string
                option_type_id:
                  type: integer
              required:
              - name
              - presentation
              - option_type_id
  "/shop_admin/option_values/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show option value
      tags:
      - Option Values
      security:
      - bearerAuth: []
      responses:
        '200':
          description: option value found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update option value
      tags:
      - Option Values
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: option value updated
        '401':
          description: unauthorized
        '404':
          description: not found
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                presentation:
                  type: string
              required:
              - name
              - presentation
    delete:
      summary: Delete option value
      tags:
      - Option Values
      security:
      - bearerAuth: []
      responses:
        '204':
          description: option value deleted
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/order_tax_invoices":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List order tax invoices
      tags:
      - Order Tax Invoices
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: order tax invoices retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/order_tax_invoices/bulk_process":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Bulk process order tax invoices
      tags:
      - Order Tax Invoices
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '302':
          description: bulk process initiated (redirect)
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                invoice_ids:
                  type: array
                  items:
                    type: string
                order_ids:
                  type: array
                  items:
                    type: string
              required:
              - invoice_ids
              - order_ids
  "/shop_admin/stores/{store_id}/order_tax_invoices/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show order tax invoice
      tags:
      - Order Tax Invoices
      security:
      - bearerAuth: []
      responses:
        '200':
          description: order tax invoice found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/orders":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List orders
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Returns a list of orders for the shop admin
      operationId: shop-admin-orders-list
      parameters:
      - name: page
        in: query
        description: Page number
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        example: 25
        schema:
          type: integer
      - name: q
        in: query
        type: object
        description: Search parameters
        schema:
          type: object
          properties:
            completed_at_gteq:
              type: string
              description: Orders completed after date
              example: '2024-01-01'
            completed_at_lteq:
              type: string
              description: Orders completed before date
              example: '2024-01-31'
            state_eq:
              type: string
              description: Order state filter
              example: complete
      responses:
        '200':
          description: Orders list retrieved
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  count:
                    type: integer
                    description: Number of orders in current page
                  total_count:
                    type: integer
                    description: Total number of orders
                  pages:
                    type: integer
                    description: Total number of pages
                  current_page:
                    type: integer
                    description: Current page number
                  per_page:
                    type: integer
                    description: Number of items per page
                  orders:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    post:
      summary: Create order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Creates a new order
      operationId: shop-admin-orders-create
      parameters: []
      responses:
        '201':
          description: Order created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  item_total:
                    type: string
                  total:
                    type: string
                  ship_total:
                    type: string
                  state:
                    type: string
                  adjustment_total:
                    type: string
                  user_id:
                    type: integer
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  completed_at:
                    type: string
                    format: date-time
                    nullable: true
                  payment_total:
                    type: string
                  shipment_state:
                    type: string
                    nullable: true
                  payment_state:
                    type: string
                    nullable: true
                  email:
                    type: string
                  special_instructions:
                    type: string
                    nullable: true
                  channel:
                    type: string
                  included_tax_total:
                    type: string
                  additional_tax_total:
                    type: string
                  display_included_tax_total:
                    type: string
                    nullable: true
                  display_additional_tax_total:
                    type: string
                    nullable: true
                  tax_total:
                    type: string
                  currency:
                    type: string
                  considered_risky:
                    type: boolean
                  canceler_id:
                    type: integer
                    nullable: true
                  delivery_option:
                    type: boolean
                  pay_offline:
                    type: boolean
                    nullable: true
                  delivery_mode:
                    type: string
                  approved_at:
                    type: string
                    format: date-time
                    nullable: true
                  customer_id:
                    type: integer
                    nullable: true
                  loyalty_points_used:
                    type: integer
                    nullable: true
                  display_item_total:
                    type: string
                  total_quantity:
                    type: integer
                  display_total:
                    type: string
                  display_ship_total:
                    type: string
                  display_tax_total:
                    type: string
                  display_adjustment_total:
                    type: string
                  token:
                    type: string
                  checkout_steps:
                    type: array
                    items:
                      type: string
                  shipment_total:
                    type: string
                  outstanding_balance:
                    type: string
                  taxable_adjustment_total:
                    type: string
                  non_taxable_adjustment_total:
                    type: string
                  promo_total:
                    type: string
                  allow_partial_payment:
                    type: boolean
                    nullable: true
                  state_lock_version:
                    type: integer
                  customer:
                    type: object
                    nullable: true
                  customer_name:
                    type: string
                    nullable: true
                  customer_phone:
                    type: string
                  customer_email:
                    type: string
                  store:
                    type: object
                  client_store:
                    type: object
                    nullable: true
                  user:
                    type: object
                  feedback:
                    type: boolean
                  bill_address:
                    type: object
                    nullable: true
                  ship_address:
                    type: object
                    nullable: true
                  is_required_geo_coordinates_invalid_only:
                    type: boolean
                    nullable: true
                  line_items:
                    type: array
                    items:
                      type: object
                  payments:
                    type: array
                    items:
                      type: object
                  payment_methods:
                    type: array
                    items:
                      type: object
                  payment_methods_stores:
                    type: array
                    items:
                      type: object
                  shipments:
                    type: array
                    items:
                      type: object
                  expenses:
                    type: array
                    items:
                      type: object
                  adjustments:
                    type: array
                    items:
                      type: object
                  display_order_total:
                    type: string
                  display_discount:
                    type: string
                  permissions:
                    type: object
                  credit_cards:
                    type: array
                    items:
                      type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    user_id:
                      type: integer
                      example: 1
                    email:
                      type: string
                      example: customer@example.com
                    currency:
                      type: string
                      example: USD
                    line_items_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          variant_id:
                            type: integer
                            example: 1
                          quantity:
                            type: integer
                            example: 2
                  required:
                  - email
  "/shop_admin/stores/{store_id}/orders/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Returns a specific order
      operationId: shop-admin-orders-show
      responses:
        '200':
          description: Order found
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  total:
                    type: string
                  email:
                    type: string
                  completed_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  line_items:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    patch:
      summary: Update order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Updates a specific order
      operationId: shop-admin-orders-update
      parameters: []
      responses:
        '200':
          description: Order updated
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  total:
                    type: string
                  email:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                order:
                  type: object
                  properties:
                    email:
                      type: string
                      example: updated@example.com
                    special_instructions:
                      type: string
                      example: Handle with care
  "/shop_admin/stores/{store_id}/orders/{id}/cancel":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Cancel order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Cancels a specific order
      operationId: shop-admin-orders-cancel
      responses:
        '200':
          description: Order cancelled
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  cancelled_at:
                    type: string
                    format: date-time
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/orders/{id}/reject":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Reject order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Rejects a specific order
      operationId: shop-admin-orders-reject
      responses:
        '200':
          description: Order rejected
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  cancelled_at:
                    type: string
                    format: date-time
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/orders/{id}/accept":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Accept order
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Accepts a specific order
      operationId: shop-admin-orders-accept
      responses:
        '200':
          description: Order accepted
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  approved_at:
                    type: string
                    format: date-time
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/orders/report":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get orders report
      tags:
      - Orders
      security:
      - bearerAuth: []
      description: Returns a report of orders with various statistics
      operationId: shop-admin-orders-report
      parameters:
      - name: start_date
        in: query
        description: Start date for report
        example: '2024-01-01'
        schema:
          type: string
      - name: end_date
        in: query
        description: End date for report
        example: '2024-12-31'
        schema:
          type: string
      responses:
        '200':
          description: Orders report retrieved
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                properties:
                  total_orders:
                    type: integer
                  total_revenue:
                    type: string
                  average_order_value:
                    type: string
                  orders_by_state:
                    type: object
                    additionalProperties:
                      type: integer
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/payment_methods":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List payment methods stores
      tags:
      - Payment Methods Stores
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: payment methods stores retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create payment methods store
      tags:
      - Payment Methods Stores
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: payment methods store created
        '401':
          description: unauthorized
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_id:
                  type: integer
                payment_method_id:
                  type: integer
                tx_fee_amount:
                  type: number
                  nullable: true
                tx_fee_currency:
                  type: string
                  nullable: true
                tx_percentage_fee:
                  type: number
                  nullable: true
                global:
                  type: boolean
                  nullable: true
              required:
              - store_id
              - payment_method_id
  "/shop_admin/stores/{store_id}/payment_methods/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show payment methods store
      tags:
      - Payment Methods Stores
      security:
      - bearerAuth: []
      responses:
        '200':
          description: payment methods store found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update payment methods store
      tags:
      - Payment Methods Stores
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: payment methods store updated
        '401':
          description: unauthorized
        '404':
          description: not found
        '422':
          description: invalid request
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tx_fee_amount:
                  type: number
                  nullable: true
                tx_fee_currency:
                  type: string
                  nullable: true
                tx_percentage_fee:
                  type: number
                  nullable: true
                global:
                  type: boolean
                  nullable: true
              required: []
    delete:
      summary: Delete payment methods store
      tags:
      - Payment Methods Stores
      security:
      - bearerAuth: []
      responses:
        '204':
          description: payment methods store deleted
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/payments":
    get:
      summary: List payments
      tags:
      - Payments
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: payments retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/payments/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show payment
      tags:
      - Payments
      security:
      - bearerAuth: []
      responses:
        '200':
          description: payment found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/permissions/receive_email_report":
    get:
      summary: Receive email report permissions
      tags:
      - Permissions
      security:
      - bearerAuth: []
      responses:
        '200':
          description: permissions retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/possible_images":
    get:
      summary: List possible images
      tags:
      - Possible Images
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: possible images listed
          content:
            application/json:
              schema:
                type: object
                properties:
                  possible_images:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        attachment_file_name:
                          type: string
                          nullable: true
                        viewable_id:
                          type: integer
                        viewable_type:
                          type: string
        '401':
          description: unauthorized
  "/shop_admin/possible_images/verify":
    post:
      summary: Verify possible images
      tags:
      - Possible Images
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '302':
          description: images verified and redirected
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                possible_images:
                  type: array
                  items:
                    type: integer
                invalid_images:
                  type: array
                  items:
                    type: integer
              required:
              - possible_images
  "/shop_admin/products":
    parameters:
    - name: page
      in: query
      description: Page number
      example: 1
      schema:
        type: integer
    - name: per_page
      in: query
      description: Items per page
      example: 25
      schema:
        type: integer
    - name: q
      in: query
      description: Search query
      example: search term
      schema:
        type: string
    get:
      summary: List products
      tags:
      - Products
      security:
      - bearerAuth: []
      description: Returns a list of products for the shop admin
      operationId: shop-admin-products-list
      responses:
        '200':
          description: Products list retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  facets:
                    type: object
                    nullable: true
                  products:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        description:
                          type: string
                        slug:
                          type: string
                        is_google_ad_friendly:
                          type: boolean
                        is_destroyed:
                          type: boolean
                        taxon_ids:
                          type: array
                          items:
                            type: integer
                        taxons:
                          type: array
                          items:
                            type: string
                        images:
                          type: array
                          items:
                            type: object
                        likes:
                          type: integer
                        likes_count:
                          type: integer
                        master:
                          type: object
                          nullable: true
                        variants:
                          type: array
                          items:
                            type: object
                        shops:
                          type: array
                          items:
                            type: object
                        stores:
                          type: array
                          items:
                            type: object
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/products/bulk_delete":
    post:
      summary: Bulk delete products
      tags:
      - Products
      security:
      - bearerAuth: []
      description: Deletes multiple products at once
      operationId: shop-admin-products-bulk-delete
      parameters: []
      responses:
        '204':
          description: Invalid product IDs
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 1
                  - 2
                  - 3
              required:
              - ids
  "/shop_admin/stores/{store_id}/promotions/{promotion_id}/promotion_actions":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    post:
      summary: Create a promotion action
      tags:
      - Promotion Actions
      security:
      - bearerAuth: []
      parameters:
      - name: promotion_id
        in: path
        required: true
        schema:
          type: string
      - name: action_type
        in: query
        required: true
        example: Spree::Promotion::Actions::CreateAdjustment
        schema:
          type: string
      responses:
        '201':
          description: promotion action created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                calculator_attributes:
                  type: object
                  properties:
                    preferred_amount:
                      type: number
              required:
              - calculator_attributes
  "/shop_admin/stores/{store_id}/promotions/{promotion_id}/promotion_actions/{id}":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    delete:
      summary: Delete a promotion action
      tags:
      - Promotion Actions
      security:
      - bearerAuth: []
      parameters:
      - name: promotion_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: promotion action deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/promotion_categories":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    post:
      summary: Create a promotion category
      tags:
      - Promotion Categories
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: promotion category created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                store_id:
                  type: integer
              required:
              - name
              - store_id
  "/shop_admin/stores/{store_id}/promotions/{promotion_id}/promotion_rules":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    post:
      summary: Create a promotion rule
      tags:
      - Promotion Rules
      security:
      - bearerAuth: []
      parameters:
      - name: promotion_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: promotion rule created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  example: Spree::Promotion::Rules::ItemTotal
                preferred_operator_min:
                  type: string
                  example: gte
                preferred_operator_max:
                  type: string
                  example: lte
                preferred_amount_min:
                  type: number
                  example: 10
                preferred_amount_max:
                  type: number
                  example: 100
              required:
              - type
              - preferred_operator_min
              - preferred_operator_max
              - preferred_amount_min
              - preferred_amount_max
  "/shop_admin/stores/{store_id}/promotions/{promotion_id}/promotion_rules/{id}":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    delete:
      summary: Delete a promotion rule
      tags:
      - Promotion Rules
      security:
      - bearerAuth: []
      parameters:
      - name: promotion_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: promotion rule deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/promotions":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    get:
      summary: List promotions
      tags:
      - Promotions
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      - name: status
        in: query
        required: false
        description: Filter by status
        schema:
          type: string
      responses:
        '200':
          description: promotions retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  promotion:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        description:
                          type:
                          - string
                          - 'null'
                        starts_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                        expires_at:
                          type:
                          - string
                          - 'null'
                          format: date-time
                        usage_limit:
                          type:
                          - integer
                          - 'null'
                        match_policy:
                          type: string
                        advertise:
                          type: boolean
                        type:
                          type:
                          - string
                          - 'null'
                        code:
                          type:
                          - string
                          - 'null'
                        path:
                          type:
                          - string
                          - 'null'
                        rules:
                          type: array
                        actions:
                          type: array
                        stores:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              code:
                                type: string
                              default_currency:
                                type: string
                              type:
                                type:
                                - string
                                - 'null'
                              shop:
                                type:
                                - string
                                - 'null'
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
        '401':
          description: unauthorized
    post:
      summary: Create a promotion
      tags:
      - Promotions
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: promotion created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                starts_at:
                  type: string
                  format: date-time
                expires_at:
                  type: string
                  format: date-time
                usage_limit:
                  type: integer
                match_policy:
                  type: string
                advertise:
                  type: boolean
              required:
              - name
  "/shop_admin/stores/{store_id}/promotions/{id}":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      description: Promotion ID
      schema:
        type: integer
    get:
      summary: Get a promotion
      tags:
      - Promotions
      security:
      - bearerAuth: []
      responses:
        '200':
          description: promotion retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  description:
                    type:
                    - string
                    - 'null'
                  starts_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                  expires_at:
                    type:
                    - string
                    - 'null'
                    format: date-time
                  usage_limit:
                    type:
                    - integer
                    - 'null'
                  match_policy:
                    type: string
                  advertise:
                    type: boolean
                  type:
                    type:
                    - string
                    - 'null'
                  code:
                    type:
                    - string
                    - 'null'
                  path:
                    type:
                    - string
                    - 'null'
                  stores:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        code:
                          type: string
                        default_currency:
                          type: string
                        type:
                          type:
                          - string
                          - 'null'
                        shop:
                          type:
                          - string
                          - 'null'
                  shops:
                    type: array
        '404':
          description: promotion not found
        '401':
          description: unauthorized
    put:
      summary: Update a promotion
      tags:
      - Promotions
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: promotion updated
        '404':
          description: promotion not found
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                starts_at:
                  type: string
                  format: date-time
                expires_at:
                  type: string
                  format: date-time
                usage_limit:
                  type: integer
                match_policy:
                  type: string
                advertise:
                  type: boolean
    delete:
      summary: Delete a promotion
      tags:
      - Promotions
      security:
      - bearerAuth: []
      responses:
        '204':
          description: promotion deleted
        '404':
          description: promotion not found
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/purchases":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List purchases
      tags:
      - Purchases
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: supplier_id
        in: query
        required: false
        description: Filter by supplier ID
        schema:
          type: integer
      - name: status
        in: query
        required: false
        description: Filter by status
        schema:
          type: string
      - name: undelivered
        in: query
        required: false
        description: When true, return undelivered purchases; when false, return full
          purchase history.
        schema:
          type: boolean
      responses:
        '200':
          description: purchase history retrieved when undelivered is false
          content:
            application/json:
              schema:
                type: object
                properties:
                  orders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        number:
                          type: string
                        state:
                          type: string
                        total:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        store:
                          type: object
                        client_store:
                          type: object
                        shipments:
                          type: array
                        line_items:
                          type: array
                        adjustments:
                          type: array
                      additionalProperties: true
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                additionalProperties: true
        '401':
          description: unauthorized
    post:
      summary: Create a purchase
      tags:
      - Purchases
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: purchase created
        '422':
          description: invalid purchase
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payment:
                  type: object
                  properties:
                    order_id:
                      type: integer
                    amount:
                      type: number
                    payment_method_id:
                      type: integer
                    reference_number:
                      type: string
                    reference_name:
                      type: string
                    notes:
                      type: string
                    payment_date:
                      type: string
                      format: date
                    card_type:
                      type: string
                    allow_partial_payment:
                      type: boolean
                    bank_address:
                      type: string
                    bank_name:
                      type: string
                  required:
                  - order_id
                  - amount
                  - payment_method_id
  "/shop_admin/stores/{store_id}/purchases/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      description: Purchase ID
      schema:
        type: integer
    get:
      summary: Get a purchase
      tags:
      - Purchases
      security:
      - bearerAuth: []
      responses:
        '200':
          description: purchase retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  total:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  store:
                    type: object
                  client_store:
                    type: object
                  line_items:
                    type: array
                  shipments:
                    type: array
                  adjustments:
                    type: array
                additionalProperties: true
        '404':
          description: purchase not found
        '401':
          description: unauthorized
    put:
      summary: Update a purchase
      tags:
      - Purchases
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: purchase updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  state:
                    type: string
                  total:
                    type: string
                  allow_partial_payment:
                    type: boolean
                  pay_offline:
                    type:
                    - boolean
                    - 'null'
                  delivery_option:
                    type: boolean
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                additionalProperties: true
        '404':
          description: purchase not found
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                payment:
                  type: object
                  properties:
                    allow_partial_payment:
                      type: boolean
                    pay_offline:
                      type: boolean
                    delivery_option:
                      type: boolean
    delete:
      summary: Delete a purchase
      tags:
      - Purchases
      security:
      - bearerAuth: []
      responses:
        '204':
          description: purchase deleted
        '404':
          description: purchase not found
        '401':
          description: unauthorized
  "/shop_admin/redmine_imports/sync_all_orders":
    post:
      summary: Sync all Redmine orders
      tags:
      - Redmine Imports
      security:
      - bearerAuth: []
      parameters:
      - name: redmine_api_access_key
        in: query
        required: true
        schema:
          type: string
      - name: project_id
        in: query
        required: true
        schema:
          type: string
      - name: invoice_id
        in: query
        required: false
        schema:
          type: string
      responses:
        '302':
          description: Redmine Invoice Job has been scheduled
        '401':
          description: unauthorized
  "/shop_admin/refund_reasons":
    get:
      summary: List refund reasons
      tags:
      - Refund Reasons
      security:
      - bearerAuth: []
      responses:
        '200':
          description: refund reasons listed
          content:
            application/json:
              schema:
                type: object
                properties:
                  refund_reasons:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        active:
                          type: boolean
                        mutable:
                          type: boolean
        '401':
          description: unauthorized
    post:
      summary: Create a refund reason
      tags:
      - Refund Reasons
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '302':
          description: refund reason created and redirected
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                active:
                  type: boolean
                mutable:
                  type: boolean
              required:
              - name
              - active
              - mutable
  "/shop_admin/refund_reasons/{id}":
    put:
      summary: Update a refund reason
      tags:
      - Refund Reasons
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: refund reason updated and redirected
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                active:
                  type: boolean
                mutable:
                  type: boolean
              required:
              - name
              - active
              - mutable
    delete:
      summary: Delete a refund reason
      tags:
      - Refund Reasons
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: refund reason deleted and redirected
        '401':
          description: unauthorized
  "/shop_admin/payments/{payment_id}/refunds":
    get:
      summary: List refunds for a payment
      tags:
      - Refunds
      security:
      - bearerAuth: []
      parameters:
      - name: payment_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: refunds listed
          content:
            application/json:
              schema:
                type: object
                properties:
                  refunds:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        amount:
                          type: number
                        transaction_id:
                          type: string
                        payment_id:
                          type: integer
                        reason_id:
                          type: integer
        '401':
          description: unauthorized
    post:
      summary: Create a refund for a payment
      tags:
      - Refunds
      security:
      - bearerAuth: []
      parameters:
      - name: payment_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: refund created and redirected
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                reason_id:
                  type: integer
              required:
              - amount
              - reason_id
  "/shop_admin/payments/{payment_id}/refunds/{id}":
    put:
      summary: Update a refund
      tags:
      - Refunds
      security:
      - bearerAuth: []
      parameters:
      - name: payment_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: refund updated and redirected
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount:
                  type: number
                reason_id:
                  type: integer
              required:
              - amount
              - reason_id
    delete:
      summary: Delete a refund
      tags:
      - Refunds
      security:
      - bearerAuth: []
      parameters:
      - name: payment_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: refund deleted and redirected
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/reimbursement_types":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    get:
      summary: List reimbursement types
      tags:
      - Reimbursement Types
      security:
      - bearerAuth: []
      responses:
        '200':
          description: reimbursement types listed
          content:
            application/json:
              schema:
                type: array
                properties:
                  reimbursement_types:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        active:
                          type: boolean
                        mutable:
                          type: boolean
        '401':
          description: unauthorized
    post:
      summary: Create a reimbursement type
      tags:
      - Reimbursement Types
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: reimbursement type created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                active:
                  type: boolean
                mutable:
                  type: boolean
              required:
              - name
              - active
              - mutable
  "/shop_admin/stores/{store_id}/reimbursement_types/{id}":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    put:
      summary: Update a reimbursement type
      tags:
      - Reimbursement Types
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: reimbursement type updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reimbursement_type_original_payment:
                  type: object
                  properties:
                    name:
                      type: string
                    active:
                      type: boolean
                    mutable:
                      type: boolean
                  required:
                  - name
                  - active
                  - mutable
              required:
              - reimbursement_type_original_payment
    delete:
      summary: Delete a reimbursement type
      tags:
      - Reimbursement Types
      security:
      - bearerAuth: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: reimbursement type deleted
        '401':
          description: unauthorized
  "/shop_admin/orders/{order_id}/reimbursements":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List reimbursements for an order
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: reimbursements retrieved
          content:
            application/json:
              schema:
                type: array
        '401':
          description: unauthorized
    post:
      summary: Create reimbursement for an order
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: reimbursement created
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reimbursement:
                  type: object
                  properties:
                    customer_return_id:
                      type: integer
                    order_id:
                      type: integer
                    total:
                      type: number
                      format: float
                    device_identifier:
                      type: string
                    generate_customer_return:
                      type: boolean
                    generate_return_authorization:
                      type: boolean
                    return_authorization_reason_id:
                      type: integer
                    stock_location_id:
                      type: integer
                    return_items_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          inventory_unit_id:
                            type: integer
                          return_quantity:
                            type: integer
                          pre_tax_amount:
                            type: number
                            format: float
                          included_tax_total:
                            type: number
                            format: float
                          additional_tax_total:
                            type: number
                            format: float
                          acceptance_status:
                            type: string
                          preferred_reimbursement_type_id:
                            type: integer
                          resellable:
                            type: boolean
                  required:
                  - customer_return_id
              required:
              - reimbursement
  "/shop_admin/orders/{order_id}/reimbursements/{id}":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show reimbursement
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      responses:
        '200':
          description: reimbursement found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
    patch:
      summary: Update reimbursement
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: reimbursement updated
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                reimbursement:
                  type: object
                  properties:
                    reimbursement_status:
                      type: string
  "/shop_admin/orders/{order_id}/reimbursements/{id}/edit":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Edit reimbursement
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      responses:
        '200':
          description: reimbursement edit data
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/orders/{order_id}/reimbursements/{id}/perform":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      summary: Perform reimbursement
      tags:
      - Reimbursements
      security:
      - bearerAuth: []
      responses:
        '200':
          description: reimbursement performed
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  number:
                    type: string
                  reimbursement_status:
                    type: string
                  customer_return_id:
                    type: integer
                  order_id:
                    type: integer
                  total:
                    type: string
                  device_identifier:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                  updated_at:
                    type: string
                  deleted_at:
                    type: string
                    nullable: true
                  preferences:
                    type: string
                    nullable: true
        '401':
          description: unauthorized
  "/shop_admin/reports/send_pos_report":
    post:
      summary: Send POS report to eligible store users
      tags:
      - Reports
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: report sent
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: no file attached or no user found
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: array
        required: true
        description: IDs of store users to send report to
  "/shop_admin/orders/{order_id}/return_authorizations":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List return authorizations for an order
      tags:
      - Return Authorizations
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: return authorizations retrieved
          content:
            application/json:
              schema:
                type: Array
        '401':
          description: unauthorized
    post:
      summary: Create return authorization for an order
      tags:
      - Return Authorizations
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: return authorization created
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                return_authorization:
                  type: object
                  properties:
                    stock_location_id:
                      type: integer
                    return_authorization_reason_id:
                      type: integer
                    memo:
                      type: string
                    return_items_attributes:
                      type: object
                      additionalProperties:
                        type: object
                        properties:
                          inventory_unit_id:
                            type: integer
                          return_quantity:
                            type: integer
                          pre_tax_amount:
                            type: number
                  required:
                  - stock_location_id
                  - return_authorization_reason_id
                  - return_items_attributes
              required:
              - return_authorization
  "/shop_admin/orders/{order_id}/return_authorizations/{id}":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show return authorization
      tags:
      - Return Authorizations
      security:
      - bearerAuth: []
      responses:
        '200':
          description: return authorization found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/orders/{order_id}/return_authorizations/{id}/cancel":
    parameters:
    - name: order_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Cancel return authorization
      tags:
      - Return Authorizations
      security:
      - bearerAuth: []
      responses:
        '200':
          description: return authorization canceled
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/return_index/return_authorizations":
    get:
      summary: List all return authorizations
      tags:
      - Return Index
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: return authorizations retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/return_index/customer_returns":
    get:
      summary: List all customer returns
      tags:
      - Return Index
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: customer returns retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/roles":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List roles
      tags:
      - Roles
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: roles retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create role
      tags:
      - Roles
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: role created
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    name:
                      type: string
                    store_id:
                      type: integer
                    description:
                      type: string
                  required:
                  - name
                  - store_id
              required:
              - role
  "/shop_admin/stores/{store_id}/roles/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    patch:
      summary: Update role
      tags:
      - Roles
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: role updated
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: object
                  properties:
                    description:
                      type: string
    delete:
      summary: Delete role
      tags:
      - Roles
      security:
      - bearerAuth: []
      responses:
        '204':
          description: role deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/roles/assign_role_to_user":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    post:
      summary: Assign role to user
      tags:
      - Roles
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: role assigned to user
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_user:
                  type: integer
                role_id:
                  type: integer
              required:
              - store_user
              - role_id
  "/shop_admin/sales_returns":
    get:
      summary: List sales returns
      tags:
      - Sales Returns
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: sales returns retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/sales_returns/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show sales return
      tags:
      - Sales Returns
      security:
      - bearerAuth: []
      responses:
        '200':
          description: sales return found
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/sales_taxes":
    get:
      summary: List sales taxes (line items)
      tags:
      - SalesTaxes
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: sales taxes retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/sales_taxes/report":
    get:
      summary: Get sales taxes report
      tags:
      - SalesTaxes
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: sales taxes report retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/sales_taxes/order_report":
    get:
      summary: Get order sales taxes report
      tags:
      - SalesTaxes
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: order sales taxes report retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/shifts":
    post:
      summary: Create a shift
      tags:
      - Shifts
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: shift created
          content:
            application/json:
              schema:
                type: object
        '422':
          description: cash drawer missing
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_user_id:
                  type: integer
                cash_drawer_id:
                  type: integer
                status:
                  type: string
                checkin_at:
                  type: string
                  format: date_time
                opening_drawer_amount:
                  type: number
                closing_drawer_amount:
                  type: number
                drawer_amount_status:
                  type: string
                total_cash_in_amount:
                  type: number
                total_cash_out_amount:
                  type: number
              required:
              - store_user_id
              - cash_drawer_id
              - status
              - checkin_at
  "/shop_admin/shifts/ongoing":
    get:
      summary: Get ongoing shift
      tags:
      - Shifts
      security:
      - bearerAuth: []
      responses:
        '200':
          description: ongoing shift retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/shifts/{id}/checkout":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      summary: Checkout a shift
      tags:
      - Shifts
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: shift checked out
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                checkout_at:
                  type: string
                  format: date_time
                status:
                  type: string
              required:
              - checkout_at
              - status
  "/shop_admin/shifts/report":
    get:
      summary: Get shifts report
      tags:
      - Shifts
      security:
      - bearerAuth: []
      parameters:
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: shifts report with completed payments
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/shifts/sync_shifts":
    post:
      summary: Sync shifts
      tags:
      - Shifts
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: shifts synced
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                shifts:
                  type: array
                  items:
                    type: object
                    properties:
                      store_user_id:
                        type: integer
                      cash_drawer_id:
                        type: integer
                      status:
                        type: string
                      checkin_at:
                        type: string
                        format: date_time
                      checkout_at:
                        type: string
                        format: date_time
                    required:
                    - store_user_id
                    - cash_drawer_id
                    - status
                    - checkin_at
              required:
              - shifts
  "/shop_admin/stores/{store_id}/shipping_categories":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    get:
      summary: List shipping categories
      tags:
      - ShippingCategories
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: shipping categories retrieved
          content:
            application/json:
              schema:
                type: array
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/shipping_methods":
    parameters:
    - name: store_id
      in: path
      description: Store ID
      required: true
      schema:
        type: string
    get:
      summary: List shipping methods
      tags:
      - ShippingMethods
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: shipping methods retrieved
          content:
            application/json:
              schema:
                type: array
        '401':
          description: unauthorized
  "/shop_admin/shops":
    get:
      summary: List shops
      tags:
      - Shops
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: shops retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/social_accounts":
    get:
      summary: List social accounts
      tags:
      - SocialAccounts
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: social accounts retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create social account
      tags:
      - SocialAccounts
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: social account created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                provider:
                  type: string
                uid:
                  type: string
                page_id:
                  type: string
                page_name:
                  type: string
                page_token:
                  type: string
              required:
              - provider
              - uid
              - page_id
              - page_name
              - page_token
  "/shop_admin/social_accounts/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show social account
      tags:
      - SocialAccounts
      security:
      - bearerAuth: []
      responses:
        '200':
          description: social account retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    put:
      summary: Update social account
      tags:
      - SocialAccounts
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: social account updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                page_id:
                  type: string
                page_name:
                  type: string
                page_token:
                  type: string
              required:
              - page_id
              - page_name
              - page_token
  "/shop_admin/social_accounts/autocomplete_selection_variants":
    get:
      summary: Autocomplete selection variants
      tags:
      - SocialAccounts
      security:
      - bearerAuth: []
      parameters:
      - name: term
        in: query
        required: true
        schema:
          type: string
      responses:
        '200':
          description: autocomplete variants returned
        '401':
          description: unauthorized
  "/shop_admin/social_campaigns":
    post:
      summary: Create social campaign
      tags:
      - SocialCampaigns
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: social campaign created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                social_account:
                  type: integer
                post:
                  type: string
                item_list:
                  type: array
                  items:
                    type: string
                place_list:
                  type: array
                  items:
                    type: string
                frequency_quantity:
                  type: string
                frequency_period:
                  type: string
              required:
              - social_account
              - post
              - item_list
              - place_list
              - frequency_quantity
              - frequency_period
  "/shop_admin/social_campaigns/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Update social campaign
      tags:
      - SocialCampaigns
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: social campaign updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                post:
                  type: string
                item_list:
                  type: array
                  items:
                    type: string
                place_list:
                  type: array
                  items:
                    type: string
                frequency_quantity:
                  type: string
                frequency_period:
                  type: string
              required:
              - post
              - item_list
              - place_list
              - frequency_quantity
              - frequency_period
    delete:
      summary: Delete social campaign
      tags:
      - SocialCampaigns
      security:
      - bearerAuth: []
      responses:
        '204':
          description: social campaign deleted
        '401':
          description: unauthorized
  "/shop_admin/staff_members":
    get:
      summary: List staff members
      tags:
      - StaffMembers
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: staff members retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/stock_adjustments":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock adjustments
      tags:
      - StockAdjustments
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock adjustments retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create stock adjustment
      tags:
      - StockAdjustments
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: stock adjustment created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                description:
                  type: string
                transaction_type:
                  type: string
                  enum:
                  - credit
                  - debit
                stock_item_adjustments_attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      stock_item_id:
                        type: integer
                      quantity:
                        type: integer
                    required:
                    - stock_item_id
                    - quantity
              required:
              - name
              - transaction_type
              - stock_item_adjustments_attributes
  "/shop_admin/stores/{store_id}/stock_adjustments/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock adjustment
      tags:
      - StockAdjustments
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock adjustment retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/stock_batches":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock batches
      tags:
      - StockBatches
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock batches retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create stock batch
      tags:
      - StockBatches
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: stock batch created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                count_on_hand:
                  type: integer
                stock_item_id:
                  type: integer
                stock_item_transaction_id:
                  type: integer
                expires_at:
                  type: string
                  format: date-time
                cost_price:
                  type: number
              required:
              - number
              - count_on_hand
              - stock_item_id
              - stock_item_transaction_id
  "/shop_admin/stores/{store_id}/stock_batches/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock batch
      tags:
      - StockBatches
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock batch retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
    patch:
      summary: Update stock batch
      tags:
      - StockBatches
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: stock batch updated with delta_count
        '422':
          description: stale last_updated_at for delta count
        '401':
          description: unauthorized
        '404':
          description: not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                count_on_hand:
                  type: integer
                delta_count:
                  type: integer
                expires_at:
                  type: string
                  format: date-time
                cost_price:
                  type: number
    delete:
      summary: Delete stock batch
      tags:
      - StockBatches
      security:
      - bearerAuth: []
      responses:
        '204':
          description: stock batch deleted
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/stock_item_transactions":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock item transactions
      tags:
      - StockItemTransactions
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock item transactions retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/stock_item_transactions/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock item transaction
      tags:
      - StockItemTransactions
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock item transaction retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/stock_items":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock items
      tags:
      - StockItems
      security:
      - bearerAuth: []
      description: Returns a list of stock items for the shop admin
      operationId: shop-admin-stock-items-list
      parameters:
      - name: page
        in: query
        description: Page number
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        example: 25
        schema:
          type: integer
      - name: q
        in: query
        description: Search query
        example: search term
        schema:
          type: string
      - name: stock_location_id_eq
        in: query
        description: Filter by stock location
        example: 1
        schema:
          type: integer
      - name: variant_id_eq
        in: query
        description: Filter by variant
        example: 1
        schema:
          type: integer
      - name: count_on_hand_gt
        in: query
        description: Filter by count on hand greater than
        example: q
        schema:
          type: integer
      responses:
        '200':
          description: Stock items list retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  stock_items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        count_on_hand:
                          type: integer
                        backorderable:
                          type: boolean
                        cost_currency:
                          type: string
                          nullable: true
                        cost_method:
                          type: string
                          nullable: true
                        cost_price:
                          type: string
                          nullable: true
                        stock_location_id:
                          type: integer
                        storage_location_id:
                          type: integer
                          nullable: true
                        store_variant_id:
                          type: integer
                        variant_id:
                          type: integer
                        display_name:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
                        variant:
                          type: object
                          properties:
                            id:
                              type: integer
                            sku:
                              type: string
                            name:
                              type: string
                        stock_location:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/stock_items/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    patch:
      summary: Update stock item
      tags:
      - StockItems
      security:
      - bearerAuth: []
      description: Updates a specific stock item
      operationId: shop-admin-stock-items-update
      parameters: []
      responses:
        '200':
          description: Stock item updated with delta_weighted_count
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  stock_location_id:
                    type: integer
                  storage_location_id:
                    type: integer
                    nullable: true
                  variant_id:
                    type: integer
                  count_on_hand:
                    type: integer
                  backorderable:
                    type: boolean
                  cost_price:
                    type: string
                  store_variant_id:
                    type: integer
                  cost_method:
                    type: string
                    nullable: true
                  cost_currency:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '422':
          description: Stale last_updated_at for delta request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stock_item:
                  type: object
                  properties:
                    count_on_hand:
                      type: integer
                      example: 150
                    weighted_count_on_hand:
                      type: number
                      example: 12.5
                    delta_count:
                      type: integer
                      example: 5
                    delta_weighted_count:
                      type: number
                      example: 1.25
                    backorderable:
                      type: boolean
                      example: false
    delete:
      summary: Delete stock item
      tags:
      - StockItems
      security:
      - bearerAuth: []
      description: Deletes a specific stock item
      operationId: shop-admin-stock-items-delete
      responses:
        '204':
          description: Stock item deleted
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/stock_locations":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock locations
      tags:
      - StockLocations
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock locations retrieved
          content:
            application/json:
              schema:
                type: array
        '401':
          description: unauthorized
    post:
      summary: Create stock location
      tags:
      - StockLocations
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: storage location created under a facility
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '422':
          description: validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stock_location:
                  type: object
                  properties:
                    name:
                      type: string
                    admin_name:
                      type: string
                    active:
                      type: boolean
                    default:
                      type: boolean
                    backorderable_default:
                      type: boolean
                    propagate_all_variants:
                      type: boolean
                    address1:
                      type: string
                    city:
                      type: string
                    address2:
                      type: string
                    zipcode:
                      type: string
                    phone:
                      type: string
                    country_id:
                      type: integer
                    state_id:
                      type: integer
                    parent_id:
                      type: integer
                    location_type:
                      type: string
                    storage_tracking_mode:
                      type: string
                    code:
                      type: string
                    barcode:
                      type: string
                    capacity:
                      type: number
                    storage_notes:
                      type: string
                  required:
                  - name
              required:
              - stock_location
  "/shop_admin/stores/{store_id}/stock_locations/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock location
      tags:
      - StockLocations
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock location retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stock_locations/{stock_location_id}/stock_movements":
    parameters:
    - name: stock_location_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock movements
      tags:
      - StockMovements
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock movements retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create stock movement
      tags:
      - StockMovements
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: stock movement created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                stock_item_id:
                  type: integer
                action:
                  type: string
              required:
              - quantity
              - stock_item_id
              - action
  "/shop_admin/stores/{store_id}/stock_transfers":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock transfers
      tags:
      - StockTransfers
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock transfers retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/stock_transfers/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock transfer
      tags:
      - StockTransfers
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock transfer retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/stock_units":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List stock units
      tags:
      - StockUnits
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: stock units retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create stock unit
      tags:
      - StockUnits
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: stock unit created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stock_unit:
                  type: object
                  properties:
                    serial_number:
                      type: string
                    stock_item_id:
                      type: integer
                    stock_item_transaction_id:
                      type: integer
                    expires_at:
                      type: string
                      format: date-time
                    equipment_identities_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            type: integer
                          imei:
                            type: string
                          position:
                            type: integer
                          _destroy:
                            type: boolean
                        required:
                        - imei
                  required:
                  - serial_number
                  - stock_item_id
                  - stock_item_transaction_id
                  - equipment_identities_attributes
              required:
              - stock_unit
  "/shop_admin/stores/{store_id}/stock_units/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show stock unit
      tags:
      - StockUnits
      security:
      - bearerAuth: []
      responses:
        '200':
          description: stock unit retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
  "/shop_admin/stores/{store_id}/store_offered_packages":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List store offered packages
      tags:
      - StoreOfferedPackages
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: store offered packages retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/store_offered_packages/{id}/subscribe":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      summary: Subscribe to store offered package
      tags:
      - StoreOfferedPackages
      security:
      - bearerAuth: []
      responses:
        '201':
          description: subscription request sent
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/riders":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List store riders
      tags:
      - StoreRiders
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: store riders retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
    post:
      summary: Create store rider
      tags:
      - StoreRiders
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: store rider created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_rider:
                  type: object
                  properties:
                    rider_profile_attributes:
                      type: object
                      properties:
                        user_attributes:
                          type: object
                          properties:
                            email:
                              type: string
                            first_name:
                              type: string
                            last_name:
                              type: string
                            password:
                              type: string
                            password_confirmation:
                              type: string
              required:
              - store_rider
  "/shop_admin/stores/{store_id}/riders/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show store rider
      tags:
      - StoreRiders
      security:
      - bearerAuth: []
      responses:
        '200':
          description: store rider retrieved
          content:
            application/json:
              schema:
                type: object
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update store rider
      tags:
      - StoreRiders
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: store rider updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_rider:
                  type: object
                  properties:
                    rider_profile_attributes:
                      type: object
                      properties:
                        user_attributes:
                          type: object
                          properties:
                            email:
                              type: string
                            first_name:
                              type: string
                            last_name:
                              type: string
                            password:
                              type: string
                            password_confirmation:
                              type: string
    delete:
      summary: Delete store rider
      tags:
      - StoreRiders
      security:
      - bearerAuth: []
      responses:
        '204':
          description: store rider deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/service_areas":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List store service areas
      tags:
      - StoreServiceAreas
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: store service areas retrieved
        '401':
          description: unauthorized
    post:
      summary: Create store service area
      tags:
      - StoreServiceAreas
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: store service area created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_service_area:
                  type: object
                  properties:
                    service_area_id:
                      type: integer
                    expires_at:
                      type: string
                      format: date-time
                      nullable: true
                  required:
                  - service_area_id
              required:
              - store_service_area
  "/shop_admin/stores/{store_id}/service_areas/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show store service area
      tags:
      - StoreServiceAreas
      security:
      - bearerAuth: []
      responses:
        '200':
          description: store service area retrieved
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update store service area
      tags:
      - StoreServiceAreas
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: store service area updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_service_area:
                  type: object
                  properties:
                    service_area_id:
                      type: integer
    delete:
      summary: Delete store service area
      tags:
      - StoreServiceAreas
      security:
      - bearerAuth: []
      responses:
        '204':
          description: store service area deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/users":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List store users
      tags:
      - StoreUsers
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: store users retrieved
        '401':
          description: unauthorized
    post:
      summary: Create store user
      tags:
      - StoreUsers
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: store user created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_user:
                  type: object
                  properties:
                    user_id:
                      type: integer
                    role_id:
                      type: integer
                    expires_at:
                      type: string
                      format: date-time
                      nullable: true
                  required:
                  - user_id
                  - role_id
              required:
              - store_user
  "/shop_admin/stores/{store_id}/users/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Update store user
      tags:
      - StoreUsers
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: store user updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_user:
                  type: object
                  properties:
                    expires_at:
                      type: string
                      format: date-time
                      nullable: true
    delete:
      summary: Delete store user
      tags:
      - StoreUsers
      security:
      - bearerAuth: []
      responses:
        '204':
          description: store user deleted
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/store_variants":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List store variants
      tags:
      - StoreVariants
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: store variants retrieved
        '401':
          description: unauthorized
    post:
      summary: Create store variant
      tags:
      - StoreVariants
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: store variant created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_variant:
                  type: object
                  properties:
                    variant_id:
                      type: integer
                    price:
                      type: number
                    currency:
                      type: string
                  required:
                  - variant_id
                  - price
                  - currency
              required:
              - store_variant
  "/shop_admin/stores/{store_id}/store_variants/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show store variant
      tags:
      - StoreVariants
      security:
      - bearerAuth: []
      responses:
        '200':
          description: store variant retrieved
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update store variant
      tags:
      - StoreVariants
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: store variant updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store_variant:
                  type: object
                  properties:
                    price:
                      type: number
    delete:
      summary: Delete store variant
      tags:
      - StoreVariants
      security:
      - bearerAuth: []
      responses:
        '204':
          description: store variant deleted
        '401':
          description: unauthorized
  "/shop_admin/stores":
    get:
      summary: List stores
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Returns a list of stores for the shop admin
      operationId: shop-admin-stores-list
      parameters:
      - name: page
        in: query
        description: Page number
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        example: 25
        schema:
          type: integer
      - name: q
        in: query
        description: Search query
        example: search term
        schema:
          type: string
      - name: name_cont
        in: query
        description: Filter by store name
        example: store name
        schema:
          type: string
      - name: code_eq
        in: query
        description: Filter by store code
        example: STORE001
        schema:
          type: string
      responses:
        '200':
          description: Stores list retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  stores:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        url:
                          type: string
                        code:
                          type: string
                        mail_from_address:
                          type: string
                        default_currency:
                          type: string
                        default_locale:
                          type: string
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type: string
                          format: date-time
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    post:
      summary: Create store
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Creates a new store
      operationId: shop-admin-stores-create
      parameters: []
      responses:
        '201':
          description: Store created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  url:
                    type: string
                  meta_description:
                    type:
                    - string
                    - 'null'
                  meta_keywords:
                    type:
                    - string
                    - 'null'
                  seo_title:
                    type:
                    - string
                    - 'null'
                  mail_from_address:
                    type: string
                  customer_support_email:
                    type:
                    - string
                    - 'null'
                  default_currency:
                    type: string
                  code:
                    type: string
                  default:
                    type: boolean
                  facebook:
                    type:
                    - string
                    - 'null'
                  twitter:
                    type:
                    - string
                    - 'null'
                  instagram:
                    type:
                    - string
                    - 'null'
                  supported_currencies:
                    type: string
                  default_locale:
                    type: string
                  supported_locales:
                    type: string
                  fixed_delivery_charges:
                    type:
                    - string
                    - 'null'
                  max_distance:
                    type: string
                  minimum_delivery:
                    type: string
                  contains_delivery_polygon:
                    type: boolean
                  likes:
                    type: integer
                  rating:
                    type: number
                  total_reviews:
                    type: integer
                  featured_category_ids:
                    type: array
                    items:
                      type: integer
                  order_format:
                    type: string
                  featured_brand_ids:
                    type: array
                    items:
                      type: integer
                  currency:
                    type: string
                  enable_option_label:
                    type: boolean
                  enable_multiple_prices:
                    type: boolean
                  track_inventory_levels:
                    type: boolean
                  shop:
                    type:
                    - object
                    - 'null'
                  address:
                    type: object
                  store_address:
                    type: object
                  translations:
                    type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store:
                  type: object
                  properties:
                    name:
                      type: string
                      example: New Store
                    url:
                      type: string
                      example: newstore.example.com
                    mail_from_address:
                      type: string
                      example: store@example.com
                    code:
                      type: string
                      example: NEWSTORE
                    default_currency:
                      type: string
                      example: USD
                    default_locale:
                      type: string
                      example: en
                  required:
                  - name
                  - url
                  - code
  "/shop_admin/stores/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get store
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Returns a specific store
      operationId: shop-admin-stores-show
      responses:
        '200':
          description: Store found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  url:
                    type: string
                  meta_description:
                    type:
                    - string
                    - 'null'
                  meta_keywords:
                    type:
                    - string
                    - 'null'
                  seo_title:
                    type:
                    - string
                    - 'null'
                  mail_from_address:
                    type: string
                  customer_support_email:
                    type:
                    - string
                    - 'null'
                  default_currency:
                    type: string
                  code:
                    type: string
                  default:
                    type: boolean
                  facebook:
                    type:
                    - string
                    - 'null'
                  twitter:
                    type:
                    - string
                    - 'null'
                  instagram:
                    type:
                    - string
                    - 'null'
                  supported_currencies:
                    type:
                    - string
                    - 'null'
                  default_locale:
                    type:
                    - string
                    - 'null'
                  supported_locales:
                    type:
                    - string
                    - 'null'
                  fixed_delivery_charges:
                    type:
                    - string
                    - 'null'
                  max_distance:
                    type:
                    - string
                    - 'null'
                  minimum_delivery:
                    type:
                    - string
                    - 'null'
                  contains_delivery_polygon:
                    type: boolean
                  likes:
                    type: integer
                  rating:
                    type: number
                  total_reviews:
                    type: integer
                  featured_category_ids:
                    type: array
                    items:
                      type: integer
                  order_format:
                    type:
                    - string
                    - 'null'
                  featured_brand_ids:
                    type: array
                    items:
                      type: integer
                  currency:
                    type:
                    - string
                    - 'null'
                  enable_option_label:
                    type: boolean
                  enable_multiple_prices:
                    type: boolean
                  track_inventory_levels:
                    type: boolean
                  shop:
                    type:
                    - object
                    - 'null'
                  address:
                    type:
                    - object
                    - 'null'
                  store_address:
                    type:
                    - object
                    - 'null'
                  translations:
                    type: object
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    patch:
      summary: Update store
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Updates a specific store
      operationId: shop-admin-stores-update
      parameters: []
      responses:
        '200':
          description: Store updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  name:
                    type: string
                  url:
                    type: string
                  meta_description:
                    type:
                    - string
                    - 'null'
                  meta_keywords:
                    type:
                    - string
                    - 'null'
                  seo_title:
                    type:
                    - string
                    - 'null'
                  mail_from_address:
                    type: string
                  customer_support_email:
                    type:
                    - string
                    - 'null'
                  default_currency:
                    type: string
                  code:
                    type: string
                  default:
                    type: boolean
                  facebook:
                    type:
                    - string
                    - 'null'
                  twitter:
                    type:
                    - string
                    - 'null'
                  instagram:
                    type:
                    - string
                    - 'null'
                  supported_currencies:
                    type:
                    - string
                    - 'null'
                  default_locale:
                    type:
                    - string
                    - 'null'
                  supported_locales:
                    type:
                    - string
                    - 'null'
                  fixed_delivery_charges:
                    type:
                    - string
                    - 'null'
                  max_distance:
                    type:
                    - string
                    - 'null'
                  minimum_delivery:
                    type:
                    - string
                    - 'null'
                  contains_delivery_polygon:
                    type: boolean
                  likes:
                    type: integer
                  rating:
                    type: number
                  total_reviews:
                    type: integer
                  featured_category_ids:
                    type: array
                    items:
                      type: integer
                  order_format:
                    type:
                    - string
                    - 'null'
                  featured_brand_ids:
                    type: array
                    items:
                      type: integer
                  currency:
                    type:
                    - string
                    - 'null'
                  enable_option_label:
                    type: boolean
                  enable_multiple_prices:
                    type: boolean
                  track_inventory_levels:
                    type: boolean
                  shop:
                    type:
                    - object
                    - 'null'
                  address:
                    type: object
                  store_address:
                    type: object
                  translations:
                    type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                store:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Updated Store Name
                    url:
                      type: string
                      example: updatedstore.example.com
                    mail_from_address:
                      type: string
                      example: updated@example.com
    delete:
      summary: Delete store
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Deletes a specific store
      operationId: shop-admin-stores-delete
      responses:
        '204':
          description: Store deleted
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{id}/dashboard":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get store dashboard
      tags:
      - Stores
      security:
      - bearerAuth: []
      description: Returns dashboard data for a specific store
      operationId: shop-admin-stores-dashboard
      responses:
        '200':
          description: Store dashboard data retrieved
        '404':
          description: Record not found
        '401':
          description: Authentication Failed
  "/shop_admin/subscriptions":
    get:
      summary: List subscriptions
      tags:
      - Subscriptions
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: subscriptions retrieved
        '401':
          description: unauthorized
  "/shop_admin/subscriptions/cancel_subscriptions":
    post:
      summary: Cancel subscriptions
      tags:
      - Subscriptions
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '302':
          description: subscriptions cancelled
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscription_ids:
                  type: array
                  items:
                    type: integer
              required:
              - subscription_ids
  "/shop_admin/supplier_invites":
    get:
      summary: List supplier invites
      tags:
      - SupplierInvites
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: supplier invites retrieved
        '401':
          description: unauthorized
  "/shop_admin/supplier_invites/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    put:
      summary: Update supplier invite
      tags:
      - SupplierInvites
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '302':
          description: supplier invite updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                supplier_invite:
                  type: object
                  properties:
                    client_store_id:
                      type: integer
                      nullable: true
    delete:
      summary: Delete supplier invite
      tags:
      - SupplierInvites
      security:
      - bearerAuth: []
      responses:
        '204':
          description: supplier invite deleted
        '401':
          description: unauthorized
  "/shop_admin/supplier_invites/{id}/accept":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      summary: Accept supplier invite
      tags:
      - SupplierInvites
      security:
      - bearerAuth: []
      responses:
        '201':
          description: supplier invite accepted
        '401':
          description: unauthorized
  "/shop_admin/supplier_invites/{id}/reject":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      summary: Reject supplier invite
      tags:
      - SupplierInvites
      security:
      - bearerAuth: []
      responses:
        '302':
          description: supplier invite rejected
        '401':
          description: unauthorized
  "/shop_admin/stores/{store_id}/suppliers":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: List suppliers
      tags:
      - Suppliers
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        description: Page number
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        description: Items per page
        schema:
          type: integer
      - name: q
        in: query
        required: false
        description: Search query
        schema:
          type: string
      responses:
        '200':
          description: suppliers retrieved with search query
          content:
            application/json:
              schema:
                type: object
                properties:
                  suppliers:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                      properties:
                        id:
                          type: integer
                        type:
                          type: string
                        name:
                          type: string
                        code:
                          type: string
                        default_currency:
                          type: string
                        address:
                          type:
                          - object
                          - 'null'
                        locale:
                          type: string
                        time_zone:
                          type: string
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  user_likes:
                    type: array
        '401':
          description: unauthorized
        '404':
          description: store not found
    post:
      summary: Create a supplier
      tags:
      - Suppliers
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: supplier created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  supplier:
                    type: object
                    properties:
                      id:
                        type: integer
                      type:
                        type: string
                      name:
                        type: string
                      code:
                        type: string
                      email:
                        type: string
                      phone:
                        type:
                        - string
                        - 'null'
                      default_currency:
                        type: string
                      address:
                        type:
                        - object
                        - 'null'
                      locale:
                        type: string
                      time_zone:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      purchases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            number:
                              type: string
                            total:
                              type: string
                            state:
                              type: string
                            created_at:
                              type: string
                              format: date-time
        '422':
          description: invalid supplier - all fields invalid
        '404':
          description: store not found
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                supplier:
                  type: object
                  properties:
                    name:
                      type: string
                    email:
                      type: string
                    phone:
                      type: string
                    address:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    country:
                      type: string
                    postal_code:
                      type: string
                    default_currency:
                      type: string
                    supported_currencies:
                      type: string
                  required:
                  - name
  "/shop_admin/stores/{store_id}/suppliers/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      description: Supplier ID
      schema:
        type: integer
    get:
      summary: Get a supplier
      tags:
      - Suppliers
      security:
      - bearerAuth: []
      responses:
        '200':
          description: supplier retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  supplier:
                    type: object
                    properties:
                      id:
                        type: integer
                      type:
                        type: string
                      name:
                        type: string
                      code:
                        type: string
                      email:
                        type: string
                      phone:
                        type:
                        - string
                        - 'null'
                      default_currency:
                        type: string
                      address:
                        type:
                        - object
                        - 'null'
                      locale:
                        type: string
                      time_zone:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      purchases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            number:
                              type: string
                            total:
                              type: string
                            state:
                              type: string
                            created_at:
                              type: string
                              format: date-time
        '404':
          description: supplier not found
    put:
      summary: Update a supplier
      tags:
      - Suppliers
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: supplier updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  supplier:
                    type: object
                    properties:
                      id:
                        type: integer
                      type:
                        type: string
                      name:
                        type: string
                      code:
                        type: string
                      email:
                        type: string
                      phone:
                        type:
                        - string
                        - 'null'
                      default_currency:
                        type: string
                      address:
                        type:
                        - object
                        - 'null'
                      locale:
                        type: string
                      time_zone:
                        type: string
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                      purchases:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            number:
                              type: string
                            total:
                              type: string
                            state:
                              type: string
                            created_at:
                              type: string
                              format: date-time
        '404':
          description: supplier not found
        '422':
          description: invalid supplier - empty name
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                supplier:
                  type: object
                  properties:
                    name:
                      type: string
                    email:
                      type: string
                    phone:
                      type: string
                    address:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    country:
                      type: string
                    postal_code:
                      type: string
                    default_currency:
                      type: string
                    supported_currencies:
                      type: string
    delete:
      summary: Delete a supplier
      tags:
      - Suppliers
      security:
      - bearerAuth: []
      responses:
        '204':
          description: supplier deleted successfully
        '404':
          description: supplier not found
  "/shop_admin/stores/{store_id}/tax_categories":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: List tax categories
      tags:
      - TaxCategories
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: tax categories retrieved
        '401':
          description: unauthorized
    post:
      summary: Create tax category
      tags:
      - TaxCategories
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '201':
          description: tax category created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tax_category:
                  type: object
                  properties:
                    name:
                      type: string
                    tax_code:
                      type: string
                      nullable: true
                    store_id:
                      type: integer
                  required:
                  - name
                  - store_id
              required:
              - tax_category
  "/shop_admin/stores/{store_id}/tax_categories/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show tax category
      tags:
      - TaxCategories
      security:
      - bearerAuth: []
      responses:
        '200':
          description: tax category retrieved
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update tax category
      tags:
      - TaxCategories
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: tax category nested tax rate updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tax_category:
                  type: object
                  properties:
                    name:
                      type: string
    delete:
      summary: Delete tax category
      tags:
      - TaxCategories
      security:
      - bearerAuth: []
      responses:
        '204':
          description: tax category deleted
        '401':
          description: unauthorized
  "/shop_admin/taxons":
    get:
      summary: List taxons
      tags:
      - Taxons
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: taxons retrieved
        '401':
          description: unauthorized
    post:
      summary: Create taxon
      tags:
      - Taxons
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '201':
          description: taxon created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                taxon:
                  type: object
                  properties:
                    name:
                      type: string
                    taxonomy_id:
                      type: integer
                    parent_id:
                      type: integer
                      nullable: true
                  required:
                  - name
                  - taxonomy_id
              required:
              - taxon
  "/shop_admin/taxons/{id}":
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Show taxon
      tags:
      - Taxons
      security:
      - bearerAuth: []
      responses:
        '200':
          description: taxon retrieved
        '401':
          description: unauthorized
        '404':
          description: not found
    put:
      summary: Update taxon
      tags:
      - Taxons
      security:
      - bearerAuth: []
      parameters: []
      responses:
        '200':
          description: taxon updated
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                taxon:
                  type: object
                  properties:
                    name:
                      type: string
    delete:
      summary: Delete taxon
      tags:
      - Taxons
      security:
      - bearerAuth: []
      responses:
        '204':
          description: taxon deleted
        '401':
          description: unauthorized
  "/shop_admin/users":
    get:
      summary: List users
      tags:
      - Users
      security:
      - bearerAuth: []
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        required: false
        schema:
          type: integer
      - name: q
        in: query
        required: false
        schema:
          type: object
      responses:
        '200':
          description: users retrieved
        '401':
          description: unauthorized
  "/shop_admin/variants":
    get:
      summary: List variants
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Returns a list of variants for the shop admin
      operationId: shop-admin-variants-list
      parameters:
      - name: page
        in: query
        description: Page number
        example: 1
        schema:
          type: integer
      - name: per_page
        in: query
        description: Items per page
        example: 25
        schema:
          type: integer
      - name: q
        in: query
        description: Search query
        example: search term
        schema:
          type: string
      - name: product_id_eq
        in: query
        description: Filter by product
        example: 1
        schema:
          type: integer
      - name: sku_cont
        in: query
        description: Filter by SKU
        example: SKU-001
        schema:
          type: string
      responses:
        '200':
          description: Variants list retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  variants:
                    type: array
                    items:
                      type: object
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/products/{product_id}/variants/{id}":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    - name: product_id
      in: path
      required: true
      schema:
        type: integer
    - name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      summary: Get variant
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Returns a specific variant
      operationId: shop-admin-variants-show
      responses:
        '200':
          description: Variant found
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  sku:
                    type: string
                  price:
                    type: string
                  weight:
                    type: string
                  height:
                    type: string
                  width:
                    type: string
                  depth:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      description:
                        type: string
                  option_values:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        name:
                          type: string
                        presentation:
                          type: string
                  stock_items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                        count_on_hand:
                          type: integer
                        stock_location:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
    patch:
      summary: Update variant
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Updates a specific variant
      operationId: shop-admin-variants-update
      parameters: []
      responses:
        '200':
          description: Variant updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  sku:
                    type: string
                  price:
                    type: string
                  weight:
                    type: string
                  height:
                    type: string
                  width:
                    type: string
                  depth:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  product:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      description:
                        type: string
                  option_values:
                    type: array
                    items:
                      type: object
                  stock_items:
                    type: array
                    items:
                      type: object
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variant:
                  type: object
                  properties:
                    sku:
                      type: string
                      example: UPDATED-SKU-001
                    price:
                      type: number
                      example: 149.99
                    weight:
                      type: number
                      example: 2.0
                    height:
                      type: number
                      example: 12
                    width:
                      type: number
                      example: 6
                    depth:
                      type: number
                      example: 4
    delete:
      summary: Delete variant
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Deletes a specific variant
      operationId: shop-admin-variants-delete
      responses:
        '204':
          description: Variant deleted
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/variants":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    post:
      summary: Create variant
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Creates a new variant
      operationId: shop-admin-variants-create
      parameters: []
      responses:
        '201':
          description: Variant created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  sku:
                    type: string
                  weight:
                    type: string
                    nullable: true
                  height:
                    type: string
                    nullable: true
                  width:
                    type: string
                    nullable: true
                  depth:
                    type: string
                    nullable: true
                  is_master:
                    type: boolean
                  slug:
                    type: string
                    nullable: true
                  upc:
                    type: string
                    nullable: true
                  gtin:
                    type: string
                    nullable: true
                  is_google_ad_friendly:
                    type: boolean
                  weighted_ratio:
                    type: integer
                    nullable: true
                  is_weighted:
                    type: boolean
                  options_text:
                    type: string
                    nullable: true
                  is_destroyed:
                    type: boolean
                  option_values:
                    type: array
                    items:
                      type: object
                  images:
                    type: array
                    items:
                      type: object
                  likes_count:
                    type: integer
                  likes:
                    type: integer
                  name:
                    type: string
                    nullable: true
                  display_name:
                    type: string
                    nullable: true
                  display_price:
                    type: string
                    nullable: true
                  price:
                    type: string
                    nullable: true
                  available_on:
                    type: string
                    nullable: true
                  discontinue_on:
                    type: string
                    nullable: true
                  currency:
                    type: string
                    nullable: true
                  store_variants:
                    type: array
                    items:
                      type: object
                  in_stock:
                    type: boolean
                  is_backorderable:
                    type: boolean
                  total_on_hand:
                    type: integer
                  weighted_total_on_hand:
                    type: number
                    nullable: true
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                variant:
                  type: object
                  properties:
                    product_id:
                      type: integer
                      example: 1
                    sku:
                      type: string
                      example: VARIANT-SKU-001
                    price:
                      type: number
                      example: 99.99
                    weight:
                      type: number
                      example: 1.5
                    height:
                      type: number
                      example: 10
                    width:
                      type: number
                      example: 5
                    depth:
                      type: number
                      example: 3
                    shipping_category_id:
                      type: integer
                      example: 1
                    option_values_attributes:
                      type: array
                      items:
                        type: object
                        properties:
                          option_type_id:
                            type: integer
                            example: 1
                          name:
                            type: string
                            example: Large
                  required:
                  - product_id
                  - sku
                  - price
  "/shop_admin/variants/bulk_delete":
    post:
      summary: Bulk delete variants
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Deletes multiple variants at once
      operationId: shop-admin-variants-bulk-delete
      parameters: []
      responses:
        '204':
          description: Variants deleted
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 1
                  - 2
                  - 3
              required:
              - ids
  "/shop_admin/variants/bulk_update":
    post:
      summary: Bulk update variants
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Updates multiple variants at once
      operationId: shop-admin-variants-bulk-update
      parameters: []
      responses:
        '200':
          description: Variants updated
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                    sku:
                      type: string
                    price:
                      type: string
                    updated_at:
                      type: string
                      format: date-time
        '422':
          description: Invalid request
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ids:
                  type: array
                  items:
                    type: integer
                  example:
                  - 1
                  - 2
                  - 3
                variant:
                  type: object
                  properties:
                    price:
                      type: number
                      example: 99.99
                    weight:
                      type: number
                      example: 1.5
              required:
              - ids
              - variant
  "/shop_admin/variants/autocomplete_products":
    get:
      summary: Autocomplete products for variants
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Returns products for autocomplete when creating variants
      operationId: shop-admin-variants-autocomplete-products
      parameters:
      - name: term
        in: query
        required: true
        description: Search term
        example: product name
        schema:
          type: string
      responses:
        '200':
          description: Products for autocomplete retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  products:
                    type: array
                    items:
                      type: object
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/variants/autocomplete_products_in_shop":
    get:
      summary: Autocomplete products in shop for variants
      tags:
      - Variants
      security:
      - bearerAuth: []
      description: Returns products available in the shop for autocomplete
      operationId: shop-admin-variants-autocomplete-products-in-shop
      parameters:
      - name: term
        in: query
        required: true
        description: Search term
        example: product name
        schema:
          type: string
      responses:
        '200':
          description: Shop products for autocomplete retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  total_count:
                    type: integer
                  pages:
                    type: integer
                  current_page:
                    type: integer
                  per_page:
                    type: integer
                  products:
                    type: array
                    items:
                      type: object
        '401':
          description: Authentication Failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  errors:
                    type: array
                    items:
                      type: string
  "/shop_admin/stores/{store_id}/zones":
    parameters:
    - name: store_id
      in: path
      required: true
      schema:
        type: string
    post:
      summary: Create zone
      tags:
      - Zones
      security:
      - bearerAuth: []
      parameters:
      - name: store_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '302':
          description: state zone created
        '401':
          description: unauthorized
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                zone:
                  type: object
                  properties:
                    name:
                      type: string
                    store_id:
                      type: integer
                    description:
                      type: string
                      nullable: true
                    kind:
                      type: string
                    country_members:
                      type: array
                      items:
                        type: integer
                      nullable: true
                    state_members:
                      type: array
                      items:
                        type: integer
                      nullable: true
                  required:
                  - name
                  - store_id
                  - kind
              required:
              - zone
servers:
- url: http://{defaultHost}
  description: Development server
- url: https://www.howmuchpos.com
  description: Production server
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
security:
- bearerAuth: []
