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
fe_cart_url matches with the expected value (*.fasteditor.com). Response Body
This response body is a JSON array with items, each having the following parameters:
| Name | Description | Type |
|---|---|---|
| sku | The SKU of the created product as known by Partner. | String |
| projectKey | FastEditor's Unique identifier for the finished copy of the project. This needs to be communicated back in the request in Sale Notification. | Integer |
| projectId | FastEditor's Unique Identifier for the project. This can be used with the Smartlink function to send the user back into the project. | Integer |
| userId | The external user id, if available. This corresponds to the userId value that was submitted to the Create Smartlink endpoint. | String |
| pages | The number of pages in the project. This is mostly relevant for photo books and sets of prints. | Integer |
| quantity | Number of items to add to the shopping cart. | Integer |
| imageUrl | The URL of a thumbnail image of the project, best suited for display in a shopping cart overview. Maximum dimensions: 500 × 500 px. The product image’s aspect ratio is preserved, so the returned image is not necessarily square and its actual dimensions may be smaller. | String |
| imageUrlLarge | The URL of an image of the project for display at a larger size where higher image quality is needed. Maximum dimensions: 2000 × 2000 px. The product image’s aspect ratio is preserved, so the returned image is not necessarily square and its actual dimensions may be smaller. | String |
| output | An array with one entry per (used) print position on the product, holding the preview URLs, print method, print area and artwork details, and original uploads for that position. See the Output table below for the full list of properties. | Array<Object> |
| price | Price for product as calculated by FastEditor, expressed as a decimal value (e.g. 19.95). | Decimal |
| currency | 3-letter ISO code for the currency that the price is communicated in. | String |
| country | 2-letter ISO code for the country linked to the user session. | String |
| language | ISO code for the active language in the editor. | String |
| customAttributes | Returns the customAttributes sent to the Create Smartlink endpoint. | Object |
| addOnQuantity | For products like photo books, this provides the number of extra pages (on top of the base number of pages for the product). | Integer |
Output
The output parameter in the response body will hold an array with all (used) print positions in the product. Each object in the array will have the following parameters:
| Name | Description | Type |
|---|---|---|
| previewUrls | Provides the URL to the image showing the mockup of the print position. | Array<string> |
| printMethod | One of the (normalized) available print methods. See Print Methods for the full list of possible values. | String |
| name | Localized name of the print position. | String |
| pmsColors | Array of used PMS colors in the user's artwork. | Array<string> |
| supplierPrintMethodName | Print method name as defined in the original supplier data (non-normalized source data). | String |
| supplierPrintMethodCode | Print method code as defined in the original supplier data (non-normalized source data). | String |
| supplierPrintAreaCode | Code for the print position as defined in the original supplier data (non-normalized source data). | String |
| supplierPrintAreaName | Name for the print position as defined in the original supplier data (non-normalized source data). | String |
| printAreaSize | Defines the total size of the print area that the user can edit and thus place artwork in. See Print Area Size table below. | Object |
| artworkAreaSize | Defines the total size of the bounding box of the artwork placed inside the print area. See Artwork Area Size table below. | Object |
| uploads | Array of the original uploaded files the user added to this print position. | Array<string> |
Print Area Size
The printAreaSize object describes the total size of the print area that the user can edit and thus place artwork in. It has the following properties:
| Name | Description | Type |
|---|---|---|
| metricUnits | The unit of measurement used for the other properties. | "mm" | "inch" |
| width | Width of the print area, in the given metric units. | Decimal |
| height | Height of the print area, in the given metric units. | Decimal |
| bleed | Bleed margin around the print area, in the given metric units. | Decimal |
Artwork Area Size
The artworkAreaSize object describes the bounding box of the artwork the user placed inside the print area, including its position. It has the following properties:
| Name | Description | Type |
|---|---|---|
| metricUnits | The unit of measurement used for the other properties. | "mm" | "inch" |
| width | Width of the artwork bounding box, in the given metric units. | Decimal |
| height | Height of the artwork bounding box, in the given metric units. | Decimal |
| x | Horizontal position inside the print area where the artwork bounding box starts, in the given metric units. | Decimal |
| y | Vertical position inside the print area where the artwork bounding box starts, in the given metric units. | Decimal |
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": "101032-001#DigitalTransferOS#itemfront#100#50#3",
"projectId": 1480,
"projectKey": 615,
"userId": "user_123",
"pages": 1,
"quantity": 1,
"imageUrl": "https://zecbotvh3i.execute-api.eu-west-1.amazonaws.com/staging/project-image/21/1480/WkLBs47TZOCbpRzxKjhg/1759747383",
"imageUrlLarge": "https://example.com/project-image-large.jpg",
"price": 0,
"currency": "EUR",
"country": "ES",
"isQuantityMutable": true,
"language": "nl",
"customAttributes": [],
"output": [
{
"printMethod": "Digital transfer",
"previewUrls": [
"https://zecbotvh3i.execute-api.eu-west-1.amazonaws.com/staging/project-image/21/1480/WkLBs47TZOCbpRzxKjhg/1759747383?pageid=8ivi8IvIz7tfI9NqwlfVJ"
],
"pmsColors": [
"PANTONE 353 C"
],
"supplierPrintMethodName": "Digital transfer",
"supplierPrintMethodCode": "Digital Transfer OS",
"supplierPrintAreaCode": "item front",
"supplierPrintAreaName": "item front",
"printAreaSize": {
"metricUnits": "mm",
"width": 300,
"height": 300,
"bleed": 0
},
"artworkAreaSize": {
"metricUnits": "mm",
"width": 120,
"height": 80,
"x": 90,
"y": 110
},
"uploads": [
"https://example.com/my-logo.eps",
"https://example.com/my-second-logo.pdf"
]
}
]
}
]