cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"customerSupport": {
"email": "<string>",
"url": "<string>",
"privacyPolicyUrl": "<string>",
"termsAndConditionsUrl": "<string>"
},
"logo": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
},
"timezone": "<string>",
"currency": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"locale": "<string>",
"isMerchant": true,
"plan": "<string>",
"billingInterval": "<string>"
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/batch"
payload = [
{
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"customerSupport": {
"email": "<string>",
"url": "<string>",
"privacyPolicyUrl": "<string>",
"termsAndConditionsUrl": "<string>"
},
"logo": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
},
"timezone": "<string>",
"currency": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"locale": "<string>",
"isMerchant": True,
"plan": "<string>",
"billingInterval": "<string>"
}
]
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>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
customerSupport: {
email: '<string>',
url: '<string>',
privacyPolicyUrl: '<string>',
termsAndConditionsUrl: '<string>'
},
logo: {
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
},
timezone: '<string>',
currency: '<string>',
website: '<string>',
phoneNumber: '<string>',
locale: '<string>',
isMerchant: true,
plan: '<string>',
billingInterval: '<string>'
}
])
};
fetch('https://api.smartbills.io/v1/businesses/batch', 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/batch",
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>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'customerSupport' => [
'email' => '<string>',
'url' => '<string>',
'privacyPolicyUrl' => '<string>',
'termsAndConditionsUrl' => '<string>'
],
'logo' => [
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
],
'timezone' => '<string>',
'currency' => '<string>',
'website' => '<string>',
'phoneNumber' => '<string>',
'locale' => '<string>',
'isMerchant' => true,
'plan' => '<string>',
'billingInterval' => '<string>'
]
]),
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/batch"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\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/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/batch")
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 {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"currency": "<string>",
"slug": "<string>",
"timezone": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"logo": "<string>",
"locale": "<string>",
"brand": {
"id": 123,
"logo": "<string>",
"icon": "<string>",
"coverImage": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"linkedIn": "<string>",
"twitter": "<string>",
"youTube": "<string>",
"tikTok": "<string>",
"googleAnalyticsId": "<string>",
"gtmId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"billingCheckoutUrl": "<string>"
}
]Businesses
Post v1businessesbatch
POST
/
v1
/
businesses
/
batch
cURL
curl --request POST \
--url https://api.smartbills.io/v1/businesses/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"customerSupport": {
"email": "<string>",
"url": "<string>",
"privacyPolicyUrl": "<string>",
"termsAndConditionsUrl": "<string>"
},
"logo": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
},
"timezone": "<string>",
"currency": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"locale": "<string>",
"isMerchant": true,
"plan": "<string>",
"billingInterval": "<string>"
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/batch"
payload = [
{
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"stateCode": "<string>",
"countryCode": "<string>",
"postalCode": "<string>"
},
"customerSupport": {
"email": "<string>",
"url": "<string>",
"privacyPolicyUrl": "<string>",
"termsAndConditionsUrl": "<string>"
},
"logo": {
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>"
},
"timezone": "<string>",
"currency": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"locale": "<string>",
"isMerchant": True,
"plan": "<string>",
"billingInterval": "<string>"
}
]
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>',
address: {
line1: '<string>',
line2: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
stateCode: '<string>',
countryCode: '<string>',
postalCode: '<string>'
},
customerSupport: {
email: '<string>',
url: '<string>',
privacyPolicyUrl: '<string>',
termsAndConditionsUrl: '<string>'
},
logo: {
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>'
},
timezone: '<string>',
currency: '<string>',
website: '<string>',
phoneNumber: '<string>',
locale: '<string>',
isMerchant: true,
plan: '<string>',
billingInterval: '<string>'
}
])
};
fetch('https://api.smartbills.io/v1/businesses/batch', 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/batch",
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>',
'address' => [
'line1' => '<string>',
'line2' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'stateCode' => '<string>',
'countryCode' => '<string>',
'postalCode' => '<string>'
],
'customerSupport' => [
'email' => '<string>',
'url' => '<string>',
'privacyPolicyUrl' => '<string>',
'termsAndConditionsUrl' => '<string>'
],
'logo' => [
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>'
],
'timezone' => '<string>',
'currency' => '<string>',
'website' => '<string>',
'phoneNumber' => '<string>',
'locale' => '<string>',
'isMerchant' => true,
'plan' => '<string>',
'billingInterval' => '<string>'
]
]),
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/batch"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\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/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/batch")
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 {\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"line2\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"stateCode\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"customerSupport\": {\n \"email\": \"<string>\",\n \"url\": \"<string>\",\n \"privacyPolicyUrl\": \"<string>\",\n \"termsAndConditionsUrl\": \"<string>\"\n },\n \"logo\": {\n \"fileName\": \"<string>\",\n \"contentType\": \"<string>\",\n \"stream\": \"<string>\",\n \"base64\": \"<string>\",\n \"url\": \"<string>\",\n \"file\": \"<string>\",\n \"note\": \"<string>\",\n \"altText\": \"<string>\"\n },\n \"timezone\": \"<string>\",\n \"currency\": \"<string>\",\n \"website\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"locale\": \"<string>\",\n \"isMerchant\": true,\n \"plan\": \"<string>\",\n \"billingInterval\": \"<string>\"\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"address": {
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"stateCode": "<string>",
"country": "<string>",
"countryCode": "<string>",
"postalCode": "<string>",
"location": {
"longitude": 123,
"latitude": 123
},
"googlePlaceId": "<string>",
"formattedAddress": "<string>"
},
"currency": "<string>",
"slug": "<string>",
"timezone": "<string>",
"website": "<string>",
"phoneNumber": "<string>",
"logo": "<string>",
"locale": "<string>",
"brand": {
"id": 123,
"logo": "<string>",
"icon": "<string>",
"coverImage": "<string>",
"primaryColor": "<string>",
"secondaryColor": "<string>",
"facebook": "<string>",
"instagram": "<string>",
"linkedIn": "<string>",
"twitter": "<string>",
"youTube": "<string>",
"tikTok": "<string>",
"googleAnalyticsId": "<string>",
"gtmId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"billingCheckoutUrl": "<string>"
}
]Body
application/jsontext/jsonapplication/*+json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I