Retrieve the prepared suppression file
const url = 'https://mailer-api.optizmo.net/accesskey/getfile/m-a12-a92b82cd3848ef7810d9ef0e?dcma=<dcma>&token=<token>';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://mailer-api.optizmo.net/accesskey/getfile/m-a12-a92b82cd3848ef7810d9ef0e?dcma=<dcma>&token=<token>'Use the download_link returned by
Prepare a suppression list download
to download the suppression list ZIP file. That link already has the
token and dcma query parameters embedded — make a GET to it as-is
rather than constructing the request yourself.
Note: Requests must handle and follow 3XX responses. For example curl requests should use the
-L, --locationflag.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The Mailer Access Key (MAK) from the download_link. Use the value
provided in the prepare-download response rather than constructing
it yourself.
Query Parameters
Section titled “Query Parameters ”Opaque download token supplied in the download_link. Use the value
from that link as-is.
Responses
Section titled “ Responses ”Returned when the file cannot be retrieved — for example an invalid
token or dcma, or when the download has not been prepared yet. The
body is a JSON error response whose error_code identifies the
problem.
Error response returned when a request fails.
object
Always error for a failed response.
Error code.
Title of the error.
Detailed description of error with help on how to resolve it.
Examples
File requested before it was prepared
{ "result": "error", "error_code": "download_not_prepared", "error": "This list has not been prepared for download.", "help": "Prepare the file first by calling GET /accesskey/download/{mailer_access_key}?token=YOUR_TOKEN, then request the download_link returned in that response (a /accesskey/getfile URL that includes a 'dcma' token)."}The suppression file is ready. The response redirects (via the
Location header) to a signed URL where the ZIP file can be
downloaded. Requests must handle and follow 3XX responses.
For example curl requests should use the -L, --location flag.
Examples
A redirect to the prepared file
You should be redirected to the download file at https://...Headers
Section titled “Headers ”Signed URL the suppression list ZIP can be downloaded from.