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

# Create a service

> Creates a service in the store.

Creates a service in the store. The `shop` is set server-side from the installation and must not be supplied. Services have no category field. Requires the `WRITE_INVENTORY` scope.


## OpenAPI

````yaml POST /services
openapi: 3.1.0
info:
  title: Salesive Apps API — Catalog
  description: >-
    Catalog data endpoints (products, foods and services) callable by an
    installed third-party app using its app access token. The target store is
    bound to the token server-side by the OAuth install flow.
  version: 1.0.0
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /services:
    post:
      tags:
        - services
      summary: Create a service
      description: >-
        Creates a service in the store. The `shop` is set server-side from the
        installation and must not be supplied. Services have no category field.
        Requires the `WRITE_INVENTORY` scope.
      operationId: createService
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Service name (max 100 chars).
                price:
                  type: number
                  description: Price (>= 0).
                description:
                  type: string
                  description: Service description.
                promoPrice:
                  type: number
                  nullable: true
                  description: Promotional price (>= 0); nullable.
                images:
                  type: array
                  items:
                    type: string
                  description: Array of image URLs.
                video:
                  type: string
                  nullable: true
                  description: Video URL; nullable.
                available:
                  type: boolean
                  description: Whether the service is available to book. Default true.
                listed:
                  type: boolean
                  description: >-
                    Whether the service is listed on the storefront. Default
                    true.
                addons:
                  type: array
                  items:
                    $ref: '#/components/schemas/Addon'
                  description: >-
                    Optional add-ons. Each: name (string, required), price
                    (number, required), maxQuantity (integer, default 10), image
                    (string), available (boolean, default true), description
                    (string).
              required:
                - name
                - price
              example:
                name: Deep Tissue Massage
                description: 60-minute full-body massage
                price: 80
                images:
                  - https://cdn.salesive.com/sv/massage.jpg
                available: true
                listed: true
                addons:
                  - name: Hot stones
                    price: 15
                    maxQuantity: 1
      responses:
        '201':
          description: Create a service — success.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - success
                  - message
                  - data
                properties:
                  status:
                    type: integer
                    example: 201
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Create a service
                  data:
                    allOf:
                      - $ref: '#/components/schemas/Service'
                    example:
                      _id: 66a3b1c4e1b3a40012ef2001
                      name: Deep Tissue Massage
                      description: 60-minute full-body massage
                      price: 80
                      promoPrice: null
                      images:
                        - https://cdn.salesive.com/sv/massage.jpg
                      video: null
                      available: true
                      listed: true
                      addons:
                        - name: Hot stones
                          price: 15
                          maxQuantity: 1
                          available: true
                          description: ''
                      shop: 66a1eee0e1b3a40012ab0001
                      createdAt: '2026-06-28T09:30:00.000Z'
                      updatedAt: '2026-06-28T09:30:00.000Z'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    Addon:
      type: object
      description: An optional add-on for a food or service item.
      required:
        - name
        - price
      properties:
        _id:
          type: string
        name:
          type: string
        price:
          type: number
          minimum: 0
        maxQuantity:
          type: integer
          default: 10
        image:
          type: string
          nullable: true
        available:
          type: boolean
          default: true
        description:
          type: string
    Service:
      type: object
      description: A business service item.
      properties:
        _id:
          type: string
        name:
          type: string
        description:
          type: string
        price:
          type: number
        promoPrice:
          type: number
          nullable: true
        images:
          type: array
          items:
            type: string
        video:
          type: string
          nullable: true
        available:
          type: boolean
        listed:
          type: boolean
        addons:
          type: array
          items:
            $ref: '#/components/schemas/Addon'
        shop:
          $ref: '#/components/schemas/ShopRef'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ShopRef:
      description: >-
        The owning store. Bound server-side to the app token; populated as an
        object on reads, returned as an id string on writes.
      oneOf:
        - type: string
          description: Store ObjectId.
        - type: object
          properties:
            _id:
              type: string
            name:
              type: string
              example: Acme Store
            logo:
              type: string
              nullable: true
            currency:
              $ref: '#/components/schemas/Currency'
            isActive:
              type: boolean
    Currency:
      type: object
      description: The store's currency.
      properties:
        _id:
          type: string
        name:
          type: string
        symbol:
          type: string
          example: $
        code:
          type: string
          example: USD
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 401
              success:
                type: boolean
                example: false
              message:
                type: string
                example: Unauthorized
              data:
                type: object
                nullable: true
    Forbidden:
      description: >-
        The app token is valid but lacks the OAuth scope required by this
        endpoint.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                example: 403
              success:
                type: boolean
                example: false
              message:
                type: string
                example: 'Forbidden: missing required scope'
              data:
                type: object
                nullable: true
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````