> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Products in Bulk

> Update products in one asynchronous operation.

The request can include up to **10 MB** of data.

The response returns a unique asynchronous action ID. Use this ID in the query paramater of the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint to check, e.g.:

- The status of your request (in queue, in progress, done, or failed)

- Resources that failed to be updated

- The report file with details about the update



If a product object is not found, it is **upserted**. This is shown in the report file in the **GET** Async Action endpoint. The upserted resources have value `false` in the `found` column and `true` in the `updated` column.

This API request starts a process that affects Voucherify data in bulk. In the case of small jobs (like bulk update), the request is put into a queue and processed when every other bulk request placed in the queue prior to this request is finished.



## OpenAPI

````yaml /openapi/products.json post /v1/products/bulk/async
openapi: 3.0.1
info:
  title: Voucherify API - Products
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/products/bulk/async:
    post:
      tags:
        - Products
      summary: Update Products in Bulk
      description: >-
        Update products in one asynchronous operation.


        The request can include up to **10 MB** of data.


        The response returns a unique asynchronous action ID. Use this ID in the
        query paramater of the [GET Async
        Action](/api-reference/async-actions/get-async-action) endpoint to
        check, e.g.:


        - The status of your request (in queue, in progress, done, or failed)


        - Resources that failed to be updated


        - The report file with details about the update




        If a product object is not found, it is **upserted**. This is shown in
        the report file in the **GET** Async Action endpoint. The upserted
        resources have value `false` in the `found` column and `true` in the
        `updated` column.


        This API request starts a process that affects Voucherify data in bulk.
        In the case of small jobs (like bulk update), the request is put into a
        queue and processed when every other bulk request placed in the queue
        prior to this request is finished.
      operationId: update-products-in-bulk
      parameters: []
      requestBody:
        description: List the product fields to be updated in each product object.
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ProductsUpdateInBulkRequestBody'
            examples:
              Example:
                value:
                  - source_id: first_product
                    name: Samsung Phone 1
                    price: 220000
                    attributes:
                      - color
                      - memory
                      - processor
                    metadata:
                      test: true
                      vendor: Online Store - 3
                    image_url: '{{internalVoucherifyURL}}'
                  - source_id: second_product
                    name: Samsung Phone 2
                    price: 230000
                    attributes:
                      - color
                      - memory
                      - processor
                    metadata:
                      test: true
                      vendor: Online Store - 4
                    image_url: '{{internalVoucherifyURL}}'
        required: true
      responses:
        '202':
          description: >-
            Returns the ID of the scheduled asynchronous action. The response
            informs you that the request has been accepted and the resources
            will be updated in the repository asynchronously. To check the
            status and result, copy the `async_action_id` from the response and
            use it as a query parameter in the [GET Async
            Action](/api-reference/async-actions/get-async-action) endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductsUpdateInBulkResponseBody'
              examples:
                Example:
                  value:
                    async_action_id: aa_0a875d56c805df6601
        '413':
          description: Returns an error if the payload exceeds 10 MB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              examples:
                Request Entity Too Large:
                  value:
                    statusCode: 413
                    error: Request Entity Too Large
                    message: >-
                      Payload content length greater than maximum allowed:
                      10485760
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - products
components:
  schemas:
    ProductsUpdateInBulkRequestBody:
      type: object
      description: Request schema for **POST** `v1/products/bulk/async`.
      title: Products Update In Bulk Request Body
      properties:
        source_id:
          type: string
          description: Unique product source ID from your inventory system.
          example: test_prod_id_1
        name:
          type: string
          description: Unique user-defined product name.
          example: T-shirt
        price:
          type: integer
          description: >-
            Unit price. It is represented by a value multiplied by 100 to
            accurately reflect 2 decimal places, such as `$100.00` being
            expressed as `10000`.
        attributes:
          type: array
          description: >-
            A list of product attributes whose values you can customize for
            given SKUs: `["color","size","ranking"]`. Each child SKU can have a
            unique value for a given attribute.
          items:
            type: string
        image_url:
          type: string
          description: >-
            The HTTPS URL pointing to the .png or .jpg file that will be used to
            render the product image.
          example: https://images.com/original.jpg
        metadata:
          type: object
          description: >-
            The metadata object stores all custom attributes assigned to the
            product. A set of key/value pairs that you can attach to a product
            object. It can be useful for storing additional information about
            the product in a structured format.
      required:
        - source_id
    ProductsUpdateInBulkResponseBody:
      type: object
      title: Products Update In Bulk Response Body
      description: Response body schema for **POST** `v1/products/bulk/async`.
      allOf:
        - $ref: '#/components/schemas/AsyncActions'
    BadRequest:
      title: Error Object
      type: object
      description: Error details
      properties:
        statusCode:
          type: integer
          description: Error's HTTP status code.
        error:
          type: string
          description: A human-readable message providing a short description of the error.
        message:
          type: string
          description: A human-readable message providing more details about the error.
    AsyncActions:
      type: object
      title: Asynchronous Actions
      description: Response to requests that are processed asynchronously.
      properties:
        async_action_id:
          type: string
          example: aa_0a875d56c805df6601
          description: The ID of the scheduled asynchronous action.
      required:
        - async_action_id
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````