Retrieve your invoice information.


Retrieve Invoice Numbers

Return an array of invoice numbers to your account.

Parameter Required Description
start_date No Must be in YYYY-mm-dd format. This is the start date to begin your invoice search from.
end_date No Must be in YYYY-mm-dd format and also include a start_date in the API call. This is the end date you wish to end your invoice search from.
status No Must be either paid, unpaid, refunded, deferred, canceled. This is used to specify what kind of invoice you would like returned.

Call

1
https://sendgrid.com/api/billing.list.xml?api_user=username&api_key=secureSecret&status=pai

Response

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="ISO-8859-1"?>

<invoices>
   <invoice>
      <number>2010010001</number>
   </invoice>
   <invoice>
      <number>2010010002</number>
   </invoice>
</invoices>

Call

1
https://sendgrid.com/api/billing.list.json?api_user=username&api_key=secureSecret&status=pai

Response

1
2
3
4
5
6
7
8
[
  {
    "number": "2010010001"
  },
  {
    "number": "2010010002"
  }
]

Retrieve Invoices

Return an array of invoices.

Parameter Required Description
start_date No Must be in YYYY-mm-dd format. This is the start date to begin your invoice search from.
end_date No Must be in YYYY-mm-dd format and also include a start_date in the API call. This is the end date you wish to end your invoice search from.
status No Must be either paid, unpaid, refunded, deferred, canceled. This is used to specify what kind of invoice you would like returned.

Call

1
https://sendgrid.com/api/billing.get.xml?api_user=username&api_key=secureSecret&status=pai

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="ISO-8859-1"?>

<invoices>
   <invoice>
      <number>2010010001</number>
      <package>Basic Package</package>
      <credits>10000000</credits>
      <date_invoiced>2010-01-01 00:00:00</date_invoiced>
      <status>Paid</status>
      <amount>100</amount>
      <additional_charges>0</additional_charges>
      <overage>10</overage>
      <type>Recurring Bill</type>
      <prorated>0</prorated>
      <start_date>2009-12-01</start_date>
      <end_date>2009-12-31</end_date>
      <final_amount>110</final_amount>
   </invoice>
</invoices>

Call

1
https://sendgrid.com/api/billing.get.json?api_user=username&api_key=secureSecret&status=pai

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{
  "number": "2010010001",
  "package": "Basic Package",
  "credits": 10000000,
  "date_invoiced": "2010-01-01 00:00:00",
  "status": "Paid",
  "amount": 100,
  "additional_charges": 0,
  "overage": 10,
  "type": "Recurring Bill",
  "prorated": 0,
  "start_date": "2009-12-01",
  "end_date": "2009-12-31",
  "final_amount": 110
}