Method
The method to be called is:
Parameters
In the request headers the Authorization header must have the Access Token:
- Authorization: {{accessToken}}
JSON body
In the body of the POST a JSON structure like this one has to be passed:
{
"reporting": {
"operation": 1,
"configuration": {
"month": 3,
"year": "2020",
"cae": "12345",
"email":"test@test.com"
}
}
}
Return Information
Any call made to this method will return a JSON information with this structure:
-
In case of success:
It returns the data of the analysis, for example:
- In case of NOT set in configuration the email:
{
"code": 1,
"message": "SAF-T generated with success!",
"location": "http://phc201505003/fx/phcws/cxml.aspx?fileName=saft_01032017_31032017_3689551f-ecd4-43be-9022-4c773b5fc4a3.xml&downloadName=saft_01032017_31032017_3689551f-ecd4-43be-9022-4c773b5fc4a3.xml"
}
- In case of SET in configuration the email:
{
"code": 1,
"message": "SAF-T generated with success and sent to email!"
}
JSON Specification for Get Reporting
Reporting
Name |
Type |
PHC GO Entity |
PHC GO Field |
Observations |
operation1 | Integer | – | – | Specifies the type of reporting that is being requested.
1 – SAF-T
2 – Self-billing SAFT |
configuration1 | Object | | | The configuration for each Operation |
Configuration for Operation = 1 (SAF-T)
Name |
Type |
PHC GO Entity |
PHC GO Field |
Observations |
month1 | Integer | – | – | Month of the SAF-T reporting |
year1 | String | | | Year of the SAF-T reporting |
cae1 | String | | | |
email | String | | | If this is passed in configuration, it will be sent and url link does not come in result
|
Configuration for Operation = 2 (Self-billing SAF-T)
Name |
Type |
PHC GO Entity |
PHC GO Field |
Observations |
supplierStamp1 | String | Fl | flstamp | Supplier Stamp |
year1 | String | | | Year of the SAF-T reporting |
dataini1 | Data | Fl | dataini | Initial Data |
datafim1 | Data | Fl | datafim | Final Data |
cae | String | | | |
email | String | | | If this is passed in configuration, it will be sent and url link does not come in result
|