Overview
The purpose of this document is to assist with retrieving and creating TaxCodes and TaxRates within printIQ.
API Request Table
Below is a list of endpoints used for retrieving, updating, and creating TaxCodes and TaxRates
API Object
|
Odata Endpoint
|
Tax Type
|
All Tax Type
GET /api/v1/odata/TaxTypes
POST /api/v1/odata/TaxTypes
By ID
GET /api/v1/odata/TaxTypes({Id})
PATCH /api/v1/odata/TaxTypes({Id})
|
Tax Types
The “TaxType” endpoint within the v1 toolset is used to GET or CREATE tax codes and/or rates within printIQ.
Example of V1 OData API Request (GET)
Request to GET a list of all the TaxTypes within printIQ
Request to GET a list of all the TaxTypes with only selecting or displaying the “Name”, “Code” and if the TaxType is Active.
Request to get a list of all the TaxTypes with only selecting or displaying the “Name”, “Code”, “IsRevenue” and if the TaxType is Active.
Request to get a list of all the TaxTypes with only selecting or displaying the “Name”, “Code”, “IsRevenue” and if the TaxType is Active.
This is also expanding the TaxTypeRates which includes the RATE for the TaxType.
Example of V1 OData API Request (GETBYID)
Request to GET the TaxTypes by ID within printIQ if the ID is known.
Request to GET by ID with using the same selects and expands as per the GET endpoint above.
Example of V1 OData API Request (POST)
Example Body:
- {
- "Id": 0, - Passing 0 will create a new otherwise leaving blank or passing ID won’t work for POST.
- "Code": "AndrewTest1", - TaxType Code
- "Name": "AndrewTest1", - TaxType Name
- "Description": "AndrewTest1", - TaxType Description
- "IsRevenue": true, - Is this a Revenue TaxType
- "IsExpense": true, - Is this a Expense TaxType
- "IsAsset": true, - Is this a Asset TaxType
- "IsLiability": true, - Is this a Liability TaxType
- "Order": 0, - Order for the TaxType Admin Screen
- "Default": false, - Set the TaxType as default for printIQ
- "Uncalculated": false, - Set to True to use for TaxJar API Calls
- "EnforceQuoting": true,
- "EnforceInvoicing": true,
- "DisableOperationOverrides": true,
- "Active": true, - Set if the TaxType is Active
- "TaxTypeRates": [
- {
- "Id": 0, - Pass 0 to create TaxType Rate
- "RateTypeId": 1, - Pass in the RateTypeID as per example below
- "Name": "City", - RateTypeName
- "Rate": 0.2, - Set the TaxType Rate Amount
- "Compounding": false - Set the TaxType Rate as compounding
- },
- {
- "Id": 0, - Pass 0 to create TaxType Rate
- "RateTypeId": 2, - Pass in the RateTypeID as per example below
- "Name": "Country", - RateTypeName
- "Rate": 0.2, - Set the TaxType Rate Amount
- "Compounding": false - Set the TaxType Rate as compounding
- }
- ]
- }
Example of the RateTypeID’s
RateTypeID
|
RateTypeCode
|
RateTypeName
|
1 |
CIT |
CITY
|
2
|
COU
|
COUNTRY
|
3
|
DIS
|
DISTRICT
|
4
|
STA
|
STATE
|
5
|
STD
|
STANDARD
|
Example of V1 OData API Request (Patch)
Request to PATCH an existing TaxType within printIQ.
GET previous TaxType Created via the POST and Update the Name
- {
- "Code": "AndrewTest1", - TaxType Code
- "Name": "AndrewTest2", - TaxType Name
- "Description": "AndrewTest1", - TaxType Description
- "IsRevenue": true, - Is this a Revenue TaxType
- "IsExpense": true, - Is this a Expense TaxType
- "IsAsset": true, - Is this a Asset TaxType
- "IsLiability": true, - Is this a Liability TaxType
- "Order": 0, - Order for the TaxType Admin Screen
- "Default": false, - Set the TaxType as default for printIQ
- "Uncalculated": false, - Set to True to use for TaxJar API Calls
- "EnforceQuoting": true,
- "EnforceInvoicing": true,
- "DisableOperationOverrides": true,
- "Active": true, - Set if the TaxType is Active
- }
Example of the RateTypeID's
RateTypeID |
RateTypeCode |
RateTypeName |
1 |
CIT |
CITY |
2 |
COU |
COUNTRY |
3 |
DIS |
DISTRICT |
4 |
STA |
STATE |
5 |
STD |
STANDARD
|
In addition, the GETPRICE API request also supports passing Operation References and Groups.
These can be Identified by expanding the above requests to include the References and Groups.
Request to GET the Finishing/Operation showing only “FinishingShortName”, Operations Type Flags with Expanding the References and Groups available for Operations
Below is an example response of 1 object from ComponentReferenceGroups array,
as you can see the Operation Name is “WF GROM” this is a “Section Operation” with a Group of “Top Only” and Reference “Left Only”
- {
- "FinishingShortName": "WF GROM",
- "FinishingJob": false,
- "FinishingSection": true,
- "FinishSide": false,
- "ComponentReferenceGroups": [
- {
- "Id": 3195,
- "FinishingId": 1515,
- "ComponentsReference": "Left Only",
- "ComponentsGroup": "Top Only",
- "NumRows": 1
- },
- ]
- }
The GETPRICE request would look like this using the above example.
- "SectionOperations": [
- {
- "OperationName": " WF GROM",
- "Reference": " Left Only",
- "Group": " Top Only"
- }
- ],