WEBCentralizedShoppingCartOpenInvoiceGetList

Initial Build 2013.1
xWeb xWeb Method
Response Type XML Results

 

The WEBCentralizedShoppingCartOpenInvoiceGetList web method returns a list of open invoices for the provided CustomerKey.

Parameters

CustomerKey (GUID). This is the Customer Key of the customer for whom open invoices should be returned.

Response

A list of the open invoices for the specified customer, including the invoice key, invoice date, invoice code, invoice total, amount paid, balance, and membership code.

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.avectra.com/2005/">
   <soapenv:Header>
      <ns:AuthorizationToken>
         <ns:Token>***********************</ns:Token>
      </ns:AuthorizationToken>
   </soapenv:Header>
   <soapenv:Body>
      <ns:WEBCentralizedShoppingCartOpenInvoiceGetList>
         <ns:CustomerKey>cec29726-4a26-4c07-9162-048020e42241</ns:CustomerKey>
      </ns:WEBCentralizedShoppingCartOpenInvoiceGetList>
   </soapenv:Body>
</soapenv:Envelope>

Sample Response

Note the field <mbt_code>. If the invoice contains a membership line item, then the member code will be returned in this field. If the invoice does not have membership items in it, then the field will be empty.

Also, observe that the second item has a partial payment of 118.40, so the balance due (117.60) is less than the original invoice total (296.00). So, if you're displaying this information to a user, make sure to not just show the invoice total but show the remaining balance as well.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Header>
      <AuthorizationToken xmlns="http://www.avectra.com/2005/">
         <Token>1be16158-7d91-489a-97c4-fbdbfb0be1d6</Token>
      </AuthorizationToken>
   </soap:Header>
   <soap:Body>
      <WEBCentralizedShoppingCartOpenInvoiceGetListResponse xmlns="http://www.avectra.com/2005/">
         <WEBCentralizedShoppingCartOpenInvoiceGetListResult>
            <Results recordReturn="2">
               <Result>
                  <inv_key>83a4965c-ae53-4d4d-a725-ef4069c399ab</inv_key>
                  <inv_date>11/03/2011</inv_date>
                  <inv_code_cp>70145</inv_code_cp>
                  <inv_total>600.0000000</inv_total>
                  <inv_paid>0.0000</inv_paid>
                  <inv_balance>600.0000</inv_balance>
                  <mbt_code>AV_Inst Mbr</mbt_code>
               </Result>
               <Result>
                  <inv_key>49e789c8-c49a-4eb0-8c37-746386225c7f</inv_key>
                  <inv_date>02/09/2013</inv_date>
                  <inv_code_cp>107106</inv_code_cp>
                  <inv_total>296.0000</inv_total>
                  <inv_paid>118.4000</inv_paid>
                  <inv_balance>177.6000</inv_balance>
                  <mbt_code/>
               </Result>
            </Results>
         </WEBCentralizedShoppingCartOpenInvoiceGetListResult>
      </WEBCentralizedShoppingCartOpenInvoiceGetListResponse>
   </soap:Body>
</soap:Envelope>

JSON Method

POST /xWeb/JSON/WEBCentralizedShoppingCartOpenInvoiceGetList

DATA: JSON
{
    "WEBCentralizedShoppingCartOpenInvoiceGetList": {
        "CustomerKey":"dbe1371c-1731-4f87-a2e6-07c1b99c672a"
    }
}

 

SAMPLE RESULT
HTTP STATUS: 200
DATA: JSON
{
    "Results": {
        "@recordReturn": "2"
        "Result": [
            {
                "inv_key": "647d5680-bc65-465e-887b-87b94a57f97f",
                "inv_date": "08/31/2022",
                "inv_code_cp": "60289",
                "inv_total": "11.00",
                "inv_paid": "0.00",
                "inv_balance": "11.00",
                "inv_amount_due": "11.00",
                "mbt_code": " CB_Inst Mbr ",
            },
            {
                "inv_key": "0c268e5e-2afb-4df4-870e-2da63f065cb7",
                "inv_date": "08/31/2022",
                "inv_code_cp": "60290",
                "inv_total": "10.00",
                "inv_paid": "0.00",
                "inv_balance": "10.00",
                "inv_amount_due": "10.00",
                "mbt_code": null
            }
        ]
    }
}

 

Was this article helpful?
0 out of 0 found this helpful