# Create Downloadable Product

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/products/:
    post:
      summary: Create Downloadable Product
      deprecated: false
      description: >-
        Here’s the updated description with the additional clarification:


        The 'Create Downloadable Product' endpoint allows users to add a new
        digital product to their store. This endpoint enables specifying product
        details, such as name, price, SKU, and download settings, to configure
        the product for digital delivery without shipping requirements. The
        process is the same as creating any other product, with the key
        distinction being the inclusion of `'product_class': 'downloadable'` in
        the request payload. The response includes product metadata,
        availability, and stock settings relevant to digital products.


        <Accordion title="🔑Scopes" defaultOpen>
            
          `products.read_write` - Products Read & Write
         
        </Accordion>
      tags:
        - Default module/Apps/Merchant APIs/Products/Digital Products
      parameters:
        - name: Store-Id
          in: header
          description: Unique identifier of the store.
          required: false
          example: 3
          schema:
            type: integer
        - name: Accept-Language
          in: header
          description: >-
            Preferred language for the response. Defaults to `en` if not
            specified.
          required: false
          example: ar
          schema:
            type: string
        - name: X-manager-Token
          in: header
          description: >-
            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.
          required: false
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Currency
          in: header
          description: >-
            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.
          required: false
          example: SAR
          schema:
            type: string
        - name: Access-Token
          in: header
          description: >-
            An Access Token is a unique string that represents the authorization
            granted to a client (Partner application) by a user (Merchant or
            Store Manager) to access their protected resources. It is part of
            the OAuth 2.0 standard and is used to authenticate API requests on
            behalf of the user. Access Tokens have a limited lifespan and must
            be used within their validity period. Once expired, a new Access
            Token can be obtained using a Refresh Token. Access Tokens should be
            treated as sensitive information and must be kept secure to prevent
            unauthorized access to the user's data. If you do not have an
            `Access-Token`, but have the older alternative instead, i.e., the
            `X-Manager-Token`, then see the instructions
            [here](docs/Migrate-to-OAUTH-2.0.md) on how to obtain the
            `Access-Token`.
          required: false
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Role
          in: header
          description: Role of the user.
          required: false
          example: Manager
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            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.
          required: false
          example: '{{Autherization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: object
                  properties:
                    ar:
                      type: string
                      description: Name in Arabic.
                      examples:
                        - منتج قابل للتنزيل
                    en:
                      type: string
                      description: Name in English.
                      examples:
                        - downloadable product
                  required:
                    - ar
                    - en
                  x-apidog-orders:
                    - ar
                    - en
                  description: Product name object.
                  x-apidog-ignore-properties: []
                price:
                  type: integer
                  description: The regular price of the product.
                  examples:
                    - 2
                is_draft:
                  type: boolean
                  description: Indicates whether the product is in a draft state.
                  default: true
                product_class:
                  type: string
                  description: Specifies the type of product.
                  examples:
                    - downloadable
              required:
                - name
                - price
                - is_draft
                - product_class
              x-apidog-orders:
                - name
                - price
                - is_draft
                - product_class
              x-apidog-ignore-properties: []
            example:
              name:
                ar: منتج قابل للتنزيل
                en: downloadable product
              price: 2
              is_draft: true
              product_class: downloadable
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                title: Create Downloadable Product Response
                type: object
                description: >-
                  Response returned after successfully creating a downloadable
                  product.
                required:
                  - id
                  - product_class
                  - sku
                  - barcode
                  - parent_id
                  - name
                  - slug
                  - price
                  - short_description
                  - sale_price
                  - formatted_price
                  - formatted_sale_price
                  - currency
                  - currency_symbol
                  - attributes
                  - categories
                  - display_order
                  - has_options
                  - has_fields
                  - images
                  - videos
                  - is_draft
                  - quantity
                  - is_infinite
                  - html_url
                  - weight
                  - keywords
                  - requires_shipping
                  - is_taxable
                  - structure
                  - seo
                  - rating
                  - store_id
                  - purchase_restrictions
                  - meta
                  - created_at
                  - updated_at
                properties:
                  id:
                    type: string
                    format: uuid
                    description: Unique identifier of the downloadable product.
                    examples:
                      - 3471cfc4-08fe-4354-aa64-ac3786e86e83
                  product_class:
                    type: string
                    enum:
                      - downloadable
                    description: >-
                      Defines the product type. Downloadable products are
                      delivered digitally.
                    examples:
                      - downloadable
                  sku:
                    type: string
                    description: Unique Stock Keeping Unit for the product.
                    examples:
                      - Z.17703616723256807
                  barcode:
                    type: string
                    description: Product barcode. Empty string if not provided.
                    examples:
                      - ''
                  parent_id:
                    type: string
                    format: uuid
                    description: Parent product ID if this product is a variant.
                    examples:
                      - null
                    nullable: true
                  name:
                    type: object
                    description: Localized product name.
                    required:
                      - ar
                      - en
                    properties:
                      ar:
                        type: string
                        description: Arabic product name.
                        examples:
                          - منتج قابل للتنزيل
                      en:
                        type: string
                        description: English product name.
                        examples:
                          - downloadable product
                    x-apidog-orders:
                      - ar
                      - en
                    x-apidog-ignore-properties: []
                  slug:
                    type: string
                    description: SEO-friendly slug used in the product URL.
                    examples:
                      - منتج-قابل-للتنزيل
                  price:
                    type: number
                    description: Base selling price of the product.
                    examples:
                      - 2
                  short_description:
                    type: object
                    description: Short localized description shown in listings.
                    required:
                      - ar
                      - en
                    properties:
                      ar:
                        type: string
                        description: Arabic short description.
                        examples:
                          - ''
                      en:
                        type: string
                        description: English short description.
                        examples:
                          - ''
                    x-apidog-orders:
                      - ar
                      - en
                    x-apidog-ignore-properties: []
                  sale_price:
                    type: number
                    description: Discounted price if the product is on sale.
                    examples:
                      - null
                    nullable: true
                  formatted_price:
                    type: string
                    description: Formatted price including currency symbol.
                    examples:
                      - '2.00  ر.س '
                  formatted_sale_price:
                    type: string
                    description: Formatted sale price including currency symbol.
                    examples:
                      - null
                    nullable: true
                  currency:
                    type: string
                    description: ISO 4217 currency code.
                    examples:
                      - SAR
                  currency_symbol:
                    type: string
                    description: Currency symbol used for display.
                    examples:
                      - ' ر.س '
                  attributes:
                    type: array
                    description: List of attributes assigned to the product.
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                      x-apidog-ignore-properties: []
                    examples:
                      - []
                  categories:
                    type: array
                    description: Categories this product belongs to.
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                      x-apidog-ignore-properties: []
                    examples:
                      - []
                  display_order:
                    type: integer
                    description: Sorting order used for product listing.
                    examples:
                      - 32766
                  has_options:
                    type: boolean
                    description: Indicates whether the product has selectable options.
                    examples:
                      - false
                  has_fields:
                    type: boolean
                    description: Indicates whether the product has custom input fields.
                    examples:
                      - false
                  images:
                    type: array
                    description: List of product images.
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                      x-apidog-ignore-properties: []
                    examples:
                      - []
                  videos:
                    type: array
                    description: List of product videos.
                    items:
                      type: object
                      properties: {}
                      x-apidog-orders: []
                      x-apidog-ignore-properties: []
                    examples:
                      - []
                  is_draft:
                    type: boolean
                    description: Whether the product is saved as a draft.
                    examples:
                      - true
                  quantity:
                    type: integer
                    description: Available stock quantity. Null for downloadable products.
                    examples:
                      - null
                    nullable: true
                  is_infinite:
                    type: boolean
                    description: Indicates unlimited availability.
                    examples:
                      - true
                  html_url:
                    type: string
                    format: uri
                    description: Public URL of the product page.
                    examples:
                      - https://osama.zid.store/products/منتج-قابل-للتنزيل
                  weight:
                    type: object
                    description: >-
                      Weight information (not applicable for downloadable
                      products).
                    required:
                      - value
                      - unit
                    properties:
                      value:
                        type: number
                        description: Weight value.
                        examples:
                          - null
                        nullable: true
                      unit:
                        type: string
                        description: Weight unit.
                        examples:
                          - kg
                    x-apidog-orders:
                      - value
                      - unit
                    x-apidog-ignore-properties: []
                  keywords:
                    type: array
                    description: Search keywords associated with the product.
                    items:
                      type: string
                    examples:
                      - []
                  requires_shipping:
                    type: boolean
                    description: Indicates whether shipping is required.
                    examples:
                      - false
                  is_taxable:
                    type: boolean
                    description: Indicates whether taxes apply to the product.
                    examples:
                      - true
                  structure:
                    type: string
                    enum:
                      - standalone
                    description: Defines the product hierarchy structure.
                    examples:
                      - standalone
                  seo:
                    type: object
                    description: SEO metadata for the product.
                    x-apidog-orders: []
                    examples:
                      - null
                    properties: {}
                    x-apidog-ignore-properties: []
                    nullable: true
                  rating:
                    type: object
                    description: Customer rating summary.
                    properties:
                      average:
                        type: number
                        description: Average customer rating.
                        examples:
                          - 0
                      total_count:
                        type: integer
                        description: Total number of ratings.
                        examples:
                          - 0
                    x-apidog-orders:
                      - average
                      - total_count
                    x-apidog-ignore-properties: []
                  store_id:
                    type: integer
                    description: Identifier of the store that owns the product.
                    examples:
                      - 3
                  purchase_restrictions:
                    type: object
                    description: Rules limiting product purchase behavior.
                    properties:
                      min_quantity_per_cart:
                        type: integer
                        description: Minimum quantity allowed per cart.
                        examples:
                          - null
                        nullable: true
                      max_quantity_per_cart:
                        type: integer
                        description: Maximum quantity allowed per cart.
                        examples:
                          - null
                        nullable: true
                      availability_period_start:
                        type: string
                        format: date-time
                        description: Start date for product availability.
                        examples:
                          - null
                        nullable: true
                      availability_period_end:
                        type: string
                        format: date-time
                        description: End date for product availability.
                        examples:
                          - null
                        nullable: true
                      sale_price_period_start:
                        type: string
                        format: date-time
                        description: Sale price start date.
                        examples:
                          - null
                        nullable: true
                      sale_price_period_end:
                        type: string
                        format: date-time
                        description: Sale price end date.
                        examples:
                          - null
                        nullable: true
                    x-apidog-orders:
                      - min_quantity_per_cart
                      - max_quantity_per_cart
                      - availability_period_start
                      - availability_period_end
                      - sale_price_period_start
                      - sale_price_period_end
                    x-apidog-ignore-properties: []
                  meta:
                    type: object
                    description: Downloadable product metadata.
                    properties:
                      download_limit:
                        type: integer
                        description: Maximum number of downloads allowed.
                        examples:
                          - null
                        nullable: true
                      expiration_period:
                        type: integer
                        description: Number of days before the download expires.
                        examples:
                          - null
                        nullable: true
                    x-apidog-orders:
                      - download_limit
                      - expiration_period
                    x-apidog-ignore-properties: []
                  created_at:
                    type: string
                    format: date-time
                    description: Timestamp when the product was created.
                    examples:
                      - '2026-02-06T07:07:52.390033Z'
                  updated_at:
                    type: string
                    format: date-time
                    description: Timestamp when the product was last updated.
                    examples:
                      - '2026-02-06T07:07:52.390059Z'
                x-apidog-orders:
                  - id
                  - product_class
                  - sku
                  - barcode
                  - parent_id
                  - name
                  - slug
                  - price
                  - short_description
                  - sale_price
                  - formatted_price
                  - formatted_sale_price
                  - currency
                  - currency_symbol
                  - attributes
                  - categories
                  - display_order
                  - has_options
                  - has_fields
                  - images
                  - videos
                  - is_draft
                  - quantity
                  - is_infinite
                  - html_url
                  - weight
                  - keywords
                  - requires_shipping
                  - is_taxable
                  - structure
                  - seo
                  - rating
                  - store_id
                  - purchase_restrictions
                  - meta
                  - created_at
                  - updated_at
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response returned when the request cannot be authenticated
                  because the required credentials are missing, invalid, or
                  expired.
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                    examples:
                      - error
                  message:
                    type: object
                    description: >-
                      Contains structured details explaining why the request
                      could not be authenticated.
                    properties:
                      type:
                        type: string
                        description: Indicates the category of the response message.
                        examples:
                          - error
                      code:
                        type: string
                        description: >-
                          A machine-readable code identifying the authentication
                          error. Returns null when no specific code is
                          available.
                        examples:
                          - UNAUTHORIZED
                        nullable: true
                      name:
                        type: string
                        description: >-
                          A short, human-readable title describing the
                          authentication error. Returns null when no title is
                          available.
                        examples:
                          - Unauthorized
                        nullable: true
                      description:
                        type: string
                        description: >-
                          A human-readable explanation of why the request could
                          not be authenticated. Returns null when no detailed
                          explanation is available.
                        examples:
                          - >-
                            Authentication credentials are missing, invalid, or
                            expired.
                        nullable: true
                    required:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                examples:
                  - status: error
                    message:
                      type: error
                      code: UNAUTHORIZED
                      name: Unauthorized
                      description: >-
                        Authentication credentials are missing, invalid, or
                        expired.
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Example 1
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_MISSING
                      name: Sorry
                      description: Please login first.
                '2':
                  summary: Example 2
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Login session expired. Please login again.
                '3':
                  summary: Example 3
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Invalid authentication
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the error.
                  message:
                    $ref: '#/components/schemas/ResponseEnvelopMessage'
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              example:
                status: error
                message:
                  type: error
                  code: MSG_HIDDEN
                  name: Error
                  description: Internal Server Error
          headers: {}
          x-apidog-name: Internal Server error
      security: []
      x-apidog-folder: Default module/Apps/Merchant APIs/Products/Digital Products
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-11395331-run
components:
  schemas:
    ResponseEnvelopMessage:
      type: object
      properties:
        type:
          type: string
          description: Type of response message returned by the API.
          examples:
            - success
        code:
          type: string
          description: Response code returned by the API, if available.
          examples:
            - MSG_POPUP_OK
          nullable: true
        name:
          type: string
          description: Name or title of the response message, if available.
          examples:
            - Coupons
          nullable: true
        description:
          type: string
          description: Detailed description of the response message, if available.
          examples:
            - Coupons created successfully
          nullable: true
      required:
        - type
        - code
        - name
        - description
      description: Additional response metadata.
      x-apidog-orders:
        - type
        - code
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
