Verify an ONID
const url = 'https://one.optizmo.net/api.cgi?ref=pqmpg&onid=662b824d577c74b57bf1c4fc647b79c7&check_hash=7583f2e660997b8d1c224a8d74260c51&return_format=csv&action=verify_onid%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&onid=662b824d577c74b57bf1c4fc647b79c7&check_hash=7583f2e660997b8d1c224a8d74260c51&return_format=csv&action=verify_onid%3Fref%3Dpqmpg'Checks that an ONID entered into your platform belongs to a SUPPRESS account, and that your credentials are accepted. Use it when an account holder connects your platform to their account.
Values in the check_hash
action, ref, onid.
Failures
| Response | Meaning |
|---|---|
failed,Value for 'onid' does not exist in our system |
No account has this ONID. |
failed,Tracking system does not exist. |
ref is not a registered Reference Code. |
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
pqmpgThe ONID of the SUPPRESS account the request is for. The account holder finds it on the Account Settings page in SUPPRESS under Affiliate Tracking System, and copies it into your platform.
Example
662b824d577c74b57bf1c4fc647b79c7MD5 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.
Responses
Section titled “ Responses ”The request was processed. The body says whether it succeeded; failures are also returned with HTTP 200.
Examples
successfailed,Invalid status_change valueExamples
<?xml version="1.0" encoding="utf-8"?><output><result>success</result><data><mailer_url></mailer_url><optout_url></optout_url></data></output><?xml version="1.0" encoding="utf-8"?><output><result>failed</result><error>Invalid status_change value</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.
Examples
{ "output": { "result": "success", "data": { "mailer_url": null, "optout_url": null } }}{ "output": { "result": "failed", "error": "Invalid status_change value" }}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" }}