Credentially Placement Notes API

Notes attached to a placement — free-text annotations.

OpenAPI Specification

credentially-placement-notes-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Credentially Public Compliance-packages Placement Notes API
  description: Public API Proxy with Rate Limiting and Audit
  version: 2.0.0
servers:
- url: https://app.credentially.io/gateway
  description: Generated server url
tags:
- name: Placement Notes
  description: Notes attached to a placement — free-text annotations.
paths:
  /api/placements/{placementId}/notes:
    get:
      tags:
      - Placement Notes
      summary: List notes for a placement
      description: '


        **Rate Limit:** `list-placement-notes` (100 req / 1s)'
      operationId: getNotes
      parameters:
      - name: placementId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      responses:
        '200':
          description: Notes retrieved
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlacementNoteResponseDto'
        '403':
          description: Token lacks required scope
        '404':
          description: Placement not found for this organisation
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
    post:
      tags:
      - Placement Notes
      summary: Add a note to a placement
      description: '


        **Rate Limit:** `list-placement-notes` (100 req / 1s)'
      operationId: addNote
      parameters:
      - name: placementId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPlacementNoteRequest'
        required: true
      responses:
        '201':
          description: Note created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PlacementNoteResponseDto'
        '400':
          description: Validation failed
        '404':
          description: Placement not found for this organisation
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
  /api/placements/{placementId}/notes/{noteId}:
    delete:
      tags:
      - Placement Notes
      summary: Delete a placement note
      description: '


        **Rate Limit:** `delete-placement-note` (25 req / 1s)'
      operationId: deleteNote
      parameters:
      - name: placementId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: noteId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      responses:
        '204':
          description: Note deleted
        '403':
          description: Token lacks required scope
        '404':
          description: Placement or note not found for this organisation
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
components:
  schemas:
    AddPlacementNoteRequest:
      type: object
      properties:
        content:
          type: string
          maxLength: 4000
          minLength: 0
      required:
      - content
    PlacementNoteResponseDto:
      type: object
      properties:
        publicId:
          type: string
          format: uuid
        placementPublicId:
          type: string
          format: uuid
        employeePublicId:
          type: string
          format: uuid
        locationName:
          type: string
        roleName:
          type: string
        content:
          type: string
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
        createdByName:
          type: string
        createdByJobRole:
          type: string
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
          format: uuid
  securitySchemes:
    bearer-key:
      type: http
      scheme: bearer
      bearerFormat: JWT