Generate an SMAK
const url = 'https://one.optizmo.net/api.cgi?ref=pqmpg&access_link=m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387&submailer_id=AFF-8821&check_hash=7583f2e660997b8d1c224a8d74260c51&return_format=csv&test_only=success&action=submailer_gen%3Fref%3Dpqmpg';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://one.optizmo.net/api.cgi?ref=pqmpg&access_link=m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387&submailer_id=AFF-8821&check_hash=7583f2e660997b8d1c224a8d74260c51&return_format=csv&test_only=success&action=submailer_gen%3Fref%3Dpqmpg'Issues an SMAK (sm-..., the key of an affiliate on a linked list) and Opt-Out link for one of your affiliates on a campaign that another
account gave you access to, without creating any records in a SUPPRESS account of your own. The affiliate
downloads the source’s list with the key, and opt-outs collected through the link are stored in the source’s
list and attributed to the affiliate.
Send the access key you were given as access_link and your id for the affiliate as submailer_id. Repeating
the request for the same key and id returns the same key. No onid is needed.
A campaign move that changes the key the campaign’s linked list chain hangs from (onto or off a linked list, or
onto a list linked from a different key) replaces this key. Optizmo emails the affiliate its replacement key
directly, capped at once per affiliate per campaign per 24 hours unless the key the last such email carried has
itself since been replaced, and only once the replacement is itself confirmed servable; presenting the replaced
key to this action afterwards answers failed,The 'access_link' provided has expired, the same as any other
expired key. A move between two standard lists leaves the key as it is. A later move back to the original shape
restores the original key and takes the replacement out of service, again by email; there is no need to call
this action again to pick up either change.
Values in the check_hash
action, ref, access_link, submailer_id.
Failures
| Response | Meaning |
|---|---|
failed,Invalid 'access_link' type |
The value is not an m-... or sm-... key. |
failed,Failed integrity check on 'access_link' |
The key does not belong to any campaign. |
failed,The 'access_link' provided has expired |
The source has stopped, expired or deleted the campaign, or revoked the affiliate’s access by hand: ask the issuing account for a current key. For a key a move replaced (see above), the replacement was already sent by email; presenting the old key after that still answers this, but there is nothing to ask the issuing account for. |
failed,Invalid Access Key / failed,Failed Integrity Check |
The key could not be used to issue the SMAK. |
failed,The opt-out link for this access key could not be created just now. Please retry. |
A read that the affiliate’s Opt-Out link needs failed. Nothing was written for the link. |
failed,The opt-out link for this access key could not be created, because the linked list chain it belongs to records into no live Opt-Out List. |
The linked list chain’s source link has no live list left for a new Opt-Out link to record into. Contact support. |
failed,Check Hash Failed. |
check_hash does not match. |
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Your tracking platform’s Reference Code (PRC), issued by Optizmo when the integration was set up.
Example
pqmpgA Mailer Access Key (MAK, m-...) or an SMAK (sm-...) issued to this account by another SUPPRESS
account for one of its campaigns. The full access URL or the key on its own is accepted; surrounding
whitespace is removed.
Example
m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387Your platform’s id for the affiliate on the source campaign. Sending the same id for the same key returns the same SMAK.
Example
AFF-8821MD5 hex digest of the request’s hashed values, in the order they are listed for this action, followed by your Access Key (PAK). See Authentication for the rules.
Example
7583f2e660997b8d1c224a8d74260c51Sets the format of the success or failed answer on the synchronisation and status actions, and of the
failure answer on every action. It does not change the success answer of the report and list actions, which
is always their own XML document, or of the actions that answer with a page or a redirect. csv, xml and
json are the only recognised values; anything else is answered in the csv format, the default. Not
included in the check_hash.
Only honoured by Sync an advertiser, list, campaign and affiliate,
Sync onto a linked list,
Generate an SMAK,
Account report, Get Opt-Out Lists,
Advertiser and list settings page and
Add opt-outs page; every other action ignores it and runs as normal, so
sending it there does not stop the real change. On the actions that honour it, once the request has
authenticated, it answers without creating or changing anything, and before the page renders on the two
pages actions: failed,Test Failed Output for test_only=failed everywhere it is honoured. For
test_only=success: the sync actions return a fixed key pair
(https://TESTONLY.optizmo.net/m-test-a00-410324axc3e1eb7a and
https://TESTONLY.optoutsystem.net/o-test-a00-546c4dxa10df19b8) in place of real ones, in the same body
shape a real success with keys would have; the account report returns that same fixed key pair, not a
report document; Get Opt-Out Lists returns a fixed two-entry list document; and the two pages actions
return a bare success with no keys, the same shape as a real one with no campaign_id/mailer_id pair.
Not included in the check_hash.
Responses
Section titled “ Responses ”The request was processed. The body says whether it succeeded; failures are also returned with HTTP 200.
success,<mailer_url>,<optout_url>: the affiliate’s access URL and Opt-Out link. The access URL’s last path segment is a MAK (m-...) on a standard list or an SMAK (sm-...) on a linked list.success,<mailer_url>,: an access URL with no Opt-Out link, a deliberate trailing comma rather than a shorter body.success: the records were created or updated, but nocampaign_idandmailer_idpair was sent, so no keys were issued.failed,<message>: nothing was changed by the failing step. The messages are listed with each action.
A client_sub_sync call healed onto a replacement key (see
Sync onto a linked list) carries a fourth value, access_link, and is
never served from the cache; every other response served from the cache carries the header
X-Status: cached.
Examples
Access key and Opt-Out link issued
success,https://www.affiliateaccesskey.com/m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387,https://www.optout-tbjt.net/o-tbjt-j53-eeedade91ab3043dea9edcc260d983efclient_sub_sync healed onto a replacement key
success,https://www.affiliateaccesskey.com/sm-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387,https://www.optout-tbjt.net/o-tbjt-j53-eeedade91ab3043dea9edcc260d983ef,sm-wnzp-k64-a1c2e3f4b5a6d7c8e9f0a1b2c3d4e5f6Records synced, no keys requested
successFailure
failed,Check Hash Failed.Examples
Access key and Opt-Out link issued
<?xml version="1.0" encoding="utf-8"?><output><result>success</result><data><mailer_url>https://www.affiliateaccesskey.com/m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387</mailer_url><optout_url>https://www.optout-tbjt.net/o-tbjt-j53-eeedade91ab3043dea9edcc260d983ef</optout_url></data></output>Failure
<?xml version="1.0" encoding="utf-8"?><output><result>failed</result><error>Check Hash Failed.</error></output>object
object
Present when result is success and either keys were issued or (client_sub_sync only)
access_link was, even with no keys of its own to issue.
object
The affiliate’s access URL. The last path segment is the access key (m-... or sm-...).
The affiliate’s Opt-Out link for this campaign.
Present only on a client_sub_sync call presenting an access_link a campaign move replaced,
that this request healed onto its replacement: the current key, in the same m-.../sm-... form
as access_link itself. Store it and send it as access_link from then on. Absent from every
other response, including every client_sync and submailer_gen response.
Present when result is failed.
Examples
Access key and Opt-Out link issued
{ "output": { "result": "success", "data": { "mailer_url": "https://www.affiliateaccesskey.com/m-tbjt-j53-b4f8dfbb7f76d3bd0fd92a9f39ba5387", "optout_url": "https://www.optout-tbjt.net/o-tbjt-j53-eeedade91ab3043dea9edcc260d983ef" } }}Failure
{ "output": { "result": "failed", "error": "Check Hash Failed." }}The system is in maintenance mode. Retry later. The answer follows return_format: csv (also the answer to
a return_format that is neither xml nor json) as text/plain, xml as text/xml, json as
application/json.
Example
failed,System currently under maintenanceExample
<?xml version="1.0" encoding="utf-8"?><output><result>failed</result><error>System currently under maintenance</error></output>object
object
Present when result is success. This action issues no keys, so both values are null.
object
Present when result is failed.
Example
{ "output": { "result": "failed", "error": "System currently under maintenance" }}