GET /product-tax-codes— the full list of tax codes you can assign to a product.GET /product-attributes— modifiers that refine how a product is taxed (rental, downloaded, B2B, etc.).
Simple lifecycle
Use this when your products map cleanly to a single tax code and you don’t need attribute-level refinement.1. Create the product
Send aPOST /products with the minimum required fields — source_id and name — and optionally a tax_codes array. Omit tax_codes to inherit your organization’s default tax code.
id for the product. Save it: you’ll use it to update the product. Line items don’t use it; they name the product by its source_id.
Response (201)
resolved_tax_codes is what Taxwire actually uses during a calculation. When tax_codes is empty, resolved_tax_codes reflects your organization’s default. When you assign codes explicitly, both fields match.2. Reference the product as a preset in a calculation
Pass the product’ssource_id as the id in product.preset on a line item, with its source (taxwire for products created through this API). Taxwire loads the tax codes from the saved product automatically.
Line item using a product preset
3. Update the product when it changes
PATCH /products/{product_id} is a partial update — omit any field you don’t want to touch.
"tax_codes": [].
Complex lifecycle
Use this when a product’s taxability depends on how it is delivered or used — downloaded vs. shipped, rented vs. sold, B2B vs. B2C. Product attributes express those distinctions.1. Find the right base tax code
CallGET /product-tax-codes to browse available codes.
Response (excerpt)
2. Find applicable attributes
CallGET /product-attributes to see all available modifiers. Pass ?ptc= to filter to only the attributes that apply to your chosen code.
Response (excerpt)
Attributes that share a
group.key answer the same question. When group.mutually_exclusive is true, a product carries at most one attribute from that group (_B2B or _B2C, not both); when it is false, the group’s attributes combine freely. An attribute appends to the code as a trailing .-separated component: DIGITAL_PROPERTY.DIGITAL_SOFTWARE._DOWNLOADED.An empty ptcs array, as on _B2B, means the attribute applies to every product tax code. The one exception is MEDIUMS_OF_EXCHANGE codes such as gift cards, which are exempt before any attribute is considered, so no attribute applies to them.ptcs lists only the codes an attribute is offered on, not the codes it is excluded from: _REQUIRED_FOR_DAILY_WORK lists PROTECTIVE_CLOTHING, yet is not offered on TANGIBLE_PERSONAL_PROPERTY.HUMAN_APPAREL.PROTECTIVE_CLOTHING.LAB_COATS. To build the attribute choices for each of your products, call this endpoint with ?ptc= set to that product’s code rather than matching ptcs against the unfiltered list yourself.3. Compose the full tax code
Append the chosen attribute to the base code:DIGITAL_PROPERTY.DIGITAL_SOFTWARE._DOWNLOADED._B2B. See Tax attributes for full composition rules.
4. Create the product with the composed code
5. Reference the product as a preset
Same as the simple lifecycle — useproduct.preset on any line item.
Line item
6. Update the tax code when delivery method changes
If the same software starts shipping on USB drives instead, update the attribute:Key concepts
Putting it all together
Complete sync of 5 products. The script:- Fetches the full PTC catalog (paginated) and matches PTCs to your product types by keyword.
- Fetches attributes for the 3 matched PTCs in parallel.
- Resolves specific attributes by code — fails loudly if not found.
- Builds and creates all 5 products in parallel.