Skip to content

Instantly share code, notes, and snippets.

View MamaiRachid's full-sized avatar
🏠
Working from home

Rachid Mamai MamaiRachid

🏠
Working from home
  • Paris
View GitHub Profile
@MamaiRachid
MamaiRachid / gist:5a2f9942bb392c4c14dcfd088057e753
Created November 25, 2019 14:30
/interaction/v1/interactions/?name=JOURNEY_NAME
{
"count": 1,
"page": 1,
"pageSize": 50,
"links": {},
"items": [
{
"id": "59978a5f-f503-489e-b44c-xxxxxxxxxxxx",
"key": "3190210c-7f4f-5b06-498b-xxxxxxxxxxxx",
"name": "JOURNEY_NAME",
@MamaiRachid
MamaiRachid / gist:a8502e87e811f7616e0e9ac9b3f939f0
Created November 25, 2019 14:56
/interaction/v1/interactions/journeyhistory/search
{
"count": 107,
"page": 1,
"pageSize": 100,
"links": {},
"items": [
{
"id": "2157XXXX",
"mid": 50000XXXX,
"eventId": "462f6eae-e39a-4c3f-8da4-xxxxxxxxxxxxx",
@MamaiRachid
MamaiRachid / gist:af4218679598546ffcf05fc4fca4ae4d
Created November 25, 2019 15:09
oAuth token API call payload
{
"grant_type": "client_credentials",
"client_id": "85z0pydo1ykxxxxxxxxxxxx",
"client_secret": "jQ1o2JmRvxxxxxxxxxxxx",
"scope": "journeys_read list_and_subscribers_read",
"account_id": "5000xxxxx"
}
@MamaiRachid
MamaiRachid / gist:862e700195ec0eff9b960c4196833b2e
Created November 25, 2019 15:15
Get Journey’s Definition ID - Endpoint
GET interaction/v1/interactions/?name=JOURNEY_NAME
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<fueloauth xmlns="http://exacttarget.com">{{access_token}}</fueloauth>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
<Options/>
<Objects xsi:type="Automation">
<Client>
https://mc.s50.exacttarget.com/rest/beta/automations/notifications/AUTOMATION_ID/
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1">
<wsse:UsernameToken>
<wsse:Username>username</wsse:Username>
<wsse:Password>password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
{
"programId": "TnJZZGdzNjVjRW1zX0lhVjhrNkxPxxxxxx",
"workers": [
{
"body": "",
"channelType": "1",
"programId": "TnJZZGdzNjVjRW1zX0lhVjhrNkxPxxxxxx",
"definition": "rachid.mamai@xxxx.com",
"notificationType": "Complete"
},
%%=ContentBlockbyKey("4bd9cced-f9c5-49fe-927a-xxxxxxx")=%%
@MamaiRachid
MamaiRachid / gist:e3eb5b9d3da85695402a383b16af0b7c
Created November 25, 2019 15:17
Get journey's history by filtering via DefinitionID - Endpoint
POST /interaction/v1/interactions/journeyhistory/search