Question

How to Generate a Report using API

  • 17 October 2023
  • 3 replies
  • 115 views

Userlevel 1
Badge +7

Hi Everyone,

 

I’m sorry but I’m not all that knowledgeable when it comes to IFS. What I am trying to do for our business is generate the Shipment BOL report via API. When I debug IFS it looks like it’s calling ShipmentBillOfLadingRep.svc however when I attempt to replicate the same calls I’m not getting anything useful back.

 

Does anyone know how I can generate the Shipment BOL Report for a specific shipment ID using the IFS API?

 

Perhaps there is a more generic Report API that I should be using instead of the ShipmentBillOfLadingRep.svc API?

 

Any help would be appreciated.

 

Thanks,

 

Mark 


3 replies

Userlevel 7
Badge +21

Hi @MarkMr ,

 

Are you using IFS Application 10 update 8 or above or IFS Cloud <version>?

I believe you may need to call more than one API to render the report and then print it to a specific printer.  I can attempt to implement the calls using Postman in my systems I have IFS Application 10 Update 8 installed and IFS Cloud 23R1 as we are migrating to this new release.

 

Regards,

William Klotz

Userlevel 1
Badge +7

Hi WIlliam,

Thanks for the reply we are using IFS Apps 10 Update 16.

I think what I need to do is call /ShipmentBillOfLadingRep.svc/VirtualOrderReports and set the ReportId, CompanyId, ShipmentID, etc in order to get an Object Key. 

Then with the object key call ShipmentBillOfLadingRep.svc/VirtualOrderReports(Objkey='{KEY}')/IfsApp.ShipmentBillOfLadingRep.VirtualOrderReport.OrderReport to generate the actual report.

 

But whenever I do I get the following response and I’m not sure what I’m missing:

 

{
    "error": {
        "code": "ODP_DESERIALIZATION_ERROR",
        "message": "Error while de-serializing contents."
    }
}

Userlevel 4
Badge +10

Hi WIlliam,

Thanks for the reply we are using IFS Apps 10 Update 16.

I think what I need to do is call /ShipmentBillOfLadingRep.svc/VirtualOrderReports and set the ReportId, CompanyId, ShipmentID, etc in order to get an Object Key. 

Then with the object key call ShipmentBillOfLadingRep.svc/VirtualOrderReports(Objkey='{KEY}')/IfsApp.ShipmentBillOfLadingRep.VirtualOrderReport.OrderReport to generate the actual report.

 

But whenever I do I get the following response and I’m not sure what I’m missing:

 

{
    "error": {
        "code": "ODP_DESERIALIZATION_ERROR",
        "message": "Error while de-serializing contents."
    }
}

 

Try to add following in the header request and check this error is still happening.

  • Accept: application/json;odata.metadata=full;IEEE754Compatible=true
  • Content-Type: application/json;IEEE754Compatible=true

 

Reply