Create Relationship Instance (Hub Data)

[This topic is pre-release documentation and is subject to change.]

Creates a new instance of an existing custom Relationship type within the specified Hub. If the instance already exists, it is updated.

Request

The request is constructed as follows:

HTTP Verb Request URI
POST <hub-endpoint>/data/Relationship?api-version=2017-04-26

URI Parameters

URI Parameter Required Description
Hub-endpoint Yes The base URL for your Customer Insights Hub

Request Body

A JSON object describing the custom Relationship type instance, of the form:

{
    "ProfileStrongIdFieldMappings" :[
    {
        "FieldName": "<Field in the relationshipDefinition that refers to strongId Key property of Profile>", 
        "StrongIdKeyProperty": "<Specifies the strongId Key Property of Profile>"
    } ],
    "RelatedProfileStrongIdFieldMappings" :[
    {
        "FieldName": "<Field in the relationshipDefinition that refers to strongId Key property of Related Profile>", 
        "StrongIdKeyProperty": "<Specifies the strongId Key Property of Profile>"
    } ],
    "RelationshipType" :"<Relationship TypeName for which we are posting the instance>",

    <Fields in RelationshipDefinition>
}


Response

The response includes an HTTP status code, a response body and a set of response headers.

Response Body

The body contains the custom Relationship instance along with the assigned Profile ID.

Status Code

  • 202 (Accepted) - if the request was accepted and the instance creation is in process.