Search the Omeda Knowledge Base

< All Topics
Print

Demographic Lookup by Brand API

Summary

This API provides capabilities to retrieve the defined demographics of a single brand. This service is useful for building your own data mapping service when reading or writing from/to other Omeda services.

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}/demographics/*

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

brandAbbreviationis the abbreviation for the brand

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 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:

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

Demographic Lookup by Brand

Retrieves all demographics of a single brand.

Field Definition

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

Brand Elements

Element NameAlways Returned…Data TypeDescription
IdYesIntegerThe brand identifier.
DescriptionYesStringThe name of the brand.
BrandAbbrevYesStringThe abbreviation for the brand (used in most web service URLs).
DemographicsYesListA list of Demographic elements. These define the customized information that is being collected about a customer for this brand.

Demographics Elements

Element NameAlways Returned…Data TypeDescription
IdYesIntegerThis is the Omeda demographic id, and is the value used for the OmedaDemographicId attribute when utilizing the Save Customer and Order API.
DemographicTypeYesIntegerType of demographic. See Demographic Types for the list of values and their descriptions
DescriptionYesStringThe name of the demographic, and the value used for the ClientDemographicId attribute when utilizing the Save Customer and Order API.
DemoLegacyIdYesStringThis is the Demographic ID that is used in the Omeda’s V10 system.
DemographicValuesYesLista list of DemographicValue elements. These define the values associated with the customized demographic information that is being collected about a customer
AuditedProductsNoListThis is a list of Product Ids that the demo is audited for. If the demo is not audited for any product, this will not be returned.
OmedaWebformTextYesStringOmeda INTERNAL use only
OmedaWebformViewCodeYesIntegerOmeda INTERNAL use only. See View Codes for the list of values and their descriptions
OmedaWebformSequenceYesIntegerOmeda INTERNAL use only
DemographicValues Elements
Element NameAlways Returned…Data TypeDescription
IdYesIntegerThis is the Omeda demographic value id, and the value used for the OmedaDemographicValue attribute when utilizing the Save Customer and Order API.
DescriptionYesStringThe name of the demographic value.
ShortDescriptionYesStringThe short name of the demographic value.
DemographicValueTypeYesIntegerType of demographic value. See Demographic Value Types for the list of values and their descriptions
AlternateIdYesStringThe client’s associated value to Omeda’s demographic value, and the value used for the ClientDemographicValue attribute when using the Save Customer and Order API.
SequenceYesIntegerOrder in which to display demographic items. If you would like this order to be adjusted, please contact your Account Representative.
OmedaWebformTextYesStringOmeda INTERNAL use only
OmedaWebformViewCodeYesIntegerOmeda INTERNAL use only. See View Codes for the list of values and their descriptions
OmedaWebformSequenceYesIntegerOmeda INTERNAL use only

Response

HTTP Response Codes

StatusDescription
200 OKThe request has succeeded. See Example Response below.
404 Not FoundIn the event no Brand Information is found, an HTTP 404 (not found) response will be returned.

Success

{ 
  "SubmissionId":"C95AE90C-BEC6-41F2-91E2-2BA9168D1D1F",
  "Id":3000,
  "Description":"AppDev Today",
  "BrandAbbrev":"APPDEV",
  "CustomerCount":4,
  "Demographics":[
    {
      "Id":1,
      "DemographicType":1,
      "Description":"Job Title",
      "AuditedProducts":[
         101,
         102,
         103
      ],
      "DemographicValues":[
        {
          "Id":1, 
          "Description":"Owner, President, CEO", 
          "ShortDescription":"Owner",
          "AlternateId":"02"
        },       
        { 
          "Id":2, 
          "Description":"CIO, CFO, CXO", 
          "ShortDescription":"CIO, CFO, CXO",
          "AlternateId":"04"
        },
        {
          "Id":3, 
          "Description":"Vice President", 
          "ShortDescription":"VPs",
          "AlternateId":"05"
        },
        { 
          "Id":4, 
          "Description":"Management", 
          "ShortDescription":"Management",
          "AlternateId":"09"
        }
      ]
    },
    {
      "Id":2,
      "DemographicType":2,
      "Description":"Technology",
      "DemographicValues":[
        {
          "Id":11, 
          "Description":"Java", 
          "ShortDescription":"Java",
          "AlternateId":"23"
        },
        { 
          "Id":12, 
          "Description":"C#", 
          "ShortDescription":"C#",
          "AlternateId":"34"
        },
        { 
          "Id":13, 
          "Description":"C, C++", 
          "ShortDescription":"C, C++",
          "AlternateId":"35"
        }
      ]
    }
  ]
}

Failure

{
   "SubmissionId":"ec0c2ba6-13f4-4934-8efa-74c2ccb33f1d",
   "Errors":[
      {
         "Error":"Brand 12345 was 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.

Brand {brandId} was not found.

Additional Information

Demographics – DemographicType

StatusCodeDescription
1A single-choice-allowed type of question. (Two or more choices – one answers)
2A multiple-choice-allowed type of question. (Two or more choices – many answers)
3An open-form short answer question. (No choices – text input)
5A yes/no answer.
6A date answer.
7A whole number answer.
8A decimal answer.

Demographics – DemographicValueType

StatusCodeDescription
0Standard Choice: Type indicating a single-choice-allowed type of question. (Two or more choices – one answers).
3None-of-the-above Choice: None-of-the-above choice value type. A type of standard choice whose selection may force some special validation.
4‘Other’ Choice: This value type will represent the “Other” option ( Open ended Coding ).
Table of Contents
Scroll to Top