Email Optout Queue

Knowledge Base Home

Search the Omeda Knowledge Base

Summary

The OptOut Queue API allows our client to OptOut their subscribers or customers to their email deployments at the client, brand, and deployment type level. All 3 OptOut levels can be submitted in one OptOut Queue API call.

Base Resource URI

For Production, use: https://ows.omeda.com/webservices/rest/client/{clientAbbreviation}/optoutfilterqueue/* For Testing, use: https://ows.omedastaging.com/webservices/rest/client/{clientAbbreviation}/optoutfilterqueue/*

clientAbbreviation is the abbreviation for the client who is posting the data.

PLEASE NOTE: Unlike the majority of our APIs, the OptOutFilterQueue takes in the CLIENT name, not a BRAND name. Please consult us to receive the proper client name.

Technical Requirements

The HTTP header must contain the following elements: x-omeda-appid a unique id provided to you by Omeda to access your data. The request will fail without a valid id. content-type a content type supported by this resource. See Supported Content Types for more details. If omitted, the default content type is application/json.

Supported Content Types

There are three content types supported. If omitted, the default content type is application/json. JSON application/json

JSON is the preferred data exchange format, because it is lightweight and, in most cases, faster to process and utilizes less bandwidth. There are many available open-source JSON libraries available. See json.org for details.

Supported HTTP Methods

There is one HTTP method supported: POST See W3C’s POST specs for details.

Field Definition

The following tables describe the hierarchical data elements.

OptOuts Elements

Attribute Name

Required?

Data Type

Description

Attribute Name

Required?

Data Type

Description

ClientOptOut

Optional

Array

Array element containing one or multiple ClientOptOut elements (see below)

BrandOptOut

Optional

Array

Array element containing one or multiple BrandOptOut elements (see below)

DeploymentTypeOptOut

Optional

Array

Array element containing one or multiple DeploymentTypeOptOut elements (see below)

ClientOptOut Elements

Attribute Name

Required?

Data Type

Description

Attribute Name

Required?

Data Type

Description

EmailAddress

required

string

The customer’s email address for which the client opt-out is requested.

Source

optional

string

Allows you to set the source of the opt-out. If omitted, the default source is “Optout API 2.”

BrandOptOut Elements

Attribute Name

Required?

Data Type

Description

Attribute Name

Required?

Data Type

Description

EmailAddress

required

string

The customer’s email address for which the brand opt-out is requested.

BrandId

required

string

The brand for which the opt-out is requested.

Source

optional

string

Allows you to set the source of the opt-out. If omitted, the default source is “Optout API 2.”

DeploymentTypeOptOut Elements

Attribute Name

Required?

Data Type

Description

Attribute Name

Required?

Data Type

Description

EmailAddress

required

string

The customer’s email address for which the deployment type opt-out is requested.

DeploymentTypeId

required

string

The deployment type for which the opt-out is requested.

Source

optional

string

Allows you to set the source of the opt-out. If omitted, the default source is “Optout API 2.”

PromoCode

optional

string

Allows you to set an optional promocode to tie to the filter entry.

Client-Level OptOut

A Client-level OptOut signifies that the email address(es) submitted will be Opted Out to all of the Client’s Brands’ active Deployment Types that is associated with the x-omeda-appid. Example:

You submit an x-omeda-appid of 11111111-1111-1111-1111-111111111111. The Brands associated with the x-omeda-appid are: XXP,XXD, and XXQ. The Deployment Types for Brand XXP are: 23,25,26. The Deployment Types for Brand XXD are: 27,28. The Deployment Types for Brand XXQ are: 33,34,36.

RESULT: A Client-level OptOut, in this case, will be done for all 8 Deployment Types.

Brand-Level OptOut

A Brand-level OptOut signifies that the email address(es) submitted will be Opted Out to all of the Brand’s active Deployment Types that is associated with the given x-omeda-appid. Example:

You submit an x-omeda-appid of 11111111-1111-1111-1111-111111111111. The Brand you have submitted is XXP. The Deployment Types for Brand XXP are: 23,25,26.

RESULT: A Brand-level OptOut, in this case, will be done for all 3 Deployment Types.

RESULT: A Brand-level OptOut, in this case, will generate an error because Brand XXZ is NOT associated with the x-omeda-appid.

Deployment Type-Level OptOut

A Deployment Type-level OptOut signifies that the email address(es) submitted will be Opted out to the active Deployment Types that is associated with the given x-omeda-appid. Example:

RESULT: A Deployment Type-level OptOut, in this case, will be done for the 2 Deployment Types.

RESULT: A Deployment Type-level OptOut, in this case, will generate an error because the Deployment Type 46 is not associated with a Brand that is associated with the x-omeda-appid.

Request Examples

In these examples, we’re submitting:

JSON Example

Response Examples

Two responses are possible: a successful POST (200 OK Status) or a failed POST (400 Bad Request/403 Forbidden/404 Not Found/405 Method Not Allowed Statuses). See W3C’s Status Codes.

Successful Submission

A successful POST submission will create OptOut entries.

JSON Example

Failed Submission

A failed POST submission may be due to several factors:

Status

Description

Status

Description

400 Bad Request

Typically, this error occurs when the request does not follow the specifications.

403 Forbidden

Typically, this error occurs when the credentials are erroneous. Potentially, an incorrect x-omeda-appid.

404 Not Found

Typically, this error occurs with a malformed URL or the resource that is searched for is not found.

405 Method Not Allowed

Typically, this error occurs when the resource accessed is not allowed by the HTTP Method utilized. Make sure you employ the correct HTTP Method (POST) for this request.

This is not an exhaustive list of errors, but common ones. If an error occurs repeatedly, please contact your Omeda representative.

IMPORTANT: If an error occurs, NONE of the OptOuts submitted will be processed. The errors array simply indicates the reason why the request was rejected. Fixing the errors in the error array and resubmitting the request should work, provided no new errors have been re-introduced. Please contact your Omeda representative if you need assistance.

JSON Example

ClientOptOut

If no Brand is found for the x-omeda-appid submitted, you would get the error message below.

BrandOptOut

For each BrandId submitted, our system verifies that the BrandId is authorized to receive OptOuts for the x-omeda-appid submitted. If a BrandId is not authorized, you would get the error message below.

DeploymentTypeOptOut

For each DeploymentTypeId submitted, our system verifies that it belongs to a BrandId, and that the BrandId is authorized to receive OptOuts for the x-omeda-appid submitted. If this occurs, you would get the error message below.