> For the complete documentation index, see [llms.txt](https://developer.ellypayapp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ellypayapp.com/service-payments/service-choices-list.md).

# Service Choices List

Obtaining a service choice list relates to services returned [here](/service-payments/services-list.md) and the value for `has_choices` is **true**. Every item in the choice list represents a choice a customer would make in order to facilitate their payment. Currently, only NWSC has a defined choice list and it's ID is **NWSC.Area**. Whenever more choice list IDs are created, the document will be updated accordingly

### Get Service Choices List

<mark style="color:blue;">`GET`</mark> `https://gwapisdbx.ellypayapp.com/service-payments/choice-list?listId=`

Returns the list of service choices based on the specified choice list type/ID. The list ID is passed as query parameter to retrieve the choices accordingly.

#### Query Parameters

<table><thead><tr><th width="180">Name</th><th width="82">Type</th><th>Description</th></tr></thead><tbody><tr><td>listId<mark style="color:red;">*</mark></td><td>String</td><td>The ID for the choice list to be obtained in the request.</td></tr></tbody></table>

#### Headers

<table><thead><tr><th width="147">Name</th><th width="114">Type</th><th>Description</th></tr></thead><tbody><tr><td>public-key<mark style="color:red;">*</mark></td><td>String</td><td>The Public Key as shared in the approval email</td></tr></tbody></table>

### Sample Service Choices Request

```powershell
curl https://gwapisdbx.ellypayapp.com/service-payments/choice-list?listId=NWSC.Area \
   -H "Accept: application/json" \
   -H "x-api-version: 1" \
   -H "public-key: your-public-key"
```

{% tabs %}
{% tab title="200: OK Returns the list of choices" %}

```json
{
    "code": 200,
    "status": "success",
    "message": "Request completed successfully.",
    "data": [
        {
            "code": "NWSC.Area:Entebbe",
            "name": "Entebbe",
            "description": "Entebbe",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Iganga",
            "name": "Iganga",
            "description": "Iganga",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Jinja",
            "name": "Jinja",
            "description": "Jinja",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Kajjansi",
            "name": "Kajjansi",
            "description": "Kajjansi",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Kampala",
            "name": "Kampala",
            "description": "Kampala",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Kawuku",
            "name": "Kawuku",
            "description": "Kawuku",
            "is_active": true
        },
        {
            "code": "NWSC.Area:Other",
            "name": "Other NWSC Areas",
            "description": "Other NWSC Areas",
            "is_active": true
        }
    ]
}
```

{% tabs %}
{% tab title="Response Description" %}

<table><thead><tr><th width="141">Parameter</th><th width="96">Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>string</td><td>The unique code for the choice. During validation, this would be sent in the request as one of the additional parameters.</td></tr><tr><td>name</td><td>string</td><td>The name of the choice</td></tr><tr><td>description</td><td>string</td><td>The description of the choice</td></tr><tr><td>is_active</td><td>Boolean</td><td>Whether or not this choice can be used in the payment process</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request When the request is not formed as expected" %}

```javascript
{
  "code": 400,
  "status": "error",
  "message": "unrecognized list ID",
  "data": {}
}
```

{% endtab %}
{% endtabs %}

### Supported Choice Lists

<table><thead><tr><th width="180">List ID</th><th>Description</th></tr></thead><tbody><tr><td>NWSC.Area</td><td>Returns the list of the different NWSC areas</td></tr></tbody></table>
