Uploading Orders to TaxCloud
TaxCloud’s API enables you to upload completed orders one at a time, making it ideal for syncing data from external systems, migrating historical records, or automating post-sale compliance. Each request creates a single order, giving you full control over batching, error handling, and tax reporting accuracy.
⚠️Heads up! This guide is intended for uploading finalized or pre-existing orders, such as those from marketplaces, legacy systems, or bulk imports. If you’re creating new orders during checkout, use our Standard Checkout Flow instead to ensure proper tax calculation and exemption handling.
If you want to create, retrieve, and update orders, follow this guide to provide best practices that helps you build a resilient and efficient integration.
Prerequisites
Before you begin, ensure you have the following:
- A TaxCloud account and API credentials.
- Familiarity with making HTTP requests using tools like Postman, cURL, or a programming language of your choice.
Endpoints Overview
TaxCloud provides three key endpoints for managing orders:
Each endpoint is designed for single-order processing, simplifying the workflow and ensuring accuracy when handling tax compliance.
Integration Steps
Create the Order
To upload a new order, call the create-order
endpoint. Each request creates one order at a time.
If the orderID for your new order already exists in our system, you’ll receive a 400 Bad request
response.
Taxability
Assign a TIC to each line item in the items
array to ensure correct tax treatment. If omitted, the default TIC set during your integration will apply. See the TaxCloud TIC reference for the full list.
Order exemptions
To exclude an order from tax returns and compliance reports, set excludeFromFiling
to true
. This is useful for orders processed through other systems or involving tax-exempt customers. Ensure any applicable customer exemption settings are also configured.
Customer Exemptions
You can use one of the following methods to associate an order with an exemption certificate for tax-exempt customers:
- Pass a
exemptionID
to reference a stored certificate. - Let TaxCloud auto-match an existing certificate on file.
- Or, omit
exemptionId
now and upload the certificate later.
Make sure exemption settings are correctly configured at the customer level to apply exemptions accurately. In all cases, be sure to set isExempt: true
on the order, even when TaxCloud auto-matches an existing certificate or you plan to add one later.
Key Notes:
orderID
must be unique within your account.- Set
exemptFromFiling
totrue
if the order has already been filed elsewhere to prevent TaxCloud from duplicating the filing. - Orders are created one at a time. If you need to ingest multiple orders, implement batching logic on the client side and process them sequentially.
Update the Order
Use the update-order
endpoint to change the completedDate
of an existing order. This may be necessary if the order’s completion date was not set when the cart was converted to an order.
Retrieving an Order
The
PUT
endpoint response includes your order details, but you may also call theget-order
endpoint after creating an order to verify the details and ensure the data was stored as expected. This can be especially useful for validation, reporting, or troubleshooting workflows.
Implement Error Handling
TaxCloud provides clear error messages, making it easier to handle issues programmatically. Implement proper error handling and retries with exponential backoff for transient failures.
Common Error Responses:
400 Bad Request
: Indicates invalid input. Double-check your payload.422 Unprocessable Entity Error
: Some properties of the order are missing.500 Internal Server Error
: Temporary server issue. Implement retry logic.
Best Practices
- Optimize Bulk Uploads: Since TaxCloud only supports single order creation per request, implement client-side batching to handle large imports.
- Error Handling: Implement robust error handling with retries for network failures.
- Use Exempt From Filing: Set
exemptFromFiling
totrue
for orders already filed elsewhere, preventing duplicate filing.
Conclusion
Uploading orders to TaxCloud is a straightforward process that ensures accurate tax compliance.By leveraging the get-order
and update-order
endpoints, you can build resilient integrations that handle order ingestion efficiently.
For more details and advanced configurations, visit the TaxCloud API Reference.