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

# Add or Update Bulk Price

> Enables you to add or update prices, in bulk. This API is secured by x-api-key.



## OpenAPI

````yaml offers_v1 post /api-price/price/bulk-insert
openapi: 3.0.0
info:
  description: >-
    fabric e-commerce Offers APIs allow you to to set up and manage stock
    keeping unit (SKU) prices. Its wide range of coupon and promotion features
    let you design deals ranging from single-use, customer-specific coupons to
    site-wide promotions.
  version: 1.0.0
  title: Offers v1
  contact:
    email: support@fabric.inc
  license:
    name: fabric API license
    url: https://fabric.inc/api-license
servers:
  - url: https://prod01-apigw.{customer_name}.fabric.zone
    description: Production
    variables:
      customer_name:
        default: yourcompany
        description: Customer name, provided by support team
security: []
tags:
  - name: Pricing
    description: Pricing APIs enable you to add price details for one or many items.
  - name: Promotions
    description: >-
      Promotion APIs enable you to apply and verify promotions and discount
      coupons.
  - name: Login API
    description: >-
      Login endpoint generates an authorization token for local users that they
      can use to log into fabric copilot application. <br /><br /> **Note:** A
      local user is someone who has an active account with fabric Inc
externalDocs:
  description: Learn more about Offers
  url: https://fabric.inc/knowledgebase/offers
paths:
  /api-price/price/bulk-insert:
    post:
      tags:
        - Pricing
      summary: Add or Update Bulk Price
      description: >-
        Enables you to add or update prices, in bulk. This API is secured by
        x-api-key.
      operationId: bulkInsert
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
        - in: header
          name: x-api-key
          description: >
            The `x-api-key` enables you to access the fabric API without
            `Authorization`. You must request fabric Inc to obtain this key.<br
            />Authorization` header is required if `x-api-key` is omitted.
          required: true
          schema:
            type: string
      requestBody:
        description: Array of Items
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/createPriceWithMinQuantity'
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/bulkInsetResponse'
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/clientError'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/serverError'
components:
  parameters:
    xSiteContent:
      name: x-site-context
      in: header
      description: >-
        The `x-site-context` header is a JSON object that contains information
        about the source you wish to pull from. The mandatory `account` is the
        24 character identifier found in Copilot. The `channel` (Sales channel
        ID), `stage` (environment name), and `date` attributes can be used to
        further narrow the scope of your data source.
      required: true
      schema:
        type: string
        example: >-
          {"date": "2023-01-01T00:00:00.000Z", "channel": 12, "account":
          "1234abcd5678efgh9ijklmno","stage":"production"}
  schemas:
    createPriceWithMinQuantity:
      type: array
      items:
        type: object
        properties:
          priceListId:
            description: >-
              Pricelist Id or name. this is `optional`. Price will be updated
              for Default Pricelist if priceListId is not provided.
            oneOf:
              - type: number
                description: price list id
                example: 100000
              - type: string
                description: price list name
                example: test
          itemId:
            type: number
            description: Item ID
            example: 1000011218
          itemSku:
            type: string
            description: SKU
            example: 1234XYZ
          offers:
            type: array
            description: Offers
            maxItems: 10
            minItems: 1
            items:
              type: object
              description: Items
              properties:
                kind:
                  description: Pricekind Id
                  type: number
                  example: 0
                channel:
                  description: Channel Id
                  type: number
                  example: 12
                startDate:
                  description: Price start date time
                  type: string
                  format: date-time
                  example: '2021-12-30T02:05:47.234Z'
                endDate:
                  description: Price end date time
                  type: string
                  format: date-time
                  example: '2099-12-31T00:00:00.000Z'
                range:
                  type: array
                  description: Range Prices
                  minItems: 1
                  items:
                    type: object
                    description: Items
                    properties:
                      minQuantity:
                        description: Minimum Quantity
                        type: number
                        example: 2
                      price:
                        description: range price of item
                        type: number
                        example: 500
                price:
                  type: object
                  description: Price
                  properties:
                    base:
                      description: base price of item
                      type: number
                      example: 2000
                    sale:
                      description: sale price of item if any
                      type: number
                      example: ''
                    cost:
                      description: cost of item
                      type: number
                      example: ''
                    currency:
                      description: Currency
                      type: string
                      example: USD
                  required:
                    - base
                    - currency
              required:
                - channel
                - startDate
                - endDate
                - price
        required:
          - priceListId
          - itemId
          - offers
    bulkInsetResponse:
      type: array
      items:
        type: object
        properties:
          _id:
            description: ID
            type: string
            example: 616e011037a3810008cfb256
          priceListId:
            description: Price List ID
            type: number
            example: 100000
          isSoftDeleted:
            description: Has been soft deleted
            type: boolean
            example: false
          itemId:
            description: Internal Item ID
            type: number
            example: 1000011218
          itemSku:
            description: Produtct SKU
            type: string
            example: 1234XYZ
          offerId:
            description: Offer ID
            type: number
            example: 381933
          offers:
            description: Offers
            type: array
            maxItems: 10
            minItems: 1
            items:
              description: Items
              type: object
              properties:
                kind:
                  description: Pricekind Id
                  type: number
                  example: 0
                channel:
                  description: Channel Id
                  type: number
                  example: 12
                startDate:
                  description: Price start date time
                  type: string
                  format: date-time
                  example: '2021-12-30T02:05:00.000Z'
                endDate:
                  description: Price end date time
                  type: string
                  format: date-time
                  example: '2099-12-31T00:00:00.000Z'
                price:
                  type: object
                  description: Price
                  properties:
                    base:
                      description: base price of item
                      type: number
                      example: 2000
                    sale:
                      description: sale price of item if any
                      type: number
                      example: null
                    cost:
                      description: Cost of product
                      type: number
                      example: ''
                    currency:
                      description: Currency
                      type: string
                      example: USD
                offerCode:
                  type: number
                  description: Offer code
                  example: 123786
                range:
                  type: array
                  description: Price ranges
                  items:
                    type: object
                    description: Items
                    properties:
                      _id:
                        description: ID
                        type: string
                        example: 616e143828d0b800086dd84a
                      minQuantity:
                        description: Min quantity
                        type: number
                        example: 2
                      price:
                        type: number
                        description: Price at min quantity
                        example: 500
          createdAt:
            type: string
            description: Date and time of creation
            format: date-time
            example: '2021-10-18T23:19:44.852Z'
          updatedAt:
            type: string
            description: Date and time of updated
            format: date-time
            example: '2021-10-19T00:40:30.341Z'
          job:
            description: Job
            type: boolean
            example: false
    clientError:
      type: object
      properties:
        code:
          description: The error code, meant for machine consumption.
          type: string
          example: 400
        message:
          description: A human-readable description of the error that occurred.
          type: string
          example: SKU cannot be empty
    serverError:
      type: object
      properties:
        code:
          description: The error code, meant for machine consumption.
          type: string
          example: 500
        message:
          description: A human-readable description of the error that occurred.
          type: string
          example: >-
            An internal error occurred. If the issue persists please contact
            support@fabric.inc.

````