Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.tax.update();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->tax->update();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.tax.update()
curl --request PUT \
--url https://api.shoply.gg/v1/stores/{storeId}/tax \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collect": true,
"included": true,
"business": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/tax"
payload := strings.NewReader("{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shoply.gg/v1/stores/{storeId}/tax")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/tax")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"collect": true,
"included": false,
"business": true,
"home": "DE",
"homeName": "Germany",
"rates": [],
"standard": {
"AT": {
"label": "VAT",
"rate": 20
},
"BE": {
"label": "VAT",
"rate": 21
},
"BG": {
"label": "VAT",
"rate": 20
},
"HR": {
"label": "VAT",
"rate": 25
},
"CY": {
"label": "VAT",
"rate": 19
},
"CZ": {
"label": "VAT",
"rate": 21
},
"DK": {
"label": "VAT",
"rate": 25
},
"EE": {
"label": "VAT",
"rate": 24
},
"FI": {
"label": "VAT",
"rate": 25.5
},
"FR": {
"label": "VAT",
"rate": 20
},
"DE": {
"label": "VAT",
"rate": 19
},
"GR": {
"label": "VAT",
"rate": 24
},
"HU": {
"label": "VAT",
"rate": 27
},
"IE": {
"label": "VAT",
"rate": 23
},
"IT": {
"label": "VAT",
"rate": 22
},
"LV": {
"label": "VAT",
"rate": 21
},
"LT": {
"label": "VAT",
"rate": 21
},
"LU": {
"label": "VAT",
"rate": 17
},
"MT": {
"label": "VAT",
"rate": 18
},
"NL": {
"label": "VAT",
"rate": 21
},
"PL": {
"label": "VAT",
"rate": 23
},
"PT": {
"label": "VAT",
"rate": 23
},
"RO": {
"label": "VAT",
"rate": 21
},
"SK": {
"label": "VAT",
"rate": 23
},
"SI": {
"label": "VAT",
"rate": 22
},
"ES": {
"label": "VAT",
"rate": 21
},
"SE": {
"label": "VAT",
"rate": 25
},
"GB": {
"label": "VAT",
"rate": 20
},
"NO": {
"label": "VAT",
"rate": 25
},
"CH": {
"label": "VAT",
"rate": 8.1
},
"LI": {
"label": "VAT",
"rate": 8.1
},
"IS": {
"label": "VAT",
"rate": 24
},
"RS": {
"label": "VAT",
"rate": 20
},
"UA": {
"label": "VAT",
"rate": 20
},
"TR": {
"label": "VAT",
"rate": 20
},
"AU": {
"label": "GST",
"rate": 10
},
"NZ": {
"label": "GST",
"rate": 15
},
"CA": {
"label": "GST",
"rate": 5
},
"SG": {
"label": "GST",
"rate": 9
},
"IN": {
"label": "GST",
"rate": 18
},
"JP": {
"label": "Consumption tax",
"rate": 10
},
"KR": {
"label": "VAT",
"rate": 10
},
"TW": {
"label": "VAT",
"rate": 5
},
"TH": {
"label": "VAT",
"rate": 7
},
"MY": {
"label": "Service tax",
"rate": 8
},
"ID": {
"label": "VAT",
"rate": 11
},
"PH": {
"label": "VAT",
"rate": 12
},
"VN": {
"label": "VAT",
"rate": 10
},
"AE": {
"label": "VAT",
"rate": 5
},
"SA": {
"label": "VAT",
"rate": 15
},
"BH": {
"label": "VAT",
"rate": 10
},
"OM": {
"label": "VAT",
"rate": 5
},
"IL": {
"label": "VAT",
"rate": 18
},
"EG": {
"label": "VAT",
"rate": 14
},
"MA": {
"label": "VAT",
"rate": 20
},
"ZA": {
"label": "VAT",
"rate": 15
},
"NG": {
"label": "VAT",
"rate": 7.5
},
"KE": {
"label": "VAT",
"rate": 16
},
"MX": {
"label": "VAT",
"rate": 16
},
"CL": {
"label": "VAT",
"rate": 19
},
"CO": {
"label": "VAT",
"rate": 19
},
"AR": {
"label": "VAT",
"rate": 21
},
"PE": {
"label": "VAT",
"rate": 18
}
},
"eu": [
"AT",
"BE"
],
"regions": {
"US": [
{
"code": "AL",
"name": "Alabama"
},
{
"code": "AK",
"name": "Alaska"
}
]
},
"limit": 400,
"maxRate": 50
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Tax
Update tax settings
Changes the store’s three tax switches. Only what is sent changes. Refused with business_details_required until the store has its business details.
Needs the finance.write permission (Change Finance).
PUT
/
stores
/
{storeId}
/
tax
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.tax.update();
<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->tax->update();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.tax.update()
curl --request PUT \
--url https://api.shoply.gg/v1/stores/{storeId}/tax \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"collect": true,
"included": true,
"business": true
}
'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/tax"
payload := strings.NewReader("{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.shoply.gg/v1/stores/{storeId}/tax")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/tax")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"collect\": true,\n \"included\": true,\n \"business\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"collect": true,
"included": false,
"business": true,
"home": "DE",
"homeName": "Germany",
"rates": [],
"standard": {
"AT": {
"label": "VAT",
"rate": 20
},
"BE": {
"label": "VAT",
"rate": 21
},
"BG": {
"label": "VAT",
"rate": 20
},
"HR": {
"label": "VAT",
"rate": 25
},
"CY": {
"label": "VAT",
"rate": 19
},
"CZ": {
"label": "VAT",
"rate": 21
},
"DK": {
"label": "VAT",
"rate": 25
},
"EE": {
"label": "VAT",
"rate": 24
},
"FI": {
"label": "VAT",
"rate": 25.5
},
"FR": {
"label": "VAT",
"rate": 20
},
"DE": {
"label": "VAT",
"rate": 19
},
"GR": {
"label": "VAT",
"rate": 24
},
"HU": {
"label": "VAT",
"rate": 27
},
"IE": {
"label": "VAT",
"rate": 23
},
"IT": {
"label": "VAT",
"rate": 22
},
"LV": {
"label": "VAT",
"rate": 21
},
"LT": {
"label": "VAT",
"rate": 21
},
"LU": {
"label": "VAT",
"rate": 17
},
"MT": {
"label": "VAT",
"rate": 18
},
"NL": {
"label": "VAT",
"rate": 21
},
"PL": {
"label": "VAT",
"rate": 23
},
"PT": {
"label": "VAT",
"rate": 23
},
"RO": {
"label": "VAT",
"rate": 21
},
"SK": {
"label": "VAT",
"rate": 23
},
"SI": {
"label": "VAT",
"rate": 22
},
"ES": {
"label": "VAT",
"rate": 21
},
"SE": {
"label": "VAT",
"rate": 25
},
"GB": {
"label": "VAT",
"rate": 20
},
"NO": {
"label": "VAT",
"rate": 25
},
"CH": {
"label": "VAT",
"rate": 8.1
},
"LI": {
"label": "VAT",
"rate": 8.1
},
"IS": {
"label": "VAT",
"rate": 24
},
"RS": {
"label": "VAT",
"rate": 20
},
"UA": {
"label": "VAT",
"rate": 20
},
"TR": {
"label": "VAT",
"rate": 20
},
"AU": {
"label": "GST",
"rate": 10
},
"NZ": {
"label": "GST",
"rate": 15
},
"CA": {
"label": "GST",
"rate": 5
},
"SG": {
"label": "GST",
"rate": 9
},
"IN": {
"label": "GST",
"rate": 18
},
"JP": {
"label": "Consumption tax",
"rate": 10
},
"KR": {
"label": "VAT",
"rate": 10
},
"TW": {
"label": "VAT",
"rate": 5
},
"TH": {
"label": "VAT",
"rate": 7
},
"MY": {
"label": "Service tax",
"rate": 8
},
"ID": {
"label": "VAT",
"rate": 11
},
"PH": {
"label": "VAT",
"rate": 12
},
"VN": {
"label": "VAT",
"rate": 10
},
"AE": {
"label": "VAT",
"rate": 5
},
"SA": {
"label": "VAT",
"rate": 15
},
"BH": {
"label": "VAT",
"rate": 10
},
"OM": {
"label": "VAT",
"rate": 5
},
"IL": {
"label": "VAT",
"rate": 18
},
"EG": {
"label": "VAT",
"rate": 14
},
"MA": {
"label": "VAT",
"rate": 20
},
"ZA": {
"label": "VAT",
"rate": 15
},
"NG": {
"label": "VAT",
"rate": 7.5
},
"KE": {
"label": "VAT",
"rate": 16
},
"MX": {
"label": "VAT",
"rate": 16
},
"CL": {
"label": "VAT",
"rate": 19
},
"CO": {
"label": "VAT",
"rate": 19
},
"AR": {
"label": "VAT",
"rate": 21
},
"PE": {
"label": "VAT",
"rate": 18
}
},
"eu": [
"AT",
"BE"
],
"regions": {
"US": [
{
"code": "AL",
"name": "Alabama"
},
{
"code": "AK",
"name": "Alaska"
}
]
},
"limit": 400,
"maxRate": 50
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
Body
application/json

