Create an Entry
POST/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
The slug for the flow/template you want to create an entry for.
- application/json
Body
required
data object
Specifies the type of the resource object.
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.
Represents the type of object being returned.
Responses
- 201
- 400
- 404
- 422
- 500
Created
- application/json
- Schema
- Example (from schema)
- default
Schema
data object
A unique identifier for a resource.
Represents the type of object being returned.
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:
Property | Description |
---|---|
current | Always the current page |
first | Always the first page |
last | null if there is only one page. |
prev | null if you are on the first page. |
next | null if there is only one page. |
meta object
Possible values: [store
, organization
]
The resource owner, either organization
or store
.
timestamps object
The date and time a resource is created.
The date and time a resource is updated.
There can be a :fieldSlug
attribute for each field/attribute attached to a flow/template. The type depends on the field type.
{
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "entry",
"links": {
"self": "https://euwest.api.elasticpath.com/v2/flows/d2a9b22a-b4b0-456b-bbc7-d8723aaffa84"
},
"meta": {
"owner": "enum",
"timestamps": {
"created_at": "2023-10-11T13:02:25.293Z",
"updated_at": "2023-10-11T13:02:25.293Z"
}
}
}
}
{
"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"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"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": "Validation Error",
"status": 400,
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Bad request. Not Found.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"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
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- missing-name
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"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": "Validation Error",
"status": 400,
"detail": "data.attributes.name: \"name\" is required"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"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"
}
]
}