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

# Create Contract Pricing

> Create a new contract pricing



## OpenAPI

````yaml post /v1/contract-pricing
openapi: 3.0.0
info:
  description: Open API's for WizCommerce API's
  title: WizCommerce Open API's
  termsOfService: https://wizcommerce.com/terms/
  contact:
    name: Tech Support
    url: https://help.wizcommerce.com/
    email: tech@wizcommerce.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: '1.0'
servers:
  - url: https://api.wizcommerce.com
    description: Production BaseURL
  - url: https://api-staging.sourcerer.tech
    description: Staging BaseURL
security: []
paths:
  /v1/contract-pricing:
    post:
      tags:
        - Contract Pricing
      summary: Create Contract Pricing
      description: Create a new contract pricing
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/dtos.ContractPricingCreateRequest'
        description: Request
        required: true
      responses:
        '201':
          description: desc
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/dtos.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/dtos.ContractPricingResponse'
        '400':
          description: desc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '401':
          description: desc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '429':
          description: desc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
        '500':
          description: desc
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.HttpError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    dtos.ContractPricingCreateRequest:
      type: object
      required:
        - channel
        - customer_group_type
        - discount_applicable_on
        - name
        - product_price_map
        - schedule_details
      properties:
        name:
          type: string
          maxLength: 255
          x-order: '1'
          example: Q1 Enterprise Contract
        reference_id:
          type: string
          maxLength: 255
          x-order: '2'
          example: REF-CONTRACT-2025
        customer_group_type:
          type: string
          enum:
            - all
            - segment
            - specific_customer
          x-order: '3'
          example: all
        customer_ids:
          type: array
          items:
            type: string
          x-order: '5'
          example:
            - fb9eb667-f032-456d-b980-646af84b2989
        customer_segments:
          type: array
          items:
            type: string
          x-order: '5'
          example:
            - segment_ref_id_1
        product_price_map:
          type: array
          minItems: 1
          items:
            $ref: >-
              #/components/schemas/openapi_internal_dtos_contractpricing.ProductPriceRequest
          x-order: '6'
        schedule_details:
          allOf:
            - $ref: '#/components/schemas/dtos.ScheduleDetailsRequest'
          x-order: '7'
        channel:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - wizorder
              - wizshop
          x-order: '9'
          example:
            - wizorder
        discount_campaign_allowed:
          type: boolean
          default: false
          x-order: '10'
          example: false
        discount_applicable_on:
          type: string
          enum:
            - contract_pricing
          x-order: '11'
          example: contract_pricing
    dtos.SuccessResponse:
      type: object
      properties:
        data:
          x-order: '1'
    dtos.ContractPricingResponse:
      type: object
      properties:
        id:
          type: string
          x-order: '1'
          example: 123e4567-e89b-12d3-a456-426614174000
        name:
          type: string
          x-order: '2'
          example: Q1 Enterprise Contract
        reference_id:
          type: string
          x-order: '3'
          example: REF-CONTRACT-2025
        contract_status:
          type: string
          enum:
            - active
            - inactive
          x-order: '4'
          example: active
        customer_group_type:
          type: string
          x-order: '5'
          example: all
        customer_ids:
          type: array
          items:
            type: string
          x-order: '6'
        customer_segments:
          type: array
          items:
            type: string
          x-order: '6'
        product_price_map:
          type: array
          items:
            $ref: >-
              #/components/schemas/openapi_internal_dtos_contractpricing.ProductPriceResponse
          x-order: '7'
        schedule_details:
          allOf:
            - $ref: '#/components/schemas/dtos.ScheduleDetailsResponse'
          x-order: '8'
        timezone:
          type: string
          x-order: '9'
          example: UTC
        channel:
          type: array
          items:
            type: string
            enum:
              - wizorder
              - wizshop
          x-order: '10'
        discount_campaign_allowed:
          type: boolean
          x-order: '11'
          example: false
        discount_applicable_on:
          type: string
          x-order: '12'
          example: contract_pricing
        created_at:
          type: string
          x-order: '13'
          example: '2025-01-01T00:00:00Z'
        updated_at:
          type: string
          x-order: '14'
          example: '2025-01-01T00:00:00Z'
    errors.HttpError:
      type: object
      properties:
        code:
          type: string
          x-order: '1'
        message:
          type: string
          x-order: '2'
        details:
          type: array
          items:
            $ref: '#/components/schemas/errors.HttpErrorDetails'
          x-order: '3'
    openapi_internal_dtos_contractpricing.ProductPriceRequest:
      type: object
      required:
        - sku_id
        - volume_tiers
      properties:
        sku_id:
          type: string
          x-order: '1'
          example: SKU-001
        volume_tiers:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/dtos.VolumeTierRequest'
          x-order: '2'
    dtos.ScheduleDetailsRequest:
      type: object
      required:
        - end_date
        - start_date
      properties:
        start_date:
          type: string
          x-order: '1'
          example: '2025-01-01T00:00:00Z'
        end_date:
          type: string
          x-order: '2'
          example: '2035-01-01T00:00:00Z'
    openapi_internal_dtos_contractpricing.ProductPriceResponse:
      type: object
      properties:
        sku_id:
          type: string
          x-order: '1'
          example: SKU-001
        volume_tiers:
          type: array
          items:
            $ref: '#/components/schemas/dtos.VolumeTierResponse'
          x-order: '2'
    dtos.ScheduleDetailsResponse:
      type: object
      properties:
        start_date:
          type: string
          x-order: '1'
          example: '2025-01-01T00:00:00Z'
        end_date:
          type: string
          x-order: '2'
          example: '2035-01-01T00:00:00Z'
    errors.HttpErrorDetails:
      type: object
      properties:
        field:
          type: string
          x-order: '1'
        reason:
          type: string
          x-order: '2'
    dtos.VolumeTierRequest:
      type: object
      required:
        - end_quantity
        - start_quantity
      properties:
        start_quantity:
          type: integer
          minimum: 0
          x-order: '1'
          example: 1
        end_quantity:
          type: integer
          default: 99999
          minimum: 0
          x-order: '2'
          example: 100
        price:
          type: number
          x-order: '2'
          example: 10
    dtos.VolumeTierResponse:
      type: object
      properties:
        start_quantity:
          type: integer
          x-order: '1'
          example: 1
        end_quantity:
          type: integer
          x-order: '2'
          example: 100
        price:
          type: number
          x-order: '2'
          example: 10
  securitySchemes:
    ApiKeyAuth:
      description: API Key for authentication
      type: apiKey
      name: X-API-Key
      in: header

````