Skip to main content

Create an Entry Relationship

POST 

https://euwest.api.elasticpath.com/v2/flows/:flowSlug/entries/:flowEntryID/relationships/:flowFieldSlug

  • In Commerce, create an entry relationship to one or more resources. If any relationships already exist, the ones made in the request are added to them.
  • In Product Experience Manager, create an entry relationship with the product to which you want to associate the template.

Request

Responses

Created

Authorization: http

name: bearerAuthtype: httpscheme: bearer
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://euwest.api.elasticpath.com/v2/flows/:flowSlug/entries/:flowEntryID/relationships/:flowFieldSlug");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": [\n {\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"type\": \"string\"\n }\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Parameters
— pathrequired
— pathrequired
— pathrequired
Body required
{
  "data": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "type": "string"
    }
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.