Product Fragments API v2

Product templates include an editable region for a Product's full description. However, Evance's templating system permits multiple editable regions on a page. The content within each editable region is known as a Fragment.

Scopes

Access to the Product Fragments API requires that the client have the following scopes granted:

  • products - Permits write access to add, update or remove product fragments.
  • products.readonly - Read only access to search or get product fragment data.

The Product Fragment object

Product content fragments are rendered into a Product template's editable regions identified by their reference.

createdBy read-only
An integer representing the ID of the user who created the fragment.
This may be set to null if the object was created by an App or via import.
createdOn read-only
The date and time the product fragment was created.
html
The HTML content for the fragment.
id read-only
An unsigned 64-bit integer, which is unique across all Product Fragments and all Evance Accounts.
modifiedBy read-only
An integer representing the ID or the user who last modified the fragment.
This may be set to null if it was created by an App or via import.
modifiedOn read-only
The date and time the object was last modified.
productId read-only
An unsigned 64-bit integer representing the Product the Fragment is associated with.
reference
The identifier for the Fragment within the Product's template.
The main source of content for a Product should be referenced as fullDescription.

References are alpha-numeric and typically written in camelCase. References should adhere to:
  • Letters a-z and A-Z
  • Numbers 0-9
  • Underscores _
  • Dashes -

Example JSON

{
    "data": {
        "id": 52,
        "productId": 108964,
        "reference": "fullDescription",
        "html": "<p>Example product only</p>",
        "modifiedOn": "2026-07-17T09:11:20+00:00",
        "modifiedBy": null,
        "createdOn": "2026-07-17T09:11:20+00:00",
        "createdBy": null
    }
}

List/search Fragments for a given Product

GET /api/v2/products/{productId}/fragments.json

Get or search for one or more fragments associated with a Product using a range of accepted query parameters.

Requires either the products or products.readonly OAuth scope.

URL parameters

productId required
The product ID is required.


Query Parameters

id:in
Return fragments for a product by a comma-separated list of IDs.
id:min
Return fragments with an ID greater than or equal to that specified.
id:max
Return fragments with an ID less than or equal to that specified.
id:after
Return fragments with an ID greater than that specified.
id:before
Return fragments with an ID less than that specified.
reference
Return fragments with a matching reference.
reference:in
Return fragments with a matching references supplied as a comma separated list.


JSON response

Evance will return a JSON object containing the following properties:

success
A successful search request containing zero or more results will always return a true value.
status
An integer matching the HTTP response code. A successful request will have a status of 200.
data
An array containing zero or more Product Fragment data objects.
pagination
Search results include a pagination object contain information about the current page, total pages, the limit per page and the total number of results available.
  • limit - the number of results to return per page
  • page - the current page number
  • total - the total number of available results
  • totalPages - the total number of available pages of results
links
An object containing links to traverse available search results.
  • self - the URL for the current search.
  • previous - a URL for the previous results page, or null if there isn't one.
  • next - a URL for the next results page, or null if there isn't one


Example JSON response


{
    "success": true,
    "status": 200,
    "data": [
        {
            "id": 52,
            "productId": 108964,
            "reference": "fullDescription",
            "html": "<p>Example product only</p>",
            "modifiedOn": "2026-07-17T09:11:20+00:00",
            "modifiedBy": null,
            "createdOn": "2026-07-17T09:11:20+00:00",
            "createdBy": null
        }
    ],
    "pagination": {
        "page": 1,
        "limit": 100,
        "total": 1,
        "totalPages": 1
    },
    "links": {
        "self": "https://examples.evance.me/api/v2/products/3066/fragments.json",
        "previous": null,
        "next": null
    }
}

Get a single Product Fragment

GET /api/v2/products/{productId}/fragments/{id}.json

Retrieve a single Product Fragment using its ID.

Requires either the products or products.readonly OAuth scope.

URL parameters

id required
The ID of the Product Fragment is supplied as a path parameter.
productId required
The ID of the Product is supplied as a path parameter.


