Register for tax where you sell
Record your tax registration in a jurisdiction — the legal basis for collecting there — find the jurisdiction that applies at a postal code, read the rate table your tills resolve against, and hold a customer’s exemption certificate so their purchases are taxed correctly.
Tax · a play in 4 steps.
The steps
- Record the registration — the legal basis for collecting in that jurisdiction. — createTaxRegistration
- Find the jurisdiction that applies at a postal code. — resolveTaxJurisdictionByPostal
- Read the rate table your tills resolve against. — taxRates
- Record a customer’s exemption certificate — and revoke it the moment it no longer stands. — createExemptionCertificate, revokeExemptionCertificate
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
createTaxRegistration
createTaxRegistration — mutation · Create a new your tax registration in a jurisdiction — the legal basis for collecting there at your organization.
Example request
mutation ExampleCreateTaxRegistration($input: NewTaxRegistrationInput!) {
createTaxRegistration(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
jurisdictionId
registrationNumber
code
}
}
Variables:
{
"input": {
"caption": "Blue jeans",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"jurisdictionId": "01900000-0000-7000-8000-b50e54f50000"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createTaxRegistration": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "TN-EXMP-0000-000F",
"type": "TaxRegistration",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"jurisdictionId": "01900000-0000-7000-8000-b50e54f50000",
"registrationNumber": "<registration number>",
"code": "BJ-001"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
resolveTaxJurisdictionByPostal
resolveTaxJurisdictionByPostal — query · Find the tax jurisdiction that applies at a postal code — type a ZIP, get the place.
Example request
query ExampleResolveTaxJurisdictionByPostal($countryCode: String!, $postal: String!) {
resolveTaxJurisdictionByPostal(countryCode: $countryCode, postal: $postal) {
primary {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
level
treeParent
regime
countryCode
currencyCode
code
}
}
}
Variables:
{
"countryCode": "CA",
"postal": "<postal>"
}
Example response
{
"data": {
"resolveTaxJurisdictionByPostal": {
"primary": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "TJ-EXMP-0000-000F",
"type": "TaxJurisdiction",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"level": "country",
"treeParent": "01900000-0000-7000-8000-e095a88d0000",
"regime": "sales_tax",
"countryCode": "CA",
"currencyCode": "USD",
"code": "BJ-001"
}
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
taxRates
taxRates — query · The tax-rate table your tills resolve against.
Example request
query ExampleTaxRates($jurisdictionId: ID!, $filter: FilterInput) {
taxRates(jurisdictionId: $jurisdictionId, filter: $filter) {
items {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
category
treatment
ratePpm
compound
combined
thresholdMinorUnits
startAt
endAt
}
nextToken
matchCount
}
}
Variables:
{
"jurisdictionId": "01900000-0000-7000-8000-b50e54f50000",
"filter": {
"clauses": [
{
"field": "caption",
"op": "contains",
"values": [
"Blue"
]
}
]
}
}
Example response
{
"data": {
"taxRates": {
"items": [
{
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "TX-EXMP-0000-000F",
"type": "TaxRate",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"category": "standard",
"treatment": "taxable",
"ratePpm": 1,
"compound": true,
"combined": true,
"thresholdMinorUnits": 1,
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z"
}
],
"nextToken": "<the cursor from the previous page>",
"matchCount": 1
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
createExemptionCertificate
createExemptionCertificate — mutation · Create a new customer’s tax-exemption certificate at your organization.
Example request
mutation ExampleCreateExemptionCertificate($input: NewExemptionCertificateInput!) {
createExemptionCertificate(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
certType
certificateNumber
holderName
jurisdictionIds
categoryIds
expiresAt
docRef
orgCustomerId
code
}
}
Variables:
{
"input": {
"caption": "Blue jeans",
"certType": "resale",
"certificateNumber": "<certificate number>",
"holderName": "Blue jeans",
"jurisdictionIds": [
"01900000-0000-7000-8000-8b8f0ef20000"
]
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createExemptionCertificate": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "XC-EXMP-0000-000F",
"type": "ExemptionCertificate",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"certType": "resale",
"certificateNumber": "<certificate number>",
"holderName": "Blue jeans",
"jurisdictionIds": [
"01900000-0000-7000-8000-8b8f0ef20000"
],
"categoryIds": [
"standard"
],
"expiresAt": "2027-01-31T00:00:00.000Z",
"docRef": "<doc ref>",
"orgCustomerId": "01900000-0000-7000-8000-ba56ff800000",
"code": "BJ-001"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
revokeExemptionCertificate
revokeExemptionCertificate — mutation · Revoke a customer’s tax-exemption certificate — kill it now.
Example request
mutation ExampleRevokeExemptionCertificate($id: ID!, $revision: ID!, $reason: String) {
revokeExemptionCertificate(id: $id, revision: $revision, reason: $reason) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
certType
certificateNumber
holderName
jurisdictionIds
categoryIds
expiresAt
docRef
orgCustomerId
code
}
}
Variables:
{
"id": "01900000-0000-7000-8000-37386ae00000",
"revision": "01900000-0000-7000-8000-b7960e180000",
"reason": "Correcting a miscount."
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"revokeExemptionCertificate": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "XC-EXMP-0000-000F",
"type": "ExemptionCertificate",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"certType": "resale",
"certificateNumber": "<certificate number>",
"holderName": "Blue jeans",
"jurisdictionIds": [
"01900000-0000-7000-8000-8b8f0ef20000"
],
"categoryIds": [
"standard"
],
"expiresAt": "2027-01-31T00:00:00.000Z",
"docRef": "<doc ref>",
"orgCustomerId": "01900000-0000-7000-8000-ba56ff800000",
"code": "BJ-001"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}