# Get link to upload POI

**POST** `/customers/poi`

Base URL: `https://api.triple-a.work/kyc-api/v1`

Generate a unique upload URL for each customer provided in the payload. Utilize the resulting URL(s) to submit their proof of identity documents to Triple-A.

Document supported types: Passport, Driving License, ID Card

Document supported format: JPG, JPEG, PNG, PDF

After uploading the proof of identity document, you will receive a verification result notification via a webhook at the `notify_url` you specified.
More information can be found [here](https://developers.triple-a.io/docs/triplea-kyc-api-doc/f5825e161a510-step-by-step-guide-for-verifying-your-customers#3-verify-the-customers-identity).

Sample webhook:

```json
{
    "customer_id": <customer_id>,
    "poi": {
        "id": <poi.id>,
        "status": "accepted" | "declined" | "invalid",
        "declined_reason": <null | reason to decline>
    }
}
```
The list of declined reasons can be found [here](https://developers.triple-a.io/docs/triplea-kyc-api-doc/a0344c2c4a20e-proof-of-identity-declined-reasons).

## Authorization

- oauth2 (http, bearer)

## Body

Content type: `application/json`

- `files` (object[], required)
  - `customer_id` (string, required)
  - `options` (object)
    - `filename` (string, required)
    - `filetype` (string, required)
      File Format: image/jpeg | image/png | application/pdf
  - `notify_url` (string)

Example:

```json
{
  "files": [
    {
      "customer_id": "6d282e8c-128e-4153-ad65-601930a94e02",
      "options": {
        "filename": "example.txt",
        "filetype": "text/plain"
      },
      "notify_url": "https://example.com/notify"
    },
    {
      "customer_id": "4d37cbdc-9dbb-4604-82a7-8f8753366a68",
      "options": {
        "filename": "example.jpeg",
        "filetype": "image/jpeg"
      },
      "notify_url": "https://example.com/notify"
    }
  ]
}
```

## Responses

### 200

Get pre-signed urls or error message

- `customer_id` (string<uuid>)
  CustomerID of the customer
- `options` (object)
  - `filename` (string, required)
  - `filetype` (string, required)
    File Format: image/jpeg | image/png | application/pdf
- `error_message` (string)
  Description of error encountered while creating upload url
- `presigned_url` (string)
  S3 signed url to upload the document
- `id` (string<uuid>)
  Poi Upload request ID on success

Example:

```json
[
  {
    "customer_id": "6d282e8c-128e-4153-ad65-601930a94e02",
    "options": {
      "filename": "example.txt",
      "filetype": "text/plain"
    },
    "error_message": "Invalid File Extension"
  },
  {
    "customer_id": "4d37cbdc-9dbb-4604-82a7-8f8753366a68",
    "options": {
      "filename": "example.jpeg",
      "filetype": "image/jpeg"
    },
    "presigned_url": "https://<s3-url-to-upload-image>",
    "id": "82b786cd-c91e-40a7-8e06-db70e9a73787"
  }
]
```

### 400

Invalid Payload

- `message` (string)
- `errors` (object[])
  - `path` (string)
  - `message` (string)
  - `errorCode` (string)

Example:

```json
{
  "message": "error message about wrong data in request.body",
  "errors": [
    {
      "path": "parameter with error",
      "message": "description of error",
      "errorCode": "openapi validation error code"
    }
  ]
}
```

### 401

Invalid/Expired Access Token

- `message` (string)
- `errors` (object[])
  - `path` (string)
  - `message` (string)

Example:

```json
{
  "message": "unauthorized",
  "errors": [
    {
      "path": "string",
      "message": "unauthorized"
    }
  ]
}
```

### 500

Server Error

- `message` (string)

Example:

```json
{
  "message": "Internal Server Error"
}
```