Upload Merchant Document
curl --request PATCH \
--url https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/ \
--header 'Content-Type: multipart/form-data' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--form document_type=INVOICE \
--form file=@example-fileimport requests
url = "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "document_type": "INVOICE" }
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>"
}
response = requests.patch(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document_type', 'INVOICE');
form.append('file', 'Screenshot 2025-05-21 at 2.44.41 PM.png');
const options = {
method: 'PATCH',
headers: {'X-Client-ID': '<api-key>', 'X-Client-Secret': '<api-key>'}
};
options.body = form;
fetch('https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Invoice uploaded successfully",
"data": {
"detail": "Invoice uploaded successfully"
}
}Merchant
Upload Document for Merchant
Upload a document for a merchant.
PATCH
/
partners
/
merchants
/
{merchant_id}
/
documents
/
Upload Merchant Document
curl --request PATCH \
--url https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/ \
--header 'Content-Type: multipart/form-data' \
--header 'X-Client-ID: <api-key>' \
--header 'X-Client-Secret: <api-key>' \
--form document_type=INVOICE \
--form file=@example-fileimport requests
url = "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = { "document_type": "INVOICE" }
headers = {
"X-Client-ID": "<api-key>",
"X-Client-Secret": "<api-key>"
}
response = requests.patch(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('document_type', 'INVOICE');
form.append('file', 'Screenshot 2025-05-21 at 2.44.41 PM.png');
const options = {
method: 'PATCH',
headers: {'X-Client-ID': '<api-key>', 'X-Client-Secret': '<api-key>'}
};
options.body = form;
fetch('https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"X-Client-ID: <api-key>",
"X-Client-Secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-Client-Secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/")
.header("X-Client-ID", "<api-key>")
.header("X-Client-Secret", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.eximpe.com/partners/merchants/{merchant_id}/documents/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-Client-Secret"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"document_type\"\r\n\r\nINVOICE\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\nScreenshot 2025-05-21 at 2.44.41 PM.png\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Invoice uploaded successfully",
"data": {
"detail": "Invoice uploaded successfully"
}
}Authorizations
Body
multipart/form-data
Document upload request. The body must be multipart/form-data.