List invoices

This call returns a list of invoices, with information about each, including whether or not the invoice is pending and the billing period it covers.

The call returns information about all your available invoices, unless you use the query parameter bg_id to specify the ID of a particular billing group, in which case it will return the invoice incurred by that billing group only.

Request

https://api.sbgenomics.com/v2/billing/invoices
https://eu-api.sbgenomics.com/v2/billing/invoices

Example request

GET v2/billing/invoices HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl  -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X GET https://api.sbgenomics.com/v2/billing/invoices -H "Accept: application/json"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

# send GET request to SB API
invoices = api.invoices.query()

for invoice in invoices:
    print(invoice.id, invoice.invoice_period.from_, invoice.invoice_period.to)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Platform authentication token.

Query parameters

Name

Data type

Description

fields

string

Selector specifying a subset of fields to include in the response.

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
    "href": "https://api.sbgenomics.com/v2/billing/invoices/",
    "items": [
        {
            "href": "https://api.sbgenomics.com/v2/billing/invoices/7779079019",
            "invoice_id": "7779079019",
            "pending": false,
            "invoice_period": {
                "from": "2015-03-26T13:55:26Z",
                "to": "2015-03-27T00:00:00Z"
            }
        },
        {
            "href": "https://api.sbgenomics.com/v2/billing/invoices/7443918961",
            "invoice_id": "7443918961",
            "pending": false,
            "invoice_period": {
                "from": "2015-03-27T00:00:00Z",
                "to": "2015-03-30T00:00:00Z"
            }
        }
    ]
}