AssetAttachment
Models marketing items than can be attached to products, like Apple Motion Arts.
List
GET
https://api.idol.io/api/v2/asset-attachments
Query Parameters
page[size]
integer
Number of asset-attachments per page
page[number]
integer
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
"data": [
{
"id": "2",
"type": "asset-attachments",
"links": {
"self": "http://test.host/api/v2/asset-attachments/2"
},
"attributes": {
"created-at": "2023-11-30T16:36:04.188+01:00",
"updated-at": "2023-11-30T16:36:04.188+01:00",
"kind": "apple_motion_art_mobile",
"file": null,
"file-md5": null,
"file-url": null
},
"relationships": {
"attachable": {
"links": {
"self": "http://test.host/api/v2/asset-attachments/2/relationships/attachable",
"related": "http://test.host/api/v2/asset-attachments/2/attachable"
},
"data": {
"type": "products",
"id": "2340775"
}
}
}
},
{
"id": "3",
"type": "asset-attachments",
"links": {
"self": "http://test.host/api/v2/asset-attachments/3"
},
"attributes": {
"created-at": "2023-11-30T16:36:04.188+01:00",
"updated-at": "2023-11-30T16:36:04.188+01:00",
"kind": "apple_motion_art_mobile",
"file": null,
"file-md5": null,
"file-url": null
},
"relationships": {
"attachable": {
"links": {
"self": "http://test.host/api/v2/asset-attachments/3/relationships/attachable",
"related": "http://test.host/api/v2/asset-attachments/3/attachable"
},
"data": {
"type": "products",
"id": "248864372"
}
}
}
}
],
"meta": {
"record-count": 2,
"page-count": 1
},
"links": {
"first": "http://test.host/api/v2/asset-attachments?page%5Bnumber%5D=1&page%5Bsize%5D=20",
"last": "http://test.host/api/v2/asset-attachments?page%5Bnumber%5D=1&page%5Bsize%5D=20"
}
}
Get
GET
https://api.idol.io/api/v2/asset-attachments/:id
Path Parameters
id*
number
ID of the asset-attachment
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
{
"data": {
"id": "2",
"type": "asset-attachments",
"links": {
"self": "http://test.host/api/v2/asset-attachments/2"
},
"attributes": {
"created-at": "2023-11-30T16:36:04.188+01:00",
"updated-at": "2023-11-30T16:36:04.188+01:00",
"kind": "apple_motion_art_mobile",
"file": null,
"file-md5": null,
"file-url": null
},
"relationships": {
"attachable": {
"links": {
"self": "http://test.host/api/v2/asset-attachments/2/relationships/attachable",
"related": "http://test.host/api/v2/asset-attachments/2/attachable"
},
"data": {
"type": "products",
"id": "248864372"
}
}
}
},
"included": [
{
"id": "248864372",
"type": "products",
"links": {
"self": "http://test.host/api/v2/products/248864372"
},
"attributes": {
"created-at": "2023-11-30T16:41:29.888+01:00",
"updated-at": "2023-11-30T16:41:29.888+01:00",
etc...
},
"relationships": {
"distributors": {
"links": {
"self": "http://test.host/api/v2/products/248864372/relationships/distributor",
"related": "http://test.host/api/v2/products/248864372/distributor"
},
"data": {
"type": "distributors",
"id": "156614868"
}
},
etc...
}
}
]
}
Create
POST
https://api.idol.io/api/v2/asset-attachments
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
Request Body
attachable_type*
string
The objet's type of the related object ("Product" only for now)
attachable_id*
integer
The ID of the related object (product ID only for now)
kind*
string
"apple_motion_art_mobile" (3:4) or "apple_motion_art_desktop" (1:1)
{
"data": {
"id": "5",
"type": "asset-attachments",
"links": {
"self": "http://test.host/api/v2/asset-attachments/5"
},
"attributes": {
"created-at": "2023-11-30T16:36:04.188+01:00",
"updated-at": "2023-11-30T16:36:04.188+01:00",
"kind": "apple_motion_art_desktop",
"file": null,
"file-md5": null,
"file-url": null
},
"relationships": {
"attachable": {
"links": {
"self": "http://test.host/api/v2/asset-attachments/5/relationships/attachable",
"related": "http://test.host/api/v2/asset-attachments/5/attachable"
},
"data": {
"type": "products",
"id": "248864372"
}
}
}
}
}
Update
PUT
https://api.idol.io/api/v2/asset-attachments
Path Parameters
kind*
string
ID of the Availability
Headers
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
Request Body
priority*
integer
"apple_motion_art_mobile" (3:4) or "apple_motion_art_desktop" (1:1)
{
"data": {
"id": "5",
"type": "asset-attachments",
"links": {
"self": "http://test.host/api/v2/asset-attachments/5"
},
"attributes": {
"created-at": "2023-11-30T16:36:04.188+01:00",
"updated-at": "2023-11-30T16:36:04.188+01:00",
"kind": "apple_motion_art_desktop",
"file": null,
"file-md5": null,
"file-url": null
},
"relationships": {
"attachable": {
"links": {
"self": "http://test.host/api/v2/asset-attachments/5/relationships/attachable",
"related": "http://test.host/api/v2/asset-attachments/5/attachable"
},
"data": {
"type": "products",
"id": "248864372"
}
}
}
}
}
Last updated