Get a specific invoice

This call retrieves information about a selected invoice, including the costs for analysis and storage, and the invoice period.

Use the call to list invoices to retrieve the invoice_ids for a specified billing group.

Request

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

Example request

GET /v2/billing/invoices/7779079019 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/7779079019"
from sevenbridges import Api

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

# send GET request to SB API
invoice = api.invoices.get(id='7779079019')

print(invoice.invoice_period.from_, invoice.invoice_period.to)
print(invoice.total.currency, invoice.total.amount)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

invoice_id

The ID of the invoice you are querying.

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/7779079019",
    "invoice_id": "7779079019",
    "pending": false,
    "approval_date": "2015-03-26T00:00:00Z",
    "invoice_period": {
        "from": "2015-03-26T13:55:26Z",
        "to": "2015-03-27T00:00:00Z"
    },
    "analysis_costs": {
        "currency": "USD",
        "amount": "1.64"
    },
    "storage_costs": {
        "currency": "USD",
        "amount": "0.00"
    },
    "total": {
        "currency": "USD",
        "amount": "1.64"
    }
}