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

# Create Product Pricing

> Create a new product pricing



## OpenAPI

````yaml https://api.getmeasure.com/api/v1/docs/api_spec.json POST /companies/{company_id}/pricing
openapi: 3.1.0
info:
  title: Measure API
  description: APIs to communicate with Measure
  version: 1.0.0
servers:
  - url: https://api.getmeasure.com/api/v1
security: []
paths:
  /companies/{company_id}/pricing:
    post:
      tags:
        - Pricing
      summary: Create Product Pricing
      description: Create a new product pricing
      operationId: Create_Product_Pricing
      parameters:
        - name: company_id
          in: path
          description: 'The company ID with the prefix ''cmp_''. '
          required: true
          schema:
            description: 'The company ID with the prefix ''cmp_''. '
            type: string
        - name: Idempotency-Key
          in: header
          description: >-
            The idempotency key that will be used to ensure the request is only
            performed once
          schema:
            description: >-
              The idempotency key that will be used to ensure the request is
              only performed once
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestCreateSingleProductPricingRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseProductPricingLiteRepresentation'
      deprecated: false
      security:
        - apiKey:
            - ''
components:
  schemas:
    RequestCreateSingleProductPricingRequest:
      properties:
        base_price:
          $ref: '#/components/schemas/ModelAmount'
        base_units:
          format: double
          minimum: 0
          type: number
        billing_frequency:
          $ref: '#/components/schemas/ModelTerm'
        charge_type:
          enum:
            - PRE_POST
            - POST_ONLY
          type:
            - 'null'
            - string
        credit_price:
          $ref: '#/components/schemas/ModelCreditPricing'
        currency:
          description: The currency for the product pricing
          type: string
        description:
          description: The description for the product pricing
          type: string
        display_type:
          type:
            - 'null'
            - string
        entitlements:
          description: The entitlements that enable features for the product pricing
          items:
            $ref: '#/components/schemas/RequestEntitlementData'
          type:
            - array
            - 'null'
        external_name:
          description: The externally visible name for the product pricing
          type: string
        fixed_price:
          $ref: '#/components/schemas/ModelFixedPricing'
        gradient_price:
          items:
            $ref: '#/components/schemas/ModelGradientPricing'
          type:
            - array
            - 'null'
        item_id:
          description: The item ID of the product pricing. Used only for variable pricing
          type:
            - 'null'
            - string
        metadata:
          additionalProperties: true
          description: >-
            Any additional data as key-value pairs that need to be attached to
            the product pricing
          type: object
        metric_id:
          description: >-
            The billable metric ID of the product pricing. Used only for
            variable pricing
          type:
            - 'null'
            - string
        minimum_spend:
          $ref: '#/components/schemas/ModelAmount'
        minimum_spend_schedule:
          $ref: '#/components/schemas/ModelItemPricingMinimumSpendSchedule'
        name:
          description: The name of the product pricing
          type: string
        pricing_type:
          enum:
            - FIXED
            - STEP
            - GRADIENT
            - VOLUME
            - CUSTOM
            - SCHEDULED
          type: string
        product_id:
          description: The product ID of the product to which this pricing belongs
          type: string
        proration_type:
          enum:
            - NONE
            - PRORATE_ALL
          type:
            - 'null'
            - string
        recognition_schedule:
          $ref: '#/components/schemas/ModelItemPricingRecognitionSchedule'
        scheduled_price:
          $ref: '#/components/schemas/ModelScheduledPricing'
        step_price:
          $ref: '#/components/schemas/ModelStepPricing'
        tags:
          description: Any string tags associated with this product pricing
          items:
            type: string
          type:
            - array
            - 'null'
        true_up_frequency:
          type:
            - string
            - 'null'
        type:
          description: >-
            The type of product pricing whether one-time or recurring. Options
            are SUBS_PRICING for recurring and ONETIME_PRICING for one-time
            pricing.
          enum:
            - SUBS_PRICING
            - ONETIME_PRICING
          type: string
        volume_price:
          items:
            $ref: '#/components/schemas/ModelVolumePricing'
          type:
            - array
            - 'null'
      required:
        - name
        - product_id
        - type
        - pricing_type
        - currency
      type: object
    ResponseProductPricingLiteRepresentation:
      properties:
        company_id:
          description: The company ID for the product pricing
          type: string
        computed_entitlements:
          description: The final computed features for the product pricing
          items:
            $ref: '#/components/schemas/ResponseEntitlementDataRepresentation'
          type:
            - array
            - 'null'
        created_at:
          description: The date the product pricing was created
          format: date-time
          type: string
        currency:
          description: The currency for the product pricing
          type: string
        description:
          description: The description for the product pricing
          type: string
        external_name:
          description: The externally exposed name for the product pricing used on invoices
          type: string
        id:
          description: The ID of the product pricing in Measure
          type: string
        metadata:
          additionalProperties: true
          description: >-
            Any additional data as key-value pairs attached to the product
            pricing
          type: object
        name:
          description: The name of the product pricing
          type: string
        num_subs:
          description: The number of subscriptions in the company with the product pricing
          minimum: 0
          type: integer
        override_entitlements:
          description: The overridden features for the product pricing
          items:
            $ref: '#/components/schemas/ResponseEntitlementDataRepresentation'
          type:
            - array
            - 'null'
        product_id:
          description: The product ID that the product pricing is attached to
          type: string
        state:
          description: The state of the product pricing such as ACTIVE or ARCHIVED
          type: string
        tags:
          description: Any tags on the product pricing
          items:
            type: string
          type:
            - array
            - 'null'
        type:
          description: The type of product pricing such as recurring or one-time
          type: string
        updated_at:
          description: The date the product pricing was last updated
          format: date-time
          type: string
      type: object
    ModelAmount:
      description: The amount which has value in cents and a currency
      properties:
        currency:
          type: string
        value_in_cents:
          format: int64
          type: integer
      type: object
    ModelTerm:
      description: >-
        The term which includes a frequency interval and a count for number of
        intervals
      properties:
        count:
          description: The number of times the frequency elapses
          exclusiveMinimum: 0
          format: int64
          type: integer
        frequency:
          description: The frequency at which the term repeats
          enum:
            - HOUR
            - DAY
            - WEEK
            - BI_MONTH
            - MONTH
            - QUARTER
            - BI_ANNUAL
            - YEAR
            - ONETIME
          type: string
      required:
        - frequency
        - count
      type: object
    ModelCreditPricing:
      properties:
        amount:
          $ref: '#/components/schemas/ModelAmount'
          description: Amount of credit
        expiration_policy:
          description: Expiration policy for the credit
          enum:
            - END_OF_PRICING_FREQUENCY
            - NEVER
            - END_OF_TERM
          type:
            - 'null'
            - string
        item_id:
          description: Item ID of the credit
          type:
            - 'null'
            - string
        scoped_product_ids:
          description: Product IDs this credit is restricted to. Empty = unrestricted
          items:
            type: string
          type: array
        type:
          description: Type of credit
          enum:
            - AMOUNT
            - UNITS
          type: string
        units:
          description: Units of credit
          exclusiveMinimum: 0
          format: double
          type: number
      required:
        - type
      type: object
    RequestEntitlementData:
      properties:
        entitlement_id:
          type: string
        id:
          type: string
        key:
          type: string
        value: {}
      type: object
    ModelFixedPricing:
      properties:
        price_per_unit:
          description: Price per unit (in cents)
          type: number
      type: object
    ModelGradientPricing:
      properties:
        end:
          description: End quantity for the row
          minimum: 0
          type: integer
        flat_price:
          description: Flat Price (in cents)
          type: number
        is_custom_tier:
          description: Is custom tier
          type: boolean
        price_per_unit:
          description: Price per unit (in cents)
          type: number
        start:
          description: Start quantity for the row
          minimum: 0
          type: integer
      type: object
    ModelItemPricingMinimumSpendSchedule:
      properties:
        allow_pulling_forward:
          description: Allow pulling forward of minimum spend
          type: boolean
        amount_per_period:
          description: Amount of period per unit (in cents)
          items:
            type: string
          type:
            - 'null'
            - array
        minimum_spend_schedule_type:
          description: Type of minimum spend schedule
          type: string
      type: object
    ModelItemPricingRecognitionSchedule:
      properties:
        amount_per_period:
          description: Amount of period per unit (in cents)
          items:
            type: string
          type:
            - 'null'
            - array
        recognition_schedule_type:
          description: Type of recognition schedule
          enum:
            - IMMEDIATE
            - EVENLY
            - DAILY_EVENLY
            - CUSTOM
            - DONT_RECOGNIZE
          type: string
      type: object
    ModelScheduledPricing:
      properties:
        price_per_unit_per_period:
          description: Price per unit (in cents)
          items:
            type: string
          type:
            - array
            - 'null'
      type: object
    ModelStepPricing:
      properties:
        price_per_step:
          description: Price per step (in cents)
          type: number
        step_size:
          description: Step size
          minimum: 0
          type: integer
      type: object
    ModelVolumePricing:
      properties:
        flat_price:
          description: Flat Price (in cents)
          type: number
        is_custom_tier:
          description: Is custom tier
          type: boolean
        price_per_unit:
          description: Price per unit (in cents)
          type: number
        total_units_end:
          description: End quantity for the row
          minimum: 0
          type: integer
        total_units_start:
          description: Start quantity for the row
          minimum: 0
          type: integer
      type: object
    ResponseEntitlementDataRepresentation:
      properties:
        entitlement_id:
          type: string
        id:
          type: string
        inherited_from_id:
          type:
            - 'null'
            - string
        inherited_from_type:
          type:
            - 'null'
            - string
        key:
          type: string
        name:
          type: string
        original_value: {}
        overridden:
          type:
            - 'null'
            - boolean
        type:
          type: string
        value: {}
      type: object
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````