# /assign

ASSIGN a release to a driver or barge.

This request allows you to assign a release to a driver or barge.

This will be used by the terminal to validate the identity of the driver when he presents himself at the gate, or in the case of a barge when the pre-announcement (copino load) is received.

{% hint style="info" %}
Please note that to update an assignment, you can just do a new call to the endpoints below. You do not need to unassign first.
{% endhint %}

***

## ASSIGN _(driver)_

{% hint style="warning" %}
The API will create and update drivers in the web application automatically.

So any driver you assign using the API can also be seen in the web application and used to assign to a release.

When the data in your API call is different from the last time this driver was assigned, the data in the web application will be updated too.

The key to uniquely identify a driver is the identification number.
{% endhint %}

{% openapi src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media" path="/releases/{address}/assign" method="put" %}
[SCR API v1.yaml](https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media)
{% endopenapi %}

**EXAMPLE**

**ASSIGN** a _driver_ to a **release** (**without type** in URL):

<div data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2FbOP0CtK728sk1RXhQTrY%2FASSIGNwoTypeURL.png?alt=media&#x26;token=5528535c-8115-40f9-a60f-bc0b279c9f1a" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>

**ASSIGN** a _driver_ to a **release** (**with type** in URL):

<div align="center" data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2FugmYlL4ox9quAngQkUDZ%2FASSIGNwTypeURL.png?alt=media&#x26;token=a152284a-61bc-4194-9dd9-7f48332159cf" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>

***

## ASSIGN _(barge)_

{% hint style="info" %}
For barges, the identification is the ENI-number of the barge and the visit number, which is the BTS number in Antwerp.



Therefore, for barges these fields are foreseen:

* **name**: the name of the barge (mandatory)
* **identification**: the ENI number of the barge (mandatory)
* **visitNumber**: the visit number of the barge (optional)



Please note that the visit number (BTS number) is not mandatory.

However, the terminal will check this at the moment the loading order (copino) is received.

So by that time, the visit number has to be included in SCR.

Otherwise, the check of the terminal will fail.
{% endhint %}



{% openapi src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media" path="/releases/{address}/assign_barge" method="put" %}
[SCR API v1.yaml](https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media)
{% endopenapi %}

**EXAMPLE**

**ASSIGN** a _barge_ to a **release** (**without type** in URL):

<div data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2F2sizhAXoeVsZhRvRXFgk%2FASSIGNbargewoTYPEurl.png?alt=media&#x26;token=03a248db-a778-44d5-b949-eff09dd7e05e" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>

**ASSIGN** a _barge_ to a **release** (**with type** in URL):

<div data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2FxeZ9inqxoYPzkb3mV4DB%2FASSIGNbargeWtypeURL.png?alt=media&#x26;token=d3cf43d4-f020-4213-9587-46ea397d6928" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>

***

## ASSIGN _(train)_

{% openapi src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media" path="/releases/{address}/assign_train" method="put" %}
[SCR API v1.yaml](https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2Fgit-blob-7941fcd742f971f6f035b1275bfd20e277e30d26%2FSCR%20API%20v1.yaml?alt=media)
{% endopenapi %}

**EXAMPLE**

**ASSIGN** a _train_ to a **release** (**without type** in URL):

<div data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2FiBQ3uNIkUtxgg5c7aqDF%2FASSIGNtrainWOtypeURL.png?alt=media&#x26;token=8befeb1b-8d9b-4220-a3dc-4bae8345f728" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>

**ASSIGN** a _train_ to a **release** (**with type** in URL):

<div data-full-width="true"><figure><img src="https://3962621206-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F42KNM6Ikou97oywFeUuW%2Fuploads%2FevtNwkaor0wIDF3fbJrA%2FASSIGNtrainWtypeURL.png?alt=media&#x26;token=b2a51ff7-8ed1-44ab-acb7-7aab18fa4222" alt=""><figcaption><p>server = <a href="https://url+port/tmining/api/v1">https://url:port/tmining/api/v1</a></p></figcaption></figure></div>
