Behavior Lookup By Customer Id
Summary
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: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/{customerId}/behavior/*
For Testing: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/customer/{customerId}/behavior/*
To look up a specific behavior for a specific customer:
For Production: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/{customerId}/behavior/{behaviorId}/*
For Testing: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/customer/{customerId}/behavior/{behaviorId}/*
To look up all behaviors for a specific product for a specific customer:
For Production: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/customer/{customerId}/behavior/product/{productId}/*
For Testing: https://ows.omedastaging.com/webservices/rest/brand/{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 json.org for details.
Supported HTTP Methods
There is one HTTP method supported:
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. |
Response
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 Omeda Account Representative. |
Success
Failure
This is not an exhaustive list of errors, but common ones. If an error occurs repeatedly, please contact your Omeda representative.
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.
Table of Contents
- 1 Summary
- 2 General Technical Requirements
- 2.1 Base Request URI
- 2.2 HTTP Headers
- 2.3 Content Type
- 2.4 Supported HTTP Methods
- 3 Lookup Behavior By Customer Id
- 3.1 Field Definition
- 3.1.1 Behaviors Elements
- 3.2 Response
- 3.2.1 HTTP Response Codes
- 3.2.2 Success
- 3.2.3 Failure
- 3.2.3.1 Possible Error Messages
- 3.1 Field Definition