Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

74 lines (58 sloc) 2.207 kB
layout weight title seo navigation
page
0
Retrieving As-You-Go Usage
robots
NOINDEX, FOLLOW
show
true

{% warning %} This feature is deprecated. {% endwarning %}

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

Parameter Required Description
task Yes Must be set to current .

XML Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.billing.xml {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&number=2010010001&task=curren {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} usage>2010010001001234562010-09-01 00:00:00Unpaid10016.95Recurring Bill02010-08-012010-08-31user4@example.comExample Package01007.95</usage {% endcodeblock %}

JSON Call

{% requestblock %}

{% requesturl POST %}https://api.sendgrid.com/api/distributor.billing.json {% endrequesturl %}

{% requestdata Data POST %}api_user=your_sendgrid_username&api_key=your_sendgrid_password&number=2010010001&task=curren {% endrequestdata %}

{% endrequestblock %}

Response

{% codeblock %} {"number":"201001000100","credits":"123456","date_invoiced":"2010-09-01 00: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} {% endcodeblock %}

Jump to Line
Something went wrong with that request. Please try again.