> ## 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.

# Create Price

> Enables you to create one or many prices in accordance with how many items are present in the itemIds array.



## OpenAPI

````yaml offers_v1 post /api-price/price
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:
    post:
      tags:
        - Pricing
      summary: Create Price
      description: >-
        Enables you to create one or many prices in accordance with how many
        items are present in the itemIds array.
      operationId: createPrice
      parameters:
        - $ref: '#/components/parameters/xSiteContent'
        - in: header
          name: x-api-key
          description: >
            The `x-api-key` enables you to access fabric APIs 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: A JSON object that contains price information.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/commercePriceInsert'
      responses:
        '200':
          description: Successfully creates price.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/priceInsertResponse'
        '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:
    commercePriceInsert:
      type: object
      description: Price Insert Object.
      properties:
        priceListId:
          description: The Pricelist Id or name.
          oneOf:
            - type: number
              description: Price list identifier.
              example: 100000
            - type: string
              description: Price list name.
              example: test
        itemIds:
          description: A list of one or more identifiers of the items to be created.
          type: array
          items:
            description: Item
            type: number
            example:
              - 1000011218
        itemSkus:
          description: >-
            A list of Stock Keeping Units (SKUs) of the items to be created. If
            present, this array must have the same number of items as itemIds
            and each SKU will be associated with the ID in the same index.
          type: array
          items:
            description: Items
            type: number
            example: 1234XYZ
        offers:
          description: A list of the offers to be added and its properties.
          type: array
          maxItems: 10
          minItems: 1
          items:
            type: object
            description: Items
            properties:
              kind:
                description: Pricekind Id
                type: number
                example: 12
              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'
              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: 1000
                  cost:
                    description: Cost of item
                    type: number
                    example: 800
                  currency:
                    description: Currency
                    type: string
                    example: USD
                required:
                  - base
                  - currency
              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
            required:
              - channel
              - startDate
              - endDate
              - price
      required:
        - priceListId
        - itemIds
        - offers
    priceInsertResponse:
      type: object
      description: Create Price Response
      properties:
        _id:
          description: Identifier
          type: string
          example: 616e011037a3810008cfb256
        priceListId:
          description: Price List Identifier
          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: Product SKU
          type: string
          example: 1234XYZ
        offerId:
          description: Offer ID
          type: number
          example: 371922
        offers:
          type: array
          description: Offers
          maxItems: 10
          minItems: 1
          items:
            type: object
            description: Item in Offer
            properties:
              kind:
                description: Pricekind Id
                type: number
                example: 12
              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: 1000
                  cost:
                    description: Cost of Product
                    type: number
                    example: 800
                  currency:
                    description: Currency
                    type: string
                    example: USD
              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.

````