Create Bundle Offer
curl --request POST \
--url https://api.sellauth.com/v1/shops/{shopId}/bundle-offers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "pasyzwszwtxpeqq",
"type": "percentage",
"discount": 10,
"enabled": false,
"items": "syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez",
"max_uses_per_cart": 85,
"priority": 42,
"starts_at": "2020-09-01",
"ends_at": "2020-09-01"
}
'import requests
url = "https://api.sellauth.com/v1/shops/{shopId}/bundle-offers"
payload = {
"name": "pasyzwszwtxpeqq",
"type": "percentage",
"discount": 10,
"enabled": False,
"items": "syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez",
"max_uses_per_cart": 85,
"priority": 42,
"starts_at": "2020-09-01",
"ends_at": "2020-09-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'pasyzwszwtxpeqq',
type: 'percentage',
discount: 10,
enabled: false,
items: 'syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez',
max_uses_per_cart: 85,
priority: 42,
starts_at: '2020-09-01',
ends_at: '2020-09-01'
})
};
fetch('https://api.sellauth.com/v1/shops/{shopId}/bundle-offers', 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.sellauth.com/v1/shops/{shopId}/bundle-offers",
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' => 'pasyzwszwtxpeqq',
'type' => 'percentage',
'discount' => 10,
'enabled' => false,
'items' => 'syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez',
'max_uses_per_cart' => 85,
'priority' => 42,
'starts_at' => '2020-09-01',
'ends_at' => '2020-09-01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sellauth.com/v1/shops/{shopId}/bundle-offers"
payload := strings.NewReader("{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sellauth.com/v1/shops/{shopId}/bundle-offers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/shops/{shopId}/bundle-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}"
response = http.request(request)
puts response.read_bodyBundle Offers
Create Bundle Offer
Creates a new bundle offer.
POST
/
v1
/
shops
/
{shopId}
/
bundle-offers
Create Bundle Offer
curl --request POST \
--url https://api.sellauth.com/v1/shops/{shopId}/bundle-offers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "pasyzwszwtxpeqq",
"type": "percentage",
"discount": 10,
"enabled": false,
"items": "syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez",
"max_uses_per_cart": 85,
"priority": 42,
"starts_at": "2020-09-01",
"ends_at": "2020-09-01"
}
'import requests
url = "https://api.sellauth.com/v1/shops/{shopId}/bundle-offers"
payload = {
"name": "pasyzwszwtxpeqq",
"type": "percentage",
"discount": 10,
"enabled": False,
"items": "syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez",
"max_uses_per_cart": 85,
"priority": 42,
"starts_at": "2020-09-01",
"ends_at": "2020-09-01"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'pasyzwszwtxpeqq',
type: 'percentage',
discount: 10,
enabled: false,
items: 'syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez',
max_uses_per_cart: 85,
priority: 42,
starts_at: '2020-09-01',
ends_at: '2020-09-01'
})
};
fetch('https://api.sellauth.com/v1/shops/{shopId}/bundle-offers', 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.sellauth.com/v1/shops/{shopId}/bundle-offers",
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' => 'pasyzwszwtxpeqq',
'type' => 'percentage',
'discount' => 10,
'enabled' => false,
'items' => 'syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez',
'max_uses_per_cart' => 85,
'priority' => 42,
'starts_at' => '2020-09-01',
'ends_at' => '2020-09-01'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.sellauth.com/v1/shops/{shopId}/bundle-offers"
payload := strings.NewReader("{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.sellauth.com/v1/shops/{shopId}/bundle-offers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sellauth.com/v1/shops/{shopId}/bundle-offers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"pasyzwszwtxpeqq\",\n \"type\": \"percentage\",\n \"discount\": 10,\n \"enabled\": false,\n \"items\": \"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez\",\n \"max_uses_per_cart\": 85,\n \"priority\": 42,\n \"starts_at\": \"2020-09-01\",\n \"ends_at\": \"2020-09-01\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
You can retrieve your API key from your dashboard under Account > Developers.
Path Parameters
The ID of the shop.
Body
application/json
Must not be greater than 255 characters.
Example:
"pasyzwszwtxpeqq"
Available options:
percentage, fixed Example:
"percentage"
Must be at least 0.01. Must not be greater than 999999.
Example:
10
Example:
false
Must have at least 1 items.
Example:
"syzwszwtxpeqqikymwkiinfowtzmixkolowyuffszfrcsnwwxvxez"
Must be at least 1.
Example:
85
Must be at least 0.
Example:
42
Must be a valid date. Must be a date before 2038-01-19.
Example:
"2020-09-01"
Must be a valid date. Must be a date before 2038-01-19.
Example:
"2020-09-01"
Response
200 - undefined