-
Notifications
You must be signed in to change notification settings - Fork 51
docs(tax): TAX-1750 add store operations docs for tax customers and tax property type field #929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
--- | ||
title: Tax Customers | ||
keywords: tax customers, tax | ||
--- | ||
|
||
# Tax Customers | ||
|
||
The Tax Customers API allows merchants to configure customer-specific tax data for use in tax calculations. This enables merchants to provide tax providers with additional customer-related information that may affect tax rates or exemptions. | ||
|
||
This guide demonstrates how to use the Tax Customers API. For more, see the [Tax Customers API Reference](/docs/rest-management/tax-customers). | ||
declankirk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Tax customers | ||
|
||
Tax customers rely on `customer_id` to associate tax data with specific customers. This data is sent to tax providers during tax calculations. The examples below demonstrate how to create, update, retrieve, and delete tax customer data. | ||
|
||
### Get tax customers | ||
|
||
To retrieve a list of tax customers, send a request to the [Get Tax Customers](/docs/rest-management/tax-customers#get-tax-customers) endpoint. You can filter the results by specifying one or more `customer_id` values. | ||
declankirk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Tabs items={[`Request`, `Response`]}> | ||
<Tab> | ||
```http filename="Example request: Get tax customers" showLineNumbers copy | ||
GET https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/tax/customers?customer_id:in=157,158 | ||
X-Auth-Token: {{ACCESS_TOKEN}} | ||
Content-Type: application/json | ||
Accept: application/json | ||
``` | ||
</Tab> | ||
<Tab> | ||
```json filename="Example response: Get tax customers" showLineNumbers copy | ||
{ | ||
"data": [ | ||
{ | ||
"customer_id": 157, | ||
"tax_properties": { | ||
"A-123456789": "26", | ||
"B-6731789": "200" | ||
} | ||
}, | ||
{ | ||
"customer_id": 158, | ||
"tax_properties": { | ||
"A-123456789": "15" | ||
} | ||
} | ||
], | ||
"meta": { | ||
"pagination": { | ||
"total": 2, | ||
"count": 2, | ||
"per_page": 50, | ||
"current_page": 1, | ||
"total_pages": 1, | ||
"links": { | ||
"current": "?customer_id%3Ain=157%2C158&page=1&limit=50" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
### Update tax customers | ||
|
||
To add or update tax data for one or more customers, send a request to the [Update Tax Customers](/docs/rest-management/tax-customers#update-tax-customers) endpoint. This operation overwrites any existing values for the specified customers. | ||
declankirk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Tabs items={[`Request`, `Response`]}> | ||
<Tab> | ||
```http filename="Example request: Update tax customers" showLineNumbers copy | ||
PUT https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/tax/customers | ||
X-Auth-Token: {{ACCESS_TOKEN}} | ||
Content-Type: application/json | ||
Accept: application/json | ||
|
||
[ | ||
{ | ||
"customer_id": 157, | ||
"tax_properties": { | ||
"A-123456789": "30", | ||
"B-6731789": "250" | ||
} | ||
}, | ||
{ | ||
"customer_id": 159, | ||
"tax_properties": { | ||
"A-123456789": "10" | ||
} | ||
} | ||
] | ||
``` | ||
</Tab> | ||
<Tab> | ||
```json filename="Example response: Update tax customers" showLineNumbers copy | ||
{ | ||
"data": [ | ||
{ | ||
"customer_id": 157, | ||
"tax_properties": { | ||
"A-123456789": "30", | ||
"B-6731789": "250" | ||
} | ||
}, | ||
{ | ||
"customer_id": 159, | ||
"tax_properties": { | ||
"A-123456789": "10" | ||
} | ||
} | ||
], | ||
"meta": {} | ||
} | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
### Delete tax customers | ||
|
||
To delete tax data associated with one or more customers, send a request to the [Delete Tax Customers](/docs/rest-management/tax-customers#delete-tax-customers) endpoint. Use the `customer_id:in` query parameter to specify the customers whose tax data you want to delete. | ||
declankirk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Callout type="warning"> | ||
#### Batch deletion | ||
This operation removes **all** tax properties associated with the specified customers. | ||
</Callout> | ||
|
||
<Tabs items={[`Request`, `Response`]}> | ||
<Tab> | ||
```http filename="Example request: Delete tax customers" showLineNumbers copy | ||
DELETE https://api.bigcommerce.com/stores/{{STORE_HASH}}/v3/tax/customers?customer_id:in=157 | ||
X-Auth-Token: {{ACCESS_TOKEN}} | ||
Content-Type: application/json | ||
Accept: application/json | ||
``` | ||
</Tab> | ||
<Tab> | ||
```http filename="Example response: Delete tax customers" showLineNumbers copy | ||
HTTP 204 No content | ||
``` | ||
</Tab> | ||
</Tabs> | ||
|
||
## Resources | ||
- [Tax Customers API Reference](/docs/rest-management/tax-customers) | ||
declankirk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- [Tax Properties API Reference](/docs/rest-management/tax-properties) | ||
- [Tax Provider API Reference](/docs/rest-contracts/tax) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.