2016-03-15 06:53:06 +00:00
|
|
|
|
{% extends "withnav_template.html" %}
|
|
|
|
|
|
{% from "components/email-message.html" import email_message %}
|
|
|
|
|
|
{% from "components/sms-message.html" import sms_message %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block page_title %}
|
2016-03-21 14:31:01 +00:00
|
|
|
|
API integration – GOV.UK Notify
|
2016-03-15 06:53:06 +00:00
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
|
|
|
|
|
|
<h1 class="heading-large">
|
|
|
|
|
|
API integration
|
|
|
|
|
|
</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="grid-row">
|
|
|
|
|
|
<div class="column-three-quarters">
|
|
|
|
|
|
|
|
|
|
|
|
{% if 'email' == template.template_type %}
|
|
|
|
|
|
{{ email_message(
|
|
|
|
|
|
template.subject,
|
|
|
|
|
|
template.formatted_as_markup,
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% elif 'sms' == template.template_type %}
|
|
|
|
|
|
{{ sms_message(
|
|
|
|
|
|
template.formatted_as_markup,
|
|
|
|
|
|
) }}
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
|
You can send this message from your existing apps or systems by
|
|
|
|
|
|
connecting them to GOV.UK Notify.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
You’ll need to work with a developer to do this.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="heading-small">
|
|
|
|
|
|
Example payload for this template
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
{{payload|syntax_highlight_json}}
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="heading-small">
|
|
|
|
|
|
Endpoint
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="highlight" style="background: #f8f8f8">
|
|
|
|
|
|
<pre style="line-height: 125%">
|
2016-03-21 14:31:01 +00:00
|
|
|
|
{{- 'POST https://api.notifications.service.gov.uk/notifications/{}'.format(
|
2016-03-15 06:53:06 +00:00
|
|
|
|
template.template_type
|
|
|
|
|
|
) -}}
|
|
|
|
|
|
</pre>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
2016-03-21 14:31:01 +00:00
|
|
|
|
<br />See the <a href="{{ url_for(".documentation") }}">developer documentation</a> for full details.
|
2016-03-15 06:53:06 +00:00
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|