Update a Flow
PUThttps://euwest.api.elasticpath.com/v2/flows/:flowID
- For Commerce, this endpoint updates a flow.
- For Product Experience Manager, this endpoint updates a template.
Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the flow/template is not updated.
Request
Path Parameters
flowID uuidrequired
The unique identifier of the flow/template you want to update.
- application/json
Bodyrequired
data object
Responses
- 200
- 404
- 500
- application/json
- Schema
- Example (auto)
- default
Schema
data object
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "flow",
"name": "Products",
"slug": "products",
"description": "Extends the default product object",
"enabled": true,
"links": {
"self": "https://euwest.api.elasticpath.com/v2/flows/d2a9b22a-b4b0-456b-bbc7-d8723aaffa84"
},
"relationships": {
"fields": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "brand"
}
}
},
"meta": {
"owner": "enum",
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z",
"updated_at": "2023-10-11T13:02:25.293Z"
}
}
}
}
{
"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"
}
}
}
}
Bad request. Not Found.
- application/json
- Schema
- Example (auto)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": 404
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (auto)
- internal-server-error
Schema
errors Error[]required
{
"errors": [
{
"status": 500,
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": 500,
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://euwest.api.elasticpath.com/v2/flows/:flowID");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <token>");
var content = new StringContent("{\n \"data\": {\n \"description\": \"string\",\n \"enabled\": true,\n \"name\": \"string\",\n \"id\": \"00000000-0000-0000-0000-000000000000\",\n \"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());
ResponseClear