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

# Simulate Extension Cost

> Return the cost of extending the line for the specified duration.



## OpenAPI

````yaml /openapi.json put /v1/lines/simulate/extend
openapi: 3.1.0
info:
  version: 1.0.0
  title: CCCAMBOX Reseller API
  description: >-
    CCCambox Reseller API provides programmatic access to manage IPTV
    subscriptions and line management. Use this API to automate operations like
    creating new lines, managing packages, handling credits. Includes endpoints
    for subscriber management, package configuration, and line monitoring. Built
    for resellers to efficiently scale their IPTV business operations.
servers: []
security: []
paths:
  /v1/lines/simulate/extend:
    put:
      tags:
        - Line Management
      summary: Simulate Extension Cost
      description: Return the cost of extending the line for the specified duration.
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: >-
                        The ID of the line. Either the ID or the username is
                        required to run this request.
                    username:
                      type: string
                      description: The username of the line.
                - type: object
                  properties:
                    duration:
                      type: number
                      example: 12
                      description: >-
                        The duration of the line in months. Valid values are 1,
                        3, 6, or 12.
                  required:
                    - duration
      responses:
        '200':
          description: 'Ok: Return extension cost'
          content:
            application/json:
              schema:
                type: object
                properties:
                  cost:
                    type: number
                    example: 25
                required:
                  - cost
        '400':
          description: 'Bad Request: Errors in supplied parameters.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - request_errors
                  message:
                    type: string
                    example: Request error occurred.
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            message:
                              type: string
                            path:
                              type: array
                              items:
                                type: string
                          required:
                            - code
                            - message
                            - path
                    required:
                      - errors
                required:
                  - code
                  - message
                  - data
        '401':
          description: 'Auth Error: Not authorized.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_authorized
                  message:
                    type: string
                    example: Not authorized to perform this action.
                required:
                  - code
                  - message
        '404':
          description: 'Line Not Found: The line you''re looking for could not be found.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - line_not_found
                  message:
                    type: string
                    example: Line not found.
                required:
                  - code
                  - message
        '406':
          description: >-
            Duration or Action not Authorized: The duration you've selected is
            no more avaiable or the action you're trying to perform is not
            compatible with this line. 
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unavailable_duration
                      - line_not_found
                  message:
                    type: string
                    example: Selected duration is not available.
                required:
                  - code
                  - message
        '429':
          description: 'Rate limit error: too many requests.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit
                  message:
                    type: string
                    example: Rate limit exceeded.
                required:
                  - code
                  - message
        '500':
          description: 'Server Error: handler died.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - server_error
                  message:
                    type: string
                    example: Internal server error occurred.
                  requestId:
                    type: string
                required:
                  - code
                  - message
                  - requestId
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: API Key
      name: x-api-key
      in: header

````