cURL
curl --request PUT \
--url https://api.smartbills.io/v1/businesses/{businessId}/products/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"description": "<string>",
"localizedName": {},
"localizedDescription": {},
"vendor": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"publishedAt": "2023-11-07T05:31:56Z",
"htmlDescription": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>",
"productVariantIds": [
123
]
}
],
"id": 123
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/products/batch"
payload = [
{
"name": "<string>",
"description": "<string>",
"localizedName": {},
"localizedDescription": {},
"vendor": "<string>",
"category": "<string>",
"tags": ["<string>"],
"publishedAt": "2023-11-07T05:31:56Z",
"htmlDescription": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>",
"productVariantIds": [123]
}
],
"id": 123
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
description: '<string>',
localizedName: {},
localizedDescription: {},
vendor: '<string>',
category: '<string>',
tags: ['<string>'],
publishedAt: '2023-11-07T05:31:56Z',
htmlDescription: '<string>',
images: [
{
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>',
productVariantIds: [123]
}
],
id: 123
}
])
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/products/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/{businessId}/products/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'name' => '<string>',
'description' => '<string>',
'localizedName' => [
],
'localizedDescription' => [
],
'vendor' => '<string>',
'category' => '<string>',
'tags' => [
'<string>'
],
'publishedAt' => '2023-11-07T05:31:56Z',
'htmlDescription' => '<string>',
'images' => [
[
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>',
'productVariantIds' => [
123
]
]
],
'id' => 123
]
]),
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}/products/batch"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://api.smartbills.io/v1/businesses/{businessId}/products/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/products/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"vendor": {
"id": 123,
"name": "<string>"
},
"category": "<string>",
"htmlDescription": "<string>",
"images": [
{
"id": 123,
"name": "<string>",
"height": 123,
"width": 123,
"productVariantIds": [
123
],
"url": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"variants": [
{
"id": 123,
"initialPrice": 123,
"price": 123,
"weightUnit": "<string>",
"weight": 123,
"taxable": true,
"name": "<string>",
"sku": "<string>",
"upc": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"productId": 123
}
],
"tags": [
"<string>"
],
"url": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Products
Put v1businesses productsbatch
PUT
/
v1
/
businesses
/
{businessId}
/
products
/
batch
cURL
curl --request PUT \
--url https://api.smartbills.io/v1/businesses/{businessId}/products/batch \
--header 'Content-Type: application/json' \
--data '
[
{
"name": "<string>",
"description": "<string>",
"localizedName": {},
"localizedDescription": {},
"vendor": "<string>",
"category": "<string>",
"tags": [
"<string>"
],
"publishedAt": "2023-11-07T05:31:56Z",
"htmlDescription": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>",
"productVariantIds": [
123
]
}
],
"id": 123
}
]
'import requests
url = "https://api.smartbills.io/v1/businesses/{businessId}/products/batch"
payload = [
{
"name": "<string>",
"description": "<string>",
"localizedName": {},
"localizedDescription": {},
"vendor": "<string>",
"category": "<string>",
"tags": ["<string>"],
"publishedAt": "2023-11-07T05:31:56Z",
"htmlDescription": "<string>",
"images": [
{
"fileName": "<string>",
"contentType": "<string>",
"stream": "<string>",
"base64": "<string>",
"url": "<string>",
"file": "<string>",
"note": "<string>",
"altText": "<string>",
"productVariantIds": [123]
}
],
"id": 123
}
]
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
description: '<string>',
localizedName: {},
localizedDescription: {},
vendor: '<string>',
category: '<string>',
tags: ['<string>'],
publishedAt: '2023-11-07T05:31:56Z',
htmlDescription: '<string>',
images: [
{
fileName: '<string>',
contentType: '<string>',
stream: '<string>',
base64: '<string>',
url: '<string>',
file: '<string>',
note: '<string>',
altText: '<string>',
productVariantIds: [123]
}
],
id: 123
}
])
};
fetch('https://api.smartbills.io/v1/businesses/{businessId}/products/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/{businessId}/products/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
[
'name' => '<string>',
'description' => '<string>',
'localizedName' => [
],
'localizedDescription' => [
],
'vendor' => '<string>',
'category' => '<string>',
'tags' => [
'<string>'
],
'publishedAt' => '2023-11-07T05:31:56Z',
'htmlDescription' => '<string>',
'images' => [
[
'fileName' => '<string>',
'contentType' => '<string>',
'stream' => '<string>',
'base64' => '<string>',
'url' => '<string>',
'file' => '<string>',
'note' => '<string>',
'altText' => '<string>',
'productVariantIds' => [
123
]
]
],
'id' => 123
]
]),
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}/products/batch"
payload := strings.NewReader("[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]")
req, _ := http.NewRequest("PUT", 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.put("https://api.smartbills.io/v1/businesses/{businessId}/products/batch")
.header("Content-Type", "application/json")
.body("[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.smartbills.io/v1/businesses/{businessId}/products/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"localizedName\": {},\n \"localizedDescription\": {},\n \"vendor\": \"<string>\",\n \"category\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"publishedAt\": \"2023-11-07T05:31:56Z\",\n \"htmlDescription\": \"<string>\",\n \"images\": [\n {\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 \"productVariantIds\": [\n 123\n ]\n }\n ],\n \"id\": 123\n }\n]"
response = http.request(request)
puts response.read_body[
{
"id": 123,
"name": "<string>",
"slug": "<string>",
"vendor": {
"id": 123,
"name": "<string>"
},
"category": "<string>",
"htmlDescription": "<string>",
"images": [
{
"id": 123,
"name": "<string>",
"height": 123,
"width": 123,
"productVariantIds": [
123
],
"url": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"variants": [
{
"id": 123,
"initialPrice": 123,
"price": 123,
"weightUnit": "<string>",
"weight": 123,
"taxable": true,
"name": "<string>",
"sku": "<string>",
"upc": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"productId": 123
}
],
"tags": [
"<string>"
],
"url": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
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
Show child attributes
Show child attributes
Was this page helpful?
⌘I