AssetAttachment
Models marketing items than can be attached to products, like Apple Motion Arts.
Last updated
Models marketing items than can be attached to products, like Apple Motion Arts.
Last updated
GET
https://api.idol.io/api/v2/asset-attachments
page[size]
integer
Number of asset-attachments per page
page[number]
integer
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
https://api.idol.io/api/v2/asset-attachments/:id
id*
number
ID of the asset-attachment
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...
}
}
]
}
POST
https://api.idol.io/api/v2/asset-attachments
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
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"
}
}
}
}
}
PUT
https://api.idol.io/api/v2/asset-attachments
kind*
string
ID of the Availability
Authorization*
string
Bearer <token>
Content-Type*
string
application/vnd.api+json
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"
}
}
}
}
}