HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Content operations

Describes how to work with content RESTful operations, identity mapping and content identifiers when using the Optimizely Service API for integrations.

Example models

[Serializable]
public class IdentityMapping
{
  public string IntegrationId { get; set; }
  public DateTime? Modified { get; set; }
  public string ProviderName { get; set; }
}

Get identities 

GETget/episerverapi/commerce/identities/{providerName}This method gets all the content created integration identifiers with the provider name specified. If none is specified, default is the default parameter.

JSON response type

C# code sample

var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);		
var result = client.GetAsync("/episerverapi/commerce/identities/{providerName=default}").Result.Content.ReadAsStringAsync().Result

XML response type

C# code sample

var client = new HttpClient()
  {
    BaseAddress = new Uri(ConfigurationManager.AppSettings["integrationUrl"])
  };
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token.AccessToken);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("text/xml"));		
var result = client.GetAsync("/episerverapi/commerce/identities/{providerName=default}").Result.Content.ReadAsStringAsync().Result

Response

<ArrayOfIdentityMapping xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <IdentityMapping>
    <IntegrationId>02ce51ec-da5c-483e-a6a7-156904ef2e80</IntegrationId>
    <Modified>2015-02-10T17:11:53.477</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>0a0862a3-5b84-4c13-bd9d-f91f05e7bd6a</IntegrationId>
    <Modified>2015-02-10T17:11:35.013</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>0a507d7f-f31d-4559-aac0-3699851c4577</IntegrationId>
    <Modified>2015-02-10T17:11:33.983</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>12778f61-c87d-46fa-8778-adbc6c238e1d</IntegrationId>
    <Modified>2015-02-10T17:11:52.803</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>13b45549-d9c4-48b6-b9f1-d7825f98786b</IntegrationId>
    <Modified>2015-02-10T17:11:48.263</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>15780210-df2e-4454-a218-a20ddd5e6ebd</IntegrationId>
    <Modified>2015-02-10T17:11:47.763</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>19b0ecd9-fc69-4ef8-a45b-1c2e9b1b52c1</IntegrationId>
    <Modified>2015-02-10T17:11:41.843</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
  <IdentityMapping>
    <IntegrationId>1c1a773b-7b9c-4ecd-9f64-b558aff74a10</IntegrationId>
    <Modified>2015-02-10T17:11:20.287</Modified>
    <ProviderName>default</ProviderName>
  </IdentityMapping>
</ArrayOfIdentityMapping>