Search the Omeda Knowledge Base

< All Topics

Behavior Lookup By Customer Id


The behavior lookup API call returns behavior information for a specified customer. Behavior information can be requested for a specific behavior OR for behaviors associated with a specific product OR all behaviors

General Technical Requirements

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

Base Request URI

To look up all behaviors for a specific customer:

For Production:{brandAbbreviation}/customer/{customerId}/behavior/*

For Testing:{brandAbbreviation}/customer/{customerId}/behavior/*

To look up a specific behavior for a specific customer:

For Production:{brandAbbreviation}/customer/{customerId}/behavior/{behaviorId}/*

For Testing:{brandAbbreviation}/customer/{customerId}/behavior/{behaviorId}/*

To look up all behaviors for a specific product for a specific customer:

For Production:{brandAbbreviation}/customer/{customerId}/behavior/product/{productId}/*

For Testing:{brandAbbreviation}/customer/{customerId}/behavior/product/{productId}/*

brandAbbreviationis the abbreviation of the brand.customerIdis the Omeda Customer Id. (encrypted customer id may also be used)behaviorIdis the Omeda Behavior Id.productIdis the Omeda 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 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 for details.

Supported HTTP Methods

There is one HTTP method supported:

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

Lookup Behavior By Customer Id

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

Field Definition

The following tables describe the data elements present on the responses from the API.

Behaviors Elements

Element NameData TypeDescription
BehaviorIdIntegerIdentifies the behavior being returned for the customer
FirstOccurenceDateDatetime (format: yyyy-mm-dd hh:mm:ss)First time the behavior occurred.
LastOccurenceDateDatetime (format: yyyy-mm-dd hh:mm:ss)Most recent time the behavior occurred
NumberOfOccurrencesIntegerTotal number of behavioral occurrences
PromoCodeStringReturns the most recent promo code (if any) associated with the behavior. Always optional.


HTTP Response Codes

200 OKThe request has succeeded. See Example Response below.
400 Bad RequestTypically, this error occurs when the request does not follow the specifications.
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.
405 Method Not AllowedTypically, 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.
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 Omeda Account Representative.


         "LastOccurrenceDate":"2011-02-08 11:50:46.657",
         "FirstOccurrenceDate":"2011-02-08 11:50:46.657",
         "LastOccurrenceDate":"2011-02-08 11:50:46.657",
         "FirstOccurrenceDate":"2011-02-08 11:50:46.657",


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

         "Error":"ProductId 99934 not found."
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.

Invalid OmedaCustomerId.
OmedaCustomerId {OmedaCustomerId} not found.
Invalid BehaviorId.
BehaviorId {BehaviorId} not found.
Invalid ProductId.
ProductId {ProductId} not found.
No behaviors associated with ProductId {ProductId} 
No behaviors associated with OmedaCustomerId {OmedaCustomerId} 
Table of Contents
Scroll to Top