Skip to content

Search the Omeda Knowledge Base


Behavior Lookup By Customer Id


This API provides the ability look up a Customer’s Behaviors by the Customer Id.   The response returns behavior information for the 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}/*
is the abbreviation of the brand.
is the Omeda Customer Id. (encrypted customer id may also be used)
is the Omeda Behavior Id.
is the Omeda Product Id.

HTTP Headers

The HTTP header must contain the following elements:

a unique id provided to you by Omeda to access your data. The request will fail without a valid id.
a 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.


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 Name Data Type Description
BehaviorId Integer Identifies the behavior being returned for the customer
FirstOccurenceDate Datetime (format: yyyy-mm-dd hh:mm:ss) First time the behavior occurred.
LastOccurenceDate Datetime (format: yyyy-mm-dd hh:mm:ss) Most recent time the behavior occurred
NumberOfOccurrences Integer Total number of behavioral occurrences
PromoCode String Returns the most recent promo code (if any) associated with the behavior. Always optional.


HTTP Response Codes

Status Description
200 OK The request has succeeded. See Example Response below.
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.
500 Internal Server Error In 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.


         "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