Fiscal Document Generation Services
The following services are included in this functional area:
Fiscal Pre Document Request Service
Business Overview
This web service supports fiscal document requests from inventory systems. It has a simplified payload for the fiscal document request. Once the shipment system calls this service, Fiscal Document Generation will return an internal ID for the request. This ID can later be used by the shipment systems to request the document(s) created for the specific shipment.
Input
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
requestSystem |
Yes |
String |
This field contains the identification name of system that is requesting a fiscal document. This name is provided by system that is requesting. |
|
docType |
Yes |
String |
This field contains the type of the document. Valid values are codes
from |
|
extReqId |
No |
String |
This field contains the external request ID. This is the internal number from system that is requesting a fiscal document. For example: |
|
issueDate |
Yes |
OffsetDateTime |
This field contains the issue date of document in the format |
|
transactionType |
Yes |
String |
This field contains the code type of the transaction. Valid values
are codes from |
|
currencyCode |
Yes |
String |
This field contains the currency code for the fiscal document. It is based on currency code defined in shipment location that is going to ship goods. |
|
entities |
Yes |
List<RestFdgEtt> |
Collection of entities. |
|
details |
Yes |
List<RestFdgDtl> |
Collection of item details. |
|
comments |
No |
List<RestFdgText> |
Collection of comments. |
|
references |
No |
List<RestFdgRef> |
Collection of references. |
RestFdgEtt
The fiscalDocument/entities node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
entityType |
Yes |
String |
This field contains the entity type. Valid values are codes
from |
|
entityInternalType |
No |
String |
This field contains the Merchandising entity type. Valid
values are codes from |
|
entityInternalPtnrType |
No |
String |
This field contains the Merchandising partner type. Valid
values are codes from |
|
entityCode |
No |
String |
This field contains the entity's Merchandising internal code. For example, ID of store or warehouse. |
|
name |
No |
String |
This field contains the name responsible for transportation. This field is uses only when there is no entity code defined for transportation. It's used by SIM shipments because there is no transportation entity. |
|
carrierVehicleRn |
No |
String |
This field contains the vehicle registration number responsible for transportation. |
|
carrierVehicleState |
No |
String |
This field contains the state of the country where vehicle, responsible for transportation, is registered. |
|
carrierDriverName |
No |
String |
This field contains the driver name responsible for transportation. |
|
carrierDriverLn |
No |
String |
This field contains the information about driver license ID responsible for transportation. |
RestFdgDtl
The fiscalDocument/details node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
item |
Yes |
String |
This field contains the unique code ID that identifies the item. |
|
uom |
Yes |
String |
This field contains the unit of measure used in item in the fiscal document. |
|
qty |
Yes |
BigDecimal |
This field contains the quantity of item in this fiscal document. |
|
references |
No |
List<RestFdgRef> |
Collection of item references |
RestFdgRef
The fiscalDocument/details/references node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
refType |
Yes |
String |
This field contains the type of the reference at item level. It is used when there is any reference that it is necessary to add in this fiscal document, as shipment number, contract number, order, id, and so on. Valid values: |
|
refCode |
Yes |
String |
This field contains the reference code/value of reference type at item level. |
RestFdgText
The fiscalDocument/comments node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
text |
Yes |
String |
This field contains additional comments at item level. It is used to provide any additional information or legal message important to fiscal document. |
|
textGroupId |
No |
String |
Text group ID. It is used to group related comments when there is more than one or when the size of a message is bigger than the size of the text field and it is necessary to generate more than one line. |
|
textGroupSeq |
No |
String |
Sequence of the text for a given group ID. It is used in case comments information has more than one line. |
JSON Input Structure:
"{
"fiscalDocument": {
"requestSystem": "SIOCS",
"docType": "WBL",
"extReqId": "10001",
"transactionType": "TSF",
"issueDate": "2020-12-16T08:19:42-05:00",
"currencyCode": "USD",
"entities": [
{
"entityType": "SHIPP",
"entityInternalType": "WH",
"entityCode": "252525"
},
{
"entityType": "DEST",
"entityInternalType": "ST",
"entityCode": "9625518"
},
{
"entityType": "CR",
"name": "UPS",
"carrierVehicleRn": "IF5597",
"carrierVehicleState": "SP",
"carrierDriverName": "Driver Name",
"carrierDriverLn": "asasdd984955456"
}],
"details": [
{
"item": "100450025",
"uom": "EA",
"qty": 5,
"references": [
{
"refType": "TSFNO",
"refCode": "897889"
}
]
}],
"comments": [{
"text": "Additional comments to the document. If it's too l'",
"textGroupId": "1",
"textGroupSeq": "1"
},
{
"text": "ong, it can end in other line",
"textGroupId": "1",
"textGroupSeq": "2"
}
],
"references": [
{
"refType": "DOC",
"refCode": "9848945651"
}]
}
}"
Output
Parameter Name | Data Type | Description |
---|---|---|
requestId |
String |
This field contains the unique identifier of the document request. |
requestSystem |
String |
This column contains the unique identifier of the requester. |
requestAction |
String |
This column contains the current action for the request. |
docId |
BigDecimal |
This column contains the unique document ID. |
docNo |
String |
This column contains the unique document number. |
docType |
String |
This column contains the type of the document. |
status |
String |
This column contains the status of the document. |
extReqId |
String |
This field contains the external request ID. This is the internal number from system that is requesting a fiscal document. Example: asn_nbr ID from shipments. |
docPrintUrl |
String |
This column contains the url to access the fiscal document issued by government. It can be a url from third-party repository responsible to communicate with governement or other url. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties. |
errors |
List<RestFdgError> |
Collection of errors. |
RestFdgExt
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
RestFdgError
Parameter Name | Data Type | Description |
---|---|---|
errorCode |
String |
This field contains the error code. |
errorDesc |
String |
This field contains the error description. |
JSON Structure:
"{
"requestId": 62,
"requestSystem": "SIOCS",
"requestAction": "A",
"docId": 62,
"docNo": null,
"docType": "WBL",
"status": "N",
"extReqId": "10003",
"docPrintUrl": null,
"additionalproperties": [],
"errors": []
}"
Table Impact
TABLE | SELECT | INSERT | UPDATE | DELETE |
---|---|---|---|---|
FDG_ATTRIB_MAP |
Yes |
No |
No |
No |
FDG_ATTRIB_MAP_NM |
Yes |
No |
No |
No |
SVC_FDG_DTL |
Yes |
Yes |
Yes |
No |
SVC_FDG_DTL_PACK |
Yes |
Yes |
Yes |
No |
SVC_FDG_ERROR |
Yes |
Yes |
No |
No |
SVC_FDG_ETT |
Yes |
Yes |
Yes |
No |
SVC_FDG_EXT |
Yes |
Yes |
Yes |
No |
SVC_FDG_HDR |
Yes |
Yes |
Yes |
No |
SVC_FDG_NON_MERCH |
Yes |
Yes |
Yes |
No |
SVC_FDG_REF |
Yes |
Yes |
No |
No |
SVC_FDG_TAX |
Yes |
Yes |
No |
Yes |
SVC_FDG_TEXT |
Yes |
Yes |
No |
No |
CODE_DETAIL |
Yes |
No |
No |
No |
V CODE_DETAIL |
Yes |
No |
No |
No |
STORE |
Yes |
No |
No |
No |
PARTNER |
Yes |
No |
No |
No |
WH |
Yes |
No |
No |
No |
LANG |
Yes |
No |
No |
No |
FDG_SYSTEM_OPTIONS |
Yes |
No |
No |
No |
CFA_ATTRIB |
Yes |
No |
No |
No |
CFA_ATTRIB_MAP |
Yes |
No |
No |
No |
CFA_ATTRIB_MAP_LABES |
Yes |
No |
No |
No |
RTV_DETAIL |
Yes |
No |
No |
No |
ORDCUST |
Yes |
No |
No |
No |
ORDCUST_DETAIL |
Yes |
No |
No |
No |
TSFHEAD |
Yes |
No |
No |
No |
TSFDETAIL |
Yes |
No |
No |
No |
SHIPSKU |
Yes |
No |
No |
No |
TSFDETAIL_CHRG |
Yes |
No |
No |
No |
ALLOC_CHRG |
Yes |
No |
No |
No |
NON_MERCH_CODE_COMP |
Yes |
No |
No |
No |
V_NON_MERCH_CODE_HEAD_TL |
Yes |
No |
No |
No |
ADDR |
Yes |
No |
No |
No |
PACKITEM_BREAKOUT |
Yes |
No |
No |
No |
ITEM_MASTER |
Yes |
No |
No |
No |
V_ITEM_MASTER |
Yes |
No |
No |
No |
ITEM_SUPPLIER |
Yes |
No |
No |
No |
GTS_CALC_INPUT_STG |
Yes |
Yes |
No |
No |
GTS_CALC_OUTPUT_STG |
Yes |
No |
No |
No |
Fiscal Document Request Service
Business Overview
This web service supports fiscal document requests from any system based on a comprehensive payload with a detailed level of input parameters. This web service supports inbound transactions such as PO receiving. Once the requester system calls for this service, Fiscal Document Generation will return an internal ID for the request. This ID can later be used by these systems to request the document(s) created.
Input
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
requestSystem |
Yes |
String |
This field contains the identification name of system that is requesting a fiscal document. This name is provided by system that is requesting. |
|
docType |
Yes |
String |
This field contains the type of the document. Valid values
are codes from |
|
extReqId |
No |
String |
This field contains the external request ID. This is the internal
number from system that is requesting a fiscal document. For example, |
|
issueDate |
Yes |
OffsetDateTime |
This field contains the issue date of document in the format |
|
transactionType |
Yes |
String |
This field contains the code type of the transaction. Valid
values are codes from |
|
currencyCode |
Yes |
String |
This field contains the currency code for the fiscal document. It is based on currency code defined in shipment location that is going to ship goods. |
|
deduceTax |
Yes |
String |
This field contains the indicator to control in this request, if taxes is sent from request system and any calculation is needed or request system not send taxes and it is necessary to call tax calculation to fill taxes information. |
|
entities |
Yes |
List<RestFdgEtt> |
Collection of entities. |
|
details |
Yes |
List<RestFdgDtl> |
Collection of item details. |
|
comments |
No |
List<RestFdgText> |
Collection of comments. |
|
references |
No |
List<RestFdgRef> |
Collection of references. |
RestFdgEtt:
The fiscalDocument/entities node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
entityType |
Yes |
String |
This field contains the entity type. Valid values are codes
from |
|
entityInternalType |
No |
String |
This field contains the Merchandising entity type. Valid
values are codes from |
|
entityInternalPtnrType |
No |
String |
This field contains the Merchandising partner type. Valid
values are codes from |
|
entityCode |
No |
String |
This field contains the entity's Merchandising internal code. For example, ID of store or warehouse |
|
name |
No |
String |
This field contains the name responsible for transportation. This field is uses only when there is no entity code defined for transportation. It's used by SIM shipments because there is no transportation entity. |
|
carrierVehicleRn |
No |
String |
This field contains the vehicle registration number responsible for transportation. |
|
carrierVehicleState |
No |
String |
This field contains the state of the country where vehicle, responsible for transportation, is registered. |
|
carrierDriverName |
No |
String |
This field contains the driver name responsible for transportation. |
|
carrierDriverLn |
No |
String |
This field contains the information about driver license ID responsible for transportation. |
RestFdgDtl:
The fiscalDocument/details node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
Item |
Yes |
String |
This field contains the unique code ID that identifies the item. |
|
totalAmt |
Yes |
BigDecimal |
This field contains the total value of this item in the fiscal document. |
|
unitAmt |
Yes |
BigDecimal |
This field contains the item unit cost of this item in the document. |
|
uom |
Yes |
String |
This field contains the unit of measure used in item in the fiscal document. |
|
qty |
Yes |
BigDecimal |
This field contains the quantity of item in this fiscal document. |
|
totalTaxAmt |
No |
BigDecimal |
This field contains the total value of item in this fiscal document. |
|
totalAmtInclTax |
No |
BigDecimal |
This field contains the total value including all taxes value of item in this fiscal document. |
|
taxes |
No |
List<RestFdgTax> |
Collection of item taxes. |
|
references |
No |
List<RestFdgRef> |
Collection of item references. |
|
allowanceCharges |
No |
List<RestFdgNonMerch> |
Collection of item allowance/changes. |
RestFdgTax
The fiscalDocument/details/taxes node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
taxType |
Yes |
String |
This field contains the tax type at item level. |
|
taxCode |
Yes |
String |
This field contains the tax identification code that should be applied at item level. |
|
taxAmt |
Yes |
BigDecimal |
This field contains the tax value at item level, when tax type is set as per value. |
|
taxCodeDesc |
Yes |
String |
This field contains the tax code description at item level. This field can be used to indicate extra code or detailed information about tax code. |
RestFdgRef:
The fiscalDocument/details/references node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
refType |
Yes |
String |
This field contains the type of the reference at item level. It is used when there is any reference that it is necessary to add in this fiscal document, as shipment number, contract number, order, ID, and so on. Valid values: |
|
refCode |
Yes |
String |
This field contains the reference code/value of reference type at item level. |
RestFdgNonMerch:
The fiscalDocument/details/allowanceCharges node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
chargeInd |
Yes |
String |
This field contains the charge indicator at item allowance charges level. |
|
nonMerchCode |
Yes |
String |
This field contains the non-merchandise code that identify non-merchandise
cost at item allowance changes level. This value should be existing in table |
|
nonMerchAmt |
Yes |
BigDecimal |
This field contains the non-merchandise value at item allowance changes level. |
|
taxes |
No |
List<RestFdgTax> |
Collection of non-merchandise taxes. |
RestFdgTax:
The fiscalDocument/details/allowanceCharges/taxes node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
taxType |
Yes |
String |
This field contains the tax type at item allowance charge taxes level. |
|
taxCode |
Yes |
String |
This field contains the tax identification code that should be applied at item allowance charges taxes level. |
|
taxAmt |
Yes |
BigDecimal |
This field contains the tax value at item allowance charges taxes level, when tax is set up as per value. |
|
taxCodeDesc |
Yes |
String |
This field contains the tax code description at item allowance charges taxes level. This field can be used to indicate extra code or detailed information about tax code. |
|
comments |
No |
List<RestFdgText> |
Collection of non-merchandise taxes comments. |
RestFdgText:
The fiscalDocument/details/allowanceCharges/taxes/comments and fiscalDocument/comments node have the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
text |
Yes |
String |
This field contains additional comments at item level. It is used to provide any additional information or legal message important to fiscal document. |
|
textGroupId |
No |
String |
Text group ID. It is used to group related comments when there is more than one or when the size of a message is bigger than the size of the text field and it is necessary to generate more than one line. |
|
textGroupSeq |
No |
String |
Sequence of the text for a given group ID. It is used in case comments information has more than one line. |
RestFdgRef
The fiscalDocument/references node has the following parameters:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
refType |
Yes |
String |
This field contains the type of the reference at item level. It
is used when there is any reference that it is necessary to add in this fiscal document, as shipment number, contract number,
order, ID, and so on. Valid values: |
|
refCode |
Yes |
String |
This field contains the reference code/value of reference type at item level. |
JSON Input Structure:
"{
"fiscalDocument": {
"requestSystem": "SUPPLIER_PORTAL",
"docType": "WBL",
"extReqId": "1234",
"transactionType": "TSF",
"issueDate": "2020-12-16T08:19:42-05:00",
"currencyCode": "USD",
"deduceTax": "Y",
"entities": [
{
"entityType": "SHIPP",
"entityInternalType": "WH",
"entityCode": "7001"
},
{
"entityType": "DEST",
"entityInternalType": "ST",
"entityCode": "777701"
},
{
"entityType": "CR",
"entityInternalType": "PTNR",
"entityInternalPtnrType": "FF",
"entityCode": "11",
"carrierVehicleRn": "IF5597",
"carrierVehicleState": "SP",
"carrierDriverName": "Driver Name",
"carrierDriverLn": "asasdd984955456"
}],
"details": [
{
"item": "54987897",
"totalAmt": 10,
"unitAmt": null,
"uom": "EA",
"qty": 5,
"totalTaxAmt": 7,
"totalAmtInclTax": 57,
"taxes": [
{
"taxType": "P",
"taxCode": "GST",
"taxAmt": 5,
"taxCodeDesc": null
},
{
"taxType": "P",
"taxCode": "PST",
"taxAmt": 2,
"unitTaxAmt": null,
"taxCodeDesc": null
}],
"references": [
{
"refType": "ORDER",
"refCode": "897889"
}
],
"allowanceCharges": [
{
"chargeInd": "Y",
"nonMerchCode": "FRHT",
"nonMerchAmt": 10,
"taxes": [
{
"taxType": "P",
"taxCode": "GST",
"taxAmt": 1.8,
"taxCodeDesc": null,
"comments": []
},
{
"taxType": "P",
"taxCode": "PST",
"taxAmt": 1,
"taxCodeDesc": null,
"comments": []
}
]
}
],
"comments": [{
"text": "Open box Item"
}]
}
],
"comments": [{
"text": "Additional comments to the document. If it's too l'",
"textGroupId": "1",
"textGroupSeq": "1"
},
{
"text": "ong, it can end in other line",
"textGroupId": "1",
"textGroupSeq": "2"
}
],
"references": [{
"refType": "DOC",
"refCode": "9848945651"
}]
}
}"
Output
Parameter Name | Data Type | Description |
---|---|---|
requestId |
String |
This field contains the unique identifier of the document request. |
requestSystem |
String |
This column contains the unique identifier of the requester. |
requestAction |
String |
This column contains the current action for the request. |
docId |
BigDecimal |
This column contains the unique document ID. |
docNo |
String |
This column contains the unique document number. |
docType |
String |
This column contains the type of the document. |
status |
String |
This column contains the status of the document. |
extReqId |
String |
This field contains the external request ID. This is the internal number from system that is requesting a fiscal document. Example: asn_nbr ID from shipments. |
docPrintUrl |
String |
This column contains the url to access the fiscal document issued by government. It can be a url from third-party repository responsible to communicate with governement or other url. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties. |
errors |
List<RestFdgError> |
Collection of errors. |
RestFdgExt
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
RestFdgError
Parameter Name | Data Type | Description |
---|---|---|
errorCode |
String |
This field contains the error code. |
errorDesc |
String |
This field contains the error description. |
JSON Structure:
"{
"requestId": 62,
"requestSystem": "SIOCS",
"requestAction": "A",
"docId": 62,
"docNo": null,
"docType": "WBL",
"status": "N",
"extReqId": "10003",
"docPrintUrl": null,
"additionalproperties": [],
"errors": []
}"
Table Impact
TABLE | SELECT | INSERT | UPDATE | DELETE |
---|---|---|---|---|
FDG_ATTRIB_MAP |
Yes |
No |
No |
No |
FDG_ATTRIB_MAP_NM |
Yes |
No |
No |
No |
SVC_FDG_DTL |
Yes |
Yes |
Yes |
No |
SVC_FDG_DTL_PACK |
Yes |
Yes |
Yes |
No |
SVC_FDG_ERROR |
Yes |
Yes |
No |
No |
SVC_FDG_ETT |
Yes |
Yes |
Yes |
No |
SVC_FDG_EXT |
Yes |
Yes |
Yes |
No |
SVC_FDG_HDR |
Yes |
Yes |
Yes |
No |
SVC_FDG_NON_MERCH |
Yes |
Yes |
No |
No |
SVC_FDG_REF |
Yes |
Yes |
No |
No |
SVC_FDG_TAX |
Yes |
Yes |
No |
No |
SVC_FDG_TEXT |
Yes |
Yes |
No |
No |
CODE_DETAIL |
Yes |
No |
No |
No |
V_CODE_DETAIL_TL |
Yes |
No |
No |
No |
STORE |
Yes |
No |
No |
No |
PARTNER |
Yes |
No |
No |
No |
WH |
Yes |
No |
No |
No |
LANG |
Yes |
No |
No |
No |
FDG_SYSTEM_OPTIONS |
Yes |
No |
No |
No |
CFA_ATTRIB |
Yes |
No |
No |
No |
CFA_ATTRIB_MAP |
Yes |
No |
No |
No |
CFA_ATTRIB_MAP_LABES |
Yes |
No |
No |
No |
RTV_DETAIL |
Yes |
No |
No |
No |
ORDCUST |
Yes |
No |
No |
No |
ORDCUST_DETAIL |
Yes |
No |
No |
No |
TSFHEAD |
Yes |
No |
No |
No |
TSFDETAIL |
Yes |
No |
No |
No |
SHIPSKU |
Yes |
No |
No |
No |
ADDR |
Yes |
No |
No |
No |
PACKITEM_BREAKOUT |
Yes |
No |
No |
No |
ITEM_MASTER |
Yes |
No |
No |
No |
V_ITEM_MASTER |
Yes |
No |
No |
No |
ITEM_SUPPLIER |
Yes |
No |
No |
No |
Fiscal Document Status Detail Request Service
Business Overview
In both scenarios for shipment and Inbound, it will be the requestor´s responsibility to pull the approved documents from Fiscal Document Generation in order to conclude their transactions. This web service will be used to provide the status of fiscal documents requested through the Fiscal Pre Document Request Service and Fiscal Document Request Service. In case the document is approved, approval-related data will also be provided, such as the formal document number and print-version URL path.
ReST URL
{{baseUrl}}/services/private/fdg/documentStatusDetail?requestId=<string>&requestSystem=<string>&entityType=<string>&entityInternalType=<string>&entityCode=<string>&country=<string>
Input Parameters
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
requestId |
Yes |
String |
This column contains the unique identifier of the document request. |
|
requestSystem |
No |
String |
This column contains the unique identifier of the requester. |
|
entityType |
No |
String |
This field contains the entity type. Valid values are codes
from |
|
entityInternalType |
No |
String |
This field contains the Merchandising entity type. Valid
values are codes from |
|
entityCode |
No |
String |
This column contains the entity's Merchandising internal code. |
|
country |
No |
String |
This column contains the country where is the location address. |
Output
Parameter Name | Data Type | Description |
---|---|---|
requestId |
String |
Internal fiscal document REQUEST ID generated by FDG. This ID can be used to identify the fiscal document(s) being processed. |
requestSystem |
String |
Name of the system that performed the request for a fiscal document. |
requestAction |
String |
Action code to be passed along with the request for a fiscal document process. |
docNo |
String |
Official fiscal document number. This number is given to approved documents. |
docType |
String |
Valid values: |
status |
String |
Internal FDG status of the fiscal document. |
extReqId |
String |
External system´s request ID used to link FDG internal ID with the requestor system´s transaction ID. |
docPrintUrl |
String |
URL of the fiscal document report. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties. |
errors |
List<RestFdgError> |
Collection of errors. |
RestFdgExt
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
RestFdgError
Parameter Name | Data Type | Description |
---|---|---|
errorCode |
String |
This field contains the error code. |
errorDesc |
String |
This field contains the error description. |
JSON Structure:
"{
"requestId": 50039,
"requestSystem": "SUPPLIER_PORTAL",
"requestAction": "A",
"docId": 50038,
"docNo": null,
"docType": "WBL",
"status": "S",
"extReqId": "10000600",
"docPrintUrl": null,
"additionalproperties": [],
"errors": []
}"
Next Fiscal Document Request Service
Business Overview
This is the service to be called by the 3rd-party system in charge of communicating fiscal document request to local Governments in order to fetch documents ready to be approved.
ReST URL
{{baseUrl}}/services/private/fdg/nextDocumentDetail?docId=<string>&docType=<string>&entityType=<string>&internalType=<string>&internalCode=<string>&integrationSystemName=<string>&integrationSystemId=<string>
Input Parameters
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
docId |
No |
String |
Internal fiscal document ID generated by FDG. This ID is unique to each fiscal document created. |
|
docType |
No |
String |
This field contains the type of the document. Valid values
are codes from |
|
entityType |
No |
String |
This field contains the entity type. Valid values are codes
from |
|
internalType |
No |
String |
Filter criteria to fetch documents based on specific entity types in Merchandising irrespective of their role in the fiscal documents. |
|
internalCode |
No |
String |
Filter criteria to fetch documents based on a specific entity code.
This field contains the entity's Merchandising internal code and must sent in conjunction with |
|
integrationSystemName |
Yes |
String |
Name of the integration system that will process this document. |
|
integrationSystemId |
Yes |
String |
Unique identifier to be used by the integration system. |
Output
Parameter Name | Data Type | Description |
---|---|---|
requestId |
String |
Internal fiscal document REQUEST ID generated by FDG. This ID can be used to identify the fiscal document(s) being processed. |
requestSystem |
String |
Name of the system that performed the request for a fiscal document. |
requestAction |
String |
Action code to be passed along with the request for a fiscal document process. |
docId |
BigDecimal |
Internal fiscal document ID generated by FDG. This ID is unique to each fiscal document created. |
docNo |
String |
Official fiscal document number. This number is given to approved documents. |
status |
String |
Internal FDG status of the fiscal document. |
docType |
String |
Valid values: |
docTypeCode |
String |
Extended description of a document type. |
extReqId |
String |
External system´s request ID used to link FDG internal ID with the requestor system´s transaction ID. |
transactionType |
String |
Identification of the transaction associated with the fiscal document. |
issueDate |
OffsetDateTime |
Issue date of the fiscal document. Date defined at the time the document is submitted for approval. |
dueDate |
date |
Payment date of fiscal document or invoice. |
docLang |
String |
Language of fiscal document. It is based on language defined in source location. |
printerId |
String |
Printer ID that is designated to print fiscal document. |
docPrintUrl |
String |
URL of the fiscal document report. |
currencyCode |
String |
Currency code for the fiscal document. It is based on currency code defined in source location. |
totalTaxAmt |
BigDecimal |
Total TAX amount of the fiscal document. This field is the sum of |
totalNonMerchTaxAmt |
BigDecimal |
Total TAX amount of allowances/charges of the fiscal document. Rounding applied based on system option. |
totalAmtInclTax |
BigDecimal |
Total value of fiscal document including taxes. This field is the
sum of |
totalAmtExclTax |
BigDecimal |
Total value of fiscal document excluding taxes. This field has
the |
totalAllowance |
BigDecimal |
Total value of all allowances in fiscal document. This field is
the sum of |
totalCharge |
BigDecimal |
Total value of all charges in fiscal document. This field is the
sum of |
totalRounding |
BigDecimal |
The rounding amount (positive or negative) added to produce the
line extension |
terms |
String |
Payment terms used in this transaction |
deduceTax |
String |
Flag that indicates if taxes were calculated by the system or informed at the fiscal document request. |
createBy |
String |
User ID that created the record. |
createDatetime |
date |
Record creation date. |
lastUpdateBy |
String |
User ID that did last update of fiscal document. |
lastUpdateDatetime |
date |
Date of last update of fiscal document. |
entities |
List<RestFdgEtt> |
Collection of entities. |
details |
List<RestFdgDtl> |
Collection of item details |
RestFdgEtt
Parameter Name | Data Type | Description |
---|---|---|
entityType |
String |
Entity type. |
entityInternalPtnrType |
String |
Merchandising partner type. |
entityInternalType |
String |
Merchandising entity type. |
entityCode |
String |
Internal Merchandising code of the entity. For example, ID of store or warehouse |
name |
String |
Entity name. |
legalName |
String |
Entity's legal name. |
carrierVehicleRn |
String |
Carrier vehicle´s registration number. |
carrierVehicleState |
String |
Carrier vehicle´s state. |
carrierDriverName |
String |
Carrier driver´s name. |
carrierDriverLn |
String |
Carrier driver´s license number. |
address |
RestFdgEttAddr |
Collection of address details. |
identification |
List<RestFdgExt> |
Collection of Entity Identification Additional Properties. Fiscal Attributes will be send in this group. |
RestFdgEttAddr
Parameter Name | Data Type | Description |
---|---|---|
street |
String |
Street name of the entity´s address. |
additionalStreetName |
String |
Extension of street name of the entity´s address. |
complement |
String |
Additional information of entity´s address, such as neighborhood, county, etc. |
city |
String |
City name of entity´s address. |
jurisdictionCode |
String |
Jurisdiction code of entity´s address. This can be legal code associated to city, county or any other level. |
postalCode |
String |
Zip or postal code of entity´s address. |
country |
String |
Country name of entity´s address. |
telephone |
String |
Telephone number of the person who is the contact point. |
|
String |
Email address of the person who is the contact point. |
state |
String |
State name of entity´s address. |
contactName |
String |
Contact name. |
additionalproperties |
List<RestFdgExt> |
Collection of address additional properties. |
RestFdgExt
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
description |
String |
Description of additional property data. |
RestFdgExt (identification)
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
description |
String |
Description of additional property data. |
references |
List<RestFdgRef> |
Collection of references. |
totaltaxes |
List<RestFdgTax> |
Collection of taxes. |
errors |
List<RestFdgError> |
Collection of errors. |
allowanceCharges |
List<RestFdgNonMerch> |
Collection of allowance charges. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties. |
comments |
List<RestFdgText> |
Collection of comments. |
RestFdgDtl
Parameter Name | Data Type | Description |
---|---|---|
lineNo |
long |
Sequential number of the item in fiscal document. This number is a sequence starts with number one. Any gap is not allowed. |
Item |
String |
Unique code ID that identifies the item. |
itemDesc |
String |
Long description of the item. |
itemShortDesc |
String |
Short description of the item. |
totalAmt |
BigDecimal |
Total amount for the item inclusive of allowances and charges. Calculation
formula is (( |
unitAmt |
BigDecimal |
Item unit amount. No rounding applied. |
uom |
String |
Unit of measure used in item in the fiscal document. |
qty |
BigDecimal |
Quantity of item in the fiscal document. |
totalTaxAmt |
BigDecimal |
Total amount of taxes applied to the item. This field is sum of
all |
totalAmtInclTax |
BigDecimal |
Total amount for item inclusive of taxes. Calculation formula is |
totalRounding |
BigDecimal |
The rounding amount (positive or negative) added to produce the
line extension |
totalAllowance |
BigDecimal |
Total amount of all allowances at item level. This field is sum
of all allowances at |
totalCharge |
BigDecimal |
Total amount of all charges at item level. This field is sum of
all charges at |
packInd |
String |
Pack indicator. Valid values: |
gtin |
String |
GTIN number (Global Trade Item Number) of item. |
gtinType |
String |
GTIN Type. Valid values: |
vpn |
String |
Vendor Product Number (VPN) associated with the item. |
taxes |
List<RestFdgTax> |
Collection of item taxes. |
references |
List<RestFdgRef> |
Collection of item references |
allowanceCharges |
List<RestFdgNonMerch> |
Collection of item allowance charges. |
packdetails |
List<RestFdgDtlPack> |
Collection of item pack details. |
additionalproperties |
List<RestFdgExt> |
Collection of item additional properties. |
comments |
List<RestFdgText> |
Collection of item comments. |
RestFdgTax
Parameter Name | Data Type | Description |
---|---|---|
taxType |
String |
Tax type. |
taxCode |
String |
Tax identification code. |
taxRate |
BigDecimal |
Tax rate when tax type is set as percentage. |
taxAmt |
BigDecimal |
Total tax amount for the tax code. Rounding applied based on system option. |
unitTaxAmt |
BigDecimal |
Tax amount per unit for the tax code. |
taxBasis |
BigDecimal |
Tax basis amount used to calculate tax value based on |
taxCodeDesc |
String |
Tax code description. This field can be used to indicate extra code or detailed information about tax code. |
additionalproperties |
List<RestFdgExt> |
Collection of taxes addition properties. |
comments |
List<RestFdgText> |
Collection of taxes comments. |
RestFdgText
Parameter Name | Data Type | Description |
---|---|---|
text |
String |
Additional information and/or comments. It is used to provide any additional information or legal message important to the fiscal document. |
textGroupId |
String |
Text group ID. It is used to group related comments when there is more than one or when the size of a message is bigger than the size of the text field and it is necessary to generate more than one line. |
textGroupSeq |
String |
Sequence of the text for a given group ID. It is used in case comments information has more than one line. |
RestFdgRef
Parameter Name | Data Type | Description |
---|---|---|
refType |
String |
Type of the reference information. It is used when there is any reference that it is necessary to add in the fiscal document, as shipment number, contract number, order, ID, and so on. Valid values are pre-defined in the Merchandising system. |
refCode |
String |
Reference code/value of reference type. |
RestFdgNonMerch
Parameter Name | Data Type | Description |
---|---|---|
chargeInd |
String |
Charge indicator. |
nonMerchCode |
String |
Non-merchandise code that identifies a non-merchandise cost used as a charge or allowance. |
nonMerchCodeDesc |
String |
Non-merchandise code description. It is used to provide more detailed about non-merchandise code, for example: allowance details, types of non-merchandise code such as Freight, Insurance, and so on. |
nonMerchAmt |
BigDecimal |
Non-merchandise amount. |
nonMerchType |
String |
Non-merchandise type exclusive for Charges. |
taxes |
List<RestFdgTax> |
Collection of taxes for non-merchandise. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties for non-merchandise. |
comments |
List<RestFdgText> |
Collection of comments for non-merchandises. |
packdetails
Parameter Name | Data Type | Description |
---|---|---|
item |
String |
Unique alphanumeric ID of a pack component that is part of item pack. |
itemQty |
BigDecimal |
Quantity of the component item that is part of the pack. |
itemDesc |
String |
Description of the component item component. |
uom |
String |
Unit of measure of the component item. |
totaltaxes
Parameter Name | Data Type | Description |
---|---|---|
taxType |
String |
Not applicable for |
taxCode |
String |
Tax identification code. |
taxRate |
BigDecimal |
Not applicable for |
taxAmt |
BigDecimal |
Sum of |
unitTaxAmt |
BigDecimal |
Not applicable for |
taxBasis |
BigDecimal |
Sum of |
taxCodeDesc |
String |
Tax code description. This field can be used to indicate extra code or detailed information about tax code. |
JSON Structure:
"{
"fiscalDocument": {
"docId": 17200,
"requestId": 17207,
"requestSystem": "OMNI",
"requestAction": "A",
"status": "R",
"docNo": "17200",
"docType": "WBL",
"docTypeCode": null,
"extReqId": "10065007",
"transactionType": "SALES",
"issueDate": 1617196782000,
"dueDate": null,
"printerId": null,
"docPrintUrl": null,
"currencyCode": "USD",
"totalTaxAmt": null,
"totalNonMerchTaxAmt": null,
"totalAmtInclTax": null,
"totalAmtExclTax": null,
"totalAllowance": null,
"totalCharge": null,
"totalRounding": null,
"terms": null,
"docLang": "EN",
"deduceTax": null,
"createBy": "RMS_ADMIN",
"createDatetime": "2021-06-16",
"lastUpdateBy": "RFM01",
"lastUpdateDatetime": "2021-06-16",
"entities": [
{
"entityType": "SHIPP",
"entityInternalType": "ST",
"entityInternalPtnrType": null,
"entityCode": "990011",
"name": "QABR-Store Test Washington",
"legalName": "QABR-Store Test Washington",
"carrierVehicleRn": null,
"carrierVehicleState": null,
"carrierDriverName": null,
"carrierDriverLn": null,
"address": {
"street": "R da Juta",
"additionalStreetName": "1512",
"complement": null,
"city": "Washijngton",
"jurisdictionCode": null,
"postalCode": "03308070",
"country": "US",
"telephone": "2360873",
"email": "washington.dias@oracle.com",
"state": "DC",
"contactName": "Washington Dias",
"additionalproperties": []
},
"identification": []
},
{
"entityType": "DEST",
"entityInternalType": "CUST",
"entityInternalPtnrType": null,
"entityCode": "75",
"name": "wdias losnisk",
"legalName": "JADLOG",
"carrierVehicleRn": null,
"carrierVehicleState": null,
"carrierDriverName": null,
"carrierDriverLn": null,
"address": {
"street": "end10",
"additionalStreetName": "end20",
"complement": "end30",
"city": "Washington",
"jurisdictionCode": "3100104",
"postalCode": "08573160",
"country": "US",
"telephone": null,
"email": null,
"state": "DC",
"contactName": "wdias losnisk",
"additionalproperties": []
},
"identification": []
},
{
"entityType": "CR",
"entityInternalType": "PTNR",
"entityInternalPtnrType": "FF",
"entityCode": "11",
"name": "Carrier",
"legalName": "Carrier",
"carrierVehicleRn": "CJU0939",
"carrierVehicleState": "São Paulo",
"carrierDriverName": "Djalma da Carreta",
"carrierDriverLn": "77799573959957",
"address": {
"street": "15333 JFK Blvd",
"additionalStreetName": null,
"complement": null,
"city": "Houston",
"jurisdictionCode": null,
"postalCode": "77032",
"country": "US",
"telephone": null,
"email": "juliano.costa@oracle.com",
"state": "TX",
"contactName": "Juliano Costa",
"additionalproperties": [
{
"key": "NIP",
"value": "NIP09",
"type": "VARCHAR2",
"description": "NIP"
},
{
"key": "POSTALCODE",
"value": "POST09",
"type": "VARCHAR2",
"description": "Postal Code"
}
]
},
"identification": [
{
"key": "TAX_ID",
"value": "332424324",
"type": "VARCHAR2",
"description": "TAX ID"
}
]
}
],
"details": [
{
"lineNo": 1,
"item": "100900006",
"itemDesc": "item regular scenario 3",
"itemShortDesc": "regular item regular scenario 3",
"totalAmt": null,
"unitAmt": null,
"uom": "EA",
"qty": 5,
"totalTaxAmt": null,
"totalAmtInclTax": null,
"packInd": "N",
"gtin": null,
"gtinType": "ITEM",
"vpn": null,
"totalRounding": null,
"totalAllowance": null,
"totalCharge": null,
"taxes": [],
"references": [],
"allowanceCharges": [],
"packdetails": [],
"additionalproperties": [],
"comments": []
},
{
"lineNo": 2,
"item": "100900065",
"itemDesc": "itemm simple pack scenario 3",
"itemShortDesc": "itemm simple pack scenario 3",
"totalAmt": null,
"unitAmt": null,
"uom": "EA",
"qty": 5,
"totalTaxAmt": null,
"totalAmtInclTax": null,
"packInd": "Y",
"gtin": null,
"gtinType": "ITEM",
"vpn": null,
"totalRounding": null,
"totalAllowance": null,
"totalCharge": null,
"taxes": [],
"references": [],
"allowanceCharges": [],
"packdetails": [
{
"item": "100900057",
"itemQty": 10,
"itemDesc": "item componente de simple pack",
"uom": "EA"
}
],
"additionalproperties": [],
"comments": []
}],
"references": [
{
"refType": "CONO",
"refCode": "000000000000000000000000000000000000000090115067"
},
{
"refType": "CONO",
"refCode": "000000000000000000000000000000000000000090115068"
}],
"totaltaxes": [],
"errors": [],
"allowanceCharges": [],
"additionalproperties": [],
"comments": [
{
"text": "Waybill payload Scenario 3",
"textGroupId": null,
"textGroupSeq": null
},
{
"text": "Test Scenario predoc 3",
"textGroupId": null,
"textGroupSeq": null
}]
}
}"
Table Impact
TABLE | SELECT | INSERT | UPDATE | DELETE |
---|---|---|---|---|
SVC_FDG_DTL |
Yes |
No |
No |
No |
SVC_FDG_DTL_PACK |
Yes |
No |
No |
No |
SVC_FDG_ERROR |
Yes |
No |
No |
No |
SVC_FDG_ETT |
Yes |
No |
No |
No |
SVC_FDG_EXT |
Yes |
No |
No |
No |
SVC_FDG_HDR |
Yes |
No |
Yes |
No |
SVC_FDG_NON_MERCH |
Yes |
No |
No |
No |
SVC_FDG_REF |
Yes |
No |
No |
No |
SVC_FDG_TAX |
Yes |
No |
No |
No |
SVC_FDG_TEXT |
Yes |
No |
No |
No |
FDG_DTL |
Yes |
No |
No |
No |
FDG_DTL_PACK |
Yes |
No |
No |
No |
FDG_ERROR |
Yes |
No |
No |
No |
FDG_ETT |
Yes |
No |
No |
No |
FDG_EXT |
Yes |
No |
No |
No |
FDG_HDR |
Yes |
No |
No |
No |
FDG_NON_MERCH |
Yes |
No |
No |
No |
FDG_REF |
Yes |
No |
No |
No |
FDG_TAX |
Yes |
No |
No |
No |
FDG_TEXT |
Yes |
No |
No |
No |
Fiscal Document Process Status Request Service
Business Overview
This web service will be used by 3rd-party systems in charge of communicating fiscal document requests to local Governments, to provide to Fiscal Document Generation the approval status and associated data such as the formal document number and print version URL path.
Input
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
integrationSystemName |
Yes |
String |
Name of the integration system that will process this document. |
|
integrationSystemId |
Yes |
String |
Unique identifier to be used by the integration system. |
|
requestAction |
No |
String |
Action code returned for a given document in the |
|
docId |
Yes |
String |
Document ID returned for a given document in |
|
docNo |
Yes |
String |
Document number returned for a given document in |
|
operationStatus |
Yes |
String |
Status of the processing executed by a third party for the given document. Received means the document payload was properly consumed by the third party system and it is ready to proceed with its processing. Success means that the document was successfully approved. Fail means that the document approval failed; in this case it is expected that the error or errors will be provided. |
|
extDocNo |
No |
String |
External document number when applicable. This field should be populated with the approved fiscal document number when it is generated by Government. |
|
docPrintUrl |
No |
String |
URL to access or download the fiscal document printable version (PDF). |
|
additionalproperties |
No |
List<RestFdgExt> |
Collection of additional properties. |
|
errors |
No |
List<RestFdgError> |
Collection of errors. |
RestFdgExt:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
key |
No |
String |
Key value of the additional property data. |
|
value |
No |
String |
Value of the additional property data. |
|
type |
No |
String |
Data type of the additional property. |
|
description |
No |
String |
Description of additional property data. |
RestFdgError:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
errorCode |
Yes |
String |
Error code defined by 3rd party. |
|
errorDesc |
Yes |
String |
Error description defined by 3rd party. This description must have enough detail so the problem can be identified. |
JSON Input Structure:
"{
"integrationSystemName": "3RDPARNER",
"integrationSystemId": 777,
"requestAction": "A",
"docId": 669854788524448800,
"docNo": 1235489884,
"operationStatus": "S",
"extDocNo": 999999999999,
"docPrintUrl": "www.doc.com/print?code=123",
"additionalproperties": [
{
"key": "EXTID1",
"value": "ExtensionValue",
"type": "VARCHAR",
"description": "Description"
}],
"errors": [
{
"errorCode": "ERR87896",
"errorDesc": "Unknow Error"
}]
}"
Output
Parameter Name | Data Type | Description |
---|---|---|
status |
String |
Request process status. Can be either successfully or with error. |
errors |
List<RestFdgError> |
Collection of errors. |
RestFdgError
Parameter Name | Data Type | Description |
---|---|---|
errorCode |
String |
This field contains the error code. |
errorDesc |
String |
This field contains the error description. |
JSON Structure:
"{
"status": "E",
"errors": [
{
"errorCode": "FDG_DOC_NOT_FOUND",
"errorDesc": "Fiscal document with id 669854788524448800 not found."
}]
}"
Table Impact
TABLE | SELECT | INSERT | UPDATE | DELETE |
---|---|---|---|---|
SVC_FDG_DTL |
Yes |
No |
No |
Yes |
SVC_FDG_DTL_PACK |
Yes |
No |
No |
Yes |
SVC_FDG_ERROR |
Yes |
Yes |
No |
Yes |
SVC_FDG_ETT |
Yes |
No |
No |
Yes |
SVC_FDG_EXT |
Yes |
Yes |
No |
Yes |
SVC_FDG_HDR |
Yes |
No |
Yes |
Yes |
SVC_FDG_NON_MERCH |
Yes |
No |
No |
Yes |
SVC_FDG_REF |
Yes |
No |
No |
Yes |
SVC_FDG_TAX |
Yes |
No |
No |
Yes |
SVC_FDG_TEXT |
Yes |
No |
No |
Yes |
FDG_DTL |
No |
Yes |
No |
No |
FDG_DTL_PACK |
No |
Yes |
No |
No |
FDG_ERROR |
No |
Yes |
No |
No |
FDG_ETT |
No |
Yes |
No |
No |
FDG_EXT |
No |
Yes |
No |
No |
FDG_HDR |
Yes |
Yes |
No |
No |
FDG_NON_MERCH |
No |
Yes |
No |
No |
FDG_REF |
No |
Yes |
No |
No |
FDG_TAX |
No |
Yes |
No |
No |
FDG_TEXT |
No |
Yes |
No |
No |
FDG_SYSTEM_OPTIONS |
No |
No |
No |
No |
Fiscal Document Cancel Request Service
Business Overview
In both scenarios for shipment and Inbound, it will be the requestor´s option to cancel a fiscal document request. This process runs by calling the Document Cancel Request Service.
Requestor systems can request cancelation for a specific document. This request is consumed by Fiscal Document Generation and, depending on the current status of the document, different actions will take place including simply changing the status of the document to Canceled, or even the integration of the cancelation request to the 3rd-party system that communicates this request to local Governments. In this scenario, Fiscal Document Generation will expect the 3rd party to confirm the cancelation.
Input
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
docId |
Yes |
String |
This column contains the unique document ID. |
|
requestAction |
Yes |
String |
This field contains the current action for the request. This action is to third-party know the action to perform with this request. |
|
additionalproperties |
No |
List<RestFdgExt> |
Collection of additional properties. |
|
comments |
No |
List<RestFdgText> |
Collection of comments. |
RestFdgExt:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
key |
No |
String |
Key value of the additional property data. |
|
value |
No |
String |
Value of the additional property data. |
|
type |
No |
String |
Data type of the additional property. |
|
description |
No |
String |
Description of additional property data. |
RestFdgText:
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
text |
Yes |
String |
This field contains additional comments at item level. It is used to provide any additional information or legal message important to fiscal document. |
|
textGroupId |
No |
String |
Text group ID. It is used to group related comments when there is more than one or when the size of a message is bigger than the size of the text field and it is necessary to generate more than one line. |
|
textGroupSeq |
No |
String |
Sequence of the text for a given group ID. It is used in case comments information has more than one line. |
JSON Input Structure:
"{
"docId": "12345",
"requestAction": "C",
"additionalproperties": [
{
"key": "EXTID1",
"value": "ExtensionValue",
"type": "VARCHAR2"
}],
"comments":
[{
"text": "additional text"
}]
}"
Output
Parameter Name | Data Type | Description |
---|---|---|
processStatus |
String |
This column contains the status of the document |
errors |
List<RestFdgError> |
Collection of errors. |
RestFdgError
Parameter Name | Data Type | Description |
---|---|---|
errorCode |
String |
This field contains the error code. |
errorDesc |
String |
This field contains the error description. |
JSON Structure:
"{
"status": "E",
"errors": [
{
"errorCode": "FDG_DOC_NOT_FOUND",
"errorDesc": "Fiscal document with id 12345 not found."
}]
}"
Fiscal Document Detail Request Service
Business Overview
This web service is called by 3rd-party systems responsible for communicating fiscal document request to local Governments when they need to fetch data for a particular document. The response to this service will have the full payload of a fiscal document.
ReST URL
{{baseUrl}}/services/private/fdg/documentDetail?docId=<string>&entityType=<string>&entityInternalType=<string>&entityCode=<string>
Input Parameters
Parameter Name | Required | Data Type | Description | Valid values |
---|---|---|---|---|
docId |
No |
String |
Internal fiscal document ID generated by FDG. This ID is unique to each fiscal document created. |
|
entityType |
No |
String |
Filter criteria to fetch documents for specific entity types in a fiscal document. |
|
entityInternalType |
No |
String |
Filter criteria to fetch documents based on specific entity types in Merchandising irrespective of their role in the fiscal documents. |
|
entityCode |
No |
String |
Filter criteria to fetch documents based on a specific entity code.
This field contains the entity's Merchandising internal code and must sent in conjunction with |
Output
Parameter Name | Data Type | Description |
---|---|---|
requestId |
String |
Internal fiscal document REQUEST ID generated by FDG. This ID can be used to identify the fiscal document(s) being processed. |
requestSystem |
String |
Name of the system that performed the request for a fiscal document. |
requestAction |
String |
Action code to be passed along with the request for a fiscal document process. |
docId |
BigDecimal |
Internal fiscal document ID generated by FDG. This ID is unique to each fiscal document created. |
docNo |
String |
Official fiscal document number. This number is given to approved documents. |
status |
String |
Internal FDG status of the fiscal document. |
docType |
String |
Valid values: |
docTypeCode |
String |
Extended description of a document type. |
extReqId |
String |
External system´s request ID used to link FDG internal ID with the requestor system´s transaction ID. |
transactionType |
String |
Identification of the transaction associated with the fiscal document. |
issueDate |
OffsetDateTime |
Issue date of the fiscal document. Date defined at the time the document is submitted for approval. |
dueDate |
date |
Payment date of fiscal document or invoice. |
docLang |
String |
Language of fiscal document. It is based on language defined in source location. |
printerId |
String |
Printer ID that is designated to print fiscal document. |
docPrintUrl |
String |
URL of the fiscal document report. |
currencyCode |
String |
Currency code for the fiscal document. It is based on currency code defined in source location. |
totalTaxAmt |
BigDecimal |
Total TAX amount of the fiscal document. This field is the sum of |
totalNonMerchTaxAmt |
BigDecimal |
Total TAX amount of allowances/charges of the fiscal document. Rounding applied based on system option. |
totalAmtInclTax |
BigDecimal |
Total value of fiscal document including taxes. This field is the
sum of |
totalAmtExclTax |
BigDecimal |
Total value of fiscal document excluding taxes. This field has
the |
totalAllowance |
BigDecimal |
Total value of all allowances in fiscal document. This field is
the sum of |
totalCharge |
BigDecimal |
Total value of all charges in fiscal document. This field is the
sum of |
totalRounding |
BigDecimal |
The rounding amount (positive or negative) added to produce the
line extension |
terms |
String |
Payment terms used in this transaction |
deduceTax |
String |
Flag that indicates if taxes were calculated by the system or informed at the fiscal document request. |
createBy |
String |
User ID that created the record. |
createDatetime |
date |
Record creation date. |
lastUpdateBy |
String |
User ID that did last update of fiscal document. |
lastUpdateDatetime |
date |
Date of last update of fiscal document. |
entities |
List<RestFdgEtt> |
Collection of entities. |
details |
List<RestFdgDtl> |
Collection of item details |
RestFdgEtt
Parameter Name | Data Type | Description |
---|---|---|
entityType |
String |
Entity type. |
entityInternalPtnrType |
String |
Merchandising partner type. |
entityInternalType |
String |
Merchandising entity type. |
entityCode |
String |
Internal Merchandising code of the entity. Ex. ID of store or warehouse |
name |
String |
Entity name. |
legalName |
String |
Entity's legal name. |
carrierVehicleRn |
String |
Carrier vehicle´s registration number. |
carrierVehicleState |
String |
Carrier vehicle´s state. |
carrierDriverName |
String |
Carrier driver´s name. |
carrierDriverLn |
String |
Carrier driver´s license number. |
address |
RestFdgEttAddr |
Collection of address details. |
identification |
List<RestFdgExt> |
Collection of Entity Identification Additional Properties. Fiscal Attributes will be send in this group. |
RestFdgEttAddr
Parameter Name | Data Type | Description |
---|---|---|
street |
String |
Street name of the entity´s address. |
additionalStreetName |
String |
Extension of street name of the entity´s address. |
complement |
String |
Additional information of entity´s address, such as neighborhood, county, etc. |
city |
String |
City name of entity´s address. |
jurisdictionCode |
String |
Jurisdiction code of entity´s address. This can be legal code associated to city, county or any other level. |
postalCode |
String |
Zip or postal code of entity´s address. |
country |
String |
Country name of entity´s address. |
telephone |
String |
Telephone number of the person who is the contact point. |
|
String |
E-mail address of the person who is the contact point. |
state |
String |
State name of entity´s address. |
contactName |
String |
Contact name. |
additionalproperties |
List<RestFdgExt> |
Collection of address additional properties. |
RestFdgExt
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
description |
String |
Description of additional property data. |
RestFdgExt (identification)
Parameter Name | Data Type | Description |
---|---|---|
key |
String |
This column contains the key value of the entity additional properties at entity address level. |
value |
String |
This column contains the value of the entity additional properties at entity address level. |
type |
String |
This column contains the extension type at entity address level. |
description |
String |
Description of additional property data. |
references |
List<RestFdgRef> |
Collection of references. |
totaltaxes |
List<RestFdgTax> |
Collection of taxes. |
errors |
List<RestFdgError> |
Collection of errors. |
allowanceCharges |
List<RestFdgNonMerch> |
Collection of allowance charges. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties. |
comments |
List<RestFdgText> |
Collection of comments. |
RestFdgDtl
Parameter Name | Data Type | Description |
---|---|---|
lineNo |
long |
Sequential number of the item in fiscal document. This number is a sequence starts with number one. Any gap is not allowed. |
Item |
String |
Unique code ID that identifies the item. |
itemDesc |
String |
Long description of the item. |
itemShortDesc |
String |
Short description of the item. |
totalAmt |
BigDecimal |
Total amount for the item inclusive of allowances and charges. Calculation
formula is (( |
unitAmt |
BigDecimal |
Item unit amount. No rounding applied. |
uom |
String |
Unit of measure used in item in the fiscal document. |
qty |
BigDecimal |
Quantity of item in the fiscal document. |
totalTaxAmt |
BigDecimal |
Total amount of taxes applied to the item. This field is sum of
all |
totalAmtInclTax |
BigDecimal |
Total amount for item inclusive of taxes. Calculation formula is |
totalRounding |
BigDecimal |
The rounding amount (positive or negative) added to produce the
line extension |
totalAllowance |
BigDecimal |
Total amount of all allowances at item level. This field is sum
of all allowances at |
totalCharge |
BigDecimal |
Total amount of all charges at item level. This field is sum of
all charges at |
packInd |
String |
Pack indicator. Valid values: |
gtin |
String |
GTIN number (Global Trade Item Number) of item. |
gtinType |
String |
GTIN Type. Valid values: |
vpn |
String |
Vendor Product Number (VPN) associated with the item. |
taxes |
List<RestFdgTax> |
Collection of item taxes. |
references |
List<RestFdgRef> |
Collection of item references |
allowanceCharges |
List<RestFdgNonMerch> |
Collection of item allowance charges. |
packdetails |
List<RestFdgDtlPack> |
Collection of item pack details. |
additionalproperties |
List<RestFdgExt> |
Collection of item additional properties. |
comments |
List<RestFdgText> |
Collection of item comments. |
RestFdgTax
Parameter Name | Data Type | Description |
---|---|---|
taxType |
String |
Tax type. |
taxCode |
String |
Tax identification code. |
taxRate |
BigDecimal |
Tax rate when tax type is set as percentage. |
taxAmt |
BigDecimal |
Total tax amount for the tax code. Rounding applied based on system option. |
unitTaxAmt |
BigDecimal |
Tax amount per unit for the tax code. |
taxBasis |
BigDecimal |
Tax basis amount used to calculate tax value based on |
taxCodeDesc |
String |
Tax code description. This field can be used to indicate extra code or detailed information about tax code. |
additionalproperties |
List<RestFdgExt> |
Collection of taxes addition properties. |
comments |
List<RestFdgText> |
Collection of taxes comments. |
RestFdgText
Parameter Name | Data Type | Description |
---|---|---|
text |
String |
Additional information and/or comments. It is used to provide any additional information or legal message important to the fiscal document. |
textGroupId |
String |
Text group ID. It is used to group related comments when there is more than one or when the size of a message is bigger than the size of the text field and it is necessary to generate more than one line. |
textGroupSeq |
String |
Sequence of the text for a given group ID. It is used in case comments information has more than one line. |
RestFdgRef
Parameter Name | Data Type | Description |
---|---|---|
refType |
String |
Type of the reference information. It is used when there is any reference that it is necessary to add in the fiscal document, as shipment number, contract number, order, ID, and so on. Valid values are pre-defined in Merchandising System. |
refCode |
String |
Reference code/value of reference type. |
RestFdgNonMerch
Parameter Name | Data Type | Description |
---|---|---|
chargeInd |
String |
Charge indicator. |
nonMerchCode |
String |
Non-merchandise code that identifies a non-merchandise cost used as a charge or allowance. |
nonMerchCodeDesc |
String |
Non-merchandise code description. It is used to provide more detailed about non-merchandise code, for example: allowance details, types of non-merchandise code such as Freight, Insurance, etc. |
nonMerchAmt |
BigDecimal |
Non-merchandise amount. |
nonMerchType |
String |
Non-merchandise type exclusive for Charges. |
taxes |
List<RestFdgTax> |
Collection of taxes for non-merchandise. |
additionalproperties |
List<RestFdgExt> |
Collection of additional properties for non-merchandise. |
comments |
List<RestFdgText> |
Collection of comments for non-merchandises. |
packdetails
Parameter Name | Data Type | Description |
---|---|---|
item |
String |
Unique alphanumeric ID of a pack component that is part of item pack. |
itemQty |
BigDecimal |
Quantity of the component item that is part of the pack. |
itemDesc |
String |
Description of the component item component. |
uom |
String |
Unit of measure of the component item. |
totaltaxes
Parameter Name | Data Type | Description |
---|---|---|
taxType |
String |
Not applicable for |
taxCode |
String |
Tax identification code. |
taxRate |
BigDecimal |
Not applicable for |
taxAmt |
BigDecimal |
Sum of |
unitTaxAmt |
BigDecimal |
Not applicable for |
taxBasis |
BigDecimal |
Sum of |
taxCodeDesc |
String |
Tax code description. This field can be used to indicate extra code or detailed information about tax code. |
JSON Structure:
"{
"docId": 17200,
"requestId": 17207,
"requestSystem": "OMNI",
"requestAction": "A",
"status": "S",
"docNo": "17200",
"docType": "WBL",
"docTypeCode": null,
"extReqId": "10065007",
"transactionType": "SALES",
"issueDate": "2021-03-31T08:19:42-05:00",
"dueDate": null,
"printerId": null,
"docPrintUrl": null,
"currencyCode": "USD",
"totalTaxAmt": null,
"totalNonMerchTaxAmt": null,
"totalAmtInclTax": null,
"totalAmtExclTax": null,
"totalAllowance": null,
"totalCharge": null,
"totalRounding": null,
"terms": null,
"docLang": "EN",
"deduceTax": null,
"createBy": "RMS_ADMIN",
"createDatetime": "2021-06-16",
"lastUpdateBy": "RFM01",
"lastUpdateDatetime": "2021-06-16",
"entities": [
{
"entityType": "SHIPP",
"entityInternalType": "ST",
"entityInternalPtnrType": null,
"entityCode": "990011",
"name": "QABR-Store Test Washington",
"legalName": "QABR-Store Test Washington",
"carrierVehicleRn": null,
"carrierVehicleState": null,
"carrierDriverName": null,
"carrierDriverLn": null,
"address": {
"street": "R da Juta",
"additionalStreetName": "1512",
"complement": null,
"city": "Washijngton",
"jurisdictionCode": null,
"postalCode": "03308070",
"country": "US",
"telephone": "2360873",
"email": "washington.dias@oracle.com",
"state": "DC",
"contactName": "Washington Dias",
"additionalproperties": []
},
"identification": []
},
{
"entityType": "DEST",
"entityInternalType": "CUST",
"entityInternalPtnrType": null,
"entityCode": "75",
"name": "wdias losnisk",
"legalName": "JADLOG",
"carrierVehicleRn": null,
"carrierVehicleState": null,
"carrierDriverName": null,
"carrierDriverLn": null,
"address": {
"street": "end10",
"additionalStreetName": "end20",
"complement": "end30",
"city": "Washington",
"jurisdictionCode": "3100104",
"postalCode": "08573160",
"country": "US",
"telephone": null,
"email": null,
"state": "DC",
"contactName": "wdias losnisk",
"additionalproperties": []
},
"identification": []
},
{
"entityType": "CR",
"entityInternalType": "PTNR",
"entityInternalPtnrType": "FF",
"entityCode": "11",
"name": "Carrier",
"legalName": "Carrier",
"carrierVehicleRn": "CJU0939",
"carrierVehicleState": "São Paulo",
"carrierDriverName": "Djalma da Carreta",
"carrierDriverLn": "77799573959957",
"address": {
"street": "15333 JFK Blvd",
"additionalStreetName": null,
"complement": null,
"city": "Houston",
"jurisdictionCode": null,
"postalCode": "77032",
"country": "US",
"telephone": null,
"email": "juliano.costa@oracle.com",
"state": "TX",
"contactName": "Juliano Costa",
"additionalproperties": [
{
"key": "NIP",
"value": "NIP09",
"type": "VARCHAR2",
"description": "NIP"
},
{
"key": "POSTALCODE",
"value": "POST09",
"type": "VARCHAR2",
"description": "Postal Code"
}
]
},
"identification": [
{
"key": "TAX_ID",
"value": "332424324",
"type": "VARCHAR2",
"description": "TAX ID"
}
]
}],
"details": [
{
"lineNo": 1,
"item": "100900006",
"itemDesc": "item regular scenario 3",
"itemShortDesc": "regular item regular scenario 3",
"totalAmt": null,
"unitAmt": null,
"uom": "EA",
"qty": 5,
"totalTaxAmt": null,
"totalAmtInclTax": null,
"packInd": "N",
"gtin": null,
"gtinType": "ITEM",
"vpn": null,
"totalRounding": null,
"totalAllowance": null,
"totalCharge": null,
"taxes": [],
"references": [],
"allowanceCharges": [],
"packdetails": [],
"additionalproperties": [],
"comments": []
},
{
"lineNo": 2,
"item": "100900065",
"itemDesc": "itemm simple pack scenario 3",
"itemShortDesc": "itemm simple pack scenario 3",
"totalAmt": null,
"unitAmt": null,
"uom": "EA",
"qty": 5,
"totalTaxAmt": null,
"totalAmtInclTax": null,
"packInd": "Y",
"gtin": null,
"gtinType": "ITEM",
"vpn": null,
"totalRounding": null,
"totalAllowance": null,
"totalCharge": null,
"taxes": [],
"references": [],
"allowanceCharges": [],
"packdetails": [
{
"item": "100900057",
"itemQty": 10,
"itemDesc": "item componente de simple pack",
"uom": "EA"
}
],
"additionalproperties": [],
"comments": []
}],
"references": [
{
"refType": "CONO",
"refCode": "000000000000000000000000000000000000000090115067"
},
{
"refType": "CONO",
"refCode": "000000000000000000000000000000000000000090115068"
}],
"totaltaxes": [],
"errors": [],
"allowanceCharges": [],
"additionalproperties": [],
"comments": [
{
"text": "Waybill payload Scenario 3",
"textGroupId": null,
"textGroupSeq": null
},
{
"text": "Test Scenario predoc 3",
"textGroupId": null,
"textGroupSeq": null
}]
}"
Table Impact
TABLE | SELECT | INSERT | UPDATE | DELETE |
---|---|---|---|---|
SVC_FDG_DTL |
Yes |
No |
No |
No |
SVC_FDG_DTL_PACK |
Yes |
No |
No |
No |
SVC_FDG_ERROR |
Yes |
No |
No |
No |
SVC_FDG_ETT |
Yes |
No |
No |
No |
SVC_FDG_EXT |
Yes |
No |
No |
No |
SVC_FDG_HDR |
Yes |
No |
Yes |
No |
SVC_FDG_NON_MERCH |
Yes |
No |
No |
No |
SVC_FDG_REF |
Yes |
No |
No |
No |
SVC_FDG_TAX |
Yes |
No |
No |
No |
SVC_FDG_TEXT |
Yes |
No |
No |
No |
FDG_DTL |
Yes |
No |
No |
No |
FDG_DTL_PACK |
Yes |
No |
No |
No |
FDG_ERROR |
Yes |
No |
No |
No |
FDG_ETT |
Yes |
No |
No |
No |
FDG_EXT |
Yes |
No |
No |
No |
FDG_HDR |
Yes |
No |
No |
No |
FDG_NON_MERCH |
Yes |
No |
No |
No |
FDG_REF |
Yes |
No |
No |
No |
FDG_TAX |
Yes |
No |
No |
No |
FDG_TEXT |
Yes |
No |
No |
No |