> ## 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.

# Download a porting order loa template

> Download a porting order loa template



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-documents.yml get /porting_orders/{id}/loa_template
openapi: 3.1.0
info:
  title: Telnyx Porting Documents API
  version: 2.0.0
  description: API for LOA configurations, templates, and additional documents.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_orders/{id}/loa_template:
    get:
      tags:
        - Porting Orders
      summary: Download a porting order loa template
      description: Download a porting order loa template
      operationId: GetPortingOrderLoaTemplate
      parameters:
        - $ref: '#/components/parameters/PathPortingOrderID'
        - name: loa_configuration_id
          in: query
          description: >-
            The identifier of the LOA configuration to use for the template. If
            not provided, the default LOA configuration will be used.
          example: a36c2277-446b-4d11-b4ea-322e02a5c08d
          required: false
          schema:
            type: string
            format: uuid
      responses:
        '200':
          $ref: '#/components/responses/DownloadLOATemplate'
        '401':
          description: Unauthorized
      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.portingOrders.retrieveLoaTemplate(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );

            console.log(response);

            const content = await response.blob();
            console.log(content);
        - 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.porting_orders.retrieve_loa_template(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response)
            content = response.read()
            print(content)
        - 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.PortingOrders.GetLoaTemplate(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.PortingOrderGetLoaTemplateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\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.core.http.HttpResponse;

            import
            com.telnyx.sdk.models.portingorders.PortingOrderRetrieveLoaTemplateParams;


            public final class Main {
                private Main() {}

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

                    HttpResponse response = client.portingOrders().retrieveLoaTemplate("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.porting_orders.retrieve_loa_template("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - lang: CLI
          source: |-
            telnyx porting-orders retrieve-loa-template \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  parameters:
    PathPortingOrderID:
      name: id
      description: Porting Order id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  responses:
    DownloadLOATemplate:
      description: Successful response
      content:
        application/pdf:
          schema:
            type: string
            format: binary
            example: '%PDF-1.4...'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````