Zid Docs
  1. Digital Products
Zid Docs
  • Merchant API
    • Start Here 🚀
    • Overview to Zid Apps
    • Authorization
    • Responses
    • Webhooks
    • Rate Limiting
    • APIs
      • Orders
        • Update Order by ID
        • Get Order Credit Notes
        • Get Order by ID
        • List of Orders
      • Reverse Orders
        • Reverse Order Reasons
        • Create Reverse Orders
        • Create Reverse Orders Waybill
        • Add Reverse Order Reasons
      • Carts
        • Get Abandoned Cart Details
        • List Abandoned Carts
      • Products
        • Managing Products
          • Get a Product by ID
          • Retrieve a list of products
          • Create a new product
          • Update an existing product.
          • Bulk update of products using their IDs or SKUs
          • Delete a product.
          • Product Setting
          • List Product Reviews
        • Digital Vouchers
          • Product Vouchers
          • Order Voucher
          • Add Product Voucher
          • Import Vouchers
          • Export Vouchers
          • Update Product Voucher
          • Remove Product Voucher
        • Product Categories
          • Get Single Category Details
          • Get all categories
          • Create Store Category
          • Update a Store Category
          • Add a product to a certain category
          • Publish/Unpublish a Category
          • Detach Category from All Products
          • Remove Category from Product
        • Product Badge
          • Product Badge
        • Product Attributes
          • Get Product Attributes
          • Get Product Attributes
          • Retrieve a product attribute
          • Add a New Product Attribute
          • Add a New Product Attribute
          • Update a product attribute
          • Delete a product attribute
        • Product Attribute Presets
          • Get attribute presets
          • Create Attribute Preset
          • Update Attribute Preset
          • Delete an attribute preset
        • Product Customizations
          • Add Product Variants
          • Insert Custom Options to a Product
          • Insert Custom User-Input Fields to a Product
        • Product Manual Sorting
          • Set Custom Product Order
          • Reset the manual sorting of all products
        • Product Images
          • Get List of images of a product.
          • Add an image to a product
          • Update a product Image Order
          • Delete a product image
        • Product Notifications
          • Availability Notification Stats
          • Availability Notifications Settings
          • List Availability Notifications
          • Add Availability Notification
          • Save Availability Notifications Settings
          • Manually Send Availability Notification Email
          • Export Availability Notifications
        • Product Import
          • Email All Products to Store Owner
          • Import Products via CSV or xlsx File
        • Product Stock (Multi-Inventory)
          • Get Product Stock by ID
          • List Product Stocks
          • Add Product Stock
          • Update Single Product Stock
          • Bulk Update Product Stocks
        • Product Questions & Answers
          • Get Question
          • Get Answer
          • Get All Questions
          • List Question Answers
          • Create Question
          • Create Answer
          • Update Question
          • Update Answer
          • Delete Question
          • Delete Answer
        • Product Reviews
          • List Reviews
          • New Reviews Total
          • Change Review Status
          • Bulk Change all Review Statuses
          • Delete Review
          • Import Product Reviews
          • Reply to Review
          • Delete Reply
          • Update Reply to Review
        • Digital Products
          • Create Downloadable Product
            POST
          • Generate an Upload URL
            POST
          • Upload File to S3
            GET
          • Create Product Downloadables
            POST
          • Get Product Downloadables
            GET
          • Delete Product Downloadables
            DELETE
          • Get Store Downloadables
            GET
          • Create Store Downloadables
            POST
          • Delete Store Downloadables
            DELETE
      • Inventories
        • Get Store Location by ID
        • List Store Locations
        • Add a New Location
        • Update a Location by ID
        • Update Products Stock by Location ID
      • Shipping
        • List Store Delivery Options
        • Add Shipping Option
      • Marketing
        • Gift Cards
          • Get Store Settings
          • Add gift card to the cart
          • Update Store Settings
          • Upload gift card designs
          • Remove gift card from the cart
        • Coupons
          • Create a New Coupon
          • List Coupons
          • Get Coupon Details
          • Update Coupon
          • Delete Coupon
        • Bundle Offers
          • Retrieve all Bundle Offers
        • Loyalty Program
          • Customer Wallet
          • Customer Points
          • Loyalty Program Points per Order
          • Store Loyalty Status
          • Redemption Methods
          • Cashback Rules
          • Add Redemption to Cart
          • Remove Redemption from Cart
          • Info Page
          • Loyalty Program Activation
          • Loyalty Status
          • Set Points Expiration
          • Cashback Rule Method Update
          • Cashback Rule Method Update Status
          • Add Points Redemption Method
          • Update Points Redemption Method
          • Delete Points Redemption Method
          • Toggle Redemption Method Status
          • Show Loyalty Points Info for Specific Customer
          • Customer Profile
          • List Data
          • Customer Points History
          • Info Page - Managers
          • Update Info Page
          • Adjust Customer Points
      • Customers
        • List of Customers
        • Get Customer by ID
      • Store Settings
        • 📄 User Roles and Permissions
        • Get Manager's Profile
        • Get VAT Settings
        • List of Payment Method
      • Countries and Cities
        • Retrieve Store Operating Countries
        • Retrieve Cities by Country ID
        • Countries List
      • Webhook
        • List of Webhooks
        • Create a Webhook
        • Delete a Webhook by OriginalId
        • Delete a Webhook by Subscriber
    • Store Events
      • Order
      • Product
      • Abandoned Cart
      • Customer
      • Product Category
  • App API
    • Create your First App
    • Embedded Apps
    • App Scripts
    • App Events
    • App Subscription
      • Get Subscription Details
      • Update Usage-Based Charges
  • Themes
    • 🚨 Important Update: Zid Themes
    • Adding Video URL Feature to Third-Party Themes
    • Landing Page Development
    • Getting Started with Zid Themes
      • Introduction to Theme Development
      • Manage your Themes
      • Building Themes in Zid
      • Theme File Structure
      • Twig Syntax and Features
      • Zid Theme Packager
    • Templates
      • Layout
      • Home Page
      • Products
      • Cart
      • Store Language and Currency
    • Settings Schema
      • Text
      • Number
      • Text-Area
      • Select
      • Radio Buttons
      • Checkbox
      • Range
      • Color
      • Image
      • Product
      • Category
      • List
      • Fieldset
    • Code Snippets
      • Apple Pay Quick Checkout
      • Custom CSS Injection
      • Displaying the Store's Business Center Logo
      • Customizing Copyright Text
      • Store's Main Navigation Menu
      • Customer Wishlist
      • Products
        • Products Badges
        • Product Ratings
        • Remaining Product Stock
        • Sold Items Count
        • Product Filtration by Attributes
        • Grouped Products
        • Product Questions & Answers
        • Product Restock Notfication
      • SEO
        • Images alt text
        • Themes SEO Marketing Tags
      • Marketing
        • Metafields
        • Gift Feature
        • Loyalty Program
    • Zid Themes Library: API Integration
      • Products
      • Product Categories
      • Cart
      • Blog
      • Customer
      • Store Settings
    • Data Reference
      • Locals
      • Store
      • Cart
      • Product
      • Products List
      • Category
      • Categories List
      • Session
      • FAQs
      • Customer
      • Blogs
      • Page
      • Main Menu
      • Main Navigation Menu
      • Request
      • Orders
      • Addresses
      • Store Payment Methods
      • Store Shipping Methods
      • Store Banks
      • Asset URL
      • Header Meta Tags
      • Loyalty pogram Wallet
    • Themes CLI
      • CLI Authentication
      • Theme Create
      • Theme Package
      • Theme Update
      • Themes List
      • Theme Preview
  1. Digital Products

