How to get Order details through order Id in Infusionsoft

I am using infusionsoft in wordpress. I want to get the order details/Invoice details through order id. what function is used to do so?
I found a function

function getInvoiceId($orderId)

It fetches only InvoiceId.
But I need all the order details like customer Id, price etc.
help me please. Thanks in advance.

Related posts

Leave a Reply

1 comment

  1. I got some solution though it is not perfect answer.

    The following is the example code to use ‘dsLoad’ function.

    $returnFields = array('Email', 'FirstName', 'LastName');
    $conDat = $app->dsLoad("Contact", 123, $returnFields);
    

    dsLoad function is one which fetches required fields from database when we provide table name.

    So, Use “Invoice” as table name and required fields as $returnFields array.

    Here is the example code.

    $returnFields = array('Id', 'ContactId', 'JobId');
    $invoiceDetails = $app->dsLoad("Invoice", 123, $returnFields);