Generate an Upload URL
DevelopingPOST
v1/products/{{product-id}}/downloadables/generate-s3-presigned-url/The "Generate an Upload URL" endpoint allows users to generate a pre-signed URL for uploading a digital file directly to cloud storage. This URL enables secure, temporary access for uploading files associated with a digital product.
Request
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.
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.
Role of the user.
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.
Request samples
Responses
The pre-signed URL for direct file upload to the specified cloud storage location, which is active for a limited time.
An object containing fields required for uploading the file.
Maximum allowed file size (in bytes) for the upload.
{
"response": {
"url": "https://s3.eu-west-1.amazonaws.com/private.zid.store",
"fields": {
"key": "9fc92996-ffbe-4bca-9b8e-6682137fe7b6/product-downloadables/8244389b-8fe3-47dc-85ae-2f8e9e95f899",
"AWSAccessKeyId": "AKIAXOL3MW23VCA3WLDK",
"policy": "eyJleHBpcmF0aW9uIjogIjIwMjQtMTEtMDNUMDU6NTU6MTZaIiwgImNvbmRpdGlvbnMiOiBbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsIDAsIDEwNzM3NDE4MjRdLCB7ImJ1Y2tldCI6ICJwcml2YXRlLnppZC5zdG9yZSJ9LCB7ImtleSI6ICI5ZmM5Mjk5Ni1mZmJlLTRiY2EtOWI4ZS02NjgyMTM3ZmU3YjYvcHJvZHVjdC1kb3dubG9hZGFibGVzLzgyNDQzODliLThmZTMtNDdkYy04NWFlLTJmOGU5ZTk1Zjg5OSJ9XX0=",
"signature": "R5oESN7BQbUFL52iG64WSTaCAbw="
}
},
"size_limit": 1073741824
}