Skip to main content

Visual API Testing: Energy

How to run the Common and Energy API calls on an arrangement and read the results.

Use Visual API Testing to call the Energy APIs a Data Holder exposes, with your own parameters. This guide uses an Azib NRG arrangement shared as the business customer Biza Pty Ltd. For what each call and field does, see Visual API Testing.

info

The screenshots are from VTT 4.0.0. All the customer, account and service point data shown is mock data.

Before you start​

Create an Energy arrangement that includes the data clusters for the calls you want to make.

Open the arrangement​

1. On the VTT home page, click List Arrangements, then click the Arrangement ID of the arrangement to test.

Get Arrangement Details opens. The Energy Api Calls panel on the right has the top-level calls.

Run a top-level call​

The top-level calls are Get Customer, Get Service Points, Get Bulk Usage, Get Bulk DER, Get Energy Accounts, Get Bulk Balances, Get Bulk Invoices and Get Bulk Billing.

2. In Choose an Energy Api Call, choose a call. The form adds the fields that call takes:

CallExtra fields
Get Customernone
Get Service Points, Get Bulk DER, Get Bulk BalancesPage, Page Size
Get Energy AccountsPage, Page Size, Open Status (ALL, OPEN or CLOSED)
Get Bulk UsagePage, Page Size, Oldest Date, Newest Date, Interval Reads (NONE, MIN_30 or FULL)
Get Bulk InvoicesPage, Page Size, Oldest Date, Newest Date
Get Bulk BillingPage, Page Size, Oldest Time, Newest Time

3. Change x-min-v and x-v if you want to request particular API versions. They default to 1 and 999.

4. Click Submit. VTT sends the request through Open Gateway to the Data Holder and opens the result page.

Get Arrangement Details with Get Bulk Usage chosen, showing the date fields and Interval Reads set to NONE

A top-level call, ready to submit

5. Read the result and the validation panel. For a non-individual customer, Get Customer returns an organisation instead of a person.

Get Customer result for an organisation customer, with ATTRIBUTE_INVALID rows under Validation Info

Get Customer for a business customer

6. Turn on View Entire Request and Response to see the full request and response, and use the breadcrumbs to go back.

info

Get Bulk Usage and Get Bulk DER are served by the Secondary Data Holder. An empty result shows No Entries.

Run an account-scoped call​

7. Run Get Energy Accounts. The result lists each account's ID, account number, status and display name, and the Account Specific Api Calls form is on the right.

Get Energy Accounts result with two accounts and the Account Specific Api Calls form

Get Energy Accounts

8. Under Account Specific Api Calls, choose a call in Select an Api Call. These calls take one account, chosen in Choose an Account:

  • Get Energy Account Detail
  • Get Agreed Payment Schedule
  • Get Concessions
  • Get Balance For Energy Account
  • Get Invoices For Account (with Page, Page Size, Oldest Date and Newest Date)
  • Get Billing For Account (with Page, Page Size, Oldest Time and Newest Time)

Get Bulk Balances for Energy is in the same list. It takes Page and Page Size, and no account.

9. Choose the account and click Submit. Submit stays disabled until an account is chosen.

Get Invoices For Account chosen, with the date fields and an account chosen

An account-scoped call, ready to submit

Specific Accounts calls​

These calls take one or more accounts, picked in the Select Accounts multi-select:

  • Get Balances For Specific Energy Accounts
  • Get Invoices For Specific Accounts (with Oldest Date and Newest Date)
  • Get Billing For Specific Accounts (with Oldest Time and Newest Time)

10. Choose one of these calls, click Select Accounts and pick each account to include. Press Escape to close the list. Submit stays disabled until at least one account is picked.

Get Balances For Specific Energy Accounts chosen, with the empty Select Accounts multi-select and Submit disabled

The Select Accounts multi-select, before any account is picked

11. Click Submit. The result page shows the accounts you picked under Active Filters.

Get Balances For Specific Energy Accounts result with both accounts under Active Filters and a balance for each

Get Balances For Specific Energy Accounts

Run a service point call​

12. From the arrangement, run Get Service Points. The result lists each service point's ID, status and last update time, and the Service Point Specific Api Calls form is on the right.

Get Service Points result with two service points and the Service Point Specific Api Calls form

Get Service Points

13. Under Service Point Specific Api Calls, choose a call:

CallService point selectionExtra fields
Get Service Point DetailSelect Service Point (one)none
Get Service Point UsageSelect Service Point (one)Page, Page Size, Oldest Date, Newest Date
Get Service Point DERSelect Service Point (one)none
Get Usage For Specific Service PointsSelect Service Points (one or more)Page, Page Size, Oldest Date, Newest Date, Interval Reads
Get DER For Specific Service PointsSelect Service Points (one or more)Page, Page Size

Under the selector, the form shows the note "Includes close accounts".

14. Choose the service points and click Submit.

Get Service Point Usage chosen, with the date fields and a service point chosen

A service point call, ready to submit

The usage and DER calls are served by the Secondary Data Holder.

If a call fails​

If the Data Holder returns an error, VTT shows An Error Occurred, with the VTT build, the URL, the HTTP status, the error message and the request. Click Copy issue report information to copy them for a support ticket.