Manuais
PHC GO Get Reporting
 

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:

  1. In case of success:


    It returns the data of the analysis, for example:
     
    1. 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"
      }

    2. 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
    operation1IntegerSpecifies the type of reporting that is being requested.

    1 – SAF-T
    2 – Self-billing SAFT
    configuration1ObjectThe configuration for each Operation

     

    Configuration for Operation = 1 (SAF-T)


     
    Name Type PHC GO Entity PHC GO Field Observations
    month1IntegerMonth of the SAF-T reporting
    year1StringYear of the SAF-T reporting
    cae1String
    emailStringIf 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
    supplierStamp1StringFlflstampSupplier Stamp
    year1StringYear of the SAF-T reporting
    dataini1DataFldatainiInitial Data
    datafim1DataFldatafimFinal Data
    caeString
    emailStringIf this is passed in configuration, it will be sent and url link does not come in result

     


    Footnotes


    1 - Required

     
     

    Example