> ## Documentation Index
> Fetch the complete documentation index at: https://aminiai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Request

export const currentRelease = {
  versionNumber: 'Amini Lite v1.0',
  releaseDate: 'September 20, 2024'
};

export const versioning = 'versioning';

<Note>The current release available from the Amini Data Platform is **{currentRelease.versionNumber}** released on **{currentRelease.releaseDate}**.</Note>

```
https://api.prd.amini.ai/public/api/v1/polygons
```

# Introduction

This endpoint allows you request for datapoints to be processed given your own locations of interest, along with a specified start and end date, which will be used to query the Data Catalog to then serve you the datapoints via a JSON payload.

#### Request Headers

<ParamField path="x-api-key" type="string">
  A unique identifier used to authenticate the API request. This key is provided to developers upon registration and should be kept confidential.
</ParamField>

<ParamField path="data" type="string">
  The path to a file (CSV is the only file type supported at the moment) that contains the geopolygons, and start date and end date of query.
</ParamField>

<ParamField path="indexes" type="string">
  A list of paramters (e.g., spatial index like NDVI) that you want to request. Check the full list of supported datapoints for reference.
</ParamField>

<RequestExample>
  ```bash Request theme={null}
      curl -X 'POST' \
      'https://api.prd.amini.ai/public/api/v1/polygons' \
      -H 'accept: application/json' \
      -H 'x-api-key: INSERT API KEY' \
      -H 'Content-Type: multipart/form-data' \
      -F 'data=@INSERT CSV FILE HERE;type=text/csv' \
      -F 'indexes=ndvi,evi,ccci'
  ```
</RequestExample>

#### Response

<ParamField path="message" type="string">
  This contains the status message of your job. If successful, it will return 'Job created successfully'.
</ParamField>

<ParamField path="cost" type="float">
  The cost of the submitted job in USD (\$).
</ParamField>

<ParamField path="results-status" type="string">
  The status of the job submitted.
</ParamField>

<ParamField path="results-id" type="string">
  A unique identifier for the job, which can be used to [request datapoints by Job ID](https://docs.amini.ai/api-reference/get-polygons-job_id).
</ParamField>

<ResponseExample>
  ```json Response theme={null}
      {
          "message": "Job created successfully",
          "cost": 1.165674603174603,
          "result": {
              "status": "success",
              "id": "{JOB ID}"
          }
      }
  ```
</ResponseExample>
