Puzzle Products API

The Products API from Puzzle — 2 operation(s) for products.

OpenAPI Specification

puzzle-products-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Puzzle Api Accounts Products API
  description: Puzzle Api
  version: '0'
servers:
- url: https://staging.southparkdata.com/rest/v0
tags:
- name: Products
paths:
  /company/{id}/products:
    get:
      operationId: productsApi
      summary: Get Products
      description: 'Retrieves a list of all of the company''s products.


        Required scope: read:company'
      tags:
      - Products
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: name
        in: query
        required: false
        schema:
          type: string
      - name: serviceType
        in: query
        required: false
        schema:
          type: string
          enum:
          - Inventory
          - NonInventory
          - Service
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - Active
          - Inactive
      - name: sortBy
        in: query
        required: false
        schema:
          type: string
          enum:
          - INSERT_ORDER_DESC
          - INSERT_ORDER_ASC
          - NAME_ASC
          - NAME_DESC
      - name: count
        in: query
        required: false
        schema:
          type: integer
      - name: after
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          minLength: 1
                          description: Partner-facing external identifier
                        name:
                          type: string
                          nullable: true
                        serviceType:
                          type: string
                          enum:
                          - Inventory
                          - NonInventory
                          - Service
                          nullable: true
                        status:
                          type: string
                          enum:
                          - Active
                          - Inactive
                          nullable: true
                        sku:
                          type: string
                          nullable: true
                        description:
                          type: string
                          nullable: true
                        priceRate:
                          type: string
                          minLength: 1
                          description: Arbitrary-precision decimal, serialized as a string
                          nullable: true
                      required:
                      - id
                      - name
                      - serviceType
                      - status
                      - sku
                      - description
                      - priceRate
                  pageInfo:
                    type: object
                    properties:
                      endCursor:
                        type: string
                        nullable: true
                      hasNextPage:
                        type: boolean
                      total:
                        type: integer
                        nullable: true
                    required:
                    - endCursor
                    - hasNextPage
                    - total
                required:
                - items
                - pageInfo
    post:
      operationId: createProductApi
      summary: Create Product
      description: 'Create a product for the given company.


        Requires scope: write:product'
      tags:
      - Products
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                serviceType:
                  type: string
                  enum:
                  - Inventory
                  - NonInventory
                  - Service
                status:
                  type: string
                  enum:
                  - Active
                  - Inactive
                sku:
                  type: string
                description:
                  type: string
                priceRate:
                  type: string
                  minLength: 1
                  description: Arbitrary-precision decimal, serialized as a string
              required:
              - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                    nullable: true
                  serviceType:
                    type: string
                    enum:
                    - Inventory
                    - NonInventory
                    - Service
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Active
                    - Inactive
                    nullable: true
                  sku:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  priceRate:
                    type: string
                    minLength: 1
                    description: Arbitrary-precision decimal, serialized as a string
                    nullable: true
                required:
                - id
                - name
                - serviceType
                - status
                - sku
                - description
                - priceRate
  /company/{id}/products/{productId}:
    get:
      operationId: productApi
      summary: Get Product
      description: 'Get a single product by ID for the company.


        Required scope: read:company'
      tags:
      - Products
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: productId
        in: path
        required: true
        description: The product ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                    nullable: true
                  serviceType:
                    type: string
                    enum:
                    - Inventory
                    - NonInventory
                    - Service
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Active
                    - Inactive
                    nullable: true
                  sku:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  priceRate:
                    type: string
                    minLength: 1
                    description: Arbitrary-precision decimal, serialized as a string
                    nullable: true
                required:
                - id
                - name
                - serviceType
                - status
                - sku
                - description
                - priceRate
    patch:
      operationId: updateProductApi
      summary: Update Product
      description: 'Update a product for the given company.


        Requires scope: write:product'
      tags:
      - Products
      parameters:
      - name: id
        in: path
        required: true
        description: The company ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      - name: productId
        in: path
        required: true
        description: The product ID
        schema:
          type: string
          minLength: 1
          description: Partner-facing external identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                serviceType:
                  type: string
                  enum:
                  - Inventory
                  - NonInventory
                  - Service
                status:
                  type: string
                  enum:
                  - Active
                  - Inactive
                sku:
                  type: string
                description:
                  type: string
                priceRate:
                  type: string
                  minLength: 1
                  description: Arbitrary-precision decimal, serialized as a string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    description: Partner-facing external identifier
                  name:
                    type: string
                    nullable: true
                  serviceType:
                    type: string
                    enum:
                    - Inventory
                    - NonInventory
                    - Service
                    nullable: true
                  status:
                    type: string
                    enum:
                    - Active
                    - Inactive
                    nullable: true
                  sku:
                    type: string
                    nullable: true
                  description:
                    type: string
                    nullable: true
                  priceRate:
                    type: string
                    minLength: 1
                    description: Arbitrary-precision decimal, serialized as a string
                    nullable: true
                required:
                - id
                - name
                - serviceType
                - status
                - sku
                - description
                - priceRate