Skip to main content

Product Assets

To add and remove assets, assign them to products, and set an image Hero Shot

Endpoints​

EndpointDescription
Add Asset to LibraryAdd an asset (image, video, document) to the Asset Library. Use results from this call to assign assets to products.
Assign Asset to ProductAdd the asset to a product.
Assign Asset to Many ProductsAdd 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 ShotSet 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 ProductDelete 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​

NameDescriptionTypeAdditional information
companyIdThe unique Company Id that was provided in your onboarding packageintegerRequired

Body Parameters​

None.

Response Information​

Resource Description​

Asset details including the generated asset ID and URL

AssetResult

NameDescriptionTypeAdditional information
widthintegerNone.
heightintegerNone.
idId of the asset in the Asset Library. Use this to assign the asset to products.globally unique identifierNone.
hrefstringNone.
md5ChecksumstringNone.
sizeInBytesintegerNone.
namestringNone.
mimeTypeThe MIME type associated with the content. Use this when assigning the asset to products.stringNone.
successbooleanNone.

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​

NameDescriptionTypeAdditional information
companyEntityIdThe unique Company Id that was provided in your onboarding packageintegerRequired
slugIdThe Slug of the product. Typically in the format M12345 or M12345-V2stringRequired

Body Parameters​

AssignAsset

NameDescriptionTypeAdditional information
idId from the POST /asset callglobally unique identifierNone.
namename that will display in hub under the assetstringNone.
mimeTypemimeType from the POST /asset callstringNone.

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

NameDescriptionTypeAdditional information
idstringNone.
mimeTypestringNone.
namestringNone.
isHiddenIgnorebooleanNone.
isRolledUpIgnorebooleanNone.
typestringNone.

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​

NameDescriptionTypeAdditional information
companyEntityIdThe unique Company Id that was provided in your onboarding packageintegerRequired
slugIdThe Slug of the product. Typically in the format M12345 or M12345-V2stringRequired
assetIdThe Guid identifier of the asset to assignglobally unique identifierRequired

Body Parameters​

AssignAssetBulk

NameDescriptionTypeAdditional information
SlugsProduct Slugs to assign the asset to. Note: Only valuable for master products with variants. Cannot assign an asset to unrelated products.Collection of stringNone.

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​

NameDescriptionTypeAdditional information
companyEntityIdThe unique Company Id that was provided in your onboarding packageintegerRequired
slugIdThe Slug of the product. Typically in the format M12345 or M12345-V2stringRequired

Body Parameters​

AssignHeroShot

NameDescriptionTypeAdditional information
idId from the POST /asset callglobally unique identifierNone.

Request Formats​

application/json, text/json

{
"id": "dd8293f6-a7ec-4045-99f2-1b65a4307ff2"
}

Response Information​

Resource Description​

AssignHeroShot

NameDescriptionTypeAdditional information
idId from the POST /asset callglobally unique identifierNone.

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​

NameDescriptionTypeAdditional information
slugIdThe Slug of the product. Typically in the format M12345 or M12345-V2stringRequired
assetIdThe Guid identifier of the asset to removeintegerRequired

Body Parameters​

None.

Response Information​

Resource Description​

204 - No Content

None.