curl --request POST \
--url https://api.tradevu.co/v1/api/finance/inventory \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"businessId": "670000000000000000000003",
"currency": "NGN",
"requestedAmount": 500000,
"managementType": "fromLoan",
"productCategory": "Agriculture",
"productType": "Rice",
"warehouseCountry": "Nigeria",
"warehouseState": "Lagos",
"buyBackCurrency": "NGN",
"buyBackAmount": 550000,
"buyBackPeriod": 30,
"isDraft": false
}
'import requests
url = "https://api.tradevu.co/v1/api/finance/inventory"
payload = {
"businessId": "670000000000000000000003",
"currency": "NGN",
"requestedAmount": 500000,
"managementType": "fromLoan",
"productCategory": "Agriculture",
"productType": "Rice",
"warehouseCountry": "Nigeria",
"warehouseState": "Lagos",
"buyBackCurrency": "NGN",
"buyBackAmount": 550000,
"buyBackPeriod": 30,
"isDraft": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessId: '670000000000000000000003',
currency: 'NGN',
requestedAmount: 500000,
managementType: 'fromLoan',
productCategory: 'Agriculture',
productType: 'Rice',
warehouseCountry: 'Nigeria',
warehouseState: 'Lagos',
buyBackCurrency: 'NGN',
buyBackAmount: 550000,
buyBackPeriod: 30,
isDraft: false
})
};
fetch('https://api.tradevu.co/v1/api/finance/inventory', 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.tradevu.co/v1/api/finance/inventory",
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([
'businessId' => '670000000000000000000003',
'currency' => 'NGN',
'requestedAmount' => 500000,
'managementType' => 'fromLoan',
'productCategory' => 'Agriculture',
'productType' => 'Rice',
'warehouseCountry' => 'Nigeria',
'warehouseState' => 'Lagos',
'buyBackCurrency' => 'NGN',
'buyBackAmount' => 550000,
'buyBackPeriod' => 30,
'isDraft' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.tradevu.co/v1/api/finance/inventory"
payload := strings.NewReader("{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.tradevu.co/v1/api/finance/inventory")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradevu.co/v1/api/finance/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Inventory finance created successfully",
"data": {
"_id": "<string>",
"financeType": "payable_finance",
"platform": "api",
"status": "pending",
"currency": "NGN",
"requestedAmount": 123,
"bankStatement": {
"_id": "<string>",
"name": "bankStatement",
"status": "valid",
"url": "<string>",
"business": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"boardResolution": {
"_id": "<string>",
"name": "bankStatement",
"status": "valid",
"url": "<string>",
"business": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"payableFinance": {},
"receivableFinance": {},
"inventoryFinance": {},
"paymentFinance": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"error": false
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}Create inventory finance
Create inventory finance for the authenticated business. Valid bank statement and board resolution documents are required, including for drafts. An existing wallet in the requested currency is required. Set isDraft to true to save a draft; document, wallet, and database requirements still apply. See the Finance guide for conditional fields.
curl --request POST \
--url https://api.tradevu.co/v1/api/finance/inventory \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"businessId": "670000000000000000000003",
"currency": "NGN",
"requestedAmount": 500000,
"managementType": "fromLoan",
"productCategory": "Agriculture",
"productType": "Rice",
"warehouseCountry": "Nigeria",
"warehouseState": "Lagos",
"buyBackCurrency": "NGN",
"buyBackAmount": 550000,
"buyBackPeriod": 30,
"isDraft": false
}
'import requests
url = "https://api.tradevu.co/v1/api/finance/inventory"
payload = {
"businessId": "670000000000000000000003",
"currency": "NGN",
"requestedAmount": 500000,
"managementType": "fromLoan",
"productCategory": "Agriculture",
"productType": "Rice",
"warehouseCountry": "Nigeria",
"warehouseState": "Lagos",
"buyBackCurrency": "NGN",
"buyBackAmount": 550000,
"buyBackPeriod": 30,
"isDraft": False
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessId: '670000000000000000000003',
currency: 'NGN',
requestedAmount: 500000,
managementType: 'fromLoan',
productCategory: 'Agriculture',
productType: 'Rice',
warehouseCountry: 'Nigeria',
warehouseState: 'Lagos',
buyBackCurrency: 'NGN',
buyBackAmount: 550000,
buyBackPeriod: 30,
isDraft: false
})
};
fetch('https://api.tradevu.co/v1/api/finance/inventory', 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.tradevu.co/v1/api/finance/inventory",
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([
'businessId' => '670000000000000000000003',
'currency' => 'NGN',
'requestedAmount' => 500000,
'managementType' => 'fromLoan',
'productCategory' => 'Agriculture',
'productType' => 'Rice',
'warehouseCountry' => 'Nigeria',
'warehouseState' => 'Lagos',
'buyBackCurrency' => 'NGN',
'buyBackAmount' => 550000,
'buyBackPeriod' => 30,
'isDraft' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.tradevu.co/v1/api/finance/inventory"
payload := strings.NewReader("{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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://api.tradevu.co/v1/api/finance/inventory")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradevu.co/v1/api/finance/inventory")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessId\": \"670000000000000000000003\",\n \"currency\": \"NGN\",\n \"requestedAmount\": 500000,\n \"managementType\": \"fromLoan\",\n \"productCategory\": \"Agriculture\",\n \"productType\": \"Rice\",\n \"warehouseCountry\": \"Nigeria\",\n \"warehouseState\": \"Lagos\",\n \"buyBackCurrency\": \"NGN\",\n \"buyBackAmount\": 550000,\n \"buyBackPeriod\": 30,\n \"isDraft\": false\n}"
response = http.request(request)
puts response.read_body{
"message": "Inventory finance created successfully",
"data": {
"_id": "<string>",
"financeType": "payable_finance",
"platform": "api",
"status": "pending",
"currency": "NGN",
"requestedAmount": 123,
"bankStatement": {
"_id": "<string>",
"name": "bankStatement",
"status": "valid",
"url": "<string>",
"business": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"boardResolution": {
"_id": "<string>",
"name": "bankStatement",
"status": "valid",
"url": "<string>",
"business": "<string>",
"expiryDate": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"payableFinance": {},
"receivableFinance": {},
"inventoryFinance": {},
"paymentFinance": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"error": false
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}{
"statusCode": 400,
"message": "Invalid currency: XYZ",
"timestamp": "2023-11-07T05:31:56Z",
"path": "/v1/api/balance/XYZ",
"request": {
"method": "GET",
"url": "/v1/api/balance/XYZ"
}
}Authorizations
Your business API key, generated from the dashboard. Required on every business-facing endpoint.
Body
NGN, USD, USDT, USDC, KES, GHS, CNGN Requested amount in currency units. Also needed when saving a draft.
Save a draft. Document, wallet, and persistence checks still apply.
fromLoan, separate NGN, USD, USDT, USDC, KES, GHS, CNGN Buy-back period supplied with the request.
Optional authorized sub-business ID in the JSON payload.
"670000000000000000000003"
Response
Finance created or saved as a draft.
For drafts: 'Inventory finance saved successfully as a draft'.
"Inventory finance created successfully"
Finance record with populated type-specific details. Additional fields may be returned. Creation status is pending, or draft when isDraft is true.
Show child attributes
Show child attributes
false