Search code examples
apiibm-cloud-infrastructure

How to use order ID to get order information?


After placing an order in SoftLayer using its APIs, I have the Order ID. (The same Order ID that you see when you go to Account -> Sales -> Orders in the SoftLayer control panel).

What APIs are there which I can use this Order ID to get the order information including the invoice or billing? I tried using SoftLayer_Billing_Order, SoftLayer_Billing_Invoice, SoftLayer_Billing_Info, and etc to see if I can use this Order ID and none of them seem to work.

Using SoftLayer APIs, how can I get the order info, invoice info, and maybe billing info if all I have is the Order ID?


Solution

  • This Rest request using filters and masks can help you:

    https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getOrders?objectFilter={   "orders": {     "id": {       "operation": 7907000     }   } }&objectMask=mask[items.billingItem, initialInvoice]
    
    Method: GET
    

    Where: '7907000' is my orderId.

    References:

    SoftLayer_Account::getOrders