Response

Returns an object with the following properties:

success
A boolean where a value of true represents a successful request.
status
The HTTP status code e.g. 200 for a successful request.
data
Contains the Product Fragment object.


Example JSON response

{
    "success": true,
    "status": 200,
    "data": {
        "id": 52,
        "productId": 108964,
        "reference": "fullDescription",
        "html": "<p>Example product only</p>",
        "modifiedOn": "2026-07-17T09:11:20+00:00",
        "modifiedBy": null,
        "createdOn": "2026-07-17T09:11:20+00:00",
        "createdBy": null
    }
}


Add a Product Fragment

POST /api/v2/products/{productId}/fragments.json

Add a content Fragment to a Product.

Requires the products OAuth scope.

URL parameters

productId required
The ID of the Product is supplied as a path parameter.


Request body

Your request body must contain an object including:

data required
Containing a Product Fragment object.


Example: minimum requirements

The minimum requirements for a product fragment is the reference and html values.

{
    "data": {
        "reference": "fullDescription",
        "html": "<p>My initial content goes here</p>"
    }
}

Success response

If the Product Fragment was created successfully you should receive a response with a 201 status code:

success
A boolean where a value of true means the object was created successfully.
status
The HTTP status code e.g. 201 means the object was created successfully.
data
Contains the Product Fragment object you created including its new id.


Error responses

If the Fragment could not be created you will encounter a response with a 422 status code:

success
A boolean where a value of false means the object could not be created.
status
A response code of 422 means the object could not be created and you should check the errors property for further information.
context
The context property indicates where the error occurred. For a 422 error this will typically contain a value of data, indicating that there was an error with the data object supplied.
errors

Contains an array of error objects, each will have the following properties:

  • name - The property name that encountered an error.
  • message - A human readable error message.
  • ref - An error reference string (e.g. error.not-unique if the alias supplied is already in use).


Update a Product Fragment

PUT /api/v2/products/{productId}/fragments/{id}.json

Update an existing Product Fragment item by its ID.

Requires the products OAuth scope.

URL parameters

id required
The ID of your Product Fragment object
productId required
The ID of your Product object


Request body

Your request body must contain an object including:

data required
Containing updates to your Product Fragment object.


Example JSON request

To update a Product Fragment you must PUT JSON to this resource within a data object. You do not need to supply all properties and may choose to only supply properties that require modifying.

{
    "data": {
        "html": "<p>My updated content</p>"
    }
}


Success response

If the Fragment was updated successfully you should receive a response with a 200 status code:

success
A boolean where a value of true means the object was saved successfully.
status
The HTTP status code e.g. 200 means the object was updated successfully.
data
Contains the Product Fragment object you updated.


Error responses

If the Fragment could not be updated you will encounter a response with either a 400, 404or 422status code:

success
A boolean where a value of false means the object could not be updated.
status
  • 400 may indicate that the ID was not provided.
  • 404 means Product or Fragment could not be found by the IDs provided.
  • 422 means the Fragment could not be updated due to errors in the data.
context
  • parameters means the error is with the required id URL parameter.
  • data indicates an error within the object data.
errors

Contains an array of error objects, each will have the following properties:

  • name - The property name that encountered an error.
  • message - A human readable error message.
  • ref - An error reference string.


Delete a Product Fragment

DELETE /api/v2/products/{productId}/fragments/{id}.json

Delete a Product Fragment from your product by its ID.

Requires the products OAuth scope.

URL parameters

id required
The ID of your Product Fragment object
productId required
The ID of your Product object


Request body

Does not require a payload

Success response

If the Fragment was deleted successfully you should receive a response with a 204 status code and no body.

Error responses

If the Fragment could not be deleted you may encounter a response with a 400, or 404 status code:

success
A boolean where a value of false means the object could not be deleted.
status
  • 400 may indicate that the ID was not provided, or the object could not be deleted for an unknown reason.
  • 404 indicates that the ID was provided, but the fragment or product could not be found.