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

# Add a subscription measurement.

> Add a subscription measurement. This could be a quantity change, or a metered usage.



## OpenAPI

````yaml post /subscription-measurements
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /subscription-measurements:
    parameters: []
    post:
      tags:
        - Subscription Measurement
      summary: Add a subscription measurement.
      description: >-
        Add a subscription measurement. This could be a quantity change, or a
        metered usage.
      operationId: addSubscriptionMeasurement
      parameters: []
      requestBody:
        description: The new MeasurementValue resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MeasurementValue.AddMeasurementValue'
          text/html:
            schema:
              $ref: '#/components/schemas/MeasurementValue.AddMeasurementValue'
        required: true
      responses:
        '204':
          description: MeasurementValue resource created
          content:
            application/json:
              schema: {}
            text/html:
              schema: {}
          links: {}
        '400':
          description: Invalid input
        '422':
          description: Unprocessable entity
      deprecated: false
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X POST \
             /subscription-measurements \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "subscriptionItem": "1QEHKTJY9097X91J78YRJEA9E8",
                "measurementCode": "used_traffic"
            }'
components:
  schemas:
    MeasurementValue.AddMeasurementValue:
      type: object
      description: ''
      deprecated: false
      properties:
        subscription:
          description: >-
            The subscription id, or the subscription number. Only necessary if
            you provide only the measurement code.
          example: 1QEHKTJY9097X91J78YRJEA9E8
          nullable: false
        subscriptionItem:
          description: >-
            Either the subscription item or the measurement code must be
            provided.
          example: 1QEHKTJY9097X91J78YRJEA9E8
          type:
            - string
            - 'null'
        measurementCode:
          description: >-
            Either the subscription item or the measurement code must be
            provided. If the subscription contains multiple items with the same
            measurement (code), all their values will be updated.
          example: used_traffic
          type:
            - string
            - 'null'
        quantity:
          description: The new value
          example: '10.239'
          nullable: false
        measuredAt:
          description: >-
            The date the value was measured. If none is given, the current date
            is used
          example: '2021-01-01T00:00:00Z'
          nullable: false
      required:
        - quantity
        - measuredAt
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````