Generate an Upload URL

POST
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.
🔑Scopes
products.read_write - Products Read & Write
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.zid.sa/v1v1/products/{{product-id}}/downloadables/generate-s3-presigned-url/' \
--header 'Store-Id: 3' \
--header 'Accept-Language: ar' \
--header 'X-manager-Token: eyJpdiI6ImNSZ0NKWXlMZ3hEcDZudU1wS3R1dVE9PSIsInZhbHVlIjoiZnRqdGRVUE1IdU9PaytvSk1pbGV5Zk5YUk9pRG9ONWVwa1NaTUIvN0JkYzgwNlFUV3h6ZCs5S2VkRDVaSy9GbWRDQm9adlR4SEFHMStpUDNuM1V1dG9PUENCZ0R6eHJYeEZHLzhzMFlWb25NMHI3TE1NZDIzbnNEQlI3ekNycE5RVHVBczQ2L1FKSjF1UTI3Q0xzaXNtcmM1Mi9LUHc3aDEvV0J6R2ZyUkJCT0lrbXg3c0NiN0JEL1RvWFlSSWZ4M1J2MVhiRWZZcUdXMGI3NVJlMXA0aFNlcE02Z1RPak43Ump6Z1BQdEpnMD0iLCJtYWMiOiIxZmU2YzlmYWE1NTE0OTQwNDFmMTkxYzdhNGM0Zjk2NDgyYjI4ZWM2NjlkODU3NTI4NzM1NTY0YmVkZjMxNzc5IiwidGFnIjoiIn0=:' \
--header 'Currency: SAR' \
--header 'Role: Manager' \
--header 'Authorization: eyJ8eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiMTQyZjEyYTVlY2JhNzIyZTZlMjkwZjVlZDRhNmEwZDk1N2M4MGM3ZTVhODE4MjMyMjhjMzk0YjkyMGFkMmQ2ZDFkODI2YTYxOTI3MTEwMzUiLCJpYXQiOjE3MTA5NzY3MDYuNzUwOTI0LCJuYmYiOjE3MTA5NzY3MDYuNzUwOTI3LCJleHAiOjE3NDI1MTI3MDYuNzA2OTc5LCJzdWIiOiIzIiwic2NvcGVzIjpbIioiXX0.k2xkXywMs4eFArabnVFPH2CfBdMT1M-x0i6xGxM_OfUqKpFRxlTxj7tapbuSKDa2e-lyVr9AZwuCidj-5v1WQjYgj_bYRE-bi4CvGgY9reSVRy5l5a7i19nXNWyDfYHc_20CgMwrAUVlJoZLUkrQ3O6dAdjo83aoyktTKKfI7Q3-iWdFPAEzby_1pU5T883whYEWwfXWGzICwDQzulQzLm7dSAOy2xUNdB2CHn0tHCNHeaY8Mx11MBABAw_RVPZddR7kDOf5jc1g6fJ9YYGeru1ptZPwK2vHlRLnVJdbN5f4byE77LEVyb3daWuv3sYeIdEV3eV9WLmeGt0FlOjxpTHpEqBN4t1np6vV5nZyoluP9SuDXt5wKI7o3uPhat8vZ4B8pc-35484Y5_RxHyP2fxgQStqLFvMypJGoLMh2zg39sUP3oI35R1bIadKt49MM2c-RjP-16ngbK6np104hdFYojelf9EFRN9tY-yIUEyg5fWLw6mIBOxDFcqjZRUc-3P5VPgdeacp0-oU968YB1gP3155Dsu8DVxDr-iuQ5deusTpYnFlqokJ26VknHRJSMxlVBWptljv9EHNFw6a5gvcj8xht5ldm4b9RqisxUC0OlwJtK_pmhp-srp6biaj54u9zIvjKd-seJNumF1VM2nfJk63TnfPZbG9SLyPjuU'
Response Response Example
{
  "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
}

