Create Product Downloadables
DevelopingPOST
v1/products/{{product-id}}/downloadables/This endpoint creates downloadable content for a digital product, associating a file with the specified product. The download link is generated and returned, allowing users to access or download the content directly. The response provides information on the uploaded file, including its metadata, access link, and display details.
Request
The Authorization token is a unique key given to the third-party application (Partner) by Zid. It is used to authenticate the API requests made by the Partner application. The token verifies the partner's identity and ensures they have permission to access Zid's API but does not provide any specific user or store information. It should be included in the header of API requests when the partner application needs to access Zid's API.
Unique identifier of the store.
Preferred language for the response. Defaults to en
if not specified.
This token is used to authenticate and access information related to the store. It is obtained through an OAuth mechanism and is required to perform operations on the store's data. The X-Manager-Token
should be included in the header of API requests that require store-related information.
Role of the user.
The currency in which the data should be returned. This should be provided as an ISO 4217 currency code. For example, SAR for Saudi Riyal, USD for United States Dollar, KWD for Kuwaiti Dinar, etc.
Request samples
Responses
A unique identifier for the downloadable content.
The ID of the product to which this downloadable file is linked.
Contains details about the uploaded file, including storage key, access URL, and metadata.
The unique storage identifier for the file in the storage system.
The direct access URL for the file, including temporary authentication parameters if needed.
Metadata about the file.
The name of the file as it should appear to the end user.
Optional ordering value to manage display sequence among multiple files.
Indicates whether this file is available for download.
Defines if the file is hosted externally or within the primary storage.
{
"id": "1c044189-9155-4d51-aef1-22c8d3edd7ba",
"product_id": "5af835b7-1a37-4401-a3fc-6d9007c44c8f",
"file": {
"key": "9fc92996-ffbe-4bca-9b8e-6682137fe7b6/product-downloadables/8244389b-8fe3-47dc-85ae-2f8e9e95f899",
"url": "https://s3.eu-west-1.amazonaws.com/private.zid.store/9fc92996-ffbe-4bca-9b8e-6682137fe7b6/product-downloadables/8244389b-8fe3-47dc-85ae-2f8e9e95f899?response-content-disposition=inline%3B%20filename%3D%22most-common-reasons-for-journal-rejections.pdf%22&AWSAccessKeyId=AKIAXOL3MW23VCA3WLDK&Signature=vZI5mUsstSI2hT4lL957lFun%2F%2BM%3D&Expires=1730614548",
"meta": {
"content_length": 278103,
"content_type": "binary/octet-stream",
"content_encoding": null
}
},
"display_name": "most-common-reasons-for-journal-rejections.pdf",
"display_order": null,
"is_enabled": true,
"is_external": false
}