Skip to main content
Version: Next

Get a list of Smart Objects

GET https://app.dynamicmockups.com/api/v1/mockups/[mockup-id]/smart-objects/

Security

This api use API KEY as an authentication method.

  • Name: X-CSCAPI-KEY
  • In: header

Request Parameters

NameLocated inDescriptionRequiredType
[mockup-id]URLId of the mockupRequiredstring

Response

CodeDescription
200Return a array of smart objects
401Unauthorized.
404Not Found.

Example Usage

get-smart-objects.js
var headers = new Headers();
headers.append("X-CSCAPI-KEY", "API_KEY");

var requestOptions = {
method: "GET",
headers: headers,
};

fetch("https://app.dynamicmockups.com/api/v1/mockups/123/", requestOptions)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));

Example Success Response

{
"data": [
{
"id": 376,
"uuid": "9e76157c-76f2-4cc3-8392-2dc10c37ea29",
"mockup_id": 225,
"smart_object_name": "Background",
"smart_object_uuid": "5244f4fb-d71c-11e5-b1ae-a548a96e5f9f",
"top": 0,
"left": 0,
"width": 1080,
"height": 810,
"global_asset_top": 405,
"global_asset_left": 540,
"global_asset_width": 1,
"global_asset_height": 1,
"created_at": "2023-12-06T17:10:05.000000Z",
"updated_at": "2023-12-06T17:10:05.000000Z",
"deleted_at": null,
"thumbnail": "https://app-dynamicmockups-production.s3.eu-central-1.amazonaws.com/6267/Background_5244f4fb-d71c-11e5-b1ae-a548a96e5f9f.png"
}
],
"success": true,
"message": ""
}

Example Error Response

{
"message": "This action is unauthorized."
}

Example Not Found Response

{
"message": "No query results for model [App\\Models\\Mockup] 123"
}