Request

Header Params
Store-Id
integer 
optional
Unique identifier of the store.
Example:
3
Accept-Language
string 
optional
Preferred language for the response. Defaults to en if not specified.
Example:
ar
X-manager-Token
string 
optional
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.
Example:
eyJpdiI6ImNSZ0NKWXlMZ3hEcDZudU1wS3R1dVE9PSIsInZhbHVlIjoiZnRqdGRVUE1IdU9PaytvSk1pbGV5Zk5YUk9pRG9ONWVwa1NaTUIvN0JkYzgwNlFUV3h6ZCs5S2VkRDVaSy9GbWRDQm9adlR4SEFHMStpUDNuM1V1dG9PUENCZ0R6eHJYeEZHLzhzMFlWb25NMHI3TE1NZDIzbnNEQlI3ekNycE5RVHVBczQ2L1FKSjF1UTI3Q0xzaXNtcmM1Mi9LUHc3aDEvV0J6R2ZyUkJCT0lrbXg3c0NiN0JEL1RvWFlSSWZ4M1J2MVhiRWZZcUdXMGI3NVJlMXA0aFNlcE02Z1RPak43Ump6Z1BQdEpnMD0iLCJtYWMiOiIxZmU2YzlmYWE1NTE0OTQwNDFmMTkxYzdhNGM0Zjk2NDgyYjI4ZWM2NjlkODU3NTI4NzM1NTY0YmVkZjMxNzc5IiwidGFnIjoiIn0=:
Currency
string 
optional
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.
Example:
SAR
Role
string 
optional
Role of the user.
Example:
Manager
Authorization
string 
optional
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.
Example:
eyJ8eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzIiwianRpIjoiMTQyZjEyYTVlY2JhNzIyZTZlMjkwZjVlZDRhNmEwZDk1N2M4MGM3ZTVhODE4MjMyMjhjMzk0YjkyMGFkMmQ2ZDFkODI2YTYxOTI3MTEwMzUiLCJpYXQiOjE3MTA5NzY3MDYuNzUwOTI0LCJuYmYiOjE3MTA5NzY3MDYuNzUwOTI3LCJleHAiOjE3NDI1MTI3MDYuNzA2OTc5LCJzdWIiOiIzIiwic2NvcGVzIjpbIioiXX0.k2xkXywMs4eFArabnVFPH2CfBdMT1M-x0i6xGxM_OfUqKpFRxlTxj7tapbuSKDa2e-lyVr9AZwuCidj-5v1WQjYgj_bYRE-bi4CvGgY9reSVRy5l5a7i19nXNWyDfYHc_20CgMwrAUVlJoZLUkrQ3O6dAdjo83aoyktTKKfI7Q3-iWdFPAEzby_1pU5T883whYEWwfXWGzICwDQzulQzLm7dSAOy2xUNdB2CHn0tHCNHeaY8Mx11MBABAw_RVPZddR7kDOf5jc1g6fJ9YYGeru1ptZPwK2vHlRLnVJdbN5f4byE77LEVyb3daWuv3sYeIdEV3eV9WLmeGt0FlOjxpTHpEqBN4t1np6vV5nZyoluP9SuDXt5wKI7o3uPhat8vZ4B8pc-35484Y5_RxHyP2fxgQStqLFvMypJGoLMh2zg39sUP3oI35R1bIadKt49MM2c-RjP-16ngbK6np104hdFYojelf9EFRN9tY-yIUEyg5fWLw6mIBOxDFcqjZRUc-3P5VPgdeacp0-oU968YB1gP3155Dsu8DVxDr-iuQ5deusTpYnFlqokJ26VknHRJSMxlVBWptljv9EHNFw6a5gvcj8xht5ldm4b9RqisxUC0OlwJtK_pmhp-srp6biaj54u9zIvjKd-seJNumF1VM2nfJk63TnfPZbG9SLyPjuU

Responses

🟢200Success
application/json
Body
response
object 
required
url
string 
required
The pre-signed URL for direct file upload to the specified cloud storage location, which is active for a limited time.
Example:
https://s3.eu-west-1.amazonaws.com/private.zid.store
fields
object 
required
An object containing fields required for uploading the file.
size_limit
integer 
required
Maximum allowed file size (in bytes) for the upload.
Example:
1073741824
Modified at 2025-01-28 06:02:48
Previous
Create Downloadable Product
Next
Upload File to S3
Built with