# NewsMLDocuments

## Methods

## WriteNewsMLDocument

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.NewsMLDocuments/WriteNewsMLDocument`

#### Request Body

| Name             | Type            | Description |
| ---------------- | --------------- | ----------- |
| uploadId         | string          |             |
| unit             | string          |             |
| newsml           | string          |             |
| expectedRevision | string          |             |
| lockingMode      | string          |             |
| features         | cca.FeatureFlag |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## DeleteNewsMLDocument

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.NewsMLDocuments/DeleteNewsMLDocument`

#### Request Body

| Name | Type   | Description                                     |
| ---- | ------ | ----------------------------------------------- |
| UUID | string | The UUID of the document that will be removed   |
| unit | string | Under which unit are you performing this action |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## GetNewsMLDocument

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.NewsMLDocuments/GetNewsMLDocument`

#### Request Body

| Name    | Type   | Description   |
| ------- | ------ | ------------- |
| UUID    | string | Document UUID |
| version | int64  |               |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## NewsMLDocumentExists

<mark style="color:green;">`POST`</mark> `https://cca-{region}-saas-{enviroment}.infomaker.io/twirp/cca.NewsMLDocuments/NewsMLDocumentExists`

#### Request Body

| Name | Type   | Description                                     |
| ---- | ------ | ----------------------------------------------- |
| UUID | string | UUID of the document                            |
| unit | string | Under which unit are you performing this action |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

api-method-response endapi-method-response

## Enums

**cca.DownloadType** DownloadType can be passed as a parameter when downloading assets

```
TYPE_UNKNOWN
TYPE_ORIGINAL
TYPE_PRESENTATION
```

**cca.LockingMode** Locking mode is passed as a parameter when saving documents

```
NONE
OPTIMISTIC_LOCKING
PESSIMISTIC_LOCKING
```

**cca.ProcessingStatus**

```
UNKNOWN
IN_PROGRESS
DONE
ERROR
```
