Skip to main content

Create an Entry

POST 

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

  • For Commerce, this endpoint creates an entry for a flow.
  • For Product Experience Manager, this endpoint creates an entry for a template.

Request

Path Parameters

    flowSlug stringrequired

    The slug for the flow/template you want to create an entry for.

Bodyrequired

    data object

    Specifies the type of the resource object.

    FIELD_SLUGstring

    Where FIELD_SLUG is the slug for each field/attribute on this flow/template along with the corresponding value. You must provide a field slug and a value for the entry. You can have multiple field slugs if they are related to the flow/template.

    typestring

    Represents the type of object being returned.

Responses

Created

Schema
    data object
    idstring<uuid>

    A unique identifier for a resource.

    Example: 00000000-0000-0000-0000-000000000000
    typestring

    Represents the type of object being returned.

    Example: entry
    links object

    Links allow you to move between requests. Single entities use a self parameter with a link to that specific resource. Listing pages use the following:

    PropertyDescription
    currentAlways the current page
    firstAlways the first page
    lastnull if there is only one page.
    prevnull if you are on the first page.
    nextnull if there is only one page.
    selfstring
    Example: https://euwest.api.elasticpath.com/v2/flows/d2a9b22a-b4b0-456b-bbc7-d8723aaffa84
    meta object
    ownerstring

    The resource owner, either organization or store.

    Possible values: [store, organization]

    Example: enum
    timestamps object
    created_atstring

    The date and time a resource is created.

    Example: 2023-10-11T13:02:25.293Z
    updated_atstring

    The date and time a resource is updated.

    Example: 2023-10-11T13:02:25.293Z
    property name*string

    There can be a :fieldSlug attribute for each field/attribute attached to a flow/template. The type depends on the field type.

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");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"FIELD_SLUG\": \"string\",\n \"type\": \"string\"\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
Body required
{
  "data": {
    "FIELD_SLUG": "string",
    "type": "string"
  }
}
ResponseClear

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