Search the Omeda Knowledge Base

< All Topics
Print

Subscription Lookup By Email

Summary

This service returns all subscription information stored for all customers with the given Email Address and optional Product Id. Note, this includes both current subscription and deactivated subscriptions (see below to determine the differences).

Note

  • This service only returns Product types that create a Subscription. Currently only Magazine (productType=1) and Newsletter (productType=2) type products create Customer Subscriptions
  • Use the OptLookup API for opt in/out status for Email Deployment type products (productType=5).

General Technical Requirements

The following technical requirements apply to all requests for this API.

Base Resource URI

The following lookup offers the ability to lookup Subscription Data based solely on the email address being present on the Active Customer (the email used in the search may not be directly associated to the subscription returned).

Production: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/*

Testing: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/*

The ability to lookup Product specific Subscription Data based solely on the email address being present on the Active Customer (not necessarily to any product specifically).

Production: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/product/{productId}/*

Testing: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/product/{productId}/*

The ability to lookup Product specific Subscription Data based on the email address being associated to the specified product for the Active Customer.

Production: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/product/{productId}/associated/*

Testing: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/customer/email/{emailAddress}/subscription/product/{productId}/associated/*

brandAbbreviationis the abbreviation for the brandemailAddressis the email address for which we are requesting customer informationproductIdis the product id

HTTP Headers

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

Content Type

The content type is application/json.JSONapplication/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:GETSee W3C’s GET specs for details.

Lookup Subscription By Customer and Product Id

Retrieves a record containing all subscription information for the customer and specific product.

Response Field Definition

The following tables describe the hierarchical data elements.

In addition to the below elements, a SubmissionId element will also be returned with all responses. This is a unique identifier for the web services response. It can be used to cross-reference the response in Omeda’s database.

Subscription Elements

Element NameDescription
Customerseach Customer element contains the customer’s specific data and the subscription information.

Customers Elements

Element NameDescription
OmedaCustomerIdthe internal customer identifier
Subscriptionseach Subscription element contains all requested subscription information.
Urla link reference to the customer data as a resource.

Subscription Elements

Element NameOptional?Data TypeDescription
Idnointegerunique subscription identifier
ProductIdnointegerExplicit Omeda product id for the product being requested. Only Magazines (productType=1) and Newsletters (productType=2) will be returned via this API. Use the OptLookup API for Email Deployment updates (productType=5).
RequestedVersionnoString“P” for print, “D” for digital, “B” for both
RequestedVersionCodenoString“P” for print, “D” for digital, “B” for both
ActualVersionCodenoString“P” for print, “D” for digital, “B” for both
Quantityyesintegerthe number of subscriptions requested
DataLockCodeyesInteger0 = standard / not locked, 1 = locked (subscription cannot be updated while locked)
Receivenoshort (boolean)0 = subscription not received, 1 = subscription received NOTE: this is the primary way of determining whether a customer is or is not CURRRENTLY receiving a product. Customers actively receiving the product currently will have a ‘1’. Someone who is no longer currently receiving the product (but has in the past) will have a ‘0’.
MarketingClassIdyesStringSubscription class code – indicating whether the subscription is active, controlled, paid, killed etc. This is related to the Marketing Class Description. Generally the developer will want to use this class in preference to the Marketing Class ID field because these codes tend to be invariant across products. Marketing Class Codes
MarketingClassDescriptionyesStringMarketing Class description.
DeploymentTypesyesarrayeach DeploymentType element contains all deployment type and opt-in/opt-out information.
ShippingAddressIdyesIntegerInternal ID of the postal address associated with this subscription.
BillingAddressIdyesIntegerInternal ID of the billing address associated with this subscription.
BillingNameyesStringName on the credit card associated with this subscription.
EmailAddressIdyesIntegerInternal ID of the email address associated with this subscription.
ChangedDatenoDateDate & time record last changed. yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34.
RelationshipsyesIntegerEach Relationship element contains the ID and Product Id associated to the complimentary products that were included with the subscription as part of a promotion or default offering.
PaymentStatusyesIntegerPayment status of the subscription, if it is a PAID subscription. This element will be omitted from response if there is no payment status associated with the subscription. Payment Status Codes
CreditBalanceyesDecimalAmount, in USD, of remaining balance the subscriber owes for the subscription. Field will be omitted from response if there is no credit balance associated with the subscription.
AmountyesDecimalAmount, in USD, the subscriber paid for the subscription. Field will be omitted from response if there is no amount associated with the subscription.
LastPaymentDateyesDateReturns the date of the most recent payment that was received for a subscription.
LastPaymentAmountyesDecimalReturns amount in USD of the most recent payment for a subscription.
LastIssueEarnedDescriptionyesStringShort description of the issue. This is sometimes represented as a short date, sometimes as a number. Field will be omitted from response if there is no issue description associated with the subscription.
LastIssueEarnedDateyesDateLast issue date.
FirstIssueEarnedDescriptionyesStringShort description of the issue. This is sometimes represented as a short date, sometimes as a number. Field will be omitted from response if there is no issue description associated with the subscription.
FirstIssueEarnedDateyesDateDate of the first issue.
TermyesIntegerLength of the subscription using the product’s unit of measure. Field will be omitted from response if there is no term associated with the subscription, or the subscription Status is not Active.
IssuesRemainingyesIntegerProjected number of issues remaining. Field will be omitted from response if there are no issues remaining associated with the subscription.
CopiesRemainingyesIntegerProjected number of copies remaining. Field will be omitted from response if there are no copies remaining associated with the subscription.
IssueExpirationDateyesDateThe projected expiration date for issue-based (print/digital) products. Date & time record last changed. yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34. Field will be omitted from response if there is no projected expiration date associated with the subscription.
OrderDateyesDateThe date that the most recent order was entered for this subscription. The Date & time format: yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34. Field will be omitted from response if there is no order date associated with the subscription.
OriginalOrderDateyesDateThe date that the first order was entered for this subscription. The Date & time format: yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34. Field will be omitted from response if there is no order date associated with the subscription.
Coming Soon
ExpirationDateyesDateThe expiration date for continuous-access (i.e. website, online access etc.) products. Date & time record last changed. yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34. Field will be omitted from response if there is no expiration date associated with the subscription.
DeactivationDateyesDateThis date can be used to determine if a Paid subscription has been given extended temporary access. The Date & time format: yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34. Field will be omitted from response if there is no deactivation date associated with the subscription.
AutoRenewalCodeyesintThe code for if the subscription is an Auto Renewal. Valid Values are : 0 = Not Auto Renewal, 5 = Auto Charge, 6 = Auto Bill Me on Invoice
NumberOfInstallmentsyesIntegerThe number of installments on a Paid Subscription. Default is always 1, meaning the account is paid all at once. Anything greater that 1 is the number of expected payments.
InstallmentCodeyesIntegerThe type of Installment Billing Code. Valid Values: 1=Installment Bill Me, 2=Installment Auto Charge)
Vouchernostringthis will only be returned if the product was paid for with a Voucher.
DonorIdnoIntegerThe Omeda Customer Id of the Donor who purchased the this Subscription, this will only be returned if the subscription was a Gift Subscription
GiftMessagenoStringThe Gift Message if it was included at time of gift purchase, this will only be returned if the subscription was a Gift Subscription
GiftSentDatenoDateThe Date the gift was sent, this will only be returned if the subscription was a Gift Subscription
VerificationDateyesDateVerification Date of subscription.
VerificationAgenoIntegerVerification Age of subscription. (1, 2, 3, or 4 years. 4 years indicates 4 or more.) 1 is returned if the verification date is in the future or less than 1 year from the audit issue. 4 is return if verification date is 4 *or more* years away from the audit issue.
StatusnoIntegerThe Status represent the current state of the subscription (1 – Active, 2 – Pending, 3 – Expired, 4 – Cancelled, 5 – Graced, 6 – Standing Order)
SourceIdyesIntegerSourceId represents the BPA Source (e.g. 23 = Personal direct request electronic [see DataSourceConstants.java])
ClientOrderIdnoStringClient transaction id for the order
RenewalCountyesIntegerNumber of times a subscription has been renewed
PremiumCodenoIntegerPremium code id
PremiumCodeDescriptionnoStringDescription of Premium code

DeploymentType Elements

Element NameOptional?Data TypeDescription
Idnointegerunique deployment type identifier
InnointegerFor this deployment type, 0 = opt-in absent, 1 = opt-in present
OutnointegerFor this deployment type, 0 = opt-out absent, 1 = opt-out present

Relationship Elements

Element NameOptional?Data TypeDescription
Idnointegerunique relationship identifier
Product Idnointegerinternal id that identifies the complimentary product

HTTP Response Codes

StatusDescription
200 OKThe request has succeeded. See Example Response below.
403 ForbiddenTypically, this error occurs when the credentials are erroneous. Potentially, an incorrect x-omeda-appid.
404 Not FoundTypically, this error occurs with a malformed URL or the resource that is searched for is not found.
500 Internal Server ErrorIn the rare case that there is a server-side problem, this response will be returned. This generally indicates a problem of a more serious nature, and submitting additional requests may not be advisable. Please contact your Omeda Account Representative if the issue continues.

Success

Sample response showing all subscriptions for various customers with the same email address (1 with subscriptions, 2 without any subscriptions).

{  
   "Customers":[  
      {  
         "Subscriptions":[  
            {  
               "VerificationDate":"2016-01-06",
               "VerificationAge" : 1,
               "RequestedVersion":"D",
               "PromoCode":"ptest",
               "SourceId":60,
               "ActualVersionCode":"D",
               "Quantity":1,
               "RequestedVersionCode":"D",
               "ProductId":1111,
               "MarketingClassDescription":"Active",
               "DeploymentType":[  
                  {  
                     "In":1,
                     "Id":9999,
                     "Out":0
                  }
               ],
               "ShippingAddressId":9991,
               "DataLockCode":0,
               "OrderDate":"2016-01-06 11:47:00.0",
               "EmailAddressId":8881,
               "MarketingClassId":"1",
               "Receive":1,
               "AutoRenewalCode":0,
               "Id":2221,
               "ChangedDate":"2016-01-06 11:47:24",
               "PaymentStatus":6
            },
            {  
               "VerificationDate":"2016-01-04",
               "VerificationAge" : 1,
               "PromoCode":"none",
               "IssueExpirationDate":"2017-12-01 00:00:00.0",
               "SourceId":12,
               "ActualVersionCode":"P",
               "RequestedVersionCode":"P",
               "CopiesRemaining":12,
               "ProductId":1234,
               "MarketingClassDescription":"Active Qualified",
               "NumberOfInstallments":1,
               "DataLockCode":0,
               "ChangedDate":"2016-01-06 11:44:40",
               "PaymentStatus":2,
               "Status":1,
               "RequestedVersion":"P",
               "BillingAddressId":88888888,
               "CreditBalance":"0.00",
               "Quantity":1,
               "ShippingAddressId":99999999,
               "OrderDate":"2016-01-04 13:56:00.0",
               "EmailAddressId":5555,
               "MarketingClassId":"1",
               "SubscriptionPaidId":9999,
               "Receive":1,
               "AutoRenewalCode":0,
               "Id":33333333,
               "IssuesRemaining":12
            },
            {  
               "VerificationDate":"2016-01-06",
               "VerificationAge" : 1,
               "RequestedVersion":"D",
               "PromoCode":"pweb",
               "SourceId":60,
               "ActualVersionCode":"D",
               "Quantity":1,
               "RequestedVersionCode":"D",
               "ProductId":2,
               "MarketingClassDescription":"Active",
               "DeploymentType":[  
                  {  
                     "In":1,
                     "Id":6666,
                     "Out":0
                  }
               ],
               "ShippingAddressId":222222,
               "DataLockCode":0,
               "OrderDate":"2016-01-06 11:45:00.0",
               "EmailAddressId":333333,
               "MarketingClassId":"1",
               "Receive":1,
               "AutoRenewalCode":0,
               "Id":444444,
               "ChangedDate":"2016-01-06 11:47:24",
               "PaymentStatus":6
            }
         ],
         "OmedaCustomerId":1000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/1000000000/*"
      },
      {  
         "Subscriptions":[  ],
         "OmedaCustomerId":2000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/2000000000/*"
      }
   ],
   "SubmissionId":"03668922-5555-6666-7777-DD9E3FD5C014"
}

Sample response showing all subscriptions for various customers with the same email address with a specific product requested (product id 1234)

{  
   "Customers":[  
      {  
         "Subscriptions":[  
            {  
               "VerificationDate":"2016-01-04",
               "VerificationAge" : 1,
               "PromoCode":"none",
               "IssueExpirationDate":"2017-12-01 00:00:00.0",
               "SourceId":12,
               "ActualVersionCode":"P",
               "RequestedVersionCode":"P",
               "CopiesRemaining":12,
               "ProductId":1234,
               "MarketingClassDescription":"Active Qualified",
               "NumberOfInstallments":1,
               "DataLockCode":0,
               "ChangedDate":"2016-01-06 11:44:40",
               "PaymentStatus":2,
               "Status":1,
               "RequestedVersion":"P",
               "BillingAddressId":88888888,
               "CreditBalance":"0.00",
               "Quantity":1,
               "ShippingAddressId":99999999,
               "OrderDate":"2016-01-04 13:56:00.0",
               "EmailAddressId":5555,
               "MarketingClassId":"1",
               "SubscriptionPaidId":9999,
               "Receive":1,
               "AutoRenewalCode":0,
               "Id":33333333,
               "IssuesRemaining":12
            }
         ],
         "OmedaCustomerId":1000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/1000000000/*"
      },
      {  
         "Subscriptions":[  ],
         "OmedaCustomerId":2000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/2000000000/*"
      }
   ],
   "SubmissionId":"03668922-5555-6666-7777-DD9E3FD5C014"
}

Sample response showing all subscriptions for various customers with the same email address with a specific product requested associated to the email address(product id 1234)

{  
   "Customers":[  
      {  
         "Subscriptions":[  ],
         "OmedaCustomerId":1000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/1000000000/*"
      },
      {  
         "Subscriptions":[  ],
         "OmedaCustomerId":2000000000,
         "Url":"https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/2000000000/*"
      }
   ],
   "SubmissionId":"03668922-5555-6666-7777-DD9E3FD5C014"
}

Failure

{
   "SubmissionId":"ec0c2ba6-13f4-4934-8efa-74c2ccb33f1d",
   "Errors":[
      {
         "Error":"No subscriptions found for email address jane@doe.com."
      }
   ]
}

Additional Information

Payment Status Codes

valuedescriptionwhat it means
1Paid on invoice.Customer paid after being invoiced.
2Paid with order.Customer paid at the time of his order.
3Credit.Customer owes an outstanding balance on the subscription.
6Free.Customer is being granted a free subscription, but isn’t necessarily qualified by the publisher.
7Controlled.Customer was selected by publisher to receive subscription for free.

Marketing Class Codes

valueDescriptionConsidered Active?applies to
1Active. For controlled magazine products, 1 denotes Active Controlled.yesAll product types.
2Active Non-QualifiedyesOnly products with paid circulation.
3Qualified ReservenoOnly products with controlled circulation.
8Soft controlled killsnoOnly products with controlled circulation.
9Controlled killsnoOnly products with controlled circulation.
10ACS kills (Address Correction Service)noOnly products having subscription address delivery.
20Expire suspendsnoSubscription based products having an expiration date.
21Future startsnoSubscription based products having an expiration date.
21Postal suspendsnoOnly products having subscription address delivery.
23Credit SuspendsnoSubscription based paid products.
24Requested SuspendsnoAny product type.
25Kill/RefundsnoSubscription based paid products.
50PassalongnoAny product type.

DeploymentType element – Explained

We have a table that stores the ProductId and DeploymentTypeId relationship. This is a 1-to-1 relationship, so you will only see one DeploymentType element under the DeploymentTypeselement. We query this table using “where ProductId={ProductId}.” We then query our OPT (Opt-In/Opt-Out) table to retrieve the presence of an Opt-In and of an Opt-Out.If no “IN” entries are returned then”In”:0If one or many “IN” entries are returned then”In”:1If no “OUT” entries are returned then”Out”:0If one or many “OUT” entries are returned then”Out”:1

Tags:
Table of Contents
Scroll to Top