Logo
Fastly Developer Hub API Documentation

Get month-to-date billing estimate

GET {{fastly_url}}/billing/v2/account_customers/{{customer_id}}/mtd_invoice?month&year

Get the current month-to-date estimate. This endpoint has two different responses. Under normal circumstances, it generally takes less than 5 seconds to generate but in certain cases can take up to 60 seconds. Once generated the month-to-date estimate is cached for 4 hours, and is available the next request will return the JSON representation of the month-to-date estimate. While a report is being generated in the background, this endpoint will return a 202 Accepted response. The full format of which can be found in detail in our billing calculation guide. There are certain accounts for which we are unable to generate a month-to-date estimate. For example, accounts who have parent-pay are unable to generate an MTD estimate. The parent accounts are able to generate a month-to-date estimate but that estimate will not include the child accounts amounts at this time.

Authorization: API token with at least Billing permissions.

 

Body PARAM

Key Datatype Required Description 
month
null 2-digit month.
year
null 4-digit year.



HEADERS

Key Datatype Required Description 
Host
string
Accept
string




RESPONSES

status



Curl
curl -X GET 'https://api.fastly.com/billing/v2/account_customers//mtd_invoice?month&year?month=&year=' -H 'Host: api.fastly.com' -H 'Accept: application/json'

ENDPOINTS