Add to Cart
Once the user is done customizing the product(s), we will forward the user to the URL of your shopping cart. Added to that URL is a query parameter labelled fe_cart_url
that passes the URL at which you can request the items that need to be added to the user's shopping cart. You can then make a GET request to that URL and will receive the response body referenced below.
Important: Make sure to validate that the domain of the received fe_cart_url
matches with the expected value (by default: api.{yourlabel}.fasteditor.com
)
Response body
This response body is a JSON array with items, each having the following parameters:
Name | Required | Description | DataType | Example |
---|---|---|---|---|
sku | Yes | The SKU of the created product as known by Partner. | String | BOOK_13X13 |
projectKey | Yes | FastEditor’s Unique identifier for the finished copy of the project. This needs to be communicated back in the request in Sale Notification | Integer | 492393 |
projectId | Yes | FastEditor's Unique Identifier for the project. This can be used with the Smartlink function to send the user back into the project. | Integer | 501438 |
pages | Yes | The number of pages in the project. This is mostly relevant for photo books and sets of prints. | Integer | 46 |
quantity | Yes | Number of items to add to the shopping cart. | Integer | 1 |
imageUrl | Yes | The URL of a thumbnail image of the project. | String | https://fasteditor.com/image.jpg |
output | No | For logo products with multiple print areas. This provides an array of objects with parameters "previewUrls" and (optionally) "name" | Array<Object> | [{"previewUrls":["https://fasteditor.com/project-image/24/81/d51KHzFC5uahbFZuE0yn/1747750142?pageid=HXX-0yy5szTcr7yBh8WKF"],"name":"Front"},{"previewUrls":["https://fasteditor.com/project-image/24/81/d51KHzFC5uahbFZuE0yn/1747750142?pageid=qhnNe2JGC8CIAvDD_3SL6"],"name":"Back"}] |
price | No | Price for product as calculated by FastEditor. Cents as decimals. | Number | 29.95 |
currency | No | 3-letter ISO code for the currency that the price is communicated in | String | EUR |
customAttributes | No | Returns the customAttributes send to the SmartLink endpoint | Object | { "quantity": 2 } |
addOnQuantity | No | For products like photo books, this provides the number of extra pages (on top of the base number of pages for the product) | Integer | 8 |
Example response
Below is an example response body that you can receive when making the GET request to the URL received through the fe_cart_url
query parameter.
[{
"sku": "BOOK_13x13",
"projectKey": 492393,
"projectId": 501438,
"pages": 46,
"quantity": 1,
"imageUrl": "https://fasteditor.com/image.jpg"
}]