Content extension reference
Integrating Marq's content extension enables users to create personalized and dynamic content with your assets, making your platform a continuation of the full life-cycle of content creation.
To better learn how to use the content extension, review the Images concept to understand how images and folders in the content panel enable users within Marq's editor.
Marq's content request content
When a user opens your app's content pane, they likely will either browse through assets, filter by categoies/tags, or search with keyword terms.
As an external partner, you will need to register a REST API endpoint that Marq will use to request assets when a user interacts with your content extension.
Marq will utilize the following request parameters in its request, and the content extension is expected to utilize each parameter in its response.
Parameter | Description |
---|---|
query | Allows a user to lock elements on a page or project. Typically used for Template admins that are creating templates |
folderId | Allows a user to download project from their browser and choose the following file types: PDF, PNG, JPG, GIF, or MP4. |
tags | Allows a user to create an order for a print vendor that is connected to their Marq account. |
orderBy | Allows a user to share project with other users in their account or invite new users outside of their Marq account. |
limit | Allows a user to share/publish project to external platforms (e.g. Twitter, Facebook, Instagram, etc.). |
offset | Allows you to specify the type of file exported when a user clicks on Save - this will then create an export job you will be able to retrieve either via a Webhook or via the iframe. |
{
"query": "Students studying",
"folderId": "230-2394-fw239-293",
"tags": [
"MBA",
"Library"
],
"orderBy": "name",
"limit": 100,
"offset": 2
}
Provide results back to Marq's content request
After a user initiates a search, Marq expects a response labeled as "SUCCESS"
. This response should contain relevant resources that align with the user's query.
The following parameters should be included in your asset object that is returned to Marq:
Parameter | Description |
---|---|
id | Identifier of the asset or folder that should be unique within the external platform. |
name | The name of the image, GIF, or folder. |
type | The asset type: folder ,image ,gif are the current options available. |
url | The URL for the asset which must be publicly available on the internet or via a pre-signed URL accessible to Marq. Note: not required for folders |
thumbnailUrl | The URL for thumbnail of the asset that will be displayed to the user. Note: not required for folders |
In addition, Marq expects responses to include count of results and offsets to support pagination.
Parameter | Description |
---|---|
totalCount | Allows Marq to identify the number of items that could be surfaced to the user and enable pagination. |
offset | Enables Marq's users to browse assets which Marq will leverage to paginate results. |
{
"type": "SUCCESS",
"totalCount": 2468,
"offset": 2,
"resources": [{
"id": "2234",
"name": "Homecoming",
"type": "folder"
},
{
"id": "9432",
"name": "Graduation",
"type": "folder"
},
{
"id": "843582",
"name": "Students in Courtyard",
"type": "image",
"url": "https://www.images.com/s/zcav9g6reuoks6c/linkedin-sales-solutions-UK1N66KUkMk-unsplash.jpg?dl=0",
"thumbnailUrl": "https://www.images.com/s/zcav9g6reuoks6c/linkedin-sales-solutions-UK1N66KUkMk-unsplash.jpg?dl=0"
},
{
"id": "6753",
"name": "Professor Smith in Auditorium",
"type": "image",
"url": "https://www.images.com/s/e8adzqd1nvyppy3/amy-hirschi-b3AYk8HKCl0-unsplash.jpg?dl=0",
"thumbnailUrl": "https://www.images.com/s/e8adzqd1nvyppy3/amy-hirschi-b3AYk8HKCl0-unsplash.jpg?dl=0"
}
]
}
Updated over 1 year ago