Assets

Attaching assets to products

For this you will need to have the asset id and the product id(s). You can find products via another api.


Attach

Use the product id(s) and send a POST request with the asset id to

https://app.digital-downloads.com/api/v1/assets/:id/attach

Example

https://app.digital-downloads.com/api/v1/assets/82664d96-6dfd-4343-96b0-05c46f412a5b/attach

Request

{
    "products": [
        "82664d96-6dfd-4343-96b0-05c46f412a51", 
        "82664d96-6dfd-4343-96b0-05c46f412a52", 
        "82664d96-6dfd-4343-96b0-05c46f412a53"
    ]
}

Response

You will receive a 201 response code.


Removing attached products

Use the product id(s) you wish to remove and send a POST request with the asset id to

https://app.digital-downloads.com/api/v1/assets/:id/detach

Example

https://app.digital-downloads.com/api/v1/assets/82664d96-6dfd-4343-96b0-05c46f412a5b/detach

Request

{
    "products": [
        "82664d96-6dfd-4343-96b0-05c46f412a51", 
        "82664d96-6dfd-4343-96b0-05c46f412a53"
    ]
}

Response

You will receive a 201 response code.

Previous
Deleting assets