Composable Frontend 2.0 Learn more 

  • Commerce Cloud/
    Custom Data/
    Custom Data (Flows) API/
    Update a Flow

    Update a Flow

    PUT Update a Flow

    https://useast.api.elasticpath.com/v2/flows/:id
    

    Custom names and values prefixed with $ are not supported.

    Parameters

    Path parameters

    NameRequiredTypeDescription
    idRequiredstringThe ID for the flow you are changing.

    Headers

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

    Body

    NameRequiredTypeDescription
    idRequiredstringThe ID of the flow you’re requesting.
    typeRequiredstringRepresents the type of object being returned.
    nameOptionalstringThe name of the flow.
    slugOptionalstringA unique slug identifier for this flow.
    descriptionOptionalstringAny description for this flow.
    enabledOptionalstringtrue if enabled false if not.

    Request Examples

    Curl

    curl -X PUT "https://useast.api.elasticpath.com/v2/flows/:id" \
         -H "Authorization: XXXX" \
         -H "Content-Type: application/json" \
         -d $ {
            "data": {
                "id": "{FLOW_ID}",
                "type": "flow",
                "name": "Categories",
                "slug": "categories",
                "description": "Extends the default category object",
                "enabled": true
            }
         }
    

    JavaScript SDK

    
    
    const flowId = "25617d3e-14a6-434c-bfab-3fda87517aaf";
    
    
    const data = {
        id: flowId
        name: "Categories",
        slug: "categories",
        description: "Extends the default category object",
        enabled: true
    };
    
    
    await EPCC.Flows.Update(flowId, data)
    

    Response Example

    200 OK

    {
        "data": {
            "id": "6d320b42-237d-4474-8452-d49f884d4ae1",
            "type": "flow",
            "name": "extraFieldRenamed",
            "slug": "products-1",
            "description": "Extends the default product object",
            "enabled": true,
            "links": {
                "self": "https://useast.api.elasticpath.com/v2/flows/6d320b42-237d-4474-8452-d49f884d4ae1"
            },
            "relationships": {},
            "meta": {
                "owner": "store",
                "timestamps": {
                    "created_at": "2018-05-10T18:04:26.623Z",
                    "updated_at": "2018-05-10T18:11:47.469Z"
                }
            }
        }
    }
    
    Previous
    Create a Flow