---
title: "Bulk upsert or delete vocabularies"
method: POST
path: "/terminology/v1/vocabularies/bulk"
tags: ["Vocabularies"]
---

# Bulk upsert or delete vocabularies

`POST /terminology/v1/vocabularies/bulk`

Bulk upsert or delete vocabularies.
Bulk operations are processed synchronously.

## Request body

- object
  - `operations` V1VocabularyOperation[], required
    - union
      - V1VocabularyOperationUpsert
        - `action` 'CREATE' | 'UPSERT' | 'DELETE' | 'UPDATE', required — The action to perform.
        - `upsert` V1Vocabulary, required
          - `key` string, required
          - `title` string, required
          - `description` string, required
      - V1VocabularyOperationDelete
        - `action` 'CREATE' | 'UPSERT' | 'DELETE' | 'UPDATE', required — The action to perform.
        - `delete` V1VocabularyOperationDeleteContent, required
          - `key` string, required — The Key of the vocabulary to delete.

## Response `200`

The bulk operation is valid.
Response contains the status of bulk request and status of each processed operation.
Bulk request status will be `SUCCESS` if all operations are successful, otherwise `FAILURE`.

- V1BulkVocabularyResponse
  - `status` 'SUCCESS' | 'PENDING' | 'CANCELLED' | 'FAILURE', required — Status of the operation. * `SUCCESS`: The operation was persisted in the source, or was dropped by a reject action of the user. * `PENDING`: The operation is being processed asyncronously by the system or is in a pipeline IN_REVIEW status. * `CANCELLED`: The operation was cancelled by the system due to a concurrent operation. * `FAILURE`: The operation failed due to validation or processing error.
  - `receipts` V1VocabularyOperationReceipt[] — In case of failure, receipts of the operations are returned. Every operation sent will have a receipt corresponding to their original order. Each receipt will contain the status of the operation and an error if the operation failed.
    - `key` string, required — The Key of the vocabulary to upserted or deleted.
    - `status` 'SUCCESS' | 'PENDING' | 'CANCELLED' | 'FAILURE', required — Status of the operation. * `SUCCESS`: The operation was persisted in the source, or was dropped by a reject action of the user. * `PENDING`: The operation is being processed asyncronously by the system or is in a pipeline IN_REVIEW status. * `CANCELLED`: The operation was cancelled by the system due to a concurrent operation. * `FAILURE`: The operation failed due to validation or processing error.
    - `error` V1Error
      - `code` 400 | 401 | 403 | 404 | 408 | 409 | 413 | 500 | 501, required
      - `message` string, required
      - `type` 'ALREADY_EXISTS' | 'FAILED_PRECONDITION' | 'INTERNAL' | 'INVALID_ARGUMENT' | 'NOT_FOUND' | 'OUT_OF_RANGE' | 'UNIMPLEMENTED' | 'PERMISSION_DENIED' | 'UNAUTHENTICATED' | 'CONTENT_TOO_LARGE' | 'REQUEST_TIMEOUT', required
      - `details` V1Error[] — list of errors that occurred if applicable.

## Other responses

- `400` — Returned when the request is malformed or invalid.
- `413` — Returned when the payload exceeds the max content size (100kB).

---

[API](https://skmtc.net/clinia/apis/terminology-api.md) · [All operations](https://skmtc.net/clinia/apis/terminology-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/clinia/terminology-api/revisions/3fce2e6b0ae5/schema)
