cURL
curl --request POST \
--url https://api.smartbills.io/api/taxonomy/line-items/classify \
--header 'Content-Type: application/json' \
--data '
{
"lineItemId": 123,
"itemDescription": "<string>",
"itemName": "<string>",
"vendorName": "<string>",
"amount": 123,
"currency": "<string>",
"language": "<string>",
"forceRecalculation": true
}
'import requests
url = "https://api.smartbills.io/api/taxonomy/line-items/classify"
payload = {
"lineItemId": 123,
"itemDescription": "<string>",
"itemName": "<string>",
"vendorName": "<string>",
"amount": 123,
"currency": "<string>",
"language": "<string>",
"forceRecalculation": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lineItemId: 123,
itemDescription: '<string>',
itemName: '<string>',
vendorName: '<string>',
amount: 123,
currency: '<string>',
language: '<string>',
forceRecalculation: true
})
};
fetch('https://api.smartbills.io/api/taxonomy/line-items/classify', 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.smartbills.io/api/taxonomy/line-items/classify",
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([
'lineItemId' => 123,
'itemDescription' => '<string>',
'itemName' => '<string>',
'vendorName' => '<string>',
'amount' => 123,
'currency' => '<string>',
'language' => '<string>',
'forceRecalculation' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.smartbills.io/api/taxonomy/line-items/classify"
payload := strings.NewReader("{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.smartbills.io/api/taxonomy/line-items/classify")
.header("Content-Type", "application/json")
.body("{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/api/taxonomy/line-items/classify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"lineItemId": 123,
"taxonomyId": 123,
"taxonomy": {
"id": 123,
"taxonomyId": "<string>",
"name": "<string>",
"fullName": "<string>",
"path": "<string>",
"level": 123,
"handle": "<string>",
"vertical": "<string>",
"verticalPrefix": "<string>",
"verticalId": 123,
"taxonomyVertical": {
"id": 123,
"name": "<string>",
"prefix": "<string>",
"handle": "<string>",
"categories": "<array>",
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>"
}
]
},
"parentId": 123,
"parent": "<unknown>",
"children": "<array>",
"attributes": [
{
"id": 123,
"taxonomyId": "<string>",
"name": "<string>",
"handle": "<string>",
"description": "<string>",
"categoryId": 123,
"values": [
{
"id": 123,
"taxonomyId": "<string>",
"value": "<string>",
"handle": "<string>",
"attributeId": 123,
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"value": "<string>"
}
]
}
],
"isRequired": true,
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"description": "<string>"
}
]
}
],
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"fullName": "<string>"
}
]
},
"suggestedLedgerAccountId": 123,
"suggestedLedgerAccount": {
"id": 123,
"code": "<string>",
"currency": "<string>",
"isSystemDefined": true,
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"isActive": true,
"parentAccountId": 123,
"parentAccount": "<unknown>",
"subAccounts": "<array>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"description": "<string>",
"createdById": 123
}
]
},
"confidenceScore": 123,
"classificationMethod": "<string>",
"isVerified": true,
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Taxonomy
Post apitaxonomyline itemsclassify
POST
/
api
/
taxonomy
/
line-items
/
classify
cURL
curl --request POST \
--url https://api.smartbills.io/api/taxonomy/line-items/classify \
--header 'Content-Type: application/json' \
--data '
{
"lineItemId": 123,
"itemDescription": "<string>",
"itemName": "<string>",
"vendorName": "<string>",
"amount": 123,
"currency": "<string>",
"language": "<string>",
"forceRecalculation": true
}
'import requests
url = "https://api.smartbills.io/api/taxonomy/line-items/classify"
payload = {
"lineItemId": 123,
"itemDescription": "<string>",
"itemName": "<string>",
"vendorName": "<string>",
"amount": 123,
"currency": "<string>",
"language": "<string>",
"forceRecalculation": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
lineItemId: 123,
itemDescription: '<string>',
itemName: '<string>',
vendorName: '<string>',
amount: 123,
currency: '<string>',
language: '<string>',
forceRecalculation: true
})
};
fetch('https://api.smartbills.io/api/taxonomy/line-items/classify', 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.smartbills.io/api/taxonomy/line-items/classify",
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([
'lineItemId' => 123,
'itemDescription' => '<string>',
'itemName' => '<string>',
'vendorName' => '<string>',
'amount' => 123,
'currency' => '<string>',
'language' => '<string>',
'forceRecalculation' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.smartbills.io/api/taxonomy/line-items/classify"
payload := strings.NewReader("{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.smartbills.io/api/taxonomy/line-items/classify")
.header("Content-Type", "application/json")
.body("{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/api/taxonomy/line-items/classify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"lineItemId\": 123,\n \"itemDescription\": \"<string>\",\n \"itemName\": \"<string>\",\n \"vendorName\": \"<string>\",\n \"amount\": 123,\n \"currency\": \"<string>\",\n \"language\": \"<string>\",\n \"forceRecalculation\": true\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"lineItemId": 123,
"taxonomyId": 123,
"taxonomy": {
"id": 123,
"taxonomyId": "<string>",
"name": "<string>",
"fullName": "<string>",
"path": "<string>",
"level": 123,
"handle": "<string>",
"vertical": "<string>",
"verticalPrefix": "<string>",
"verticalId": 123,
"taxonomyVertical": {
"id": 123,
"name": "<string>",
"prefix": "<string>",
"handle": "<string>",
"categories": "<array>",
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>"
}
]
},
"parentId": 123,
"parent": "<unknown>",
"children": "<array>",
"attributes": [
{
"id": 123,
"taxonomyId": "<string>",
"name": "<string>",
"handle": "<string>",
"description": "<string>",
"categoryId": 123,
"values": [
{
"id": 123,
"taxonomyId": "<string>",
"value": "<string>",
"handle": "<string>",
"attributeId": 123,
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"value": "<string>"
}
]
}
],
"isRequired": true,
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"description": "<string>"
}
]
}
],
"isActive": true,
"locale": "<string>",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"fullName": "<string>"
}
]
},
"suggestedLedgerAccountId": 123,
"suggestedLedgerAccount": {
"id": 123,
"code": "<string>",
"currency": "<string>",
"isSystemDefined": true,
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"isActive": true,
"parentAccountId": 123,
"parentAccount": "<unknown>",
"subAccounts": "<array>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"translations": [
{
"id": 123,
"locale": "<string>",
"parentId": 123,
"name": "<string>",
"description": "<string>",
"createdById": 123
}
]
},
"confidenceScore": 123,
"classificationMethod": "<string>",
"isVerified": true,
"isActive": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}Body
application/jsontext/jsonapplication/*+json
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I