Search the Omeda Knowledge Base

< All Topics
Print

Customer Lookup By Customer Id

Summary

This API provides the ability look up a Customer by the Customer id.   The response will include basic Customer information and various links to look up additional Customer information such as Demographics, Addresses, etc for a single Customer record.

  • If the customer has been merged into another customer or deactivated an error message will be returned. (Please see failure section for more details)

General Technical Requirements

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

Base Resource URI

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

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

brandAbbreviation is the abbreviation for the brand customerId is the internal customer id (encrypted customer id may also be used)

HTTP Headers

The HTTP header must contain the following element: 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

The content type is always 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:

  1. GET : See W3C’s GET specs for details.

Lookup Customer By Customer Id

Retrieves a record containing all available name, contact, and demographic information about the customer.

Field Definition

The following table describes the data elements present on the response from the API.

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.

Customer Elements

OriginalPromoCodeNoStringOriginal “Promo Code” that was used to create this customer.

Element NameAlways Returned…Data TypeDescription
IdConditionalIntegerinternal id (for use on certain databases)
ReaderIdConditionalIntegerreader id (for use on certain databases) typically either the reader id or the id is returned, but not both.
EncryptedCustomerIdYesStringThe Encrypted Customer Id for the customer
SalutationNoString“Mrs.”, “Mr.”, etc.
FirstNameNoStringfirst name
MiddleNameNoStringmiddle name
LastNameNoStringlast name
SuffixNoString“Jr.”, “Sr.”, “III”, etc.
TitleNoStringjob title
GenderNoString“F” for Female, “M” for Male, “U” for Unknown.
PromoCodeNoString“Promo Code” last used to create/update this customer.
SignUpDateNoDateTimeDate & time customer “signed up” as customer. yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34.
ChangedDateNoDateTimeDate & time record last changed. yyyy-MM-dd HH:mm:ss format. Example: 2010-03-08 21:23:34.
StatusCodeNoShort1 for “Active”, 0 for “Deleted/Inactive”, 2 for “Prospect”.
MergeCodeYesShort1 for “Mergeable”, 0 for “Non-Mergeable”
AddressesYesLinka link reference to the address data as a resource.
PhonesYesLinka link reference to the phone data as a resource.
EmailAddressesYesLinka link reference to the email data as a resource.
CustomerDemographicsYesLinka link reference to the customer demographic data as a resource.
SubscriptionsYesLinka link reference to the subscription data as a resource.

Response

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

{
   "Id" : 12345,
   "Salutation" : "Mr.",
   "FirstName" : "John",
   "MiddleName" : "J",
   "LastName" : "Smith",
   "Suffix" : "Jr.",
   "Title" : "Developer",
   "Gender" : "M",
   "ClientCustomerId" : "543210",
   "OriginalPromoCode" : "2009_SIGNUP_SPECIAL",
   "PromoCode" : "2010_RENEWAL",
   "SignUpDate" : "2009-03-08 21:23:34",
   "ChangedDate" : "2010-03-08 14:07:12",
   "StatusCode" : 1,
"MergeCode" : 1, "Addresses" : "https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/12345/address/*", "Phones" : "https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/12345/phone/*", "EmailAddresses" : "https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/12345/email/*", "CustomerDemographics" : "https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/12345/demographic/*", "Subscriptions" : "https://ows.omedastaging.com/webservices/rest/brand/FOO/customer/12345/subscription/*" "SubmissionId" : "24B9BF6F-0677-462B-942A-D87EEBD10F77" }

Failure

Standard Customer Error Message
{
   "SubmissionId":"ec0c2ba6-13f4-4934-8efa-74c2ccb33f1d",
   "Errors":[
      {
         "Error":"Customer 12345 was not found."
      }
   ]
}
Merged Customer Error Message
{
   "SubmissionId":"2da476ca-9ae6-4b4a-a77c-4aafbd275028",
   "Errors":[
      {
         "MergedIntoCustomerId":99999,
         "Error":"Customer id 22 is valid but not active. Please use 99999."
      }
   ]
}
Possible Error Messages

In the event of an error, an error response will be returned. Here are some of the possible responses you might receive.

Customer {customerId} was not found.
Customer id {customerId} is valid but not active. Please use {mergedIntoCustomerId}.
OmedaCustomerId {customerId} is pending deactivation. Please try again later.
Tags:
Table of Contents
Scroll to Top