Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

136 lines (112 sloc) 3.897 kb
layout weight title navigation
page
0
Customer Timezone
show
true

{% anchor h2 %} List Timezones {% endanchor %}

This will return a list of all available timezones.

{% parameters list %} {% parameter 'method' 'Yes' 'Must be set to timezone' 'Allows you to access timezone functionality' %} {% parameter 'task' 'Yes' 'Must be set to list' 'This will allow you to retrieve the timezones' %} {% endparameters %}

{% apiexample list GET https://api.sendgrid.com/apiv2/reseller.manage api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=list %} {% response json %} [ { "display": "GMT+02:00", "name": "Athens, Bucharest", "offset": -7200, "timezone": "Europe/Bucharest" }, { "display": "GMT-00:00", "name": "Dublin, Lisabon, London, Edinburgh", "offset": 0, "timezone": "Europe/London" }, { "display": "GMT-08:00", "name": "Pacific Time, US & Canada", "offset": 28800, "timezone": "America/Los_Angeles" } ] {% endresponse %} {% response xml %} GMT+02:00 Athens, Bucharest -7200 Europe/Bucharest GMT-00:00 Dublin, Lisabon, London, Edinburgh 0 Europe/London GMT-08:00 Pacific Time, US Canada 28800 America/Los_Angeles

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Get Timezone {% endanchor %}

This API call will return the timezone currently set for your customer.

{% parameters get %} {% parameter 'user' 'Yes' 'Customer must be registered under your account' 'The customer for which we are retrieving timezone' %} {% parameter 'method' 'Yes' 'Must be set to timezone' 'Allows you to access timezone functionality' %} {% parameter 'task' 'Yes' 'Must be set to get' 'This will allow you to retrieve the timezone for your customer' %} {% endparameters %}

{% apiexample get GET https://api.sendgrid.com/apiv2/reseller.manage api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=get&user=customer@example.com %} {% response json %} { "name": "Central Time, US & Canada", "offset": 21600, "timezone": "America\/Chicago", "display": "GMT-06:00" } {% endresponse %} {% response xml %} Central Time, US Canada 21600 America/Chicago GMT-06:00

{% endresponse %} {% endapiexample %}


{% anchor h2 %} Edit Timezone {% endanchor %}

This API call will allow you to set timezone for your customer

{% parameters edit %} {% parameter 'user' 'Yes' 'Customer must be registered under your account' 'The customer for which we are edit the timezone' %} {% parameter 'method' 'Yes' 'Must be set to timezone' 'Allows you to access timezone functionality' %} {% parameter 'task' 'Yes' 'Must be set to set' 'This will allow you to set the timezone for your customer' %} {% parameter 'timezone' 'Yes' 'Must be an timezone. Ex: America/Los_Angeles' 'This will be the new timezone from List Timezones' %} {% endparameters %}

{% apiexample edit POST https://api.sendgrid.com/apiv2/reseller.manage api_user=your_sendgrid_username&api_key=your_sendgrid_password&method=timezone&task=set&user=customer@example.com&timezone=America/Los_Angeles %} {% response json %} { "message": "success" } {% endresponse %} {% response xml %} success

{% endresponse %} {% endapiexample %}

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