• Register

Tax Code Retrieval

This API allows to retrieve the SAP Document Type and Tax Code based on vendor, company, document and item information. #### Request URI
#### Request Structure
API field Type Description Mandatory Technical Details
vendorCode String Vendor identifier used for the Tax Code and Document Type determination. Y Mapped to SAP I_LIFNR.
companyCode String Company code for which the Tax Code and Document Type must be determined. Y Mapped to SAP I_BUKRS.
documentType String Indicates whether the document is an invoice or a credit note. Y Mapped to SAP I_SIGN. Expected values: I for invoice or C for credit note.
totalAmount String Total amount of the document. Y Mapped to SAP I_AMOUNT. Expected decimal value.
taxAmount String Total tax amount of the document. Y Mapped to SAP I_TAX. Expected decimal value.
stampDutyAmount String Stamp duty amount associated with the document. Y Mapped to SAP I_ZBOL. Expected decimal value. Currently expected to be provided as 0 by SPIRIT when not applicable.
conditionType String Condition type used by SAP for the Tax Code determination. Y Mapped to SAP IT_INBOUND_DATA/YCODE. Current expected value: XD15.
item (1..1)
totalAmount String Amount associated with the document item. Y Mapped to SAP IT_INBOUND_DATA/DMBTR. Expected decimal value.
numberOfAgreement String Agreement number associated with the document item. Y Mapped to SAP IT_INBOUND_DATA/NRCONTRATTO. Expected numeric value.
assignmentNumber String Assignment number associated with the document item. Y Mapped to SAP IT_INBOUND_DATA/ZUONR. The field is required but can be provided as an empty string.
itemText String Text associated with the document item. Y Mapped to SAP IT_INBOUND_DATA/SGTXT. The field is required but can be provided as an empty string.
xref3 String Reference information associated with the document item. Y Mapped to SAP IT_INBOUND_DATA/XREF3. The field is required but can be provided as an empty string.
#### Request Example

#### Response Structure
API field Type Mandatory Description
documentType String Y SAP Document Type determined for the provided input data.
taxCode String N SAP Tax Code determined for the provided input data. Returned as null when no Tax Code is determined.
#### Response Example - Successful Retrieval

#### Response Example - No Tax Code Determined

#### Error Response Structure
API field Type Mandatory Description
status String Y Response status. Returned as Error in case of failed processing.
message String Y Error message describing the reason of the failure.
#### Error Response Examples

Validation error - HTTP 400

SAP / backend processing error - HTTP 500

Generic processing error - HTTP 500

Docs Navigation