CompanyCam Tags API

The Tags API from CompanyCam — 2 operation(s) for tags.

OpenAPI Specification

companycam-tags-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: v2
  title: Core Checklists Tags API
servers:
- url: https://api.companycam.com/v2
security:
- BearerAuth: []
tags:
- name: Tags
paths:
  /tags:
    get:
      summary: List All Tags
      operationId: listTags
      tags:
      - Tags
      parameters:
      - name: page
        in: query
        schema:
          type: integer
          format: int32
      - name: per_page
        in: query
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: List of tags sorted alphabetically
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Tag'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Bad Request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Record not found
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - An unexpected error occured
    post:
      summary: Create Tag
      operationId: createTag
      tags:
      - Tags
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                tag:
                  type: object
                  properties:
                    display_value:
                      type: string
      responses:
        '201':
          description: The created photo tag(s)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Bad Request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Record not found
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - An unexpected error occured
  /tags/{id}:
    get:
      summary: Retrieve tag
      operationId: getTag
      tags:
      - Tags
      parameters:
      - name: id
        in: path
        description: ID of the Tag
        required: true
        schema:
          type: string
          format: id
      responses:
        '200':
          description: Details about the tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Bad Request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Record not found
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - An unexpected error occured
    put:
      summary: Update Tag
      parameters:
      - name: id
        in: path
        description: ID of the Tag
        required: true
        schema:
          type: string
          format: id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                tag:
                  type: object
                  properties:
                    display_value:
                      type: string
      operationId: updateTag
      tags:
      - Tags
      responses:
        '201':
          description: The updated tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Bad Request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Record not found
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - An unexpected error occured
    delete:
      summary: Delete a Tag
      parameters:
      - name: id
        in: path
        description: ID of the Tag
        required: true
        schema:
          type: string
          format: id
      operationId: deleteTag
      tags:
      - Tags
      responses:
        '204':
          description: No Content
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Bad Request
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - Record not found
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                errors:
                - An unexpected error occured
components:
  schemas:
    Error:
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          example:
          - Record not found
    Tag:
      type: object
      required:
      - id
      properties:
        id:
          type: string
          description: A unique ID for the Tag.
          example: '48892885'
        company_id:
          type: string
          description: A unique ID for the Company the Tag belongs to
          example: '8292212'
        display_value:
          type: string
          description: The display value of the Tag. Used to display to the user
          example: Front Side
        value:
          type: string
          description: The lowercase version of the display_value. This is useful for searching and sorting
          example: front side
        created_at:
          type: integer
          format: int32
          description: Timestamp when the Tag was created on the server
          example: 1152230608
        updated_at:
          type: integer
          format: int32
          description: Timestamp when the Tag was last updated
          example: 1152230700
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer