Skip to content
This repository has been archived by the owner on Aug 27, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop' into mako-3486-add-asm-groups-to-display
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernier committed Sep 28, 2015
2 parents 53dc59c + 9f671d9 commit a33dd48
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
language: ruby
sudo: false
cache: bundler
rvm:
- 2.1
branches:
Expand Down
9 changes: 4 additions & 5 deletions _config.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ highlighter: pygments # default python pygments have been replaced by pygments.r

titlecase: true # Converts page and post titles to titlecase

navigation: #creates a default for showing navigation unless otherwise overridden in individual file's frontmatter
show: true

# list each of the sidebar modules you want to include, in the order you want them to appear.
# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
default_asides: [asides/page_navigation.html]
Expand All @@ -54,14 +51,16 @@ asset_pipeline:
indextank_api_url: http://:[email protected] #get an index URL at indexden.com
indextank_index: docs #set this to the index name you set on indexden.com

# these values are applied as regular expressions
# indextank_excludes: [index.html, 404.html, ^/secret/]
# language
languages: ["en", "es"]
exclude_from_localizations: ["javascript", "images", "css"]

#pages we link to from many places, change it once here. Must be added to content as {{root_url}}{{site.thisVariable}} in links
password_requirements: "/Classroom/Basics/password.html"
app_url: "https://app.sendgrid.com"
blog_url: "https://sendgrid.com/blog"
marketing_email_url: "https://sendgrid.com/newsletter"
marketing_campaigns_url: "https://sendgrid.com/marketing_campaigns"
pricing_url: "https://sendgrid.com/pricing"
site_url: "https://sendgrid.com"
support_url: "https://support.sendgrid.com"
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"bootstrap": "~3.1.1",
"jquery-ui": "~1.10.4",
"modernizr": ">=2.7.2",
"modernizr": "=2.7.2",
"jstorage": "~0.4.8",
"jsrender": "~1.0.0-beta",
"highlightjs": "~8.0.0",
Expand Down
17 changes: 17 additions & 0 deletions source/API_Reference/SMTP_API/scheduling_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,20 @@ To schedule a send request for individual recipients; use `send_each_at` to send
]
}
{% endcodeblock %}

To allow for the cancellation of a scheduled send, you must include a batch id with your send. The endpoint for cancellation needs a batch id to cancel with. To generate a valid batch id, use the batch id generation endpoint

<h4>Example of including a batch_id</h4>
{% codeblock lang:json %}
{
"to": [
"<[email protected]>",
"[email protected]",
"[email protected]"
],
"send_at": [
1409348513
],
"batch_id": "MWQxZmIyODYtNjE1Ni0xMWU1LWI3ZTUtMDgwMDI3OGJkMmY2LWEzMmViMjYxMw"
}
{% endcodeblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ HTTP/1.1 201 OK
{
"id":103,
"name": "Product Suggestions",
"description": "Suggestions for products our users might like.",
"last_email_sent_at": "NOT IMPLEMENTED"
"description": "Suggestions for products our users might like."
}
{% endv3response %}
{% endapiv3example %}
Expand All @@ -53,14 +52,12 @@ Retrieve all suppression groups associated with the user.
"id": 100,
"name": "Newsletters",
"description": "Our monthly newsletter.",
"last_email_sent_at": "2014-09-04 01:34:43",
"unsubscribes": 400
},
{
"id": 101,
"name": "Alerts",
"description 2": "Emails triggered by user-defined rules.",
"last_email_sent_at": "2012-11-06 09:37:33",
"unsubscribes": 1
}
]
Expand All @@ -80,7 +77,6 @@ Get information on a single suppression group.
"id": 100,
"name": "Newsletters",
"description": "Our monthly newsletter.",
"last_email_sent_at": "2014-09-04 01:34:43",
"unsubscribes": 400
}
{% endv3response %}
Expand All @@ -105,8 +101,7 @@ HTTP/1.1 201 OK
{
"id":103,
"name": "Item Suggestions",
"description": "Suggestions for items our users might like.",
"last_email_sent_at": "2014-09-05 03:14:15"
"description": "Suggestions for items our users might like."
}
{% endv3response %}
{% endapiv3example %}
Expand Down
4 changes: 2 additions & 2 deletions source/API_Reference/Web_API_v3/Stats/categories.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ navigation:
Category Stats provide all of your user's email statistics for your categories.

{% anchor h2 %}
GET
GET statistics
{% endanchor %}

Gets email statistics for the given categories. If you don't pass any parameters, the endpoint will return a sum for each category 10 at a time.
Expand Down Expand Up @@ -130,7 +130,7 @@ HTTP/1.1 200
* * * * *

{% anchor h2 %}
GET
GET Sums
{% endanchor %}

Gets the total sums of each email statistic metric for all categories over the given date range.
Expand Down
136 changes: 136 additions & 0 deletions source/API_Reference/Web_API_v3/cancel_scheduled_send.apiblueprint
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
layout: page
weight: 0
title: Cancel Scheduled Sends
navigation:
show: true
---

FORMAT: 1A

# Cancellation of Scheduled Sends
Cancelling scheduled send

# Group Batch IDs

If you set the [SMTPAPI header batch_id]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html),
it allows you to then cancel a scheduled send based on that batch_id by calling the [Cancel Scheduled Send endpoint]({{root_url}}/API_Reference/Web_API_v3/cancel_scheduled_send.html#Cancel-Scheduled-Sends)

## Batch ID Generation [/mail/batch]
Generate a new Batch ID to associate with scheduled sends

### Generate Batch ID [POST]

+ Request


+ Response 200 (application/json)

+ Body

{
"batch_id": "YOUR_BATCH_ID"
}

## Validate Batch ID [/mail/batch/]

### Validate Batch ID [GET]

Validate whether or not a batch id is valid

+ Request

+ Response 200 (application/json)

+ Body

{
"batch_id": "YOUR_BATCH_ID"
}

+ Response 400 (application/json)

+ Body

{
"errors":[{"message": "invalid batch id"}]
}


# Group Cancel Scheduled Sends

The Cancel Scheduled Sends feature allows the customer to cancel a
scheduled send based on a [Batch ID]({{root_url}}/API_Reference/SMTP_API/scheduling_parameters.html)
included in the SMTPAPI header.

## Manage user scheduled sends [/user/scheduled_send]

A CRUD for managing user scheduled sends

### Retrieve scheduled send [GET]

Get cancel/paused scheduled send information.

+ Request
+ Body

{
"batch_id": "YOUR_BATCH_ID"
}

+ Response 200 (application/json)

+ Body

{
"batch_id": "YOUR_BATCH_ID",
"status": "cancel"
}



### Update user scheduled send information [PATCH]

Update the status of a scheduled send.

+ Request

+ Body

{
"batch_id": "YOUR_BATCH_ID",
"status": "pause"
}

+ Response 204 (application/json)

+ Response 404

### Cancel or pause a scheduled send [POST]

Cancel or pause a scheduled send. If the maximum number of cancellations/pauses are added, HTTP 400 will
be returned.

+ Request

+ Body

{
"batch_id": "YOUR_BATCH_ID",
"status": "pause"
}

+ Response 201 (application/json)

+ Response 400

## delete user scheduled send cancellation [/user/scheduled_send/{batch_id}]

### Delete a cancellation or pause of a scheduled send [DELETE]
Delete the cancellation/pause of a scheduled send.

+ Request

+ Response 204

+ Response 404
5 changes: 4 additions & 1 deletion source/Integrate/Code_Examples/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import com.sendgrid.*;

public class SendGridExample {
public static void main(String[] args) {
SendGrid sendgrid = new SendGrid(api_user, api_key);

SendGrid sendgrid = new SendGrid(api_key); // recommended
// OR
SendGrid sendgrid = new SendGrid(api_user, api_password);

SendGrid.Email email = new SendGrid.Email();

Expand Down
2 changes: 1 addition & 1 deletion source/User_Guide/Suppressions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@
<strong><a href="{{root_url}}/User_Guide/Suppressions/global_unsubscribes.html">Global Unsubscribes</a></strong> - When a user unsubscribes from everything you might email them.
</p>
<p>
<strong><a href="{{root_url}}/User_Guide/Suppressions/global_unsubscribes.html">Group Unsubscribes</a></strong> - When a user unsubscribes from a specific group of your emails.
<strong><a href="{{root_url}}/User_Guide/Suppressions/group_unsubscribes.html">Group Unsubscribes</a></strong> - When a user unsubscribes from a specific group of your emails.
</p>

0 comments on commit a33dd48

Please sign in to comment.