Composable Frontend 2.0 Learn more 

  • Commerce Cloud/
    Custom Data/
    Custom Data (Flows) API/
    Entries/
    Create an Entry

    Create an Entry

    POST Create an Entry

    https://useast.api.elasticpath.com/v2/flows/:slug/entries
    

    Parameters

    Path parameters

    NameRequiredTypeDescription
    slugRequiredstringThe slug for the flow for which you want to create an entry.

    Headers

    NameRequiredTypeDescription
    AuthorizationRequiredstringThe Bearer token required to get access to the API.

    Body

    NameRequiredTypeDescription
    typeRequiredstringThe type of the resource object, use entry.
    fieldSlugRequiredstringWhere fieldSlug is the slug for each field on this flow along with the corresponding value for this entry.

    Request Examples

    Curl

    curl -X POST https://useast.api.elasticpath.com/v2/flows/:flowSlug/entries \
         -H "Authorization: XXXX" \
         -H "Content-Type: application/json" \
         -d $ {
           "data": {
             "type": "entry",
             "SkinType": "Oily",
             "ml": "200"
           }
         }
    

    JavaScript SDK

    const flowSlug = "flow-slug";
    const data = {
        "{FIELD_SLUG}": "A value",
    };
    
    
    // Where `EPCC` is an authenticated client
    await EPCC.Flows.CreateEntry(flowSlug, data);
    

    Response Example

    201 Created

    {
        "data": {
            "id": "10fe2aca-09fb-42fe-a1d4-081134320641",
            "type": "entry",
            "meta": {
                "owner": "organization",
                "timestamps": {
                    "created_at": "2021-10-26T17:10:56.329Z",
                    "updated_at": "2021-10-26T17:10:56.329Z"
                }
            },
            "links": {
                "self": "https://epcc-integration.global.ssl.fastly.net/v2/flows/products/entries/10fe2aca-09fb-42fe-a1d4-081134320641"
            }
        }
    }
    
    Previous
    Get an Entry