> ## Documentation Index
> Fetch the complete documentation index at: https://docs-embeddedfinance.embedly.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Business Customer File

> This endpoint enables you to upload files required for KYC verification for a customer.

# Upload Business Customer File

<Warning>
  This API playground doesn't send files effectively, as such you would be unable to test the apis directly on here.

  The provided request parameters below while correct are expected to be sent as **multipart/form-data**.
</Warning>

<ParamField header="Content-Type" type="string" initialValue="multipart/form-data" default="multipart/form-data" required />

<ParamField body="customerId" type="string" required />

<ParamField body="fileType" type="string" required>
  The type of document or image being uploaded.

  <ul>
    <li>**Example:** `PHOTO`</li>
    <li>**Possible Values:** `PHOTO, UTILITY`</li>
  </ul>
</ParamField>

<ParamField body="File" type="file" required>
  The document or image being uploaded.

  <ul>
    <li>**Format:** `string($binary)`</li>
    <li>**Supported types:** `PNG, JPG, JPEG, PDF`</li>
  </ul>
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file' \
  --header 'Content-Type: multipart/form-data' \
  --form 'customerId="299b88c8-b13c-4336-8ed6-2ff4ab3e7f49"' \
  --form 'fileType="PHOTO"' \
  --form 'file=@"/path/to/file"'
  ```

  ```python Python theme={null}
  import requests

  url = "https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file"

  payload = {'customerId': '299b88c8-b13c-4336-8ed6-2ff4ab3e7f49',
  'fileType': 'PHOTO'}
  files=[
  	('file',('Inspired - Marty Cagan.pdf',open('/Users/mac/Downloads/Inspired - Marty Cagan.pdf','rb'),'application/pdf'))
  ]
  headers = {
  	'Content-Type': 'multipart/form-data'
  }

  response = requests.request("POST", url, headers=headers, data=payload, files=files)

  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const myHeaders = new Headers();
  myHeaders.append("Content-Type", "multipart/form-data");

  const formdata = new FormData();
  formdata.append("customerId", "299b88c8-b13c-4336-8ed6-2ff4ab3e7f49");
  formdata.append("fileType", "PHOTO");
  formdata.append("file", fileInput.files[0], "Inspired - Marty Cagan.pdf");

  const requestOptions = {
  	method: "POST",
  	headers: myHeaders,
  	body: formdata,
  	redirect: "follow",
  };

  fetch(
  	"https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file",
  	requestOptions
  )
  	.then((response) => response.json())
  	.then((response) => console.log(response))
  	.catch((error) => console.error(error));
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, array(
  	CURLOPT_URL => 'https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file',
  	CURLOPT_RETURNTRANSFER => true,
  	CURLOPT_ENCODING => '',
  	CURLOPT_MAXREDIRS => 10,
  	CURLOPT_TIMEOUT => 0,
  	CURLOPT_FOLLOWLOCATION => true,
  	CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  	CURLOPT_CUSTOMREQUEST => 'POST',
  	CURLOPT_POSTFIELDS => array('customerId' => '299b88c8-b13c-4336-8ed6-2ff4ab3e7f49','fileType' => 'PHOTO','file'=> new CURLFILE('/Users/mac/Downloads/Inspired - Marty Cagan.pdf')),
  	CURLOPT_HTTPHEADER => array(
  		'Content-Type: multipart/form-data'
  	),
  ));

  $response = curl_exec($curl);

  curl_close($curl);
  if ($err) {
  	echo "cURL Error #:" . $err;
  } else {
  	echo $response;
  }

  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"bytes"
  	"mime/multipart"
  	"os"
  	"path/filepath"
  	"net/http"
  	"io"
  )

  func main() {

  	url := "https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file"
  	method := "POST"

  	payload := &bytes.Buffer{}
  	writer := multipart.NewWriter(payload)
  	_ = writer.WriteField("customerId", "299b88c8-b13c-4336-8ed6-2ff4ab3e7f49")
  	_ = writer.WriteField("fileType", "PHOTO")
  	file, errFile3 := os.Open("/Users/mac/Downloads/Inspired - Marty Cagan.pdf")
  	defer file.Close()
  	part3,
  				errFile3 := writer.CreateFormFile("file",filepath.Base("/Users/mac/Downloads/Inspired - Marty Cagan.pdf"))
  	_, errFile3 = io.Copy(part3, file)
  	if errFile3 != nil {
  		fmt.Println(errFile3)
  		return
  	}
  	err := writer.Close()
  	if err != nil {
  		fmt.Println(err)
  		return
  	}


  	client := &http.Client {
  	}
  	req, err := http.NewRequest(method, url, payload)

  	if err != nil {
  		fmt.Println(err)
  		return
  	}
  	req.Header.Add("Content-Type", "multipart/form-data")

  	req.Header.Set("Content-Type", writer.FormDataContentType())
  	res, err := client.Do(req)
  	if err != nil {
  		fmt.Println(err)
  		return
  	}
  	defer res.Body.Close()

  	body, err := io.ReadAll(res.Body)
  	if err != nil {
  		fmt.Println(err)
  		return
  	}
  	fmt.Println(string(body))
  }
  ```

  ```java Java theme={null}
  HttpResponse<String> response = Unirest.post("https://idbanc-kyb.azurewebsites.net/embedded/api/v1/upload-customer-file")
  	.header("Content-Type", "multipart/form-data")
  	.field("customerId", "299b88c8-b13c-4336-8ed6-2ff4ab3e7f49")
  	.field("fileType", "PHOTO")
  	.field("file", new File("/Users/mac/Downloads/Inspired - Marty Cagan.pdf"))
  	.asString();

  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {}
  ```
</ResponseExample>
