# Locking and Updating Calls

## ASM API Quick Reference Guide <a href="#asmapiquickreferenceguide" id="asmapiquickreferenceguide"></a>

#### Start a new Request  <a href="#lockingandupdatingcalls" id="lockingandupdatingcalls"></a>

1. In Postman, select 'New' in the top left-hand corner.&#x20;
2. Select HTTP from the dialogue window and give the request the name of {<mark style="color:green;">**Request name**</mark>}

### <mark style="color:green;">**Request Name**</mark>**&#x20;-&#x20;*****Lock Call***

* **Method**: PUT
* **URL**: `{{SystemURLTest}}/alemba.api/api/v2/call/{{CallRef}}/lock`
  * **Full URL**, if desired: `https://<yourservername>/<yourASMsystemname>/alemba.api/api/v2/call/<yourcallno>/lock`
* **Authorization:** `Bearer {{Login_Token}}`

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FEQqgTRpAfxD0QYMs5hHl%2Fimage.png?alt=media&#x26;token=af796514-54ea-4b59-9512-3e56bbf47942" alt=""><figcaption><p>Successful Response</p></figcaption></figure>

### <mark style="color:green;">**Request Name**</mark>**&#x20;-&#x20;*****Update Call Fields***

* **Method**: PUT
* **URL**: `{{SystemURLTest}}/alemba.api/api/v2/call/{{CallRef}}`
  * **Full URL**, if desired: `https://<yourservername>/<yourASMsystemname>/alemba.api/api/v2/call/<yourcallRef>`
* **Headers**: `Content-Type: application/json`
* **Body:** `Raw`
* **Authorization:** `Bearer {{Login_Token}}`

{% hint style="info" %}
The Body of the HTTP request is where you enter the data/changes that you want to enact on the call. The Body is written in JSON. Please go to [Jargon Buster](https://docs.alemba.com/asm-hermes/integrate/apis/asm-api-quick-reference-guide/..#jargonbuster) to read more about JSON.
{% endhint %}

1. To update the Description of the call and the Call Status, the JSON body should look like as follows:

`{`

`"Description":"the new description",`

`"DescriptionHtml": "the new description",`

`"CallStatus": 3`

`}`

{% hint style="info" %}
Please note, where you have rich text fields (HTML), you always need to provide the FieldName value and the FieldNameHtml value.
{% endhint %}

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2F6Yeh2nI2cywfuEqE6M2H%2Fimage.png?alt=media&#x26;token=679f652a-47b4-42d4-afba-e7034cc7f2a2" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FWZWKUd2N1nzbnC7lwHkY%2Fimage.png?alt=media&#x26;token=81cfaab6-e4c2-44a1-bd90-175e7cf68872" alt=""><figcaption><p>A Successful Response</p></figcaption></figure>

<mark style="color:green;">**Request Name -**</mark>**&#x20;*****Unlock Call***

{% hint style="warning" %}
This is Mandatory after doing an Update, unless an Update is followed by a Forward, Defer or Close action, which will automatically unlock the call.
{% endhint %}

* **Method**: PUT
* **URL**: `{{SystemURLTest}}/alemba.api/api/v2/call/{{CallRef}}/unlock`
  * **Full URL**, if desired: `https://<yourservername>/<yourASMsystemname>/alemba.api/api/v2/call/<yourcallno>/unlock`
* **Authorization:** `Bearer {{Login_Token}}`

<figure><img src="https://1375663122-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhlW9jKl7dcDggHAPhNU9%2Fuploads%2FyySFmS2YUsHRcSwEnGqx%2Fimage.png?alt=media&#x26;token=213a9e81-01ca-4979-8751-4f43b05d35e0" alt=""><figcaption><p>A Successful Request</p></figcaption></figure>
