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

# Update requirement group for a sub number order



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/ordering.yml post /sub_number_orders/{id}/requirement_group
openapi: 3.1.0
info:
  title: Telnyx Phone Number Ordering API
  version: 2.0.0
  description: API for ordering phone numbers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sub_number_orders/{id}/requirement_group:
    post:
      tags:
        - Requirement Groups
      summary: Update requirement group for a sub number order
      operationId: updateSubNumberOrderRequirementGroup
      parameters:
        - name: id
          in: path
          description: The ID of the sub number order
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - requirement_group_id
              properties:
                requirement_group_id:
                  type: string
                  format: uuid
                  description: The ID of the requirement group to associate
            example:
              requirement_group_id: a4b201f9-8646-4e54-a7d2-b2e403eeaf8c
      responses:
        '200':
          description: Sub number order requirement group updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubNumberOrderRequirementGroupResponse'
        '400':
          $ref: '#/components/responses/numbers_BadRequestResponse'
        '401':
          $ref: '#/components/responses/numbers_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/numbers_NotFoundResponse'
        '422':
          $ref: '#/components/responses/numbers_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/numbers_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.subNumberOrders.updateRequirementGroup(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              { requirement_group_id: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c' },
            );


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.sub_number_orders.update_requirement_group(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                requirement_group_id="a4b201f9-8646-4e54-a7d2-b2e403eeaf8c",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.SubNumberOrders.UpdateRequirementGroup(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.SubNumberOrderUpdateRequirementGroupParams{\n\t\t\tRequirementGroupID: \"a4b201f9-8646-4e54-a7d2-b2e403eeaf8c\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateRequirementGroupParams;

            import
            com.telnyx.sdk.models.subnumberorders.SubNumberOrderUpdateRequirementGroupResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    SubNumberOrderUpdateRequirementGroupParams params = SubNumberOrderUpdateRequirementGroupParams.builder()
                        .id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .requirementGroupId("a4b201f9-8646-4e54-a7d2-b2e403eeaf8c")
                        .build();
                    SubNumberOrderUpdateRequirementGroupResponse response = client.subNumberOrders().updateRequirementGroup(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.sub_number_orders.update_requirement_group(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              requirement_group_id: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
            )

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->subNumberOrders->updateRequirementGroup(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                requirementGroupID: 'a4b201f9-8646-4e54-a7d2-b2e403eeaf8c',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sub-number-orders update-requirement-group \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --requirement-group-id a4b201f9-8646-4e54-a7d2-b2e403eeaf8c
components:
  schemas:
    SubNumberOrderRequirementGroupResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
            order_request_id:
              type: string
              format: uuid
            country_code:
              type: string
            phone_number_type:
              type: string
            phone_numbers_count:
              type: integer
            requirements_met:
              type: boolean
            is_block_sub_number_order:
              type: boolean
            status:
              type: string
            customer_reference:
              type: string
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            record_type:
              type: string
            regulatory_requirements:
              type: array
              items:
                $ref: '#/components/schemas/RegulatoryRequirement'
            phone_numbers:
              type: array
              items:
                $ref: '#/components/schemas/SubNumberOrderPhoneNumber'
      example:
        data:
          country_code: AT
          created_at: '2018-01-01T00:00:00.000000Z'
          updated_at: '2018-01-01T00:00:00.000000Z'
          regulatory_requirements:
            - record_type: phone_number_regulatory_requirement
              requirement_id: 2708e569-696a-4fc7-9305-5fdb3eb9c7dd
              field_type: textual
          phone_numbers_count: 1
          phone_numbers:
            - country_code: AT
              regulatory_requirements:
                - field_value: '4804570924'
                  requirement_id: 2708e569-696a-4fc7-9305-5fdb3eb9c7dd
                  field_type: textual
                  status: pending-approval
              bundle_id: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
              requirements_status: requirement-info-under-review
              phone_number_type: toll_free
              requirements_met: false
              record_type: number_order_phone_number
              status: pending
              id: 613d517a-0432-4bae-a785-c11033bd0985
              phone_number: '+43800300238'
          is_block_sub_number_order: false
          phone_number_type: toll_free
          requirements_met: false
          id: f826ed66-b27c-4340-9dc0-57dc3459f1bd
          order_request_id: a11d58fe-88a4-494a-b752-8dea411993c6
          status: pending
          customer_reference: missing
          record_type: sub_number_order
    RegulatoryRequirement:
      type: object
      properties:
        record_type:
          type: string
        requirement_id:
          type: string
          format: uuid
        field_type:
          type: string
    SubNumberOrderPhoneNumber:
      type: object
      properties:
        id:
          type: string
          format: uuid
        phone_number:
          type: string
        country_code:
          type: string
        phone_number_type:
          type: string
        requirements_met:
          type: boolean
        requirements_status:
          type: string
        status:
          type: string
        record_type:
          type: string
        bundle_id:
          type:
            - string
            - 'null'
          format: uuid
        regulatory_requirements:
          type: array
          items:
            type: object
            properties:
              requirement_id:
                type: string
                format: uuid
              field_type:
                type: string
              field_value:
                type: string
              status:
                type: string
    numbers_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/numbers_Error'
      type: object
    numbers_Error:
      properties:
        code:
          type: string
          example: '10007'
        title:
          type: string
          example: Unexpected error
        detail:
          type: string
          example: An unexpected error occured.
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              example: /base
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
              description: URL with additional information on the error.
              example: https://developers.telnyx.com/docs/overview/errors/10015
      type: object
  responses:
    numbers_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    numbers_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````