Retrieve invoices/usages from end users before your scheduled billing date.

Parameter Required Description
task Yes Must be set to current.
Parameter Value Requirements Description

Call

POST https://api.sendgrid.com/apiv2/reseller.billing.json
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&number=2010010001&task=curren

Response

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "number": "201001000100",
  "credits": 123456,
  "date_invoiced": "2010-09-0100:00:00",
  "status": "Unpaid",
  "amount": 1001,
  "overage": 6.95,
  "type": "Recurring Bill",
  "prorated": 0,
  "start_date": "2010-08-01",
  "end_date": "2010-08-31",
  "username": "user4@example.com",
  "package": "Example Package",
  "additional_charges": 0,
  "final_amount": 1007.95
}

Call

POST https://api.sendgrid.com/apiv2/reseller.billing.xml
POST Data api_user=your_sendgrid_username&api_key=your_sendgrid_password&number=2010010001&task=curren

Response

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

<usage>
   <invoices>
      <invoice>
         <number>201001000100</number>
         <credits>123456</credits>
         <date_invoiced>2010-09-01 00:00:00</date_invoiced>
         <status>Unpaid</status>
         <amount>1001</amount>
         <overage>6.95</overage>
         <type>Recurring Bill</type>
         <prorated>0</prorated>
         <start_date>2010-08-01</start_date>
         <end_date>2010-08-31</end_date>
         <username>user4@example.com</username>
         <package>Example Package</package>
         <additional_charges>0</additional_charges>
         <final_amount>1007.95</final_amount>
      </invoice>
   </invoices>
</usage>