Create an exemption certificate
curl --request POST \
--url https://api.prod.commenda.io/api/v1/exemption-certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"effective_date": "2023-12-25",
"jurisdictions": [
{
"identification_number": "<string>",
"country": "<string>",
"state": "<string>",
"end_date": "2023-12-25",
"is_active": true
}
],
"file_id": "<string>",
"exemption_certificate_number": "<string>"
}
'import requests
url = "https://api.prod.commenda.io/api/v1/exemption-certificates"
payload = {
"customer_id": "<string>",
"effective_date": "2023-12-25",
"jurisdictions": [
{
"identification_number": "<string>",
"country": "<string>",
"state": "<string>",
"end_date": "2023-12-25",
"is_active": True
}
],
"file_id": "<string>",
"exemption_certificate_number": "<string>"
}
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({
customer_id: '<string>',
effective_date: '2023-12-25',
jurisdictions: [
{
identification_number: '<string>',
country: '<string>',
state: '<string>',
end_date: '2023-12-25',
is_active: true
}
],
file_id: '<string>',
exemption_certificate_number: '<string>'
})
};
fetch('https://api.prod.commenda.io/api/v1/exemption-certificates', 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.prod.commenda.io/api/v1/exemption-certificates",
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([
'customer_id' => '<string>',
'effective_date' => '2023-12-25',
'jurisdictions' => [
[
'identification_number' => '<string>',
'country' => '<string>',
'state' => '<string>',
'end_date' => '2023-12-25',
'is_active' => true
]
],
'file_id' => '<string>',
'exemption_certificate_number' => '<string>'
]),
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.prod.commenda.io/api/v1/exemption-certificates"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\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.prod.commenda.io/api/v1/exemption-certificates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/exemption-certificates")
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 \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verification_status": "<string>",
"exemption_certificate_number": "<string>",
"effective_date": "2023-12-25",
"created_at": 123,
"jurisdictions": [
{
"country": "<string>",
"state": "<string>",
"is_active": true,
"end_date": "2023-12-25",
"identification_number": "<string>",
"is_expired": true,
"created_at": 123
}
]
},
"message": "Successfully created exemption certificate."
}{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"doc_url": "https://sales-tax-docs.commenda.io/",
"title": "Failed to validate the request body",
"detail": "<string>",
"status": 400,
"instance": "<string>",
"Errors": [
{
"details": "<string>",
"pointer": "<string>"
}
]
}
}Exemption Certificates
Create exemption certificate
Create an exemption certificate for a customer with one or more jurisdiction exemptions
POST
/
exemption-certificates
Create an exemption certificate
curl --request POST \
--url https://api.prod.commenda.io/api/v1/exemption-certificates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "<string>",
"effective_date": "2023-12-25",
"jurisdictions": [
{
"identification_number": "<string>",
"country": "<string>",
"state": "<string>",
"end_date": "2023-12-25",
"is_active": true
}
],
"file_id": "<string>",
"exemption_certificate_number": "<string>"
}
'import requests
url = "https://api.prod.commenda.io/api/v1/exemption-certificates"
payload = {
"customer_id": "<string>",
"effective_date": "2023-12-25",
"jurisdictions": [
{
"identification_number": "<string>",
"country": "<string>",
"state": "<string>",
"end_date": "2023-12-25",
"is_active": True
}
],
"file_id": "<string>",
"exemption_certificate_number": "<string>"
}
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({
customer_id: '<string>',
effective_date: '2023-12-25',
jurisdictions: [
{
identification_number: '<string>',
country: '<string>',
state: '<string>',
end_date: '2023-12-25',
is_active: true
}
],
file_id: '<string>',
exemption_certificate_number: '<string>'
})
};
fetch('https://api.prod.commenda.io/api/v1/exemption-certificates', 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.prod.commenda.io/api/v1/exemption-certificates",
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([
'customer_id' => '<string>',
'effective_date' => '2023-12-25',
'jurisdictions' => [
[
'identification_number' => '<string>',
'country' => '<string>',
'state' => '<string>',
'end_date' => '2023-12-25',
'is_active' => true
]
],
'file_id' => '<string>',
'exemption_certificate_number' => '<string>'
]),
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.prod.commenda.io/api/v1/exemption-certificates"
payload := strings.NewReader("{\n \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\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.prod.commenda.io/api/v1/exemption-certificates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.commenda.io/api/v1/exemption-certificates")
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 \"customer_id\": \"<string>\",\n \"effective_date\": \"2023-12-25\",\n \"jurisdictions\": [\n {\n \"identification_number\": \"<string>\",\n \"country\": \"<string>\",\n \"state\": \"<string>\",\n \"end_date\": \"2023-12-25\",\n \"is_active\": true\n }\n ],\n \"file_id\": \"<string>\",\n \"exemption_certificate_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verification_status": "<string>",
"exemption_certificate_number": "<string>",
"effective_date": "2023-12-25",
"created_at": 123,
"jurisdictions": [
{
"country": "<string>",
"state": "<string>",
"is_active": true,
"end_date": "2023-12-25",
"identification_number": "<string>",
"is_expired": true,
"created_at": 123
}
]
},
"message": "Successfully created exemption certificate."
}{
"error": {
"type": "CLIENT_INVALID_REQUEST_BODY",
"doc_url": "https://sales-tax-docs.commenda.io/",
"title": "Failed to validate the request body",
"detail": "<string>",
"status": 400,
"instance": "<string>",
"Errors": [
{
"details": "<string>",
"pointer": "<string>"
}
]
}
}Request body
The unique identifier of the customer this exemption certificate belongs to.
The unique identifier of the file associated with this exemption certificate (e.g., scanned certificate document).
The date when the exemption certificate becomes effective. Format: ISO 8601 date (YYYY-MM-DD).
The type of exemption certificate. Valid values:
SINGLE_STATE: Certificate valid for a single state (maximum 1 jurisdiction)MULTI_STATE: Certificate valid for multiple statesBLANKET: Blanket exemption certificate
The certificate number assigned by the issuing authority. Maximum 20 characters.
Array of jurisdiction exemptions. Must contain at least one jurisdiction.
Show Jurisdiction object properties
Show Jurisdiction object properties
Type of identification. Valid values:
FEIN: Federal Employer Identification NumberSTATE_ISSUED_EXEMPTION_ID: State-issued exemption IDDRIVERS_LICENSE: Driver’s licenseFOREIGN_DIPLOMAT_ID: Foreign diplomat ID
The identification number corresponding to the identification type.
ISO 3166-1 alpha-2 country code (e.g., “US”). Currently only US is supported.
ISO 3166-2 subdivision code (e.g., “CA”, “NY”, “TX”).
Reason for the exemption. Valid values:
PURPOSE_RESALE: Resale exemptionPURPOSE_MANUFACTURING: Manufacturing exemptionPURPOSE_AGRICULTURE: Agricultural exemptionENTITY_GOVERNMENT: Government entityENTITY_NONPROFIT: Non-profit organizationENTITY_EDUCATION: Educational institutionENTITY_RELIGIOUS: Religious organization
Optional expiration date for the exemption. Format: ISO 8601 date (YYYY-MM-DD).
Whether the exemption is currently active. Defaults to true if not specified.
Response
Show ExemptionCertificate object
Show ExemptionCertificate object
Unique identifier for the exemption certificate.
The customer ID this certificate belongs to.
The file ID associated with this certificate, if any.
The type of exemption certificate (SINGLE_STATE, MULTI_STATE, or BLANKET).
Current verification status of the certificate:
NOT_READY: No certificate file is attachedVERIFICATION_PENDING: Awaiting verificationVERIFICATION_SUCCESS: Successfully verifiedVERIFICATION_FAILED: Verification failed
The certificate number, if provided.
The effective date of the certificate (ISO 8601 date).
Unix timestamp when the certificate was created.
Array of jurisdiction exemptions associated with this certificate.
Show Jurisdiction object
Show Jurisdiction object
ISO 3166-1 alpha-2 country code.
ISO 3166-2 subdivision code.
Reason for the exemption.
Whether the exemption is currently active.
Expiration date, if applicable.
Type of identification used.
The identification number.
Whether the exemption has expired.
Unix timestamp when the jurisdiction exemption was created.
Success message.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The unique identifier of the customer.
ISO 8601 formatted date string indicating the effective date.
Show child attributes
Show child attributes
Identifier of the file to use as the exemption certificate.
The exemption certificate number.
Maximum string length:
20Was this page helpful?
⌘I