POST TaxItems
Description
This API endpoint enables upload of transactions from the external tax system into SureTax, facilitating further processing and generation of forms. By triggering this endpoint, users can seamlessly upload tax-related data, enabling the external system to perform additional processing tasks and generate necessary forms as required. This functionality streamlines the data exchange process, enhancing efficiency and accuracy in tax-related operations.
Endpoint
• Endpoint: <environment base url>/v1.0/api/Forms/TaxItems
• Method: POST
Request Body
The request will be sent using the multipart/form-data
method, with the parts structured as shown below:
Content-Disposition | Content Type | Required |
---|---|---|
form-data; name="requestData" | application/json | Yes |
form-data; name="FileContent"; filename="filename.csv" | text/csv | Yes |
Request Data
{
"externalReportingEntity": "string",
"fileLayaoutVersion": "string"
}
Response Structure
No response in case of success. The success HTTP status code will identify if the job was created successfully or not.
The response structure in case of errors.
Sample Request
httpCopy code
`POST
-- BOUNDARY
Content-Disposition: form-data; name="requestData"
Content-Type: application/json {"externalReportingEntity": "string", "fileLayoutVersion": "string"}
-- BOUNDARY
Content-Disposition: form-data; name="FileContent"; filename="37BAC21C94331EDE9499576224B64C81.csv"
Content-Type: text/csv API Contract CSV File Layout
Field
Data Type
Specifications
Company Code
String
maxLength: 4
Document Number
String
maxLength: 32
Fiscal Year
Number
(4)
Item Number
Number
(6)
Reporting Date
Date
(YYYYMMDD)
United States Tax Category
String
maxLength: 1
Material Number
String
maxLength: 40
Material Description
String
maxLength: 60
Material Group
String
maxLength: 20
Ship-From State
String
maxLength: 3
Ship-From County
String
maxLength: 40
Ship-From City
String
maxLength: 40
Ship-From Address
String
maxLength: 80
Ship-From Zip Code
String
maxLength: 10
Ship-To State
String
maxLength: 3
Ship-To County
String
maxLength: 40
Ship-To City
String
maxLength: 40
Ship-To Address
String
maxLength: 80
Ship-To Zip Code
String
maxLength: 10
Location ID
String
maxLength: 16
Gross Amount
Decimal
maxLength: 23, decimals: 2
Tax Rate
Decimal
maxLength: 23, decimals: 3
Taxable Base
Decimal
maxLength: 23, decimals: 2
Level 1 Tax
Decimal
maxLength: 23, decimals: 2
Level 1 Exemption Reason Code
String
maxLength: 2
Level 1 Exemption Amount
Decimal
maxLength: 23, decimals: 2
Level 2 Tax
Decimal
maxLength: 23, decimals: 2
Level 2 Exemption Reason Code
String
maxLength: 2
Level 2 Exemption Amount
Decimal
maxLength: 23, decimals: 2
Level 3 Tax
Decimal
maxLength: 23, decimals: 2
Level 3 Exemption Reason Code
String
maxLength: 2
Level 3 Exemption Amount
Decimal
maxLength: 23, decimals: 2
Level 4 Tax
Decimal
maxLength: 23, decimals: 2
Level 4 Exemption Reason Code
String
maxLength: 2
Level 4 Exemption Amount
Decimal
maxLength: 23, decimals: 2
Level 5 Tax
Decimal
maxLength: 23, decimals: 2
Level 5 Exemption Reason Code
String
maxLength: 2
Level 5 Exemption Amount
Decimal
maxLength: 23, decimals: 2
Level 6 Tax
Decimal
maxLength: 23
Sample Response
HTTP 201 code is returned and empty body
Sample request [CURL]
curl --location 'https://testsuretaxapi.taxrating.net/v1.0/api/Forms/TaxItemsUpload' \
--header 'X-Request-Id: 0630A823-93BD-4021-800B-0003862FE2EB' \
--header 'Authorization: Bearer <access_token_value>' \
--form 'fileContent=@"/C:/user/files/4lns0523.csv"' \
--form 'requestData="{\"externalReportingEntity\":\"A000420001\",\"fileLayoutVersion\":\"1\"}"'