Product Assets
To add and remove assets, assign them to products, and set an image Hero Shot
Endpoints
| Endpoint | Description |
|---|---|
| Add Asset to Library | Add an asset (image, video, document) to the Asset Library. Use results from this call to assign assets to products. |
| Assign Asset to Product | Add the asset to a product. |
| Assign Asset to Many Products | Add the asset to many products at once. This is useful for master products with variants. You must first assign the asset to any one of the products in the master product family. This call will then assign the asset to all slugs provided in the body. |
| Set Hero Shot | Set an image as the Hero Shot (default image). Only one Hero Shot can be assigned per product. This call will replace currrent Hero Shot. |
| Remove Asset from Product | Delete an asset from a product. |
Add Asset to Library
POST /productlibrary/ProductManager/companies/{companyId}/asset
Add an asset (image, video, document) to the Asset Library. Use results from this call to assign assets to products.
Sample request using multipart/form-data:
POST /productlibrary/ProductManager/companies/{CompanyId}/asset
Content-Type: multipart/form-data; boundary="boundary"
--boundary
Content-Disposition: form-data; name="file"; filename="product-image.jpg"
Content-Type: image/jpeg
[Binary file content]
--boundary--
Supported media types:
- Images:
.jpg,.jpeg,.png,.bmp - Video:
.3g2,.3gp,.asf,.avi,.flv,.mkv,.mov,.mp4,.mpg,.mpeg,.mpeg4,.ogg,.ogm,.ogv,.rm,.vob,.webm,.wmv - Documents:
.pdf
Maximum file size: 10MB
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| companyId | The unique Company Id that was provided in your onboarding package | integer | Required |
Body Parameters
None.
Response Information
Resource Description
Asset details including the generated asset ID and URL
AssetResult
| Name | Description | Type | Additional information |
|---|---|---|---|
| width | integer | None. | |
| height | integer | None. | |
| id | Id of the asset in the Asset Library. Use this to assign the asset to products. | globally unique identifier | None. |
| href | string | None. | |
| md5Checksum | string | None. | |
| sizeInBytes | integer | None. | |
| name | string | None. | |
| mimeType | The MIME type associated with the content. Use this when assigning the asset to products. | string | None. |
| success | boolean | None. |
Response Formats
application/json, text/json
{
"width": 1,
"height": 2,
"id": "0336721d-5d83-4c5d-bc5b-a0a495b94b72",
"href": "sample string 4",
"md5Checksum": "sample string 5",
"sizeInBytes": 6,
"name": "sample string 7",
"mimeType": "sample string 8",
"success": true
}
Assign Asset to Product
PUT /productlibrary/ProductManager/products/{slugId}/assets?companyEntityId={companyEntityId}
Add the asset to a product.
Example of a call would be:
https://api.covasoft.net/productlibrary/ProductManager/products/{slugId}/assets?companyEntityId={companyEntityId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| companyEntityId | The unique Company Id that was provided in your onboarding package | integer | Required |
| slugId | The Slug of the product. Typically in the format M12345 or M12345-V2 | string | Required |
Body Parameters
AssignAsset
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | Id from the POST /asset call | globally unique identifier | None. |
| name | name that will display in hub under the asset | string | None. |
| mimeType | mimeType from the POST /asset call | string | None. |
Request Formats
application/json, text/json
{
"id": "f68b2af1-f9f0-4a33-a8c6-b3166ab7cb5f",
"name": "sample string 2",
"mimeType": "sample string 3"
}
Response Information
Resource Description
AssignAssetResult
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | string | None. | |
| mimeType | string | None. | |
| name | string | None. | |
| isHidden | Ignore | boolean | None. |
| isRolledUp | Ignore | boolean | None. |
| type | string | None. |
Response Formats
application/json, text/json
{
"id": "sample string 1",
"mimeType": "sample string 2",
"name": "sample string 3",
"isHidden": true,
"isRolledUp": true,
"type": "sample string 6"
}
Assign Asset to Many Products
POST /productlibrary/ProductManager/products/{slugId}/assets/{assetId}/bulk?companyEntityId={companyEntityId}
Add the asset to many products at once. This is useful for master products with variants. You must first assign the asset to any one of the products in the master product family. This call will then assign the asset to all slugs provided in the body.
Example of a call would be:
https://api.covasoft.net/productlibrary/ProductManager/products/{slugId}/assets/{{AssetId}}/bulk?CompanyEntityId={{CompanyId}}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| companyEntityId | The unique Company Id that was provided in your onboarding package | integer | Required |
| slugId | The Slug of the product. Typically in the format M12345 or M12345-V2 | string | Required |
| assetId | The Guid identifier of the asset to assign | globally unique identifier | Required |
Body Parameters
AssignAssetBulk
| Name | Description | Type | Additional information |
|---|---|---|---|
| Slugs | Product Slugs to assign the asset to. Note: Only valuable for master products with variants. Cannot assign an asset to unrelated products. | Collection of string | None. |
Request Formats
application/json, text/json
{
"Slugs": [
"sample string 1",
"sample string 2"
]
}
Response Information
Resource Description
None.
Set Hero Shot
PUT /productlibrary/ProductManager/products/{slugId}/heroshot?companyEntityId={companyEntityId}
Set an image asset as the Hero Shot (default image). Only one Hero Shot can be assigned per product, and it must be an image. This call will replace currrent Hero Shot.
Example of a call would be:
https://api.covasoft.net/productlibrary/ProductManager/products/{slugId}/heroshot?companyEntityId={companyEntityId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| companyEntityId | The unique Company Id that was provided in your onboarding package | integer | Required |
| slugId | The Slug of the product. Typically in the format M12345 or M12345-V2 | string | Required |
Body Parameters
AssignHeroShot
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | Id from the POST /asset call | globally unique identifier | None. |
Request Formats
application/json, text/json
{
"id": "dd8293f6-a7ec-4045-99f2-1b65a4307ff2"
}
Response Information
Resource Description
AssignHeroShot
| Name | Description | Type | Additional information |
|---|---|---|---|
| id | Id from the POST /asset call | globally unique identifier | None. |
Response Formats
application/json, text/json
{
"id": "87768799-9ec5-4676-be14-9bc7ee347eb2"
}
Remove Asset from Product
DELETE /productlibrary/ProductManager/products/{slugId}/assets/{assetId}?companyEntityId={companyEntityId}
Delete an asset from a product.
Example of a call would be:
https://api.covasoft.net/productlibraryProductManager/products/{slugId}/assets/{assetId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| slugId | The Slug of the product. Typically in the format M12345 or M12345-V2 | string | Required |
| assetId | The Guid identifier of the asset to remove | integer | Required |
Body Parameters
None.
Response Information
Resource Description
204 - No Content
None.