Upload File
curl --request POST \
--url https://sandbox-api.axisfi.net/api/files/upload \
--header 'Api-Version: <api-version>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>' \
--data '
{
"file": "<string>"
}
'import requests
url = "https://sandbox-api.axisfi.net/api/files/upload"
payload = { "file": "<string>" }
headers = {
"Api-Version": "<api-version>",
"X-API-Key": "<api-key>",
"X-API-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Version': '<api-version>',
'X-API-Key': '<api-key>',
'X-API-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({file: '<string>'})
};
fetch('https://sandbox-api.axisfi.net/api/files/upload', 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://sandbox-api.axisfi.net/api/files/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Version: <api-version>",
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-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://sandbox-api.axisfi.net/api/files/upload"
payload := strings.NewReader("{\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.axisfi.net/api/files/upload")
.header("Api-Version", "<api-version>")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.axisfi.net/api/files/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Version"] = '<api-version>'
request["X-API-Key"] = '<api-key>'
request["X-API-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"file_id": "<string>"
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "Invalid organizationId",
"code": "ORG_ID_INVALID"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}Files
Upload File
Uploads a single document or image to the server. Supports specific categories such as invoices and contracts. Returns a unique file ID and the accessible URL upon successful storage.
POST
/
api
/
files
/
upload
Upload File
curl --request POST \
--url https://sandbox-api.axisfi.net/api/files/upload \
--header 'Api-Version: <api-version>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>' \
--data '
{
"file": "<string>"
}
'import requests
url = "https://sandbox-api.axisfi.net/api/files/upload"
payload = { "file": "<string>" }
headers = {
"Api-Version": "<api-version>",
"X-API-Key": "<api-key>",
"X-API-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Api-Version': '<api-version>',
'X-API-Key': '<api-key>',
'X-API-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({file: '<string>'})
};
fetch('https://sandbox-api.axisfi.net/api/files/upload', 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://sandbox-api.axisfi.net/api/files/upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'file' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Api-Version: <api-version>",
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-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://sandbox-api.axisfi.net/api/files/upload"
payload := strings.NewReader("{\n \"file\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Api-Version", "<api-version>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("X-API-Secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-api.axisfi.net/api/files/upload")
.header("Api-Version", "<api-version>")
.header("X-API-Key", "<api-key>")
.header("X-API-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"file\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.axisfi.net/api/files/upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Api-Version"] = '<api-version>'
request["X-API-Key"] = '<api-key>'
request["X-API-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"file\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"file_id": "<string>"
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}{
"errors": [
{
"detail": "Invalid organizationId",
"code": "ORG_ID_INVALID"
}
]
}{
"errors": [
{
"detail": "<string>",
"code": "<string>"
}
]
}Authorizations
Includes an API key in the HTTP headers to authenticate the client.
Includes an API secret in the HTTP headers to authenticate the client.
Headers
AxisFi API contract version
Available options:
2024-12-01 Query Parameters
File Type Code. Valid values vary based on the specific business scenario:
1. Customer Corporate Documents
Business Registration: Official business license.Article of Association: Corporate constitutional documents.
2. Customer Legal Representative ID
Main page: Front side of the ID card or Passport bio-data page.Back page: Back side of the ID card.
3. Transfer Documents Or Recipient Documents
Invoice: Billing document for payment request.Contract: Supporting service/goods contract.
Note: Ensure the uploaded
file_typematches the specific business context (Customer,Recipient,Transfer).
Available options:
Invoice, Contract, Business Registration, Article of Association, Main page, Back page Pattern:
^(Invoice|Contract|Business Registration|Article of Association|Main page|Back page)$Example:
"Business Registration"
Body
application/json
file
Response
Operation Successful
File ID

