openapi: 3.2.0 info: title: Folio Correspondence API version: 3.2.0 contact: name: Knowledge Integration url: https://www.k-int.com description: 'Operations tagged Correspondence across 2 of this provider''s published API definitions: folio-mod-oa-openapi.json, folio-mod-oa-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org security: - accessToken: [] - okapiToken: [] tags: - name: Correspondence paths: /oa/correspondence: description: Supports search and creation of correspondence records. parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - Correspondence summary: Get a set of correspondence records operationId: getCorrespondences parameters: - $ref: '#/components/parameters/filters' - $ref: '#/components/parameters/match' - $ref: '#/components/parameters/term' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/stats' - $ref: '#/components/parameters/perPage' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/CorrespondenceResults' - $ref: '#/components/schemas/CorrespondenceResultsArray' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '500': description: Internal server error post: tags: - Correspondence summary: Create correspondence record operationId: postCorrespondence requestBody: content: application/json: schema: $ref: '#/components/schemas/Correspondence' required: true responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/Correspondence' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '422': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '500': description: Internal server error servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org /oa/correspondence/{id}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/correspondenceId' get: tags: - Correspondence summary: Get a specified correspondence record operationId: getCorrespondence responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Correspondence' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '500': description: Internal server error put: tags: - Correspondence summary: Update correspondence record operationId: putCorrespondence requestBody: content: application/json: schema: $ref: '#/components/schemas/Correspondence' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Correspondence' '400': description: Bad request error '401': description: Unauthorized '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '422': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '500': description: Internal server error delete: tags: - Correspondence summary: Delete a specified correspondence record operationId: deleteCorrespondence responses: '204': description: No content '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '500': description: Internal server error servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org components: parameters: correspondenceId: in: path name: id description: UUID for a correspondence record required: true schema: type: string format: uuid offset: in: query name: offset required: false schema: type: integer perPage: in: query name: perPage required: false schema: type: integer page: in: query name: page required: false schema: type: integer filters: in: query name: filters required: false schema: type: string stats: in: query name: stats required: false schema: type: boolean x-okapi-tenant: in: header name: x-okapi-tenant required: true schema: type: string match: in: query name: match required: false schema: type: string term: in: query name: term required: false schema: type: string sort: in: query name: sort required: false schema: type: string schemas: CorrespondenceResultsArray: type: array items: $ref: '#/components/schemas/Correspondence' Correspondence: type: object required: - id - dateOfCorrespondence - content - correspondent - status - mode properties: id: type: string format: uuid readOnly: true owner: type: object required: - id properties: id: type: string format: uuid lastUpdated: type: string format: date-time readOnly: true dateOfCorrespondence: type: string format: date content: type: string correspondent: type: string status: oneOf: - type: string - $ref: '#/components/schemas/Refdata' mode: oneOf: - type: string - $ref: '#/components/schemas/Refdata' category: oneOf: - type: string - $ref: '#/components/schemas/Refdata' ValidationErrorResponse: description: 'Validation error body returned when a create/update request fails domain-object validation. Shape depends on the number of errors: a single ValidationError when there is exactly one, otherwise a wrapper with a count and an embedded array.' oneOf: - $ref: '#/components/schemas/ValidationError' - type: object required: - total - _embedded properties: total: type: integer _embedded: type: object properties: errors: type: array items: $ref: '#/components/schemas/ValidationError' ValidationError: type: object required: - message - path - _links properties: message: type: string path: type: string _links: type: object required: - self properties: self: type: object required: - href properties: href: type: string format: uri Refdata: type: object required: - id properties: id: type: string readOnly: true label: type: string value: type: string SpringBootErrorResponse: type: object description: Spring Boot's default error body. Emitted by the servlet container itself when a request ends in an error status with no response body written by the application, rather than by this app's own error handling - so it does not match the `HttpError` shape used elsewhere in this API. properties: timestamp: type: integer description: Epoch milliseconds status: type: integer error: type: string path: type: string CorrespondenceResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/CorrespondenceResultsArray' ResultsMeta: type: object properties: meta: type: object page: type: integer pageSize: type: integer total: type: integer totalPages: type: integer totalRecords: type: integer securitySchemes: okapiToken: type: apiKey in: header name: x-okapi-token accessToken: type: apiKey in: cookie name: folioAccessToken x-refined-from: - folio-mod-oa-openapi.json - folio-mod-oa-openapi.yml