# Get Available Fax Line Area Codes GET https://api.hellosign.com/v3/fax_line/area_codes Returns a list of available area codes for a given state/province and city Reference: https://developer.hellosign.com/api/fax-line/area-code-get ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get Available Fax Line Area Codes version: endpoint_faxLine.areaCodeGet paths: /fax_line/area_codes: get: operationId: area-code-get summary: Get Available Fax Line Area Codes description: >- Returns a list of available area codes for a given state/province and city tags: - - subpackage_faxLine parameters: - name: country in: query description: Filter area codes by country required: true schema: $ref: '#/components/schemas/FaxLineAreaCodesGetParametersCountry' - name: state in: query description: Filter area codes by state required: false schema: $ref: '#/components/schemas/FaxLineAreaCodesGetParametersState' - name: province in: query description: Filter area codes by province required: false schema: $ref: '#/components/schemas/FaxLineAreaCodesGetParametersProvince' - name: city in: query description: Filter area codes by city required: false schema: type: string - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/FaxLineAreaCodeGetResponse' '400': description: failed_operation content: {} components: schemas: FaxLineAreaCodesGetParametersCountry: type: string enum: - value: CA - value: US - value: UK FaxLineAreaCodesGetParametersState: type: string enum: - value: AK - value: AL - value: AR - value: AZ - value: CA - value: CO - value: CT - value: DC - value: DE - value: FL - value: GA - value: HI - value: IA - value: ID - value: IL - value: IN - value: KS - value: KY - value: LA - value: MA - value: MD - value: ME - value: MI - value: MN - value: MO - value: MS - value: MT - value: NC - value: ND - value: NE - value: NH - value: NJ - value: NM - value: NV - value: NY - value: OH - value: OK - value: OR - value: PA - value: RI - value: SC - value: SD - value: TN - value: TX - value: UT - value: VA - value: VT - value: WA - value: WI - value: WV - value: WY FaxLineAreaCodesGetParametersProvince: type: string enum: - value: AB - value: BC - value: MB - value: NB - value: NL - value: NT - value: NS - value: NU - value: 'ON' - value: PE - value: QC - value: SK - value: YT FaxLineAreaCodeGetResponse: type: object properties: area_codes: type: array items: type: integer required: - area_codes ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); try { $response = (new Dropbox\Sign\Api\FaxLineApi(config: $config))->faxLineAreaCodeGet( country: "US", ); print_r($response); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling FaxLineApi#faxLineAreaCodeGet: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class FaxLineAreaCodeGetExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; try { var response = new FaxLineApi(config).FaxLineAreaCodeGet( country: "US" ); Console.WriteLine(response); } catch (ApiException e) { Console.WriteLine("Exception when calling FaxLineApi#FaxLineAreaCodeGet: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.FaxLineApi(); apiCaller.username = "YOUR_API_KEY"; apiCaller.faxLineAreaCodeGet( "US", // country undefined, // state undefined, // province undefined, // city ).then(response => { console.log(response.body); }).catch(error => { console.log("Exception when calling FaxLineApi#faxLineAreaCodeGet:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class FaxLineAreaCodeGetExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); try { var response = new FaxLineApi(config).faxLineAreaCodeGet( "US", // country null, // state null, // province null // city ); System.out.println(response); } catch (ApiException e) { System.err.println("Exception when calling FaxLineApi#faxLineAreaCodeGet"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" end begin response = Dropbox::Sign::FaxLineApi.new.fax_line_area_code_get( "US", # country ) p response rescue Dropbox::Sign::ApiError => e puts "Exception when calling FaxLineApi#fax_line_area_code_get: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", ) with ApiClient(configuration) as api_client: try: response = api.FaxLineApi(api_client).fax_line_area_code_get( country="US", ) pprint(response) except ApiException as e: print("Exception when calling FaxLineApi#fax_line_area_code_get: %s\n" % e) ``` ```go Sample Area Code Response package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/fax_line/area_codes?country=CA" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Basic :") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift Sample Area Code Response import Foundation let headers = ["Authorization": "Basic :"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/fax_line/area_codes?country=CA")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```