> ## Documentation Index
> Fetch the complete documentation index at: https://telnesstech-a0a16404.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update line item

> Update a line item configuration. Order must be in PENDING status.



## OpenAPI

````yaml /api-reference/bundled_openapi.json put /orders/{orderId}/line-items/{lineItemId}
openapi: 3.1.0
info:
  title: Telness Tech Connect
  version: 2.0.0-alpha
  description: >
    Telness Tech Connect API provides all you need to own your user's
    connectivity experience.


    Go back to [Telnesstech.com](https://telnesstech.com)
servers:
  - url: https://apiv2.example.com
    description: Connect API URL for your domain
security:
  - apiKey: []
  - bearerAuth: []
    apiKey: []
tags:
  - name: Auth
    description: Authenticate users and obtain access tokens.
  - name: Users
    description: Manage users.
  - name: Customers
    description: Manage customers.
  - name: Subscriptions
    description: Manage subscriptions and subscription.
  - name: Subscription Addons
    description: Manage subscription addons.
  - name: Subscription Usage
    description: Get subscription usage.
  - name: Subscribers
    description: Manage subscribers.
  - name: Licenses
    description: Manage licenses.
  - name: Product Offerings
    description: Browse product offerings.
  - name: Product Catalogs
    description: Browse product catalogs.
  - name: Product Discounts
    description: Discounts and promotions.
  - name: Orders
    description: Manage orders and line items.
  - name: Payment Intents
    description: >-
      Inspect payment intents, the money collected over card rails for orders
      and renewals.
  - name: Payment Links
    description: Create and manage payment links for orders and invoices.
  - name: Payment Sessions
    description: Create and manage payment sessions for orders.
  - name: Payment Profiles
    description: Manage customer payment profiles and methods.
  - name: Payment Profile Sessions
    description: Create sessions for setting up payment profiles.
  - name: Signing sessions
    description: Handle contract signing sessions for postpaid orders.
  - name: Porting
    description: Manage number porting for subscriptions.
  - name: Taxes
    description: Calculate taxes for products and line items.
  - name: Invoices
    description: Manage invoices and invoice items.
  - name: Tools
    description: >-
      Tools for address validation, number porting, device info, and network
      coverage.
  - name: Inventory
    description: Manage phone number inventory, SIM cards, and reservations.
  - name: Workflows
    description: Dynamic processing of customer journeys and events.
paths:
  /orders/{orderId}/line-items/{lineItemId}:
    put:
      tags:
        - Orders
      summary: Update line item
      description: Update a line item configuration. Order must be in PENDING status.
      operationId: updateOrderLineItem
      parameters:
        - name: orderId
          in: path
          required: true
          description: The unique identifier of the order
          schema:
            type: string
        - name: lineItemId
          in: path
          required: true
          description: The unique identifier of the line item
          schema:
            type: string
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLineItemRequest'
      responses:
        '200':
          description: Line item updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderLineItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    IdempotencyKey:
      in: header
      name: X-Idempotency-Key
      required: false
      description: >
        A unique key to ensure idempotency of requests. If a request with the
        same key has already been processed, the same result will be returned.

        The key must be unique for each distinct operation. Keys are expired
        after 24 hours, but we recommend using a new key for each request.


        Modified requests with the same idempotency keys are rejected with a
        `409 Conflict` status code.
      schema:
        type: string
        maxLength: 256
  schemas:
    UpdateLineItemRequest:
      type: object
      description: Request to update a line item configuration.
      required:
        - lineItem
      additionalProperties: false
      properties:
        lineItem:
          $ref: '#/components/schemas/OrderLineItem'
    OrderLineItem:
      description: A line item in an order representing a billable action or service.
      oneOf:
        - $ref: '#/components/schemas/SubscriptionLineItem'
        - $ref: '#/components/schemas/LicenseLineItem'
        - $ref: '#/components/schemas/AddonLineItem'
        - $ref: '#/components/schemas/ExternalProductLineItem'
        - $ref: '#/components/schemas/ExternalLineItem'
        - $ref: '#/components/schemas/SubscriptionChangeLineItem'
        - $ref: '#/components/schemas/LicenseChangeLineItem'
        - $ref: '#/components/schemas/AddonChangeLineItem'
      discriminator:
        propertyName: type
        mapping:
          SUBSCRIPTION: '#/components/schemas/SubscriptionLineItem'
          LICENSE: '#/components/schemas/LicenseLineItem'
          ADDON: '#/components/schemas/AddonLineItem'
          EXTERNAL_PRODUCT: '#/components/schemas/ExternalProductLineItem'
          EXTERNAL: '#/components/schemas/ExternalLineItem'
          SUBSCRIPTION_CHANGE: '#/components/schemas/SubscriptionChangeLineItem'
          LICENSE_CHANGE: '#/components/schemas/LicenseChangeLineItem'
          ADDON_CHANGE: '#/components/schemas/AddonChangeLineItem'
    SubscriptionLineItem:
      type: object
      title: Subscription
      description: >-
        Create a new subscription in this order. This will set up a new phone
        service for a customer with their chosen plan and phone number.
      required:
        - type
        - lineItemId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - SUBSCRIPTION
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-1
        productOfferingId:
          type: string
          description: The product offering to create a subscription for.
          example: mobile-plan-basic
        msisdn:
          type: string
          description: >
            The phone number for this subscription.

            - Leave empty to have one assigned.

            - When the number pool is available, you can choose a number from
            the pool and provide the leaseToken.

            - When porting a number, provide the number and porting details.
          example: '+15551234567'
        leaseToken:
          type: string
          description: >-
            Token received when leasing a number. Required when an msisdn is
            provided from the number pool.
        tempNumber:
          type: boolean
          description: >
            Whether to use a temporary number until the porting is completed.


            If true, a temporary number will be assigned and activated as soon
            as possible until the porting is finalized.


            Can only be used when porting in a number (i.e., when msisdn and
            porting details are provided).
        portingRequested:
          type: boolean
          description: If true, the number is a port-in.
        porting:
          type: object
          description: Details needed to port in a number for this subscription.
          required:
            - details
          additionalProperties: false
          properties:
            details:
              $ref: '#/components/schemas/PortingDetails'
        extensions:
          type: object
          description: >-
            Additional subscription extensions fields for custom subscription
            types.
          additionalProperties:
            type: string
        display:
          type: string
          description: >-
            Custom display name for the subscription. If not provided, will be
            auto-generated from msisdn.
        subscriber:
          type: object
          description: Subscriber information (required eventually).
          additionalProperties: false
          properties:
            name:
              type: string
              description: Name of the subscriber.
              example: John Doe
            email:
              type: string
              format: email
              description: Contact email of the subscriber.
              example: john.doe@example.com
            msisdn:
              type: string
              format: phone
              description: >-
                Contact phone number of the subscriber. May be the same as the
                subscription's msisdn.
              example: '+15551234567'
            address:
              $ref: '#/components/schemas/Address'
              description: >
                The address of the subscriber. Depending on local regulations,
                this may be required for certain subscriptions.


                In the US, this is the E911 address.
        sim:
          type: object
          description: SIM configuration (required eventually).
          additionalProperties: false
          required:
            - esim
          properties:
            esim:
              type: boolean
              description: Whether this subscription should use eSIM technology.
              example: true
            imei:
              type: string
              description: |
                International Mobile Equipment Identity for eSIM activation.

                Some networks require this to activate the eSIM.
              example: '356938035643809'
            iccid:
              type: string
              description: |
                Integrated Circuit Card identifier for existing SIM.
                Provide if using a pre-existing SIM card.

                This feature only applies to certain networks.
              example: '8931440400000000000'
        scheduleActivationAt:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: Date when the subscription should be activated.
          example: '2024-02-01'
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    LicenseLineItem:
      type: object
      title: License
      description: Line item for creating a new license.
      required:
        - type
        - lineItemId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - LICENSE
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-2
        productOfferingId:
          type: string
          description: The product offering to create a license for.
          example: license-premium
        details:
          type: object
          description: Additional license details specific to certain license types.
          additionalProperties: true
        scheduleActivationAt:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: When to activate the license.
          example: '2024-02-01'
        parentLineItemId:
          type: string
          description: >-
            Reference to parent line item in this order this license is assigned
            to.
          example: line-item-1
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    AddonLineItem:
      type: object
      title: Add-on
      description: Line item for adding an add-on to a subscription.
      required:
        - type
        - lineItemId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - ADDON
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-3
        productOfferingId:
          type: string
          description: The add-on product offering to add.
          example: addon-data-5gb
        subscriptionId:
          type: string
          description: |
            An existing subscription to add the add-on to.

            Either this or `parentLineItemId` must be provided.
          example: subscription-456
        parentLineItemId:
          type: string
          description: |
            Reference to parent subscription line item in this same order.

            Either this or `subscriptionId` must be provided.
          example: line-item-1
        scheduledAt:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: When to activate the add-on.
          example: '2024-02-01'
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    ExternalProductLineItem:
      type: object
      title: External Product
      description: Line item for external product from catalog with external fulfillment.
      required:
        - type
        - lineItemId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - EXTERNAL_PRODUCT
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-5
        productOfferingId:
          type: string
          description: The external product offering from the catalog.
          example: external-device-iphone15
        quantity:
          type: integer
          minimum: 1
          description: Quantity of the external product.
          example: 2
        parentLineItemId:
          type: string
          description: Reference to parent line item in this order.
          example: line-item-1
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    ExternalLineItem:
      type: object
      title: External Item
      description: >-
        Line item for custom external item with which allows for selling
        externally managed products.
      required:
        - type
        - lineItemId
        - name
        - price
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - EXTERNAL
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-6
        name:
          type: string
          description: Name of the external item.
          example: Custom Installation Service
        description:
          type: string
          description: Description of the external item.
          example: Professional on-site installation and setup
        price:
          type: object
          description: Custom pricing for the external item.
          required:
            - amount
            - currency
          additionalProperties: false
          properties:
            amount:
              type: number
              format: decimal
              description: Price amount.
              example: 99.99
            currency:
              type: string
              description: Currency code.
              example: USD
        quantity:
          type: integer
          minimum: 1
          description: Quantity of the external item.
          example: 1
        taxationId:
          type: string
          description: US taxation ID for tax calculation.
          example: TAX123456
        fulfillmentWebhook:
          type: string
          format: uri
          description: Optional webhook URL for fulfillment notifications.
          example: https://partner.com/webhooks/fulfillment
        parentLineItemId:
          type: string
          description: Reference to parent line item in this order.
          example: line-item-1
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    SubscriptionChangeLineItem:
      type: object
      title: Subscription Change
      description: Line item for changing a subscription's product offering.
      required:
        - type
        - lineItemId
        - subscriptionId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - SUBSCRIPTION_CHANGE
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-7
        subscriptionId:
          type: string
          description: The subscription to modify.
          example: subscription-456
        productOfferingId:
          type: string
          description: New product offering to change to.
          example: mobile-plan-premium
        scheduleDate:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: >-
            Earliest date to perform the change on. If the change schedule
            doesn't fit this date, the earliest date after this will be chosen.
          example: '2024-02-01'
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    LicenseChangeLineItem:
      type: object
      title: License Change
      description: Line item for changing a license's product offering.
      required:
        - type
        - lineItemId
        - licenseId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - LICENSE_CHANGE
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-8
        licenseId:
          type: string
          description: The license to modify.
          example: license-789
        productOfferingId:
          type: string
          description: New product offering to change to.
          example: license-premium
        scheduleDate:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: >-
            Earliest date to perform the change on. If the change schedule
            doesn't fit this date, the earliest date after this will be chosen.
          example: '2024-02-01'
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    AddonChangeLineItem:
      type: object
      title: Add-on Change
      description: Line item for changing an add-on's product offering.
      required:
        - type
        - lineItemId
        - subscriptionId
        - addonId
        - productOfferingId
      additionalProperties: false
      properties:
        type:
          type: string
          enum:
            - ADDON_CHANGE
          description: Line item type discriminator.
        lineItemId:
          type: string
          description: Unique identifier for this line item within the order.
          example: line-item-9
        subscriptionId:
          type: string
          description: The subscription containing the add-on to modify.
          example: subscription-456
        addonId:
          type: string
          description: The add-on to change.
          example: addon-123
        productOfferingId:
          type: string
          description: New add-on product offering to change to.
          example: addon-data-5gb
        scheduleDate:
          type: string
          format: date
          x-ogen-type: telnesstech.com/apiv2/apiv2types.Date
          description: >-
            Earliest date to perform the change on. If the change schedule
            doesn't fit this date, the earliest date after this will be chosen.
          example: '2024-02-01'
        reason:
          type: string
          description: Reason for the change.
          example: Customer upgrade request
        metadata:
          $ref: '#/components/schemas/Metadata'
        status:
          $ref: '#/components/schemas/OrderLineItemStatus'
          readOnly: true
          description: Server-resolved fulfillment status for this line item.
    Error:
      type: object
      required:
        - message
        - code
      properties:
        message:
          type: string
          description: A human-readable message providing more details about the error.
        code:
          type: string
          description: A machine-readable code for the error.
        details:
          type: array
          description: Additional details about the error.
          items:
            type: object
            required:
              - message
              - code
            properties:
              message:
                type: string
                description: >-
                  A human-readable message providing more details about the
                  error.
              code:
                type: string
                description: A machine-readable code for the specific detail.
              property:
                type: string
                description: The property or field related to the error.
              suggestion:
                $ref: '#/components/schemas/Any'
                description: >
                  A suggested value for the particular property.


                  For example, this may be set when validating an address with
                  an alias, suggesting the expected value by the operator.
        hint:
          type: string
          description: A hint to help resolve the error.
    PortingDetails:
      description: >
        description: Detailed information required for the porting process,
        varying by country and provider.
      oneOf:
        - $ref: '#/components/schemas/PortingDetailsUS'
        - $ref: '#/components/schemas/PortingDetailsSweden'
    Address:
      type: object
      required:
        - street1
        - city
        - zip
        - country
      properties:
        street1:
          type: string
          description: The first line of the address, typically street and house number.
          example: 500 S Main St
        street2:
          type: string
          description: >-
            The second line of the address, typically apartment, suite, unit,
            building, floor, etc.
          example: Apt 1
        city:
          type: string
          description: The city or municipality of the address.
          example: Natick
        zip:
          type: string
          description: >
            The zip code of the address.


            Depending on the country, this may be referred to as a postal code
            or postcode.


            Specifically for US addresses, the zip can include the optional
            four-digit extension (e.g., '27604-5121').
          example: '01701'
        country:
          type: string
          description: >-
            The two-letter country abbreviation (e.g., 'US' for United States,
            'SE' for Sweden).
          pattern: ^[A-Z]{2}$
          example: US
        state:
          type: string
          description: >-
            For countries that use states or regions, the state or
            administrative area code (e.g., 'CA' for California in the United
            States).
          example: CA
        region:
          type: string
          description: >-
            A province, region, or territory name, applicable in certain
            countries (e.g., 'Ontario' in Canada, 'Sindh' in Pakistan).
        attention:
          type: string
          description: >-
            An optional line for specifying a person, department, or attention
            to a specific entity within an address.
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >
        A set of key-value pairs that can be attached to an object for storing
        additional information in a semi-structured format.
    OrderLineItemStatus:
      type: string
      description: >
        The current fulfillment status of an order line item.


        Resolved dynamically from the underlying entity (subscription action,
        license, activation).

        An order can complete while individual line items remain RUNNING or
        FAILED; failures on

        one line item do not block completion of the rest of the order.
      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - FAILED
    Any:
      oneOf:
        - type: string
        - type: number
        - type: boolean
        - type: object
          additionalProperties: true
        - type: array
    PortingDetailsUS:
      title: USPortingDetails
      type: object
      required:
        - firstName
        - lastName
        - address
      properties:
        accountNumber:
          type: string
          description: >
            The account number with the current provider.


            If not provided here, must be provided in the future for activation
            on-demand.
        passcode:
          type: string
          description: >
            The passcode or pin associated with the account at the current
            provider.


            If not provided here, must be provided in the future for activation
            on-demand.
        firstName:
          type: string
          description: The first name of the person requesting the port.
        lastName:
          type: string
          description: The last name of the person requesting the port.
        address:
          $ref: '#/components/schemas/Address'
    PortingDetailsSweden:
      title: SwedishPortingDetails
      type: object
      required:
        - identity
      properties:
        identity:
          type: string
          description: >-
            The identity of the current owner of the phone number, e.g.,
            "personal identity number" or "company registration number".
  responses:
    BadRequest:
      description: The request was malformed or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication is required to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Access to this resource is forbidden.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many requests have been sent in a given amount of time.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: >
        An API key that grants access to the Connect API. You can create and
        manage API keys in the portal.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Bearer authentication with JWT tokens is used to authenticate users.


        Do note that a valid API keys is also required to access the Connect API
        to prove that requests are made by a trusted party.


        Requests with a JWT token is scoped to the permissions of the user the
        token belongs to, regardless of the API key used.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.