Using the API to send transactional push notifications
It is possible to use the Ortto API to send SMS messages by using a dedicated transactional push notification API.
Mobile push notifications are only available on selected Ortto plans.
HTTP method and request resources
Requests to send transactional push notifications in Ortto are submitted as a single POST method to the following URL:
https://api.ap3api.com/v1/transactional/send-pushNOTE: Ortto customers who have their instance region set to Australia or Europe will need to use specific service endpoints relative to the region:
Australia: https://api.au.ap3api.com/ Europe: https://api.eu.ap3api.com/For example: https://api.eu.ap3api.com/v1/<entity/endpoint>
All other Ortto users will use the default service endpoint (https://api.ap3api.com/).
Path and query parameters
This endpoint takes no additional path and/or query parameters.
Headers
This endpoint requires a custom API key and content type (
application/jsonfor the request body) in the header of the request:
X-Api-Key: CUSTOM-PRIVATE-API-KEYContent-Type: application/jsonSending transactional push notifications
Ortto supports sending transactional push notifications via the API. You might want to use this feature to notify users of important updates, such as order status changes, new messages, or system alerts, directly to their devices in real-time.
Example of sending a single push notification
The example below sends a single transactional email to the contact ID
0065df3747712d384818ef00json
{ "async": false, "pushes": [ { "asset": { "push_name": "Example", "title": "Hi {{ people.first-name }}", "message": "Example transactional push notification", "image": "https://avatars.githubusercontent.com/u/47131913", "primary_action": { "title": "Primary", "link": "https://google.com" }, "secondary_actions": [ { "title": "youtube", "link": "https://youtube.com" }, { "title": "google", "link": "https://google.com" } ], "platforms": ["web"] }, "contact_id": "0065df3747712d384818ef00" } ] }Asset options for transactional push notifications
push_nameThe campaign name. This can be any name you like, the recipient won’t see it.
titleThe title of the push notification, which will be publicly visible.
messageThe body message of the push notification.
imageThe URL of the image that will be displayed.
primary_actionTriggered when the user clicks the notification, consisting of a
titleandlinkparameter.
secondary_actionsTriggered when the user clicks the notification, consisting of a
titleandlinkparameter. You can add up to 4 secondary actions.
platformsPlatforms where the push notification will appear. Supported values:
web,ios,android. Mobile push notifications are only available on selected Ortto plansValidation criteria
Below you can find the validation criteria for this API endpoint.
push_name,title, andmessagemust not be empty.platformsmust contain at least one of the three supported values:web,ios, orandroid(non-matching options are ignored). The URL in theimageparameter must be valid.primary_actionmust have a valid link provided for each platform listed inplatforms(additional platforms are ignored). Eachsecondary_actionmust have a valid link for everyplatformprovided.