# /catchment/create

## location after creating a catchment

<mark style="color:blue;">`GET`</mark> `geolytix.xyz/api/location/edit/catchment/create`

Create a catchment on a location and return updated infoj.

#### Query Parameters

| Name        | Type   | Description                                           |
| ----------- | ------ | ----------------------------------------------------- |
| locale      | string | The locale key.                                       |
| layer       | string | The layer key.                                        |
| table       | string | The PostGIS table.                                    |
| id          | string | The location ID.                                      |
| field       | string | The field to store the catchment geometry.            |
| coordinates | string | The catchment origin coordinates.                     |
| minutes     | string | The catchment range in minutes. Defaults to 10.       |
| profile     | string | The profile for the catchment. Defaults to 'driving'. |
| token       | string | Required to access private endpoints.                 |

{% tabs %}
{% tab title="200 The updated location infoj" %}
```javascript
{...}
```
{% endtab %}

{% tab title="406 Query has missing or invalid parameter." %}
```
'Invalid locale.'

'Invalid layer.'

'Missing table.'

'Invalid coordinates.'

'Invalid parameter.'

'No catchment found within this time frame.'
```
{% endtab %}

{% tab title="500 Please check backend error log for more details." %}
```
'PostgreSQL query error - please check backend logs.'
```
{% endtab %}
{% endtabs %}

