cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"entityType": "<string>",
"priority": 123,
"allowedVendors": [
"<string>"
],
"blockedVendors": [
"<string>"
],
"allowedVendorIds": [
123
],
"blockedVendorIds": [
123
],
"actions": [
{
"type": "<string>",
"message": "<string>",
"reason": "<string>",
"priority": "<string>",
"notifySubmitter": true,
"timeoutMinutes": 123,
"requiredApprovers": [
123
],
"escalateToUserIds": [
123
],
"escalateToRoles": [
"<string>"
],
"delayMinutes": 123,
"minAmount": 123,
"category": "<string>",
"targetCategory": "<string>",
"overrideExisting": true
}
]
}
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based"
payload = {
"name": "<string>",
"description": "<string>",
"entityType": "<string>",
"priority": 123,
"allowedVendors": ["<string>"],
"blockedVendors": ["<string>"],
"allowedVendorIds": [123],
"blockedVendorIds": [123],
"actions": [
{
"type": "<string>",
"message": "<string>",
"reason": "<string>",
"priority": "<string>",
"notifySubmitter": True,
"timeoutMinutes": 123,
"requiredApprovers": [123],
"escalateToUserIds": [123],
"escalateToRoles": ["<string>"],
"delayMinutes": 123,
"minAmount": 123,
"category": "<string>",
"targetCategory": "<string>",
"overrideExisting": 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({
name: '<string>',
description: '<string>',
entityType: '<string>',
priority: 123,
allowedVendors: ['<string>'],
blockedVendors: ['<string>'],
allowedVendorIds: [123],
blockedVendorIds: [123],
actions: [
{
type: '<string>',
message: '<string>',
reason: '<string>',
priority: '<string>',
notifySubmitter: true,
timeoutMinutes: 123,
requiredApprovers: [123],
escalateToUserIds: [123],
escalateToRoles: ['<string>'],
delayMinutes: 123,
minAmount: 123,
category: '<string>',
targetCategory: '<string>',
overrideExisting: true
}
]
})
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based', 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/v1/businesses/{businessId}/workflows/templates/vendor-based",
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([
'name' => '<string>',
'description' => '<string>',
'entityType' => '<string>',
'priority' => 123,
'allowedVendors' => [
'<string>'
],
'blockedVendors' => [
'<string>'
],
'allowedVendorIds' => [
123
],
'blockedVendorIds' => [
123
],
'actions' => [
[
'type' => '<string>',
'message' => '<string>',
'reason' => '<string>',
'priority' => '<string>',
'notifySubmitter' => true,
'timeoutMinutes' => 123,
'requiredApprovers' => [
123
],
'escalateToUserIds' => [
123
],
'escalateToRoles' => [
'<string>'
],
'delayMinutes' => 123,
'minAmount' => 123,
'category' => '<string>',
'targetCategory' => '<string>',
'overrideExisting' => 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/v1/businesses/{businessId}/workflows/templates/vendor-based"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\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/v1/businesses/{businessId}/workflows/templates/vendor-based")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyWorkflow
Post v1businesses workflowstemplatesvendor based
POST
/
v1
/
businesses
/
{businessId}
/
workflows
/
templates
/
vendor-based
cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"entityType": "<string>",
"priority": 123,
"allowedVendors": [
"<string>"
],
"blockedVendors": [
"<string>"
],
"allowedVendorIds": [
123
],
"blockedVendorIds": [
123
],
"actions": [
{
"type": "<string>",
"message": "<string>",
"reason": "<string>",
"priority": "<string>",
"notifySubmitter": true,
"timeoutMinutes": 123,
"requiredApprovers": [
123
],
"escalateToUserIds": [
123
],
"escalateToRoles": [
"<string>"
],
"delayMinutes": 123,
"minAmount": 123,
"category": "<string>",
"targetCategory": "<string>",
"overrideExisting": true
}
]
}
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based"
payload = {
"name": "<string>",
"description": "<string>",
"entityType": "<string>",
"priority": 123,
"allowedVendors": ["<string>"],
"blockedVendors": ["<string>"],
"allowedVendorIds": [123],
"blockedVendorIds": [123],
"actions": [
{
"type": "<string>",
"message": "<string>",
"reason": "<string>",
"priority": "<string>",
"notifySubmitter": True,
"timeoutMinutes": 123,
"requiredApprovers": [123],
"escalateToUserIds": [123],
"escalateToRoles": ["<string>"],
"delayMinutes": 123,
"minAmount": 123,
"category": "<string>",
"targetCategory": "<string>",
"overrideExisting": 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({
name: '<string>',
description: '<string>',
entityType: '<string>',
priority: 123,
allowedVendors: ['<string>'],
blockedVendors: ['<string>'],
allowedVendorIds: [123],
blockedVendorIds: [123],
actions: [
{
type: '<string>',
message: '<string>',
reason: '<string>',
priority: '<string>',
notifySubmitter: true,
timeoutMinutes: 123,
requiredApprovers: [123],
escalateToUserIds: [123],
escalateToRoles: ['<string>'],
delayMinutes: 123,
minAmount: 123,
category: '<string>',
targetCategory: '<string>',
overrideExisting: true
}
]
})
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based', 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/v1/businesses/{businessId}/workflows/templates/vendor-based",
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([
'name' => '<string>',
'description' => '<string>',
'entityType' => '<string>',
'priority' => 123,
'allowedVendors' => [
'<string>'
],
'blockedVendors' => [
'<string>'
],
'allowedVendorIds' => [
123
],
'blockedVendorIds' => [
123
],
'actions' => [
[
'type' => '<string>',
'message' => '<string>',
'reason' => '<string>',
'priority' => '<string>',
'notifySubmitter' => true,
'timeoutMinutes' => 123,
'requiredApprovers' => [
123
],
'escalateToUserIds' => [
123
],
'escalateToRoles' => [
'<string>'
],
'delayMinutes' => 123,
'minAmount' => 123,
'category' => '<string>',
'targetCategory' => '<string>',
'overrideExisting' => 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/v1/businesses/{businessId}/workflows/templates/vendor-based"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\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/v1/businesses/{businessId}/workflows/templates/vendor-based")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/workflows/templates/vendor-based")
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 \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"entityType\": \"<string>\",\n \"priority\": 123,\n \"allowedVendors\": [\n \"<string>\"\n ],\n \"blockedVendors\": [\n \"<string>\"\n ],\n \"allowedVendorIds\": [\n 123\n ],\n \"blockedVendorIds\": [\n 123\n ],\n \"actions\": [\n {\n \"type\": \"<string>\",\n \"message\": \"<string>\",\n \"reason\": \"<string>\",\n \"priority\": \"<string>\",\n \"notifySubmitter\": true,\n \"timeoutMinutes\": 123,\n \"requiredApprovers\": [\n 123\n ],\n \"escalateToUserIds\": [\n 123\n ],\n \"escalateToRoles\": [\n \"<string>\"\n ],\n \"delayMinutes\": 123,\n \"minAmount\": 123,\n \"category\": \"<string>\",\n \"targetCategory\": \"<string>\",\n \"overrideExisting\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Body
application/jsontext/jsonapplication/*+json
Response
200
OK
Was this page helpful?
⌘I