---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# AWA Routing API

# AWA Routing API {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The AWA Routing API provides endpoints to route a document to a
queue.
This API requires the Advanced Work Assignment plugin (com.glide.awa) and the
awa_integration_user role.

## AWA Routing - POST /now/awa/queues/{queue_sys_id}/work_item {#ariaid-title2}

If an active work item exists, routes a document to a queue. If an active work item
does not exist for the specified document, creates a work item and set its fields
accordingly.

### URL format {#awa-POST-queues-work_item__section_qgh_xt3_2mb}

Versioned URL:
/api/now/{api_version}/awa/queues/{queue_sys_id}/work_item

Default URL:
/api/now/awa/queues/{queue_sys_id}/work_item

### Supported request parameters

{#awa-POST-queues-work_item__entry__2}{#awa-POST-queues-work_item__version-not_optional-RESTAPI}

| Name | Description |
|-|-|
| api_version | Optional. Version of the endpoint to access. For example, <kbd class="ph userinput">v1</kbd> or <kbd class="ph userinput">v2</kbd>. Only specify this value to use an endpoint version other than the latest. Data type: String |
| queue_sys_id | Sys_id of the queue record from the Queue \[awa_queue\] table. Data type: String |
[Table 1. Path parameters]

{#awa-POST-queues-work_item__entry__8}

| Name | Description |
|-|-|
| None |   |
[Table 2. Query parameters]

{#awa-POST-queues-work_item__entry__12}

| Name | Description |
|-|-|
| document_sys_id | Sys_id of the document to route to the queue. Data type: String |
| document_table | Name of the table associated with the document, such as incident. Data type: String |
[Table 3. Request body parameters (XML or JSON)]

### Headers

The following request and response headers apply to this HTTP
action only, or apply to this action in a distinct way. For a list of general headers used
in the REST API, see [Supported REST API headers](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#awa-POST-queues-work_item__entry__18}{#awa-POST-queues-work_item__accept-RESTAPI}{#awa-POST-queues-work_item__content_type-RESTAPI}

| Header | Description |
|-|-|
| Accept | Data format of the response body. Supported types: application/json or application/xml. Default: application/json |
| Content-Type | Data format of the request body. Supported types: application/json or application/xml. Default: application/json |
[Table 4. Request headers]

{#awa-POST-queues-work_item__entry__24}

| Header | Description |
|-|-|
| None |   |
[Table 5. Response headers]

### Status codes

The following status codes apply to this HTTP action. For a
list of possible status codes used in the REST API, see [REST API HTTP response
codes](https://servicenow-prod.fluidtopics.net/2vuQj3~2s_niNXyXhrbRZA "REST (REpresentational State Transfer) is a simple stateless architecture that provides standards between computer systems on the web, making it easier for them to communicate with each other.").
{#awa-POST-queues-work_item__entry__28}{#awa-POST-queues-work_item__entry-200-status-code}{#awa-POST-queues-work_item__entry-401-status-code}{#awa-POST-queues-work_item__entry-404-status-code}{#awa-POST-queues-work_item__entry-500-status-code}

| Status code | Description |
|-|-|
| 200 | Successful. The request was successfully processed. |
| 401 | Unauthorized. The user credentials are incorrect or have not been passed. |
| 404 | Not found. The requested item wasn't found. |
| 500 | Internal server error. An unexpected error occurred while processing the request. The response contains additional information about the error. |
[Table 6. Status codes]

### Response body parameters (JSON or XML)

{#awa-POST-queues-work_item__entry__38}

| Name | Description |
|-|-|
| display_name | Name of the document to route by this work item, such as case record. Data type: String |
| document_sys_id | Sys_id of the document to route to the queue. Data type: String |
| document_table | Name of the table associated with the document. Data type: String |
| queue_sys_id | Sys_id of the queue on which to route a document. Data type: String |
| sys_id | Sys_id of the work item assigned to the queue. Data type: String |
[ ]

### Sample cURL request

    curl -X POST \
      https://instance.servicenow.com/api/now/awa/queues/339eed3f3b892300a2bac9bb34efc4c3/work_item \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -u 'username':'password'
    -d '{
      "document_sys_id": "9c573169c611228700193229fff72400",
      "document_table": "incident"
    }'

    {
      "result": {
        "sys_id": "cd57f90ddbb26300db2051735e9619f0",
        "document_table": "incident",
        "document_sys_id": "9c573169c611228700193229fff72400",
        "queue_sys_id": "339eed3f3b892300a2bac9bb34efc4c3",
        "display_name": "Incident: INC0000001"
      }
    }


