メニュー

Expand
ページを評価:

Pricing: Trunking Resource

The Pricing Trunking resoure provides a simple API to pull real-time, account-specific pricing for Twilio's Elastic SIP Trunking.

Prices can be retrieved at a country level via the Pricing Trunking Countries resource or for a specific phone number via the Pricing Trunking Numbers resource.

You may also wish to check out our Pricing API resources for Twilio's Voice, Messaging and Phone Number products.

Looking for details on pricing for Twilio products? Check out Twilio's pricing page.

ベースURL

リファレンスドキュメントの URL はすべて、次のベース URL を使用しています。

https://pricing.twilio.com/v2/trunking

認証

REST APIへのHTTPリクエストはHTTPベーシック認証により保護されます。Twilioをどのように認証を利用するかはこちらのセキュリティドキュメントをご確認ください。つまり、HTTPベーシック認証では Twilio AccountSIDはユーザー名、AuthTokenはパスワードとして扱われます。

curl -G https://pricing.twilio.com/v2/Trunking/Countries/US \
    -u '[YOUR ACCOUNT SID]:[YOUR AUTH TOKEN]'

AccountSid と AuthToken はダッシュボードで確認できます。

Pricing Trunking Country List Resource

リソース URL

https://pricing.twilio.com/v2/Trunking/Countries

This resource returns a list of countries where Twilio trunking services are available and the corresponding URL for retrieving the country specific trunking prices. This list includes paging information.

Retrieve a list of countries where Twilio trunking services are available.

        
        
        

        Get Prices for Individual Countries

        You can also retrieve pricing information for individual countries.

              
              
              

              Pricing Trunking Country Instance Resource

              リソース URL

              https://pricing.twilio.com/v2/Trunking/Countries/{Country}
              

              {Country} は、ISO 3166-1 alpha-2 フォーマットの国コードです。

              This resource represents prices to make trunking calls to phone numbers in a given country, organized by phone number prefix (TerminatingPrefixPriceWithOrigin), and the prices to receive trunking calls on Twilio phone numbers in this country, organized by phone number type (OriginatingCallPrices).

              リソースのプロパティ

              A Pricing Trunking Country resource is represented by the following properties:

              Resource Properties in REST API format
              country
              文字列 Not PII

              The name of the country.

              iso_country
              iso_country_code Not PII

              The ISO country code.

              url
              url Not PII

              The absolute URL of the resource.

              Instance Properties in REST API format
              terminating_prefix_prices
              outbound_prefix_price_with_origin[] Not PII

              The list of TerminatingPrefixPrice records.

              originating_call_prices
              inbound_call_price[] Not PII

              The list of OriginatingCallPrice records.

              price_unit
              currency Not PII

              The currency in which prices are measured, specified in ISO 4127 format (e.g. usd, eur, jpy).

              TerminatingPrefixPrices record

              プロパティ 概要
              DestinationPrefixes Set of destination phone number prefixes for the requested country with the same pricing
              OriginationPrefixes Set of origination phone number prefixes for the requested country with the same pricing. Valid set elements include specific prefixes, ALL (representing the entire set of all valid prefixes), or ROW (representing the rest-of-world, which is the set of remaining prefixes that aren't specifically listed)
              FriendlyName この一連のプレフィックスを説明するテキストです。
              BasePrice In the current version of the API, this value will always be null
              CurrentPrice このプレフィックスリストに一致する番号に通話を発信する現在の 1 分あたりの料金(数量割引またはカスタム割引の適用対象)です。

              OriginatingCallPrice record

              プロパティ 概要
              NumberType 電話番号タイプです(localmobilenational、または toll free のいずれか)。
              BasePrice In the current version of the API, this value will always be null
              CurrentPrice この電話番号タイプへの通話を受信する現在の 1 分あたりの料金(数量割引またはカスタム割引の適用対象)です。

              Pricing Trunking Number Instance Resource

              This resource represents the prices to make trunking calls to a given phone number (TerminatingPrefixPrices) and the prices to receive trunking calls to this Twilio phone number (OriginatingCallPrice).

              リソース URL

              https://pricing.twilio.com/v2/Trunking/Numbers/{Phone Number}
              

              {Phone Number} は、E.164 フォーマットの電話番号です。

              リソースのプロパティ

              Resource Properties in REST API format
              destination_number
              phone_number<e164> Not PII

              The destination phone number in E.164 format, which consists of a + followed by the country code and subscriber number.

              origination_number
              phone_number<e164> Not PII

              The origination phone number in [E.164 format, which consists of a + followed by the country code and subscriber number.

              country
              文字列 Not PII

              The name of the country.

              iso_country
              iso_country_code Not PII

              ISO 国コードです。

              terminating_prefix_prices
              outbound_prefix_price_with_origin[] Not PII

              originating_call_price
              inbound_call_price Not PII

              The OriginatingCallPrice record.

              price_unit
              currency Not PII

              The currency in which prices are measured, specified in ISO 4127 format (e.g. usd, eur, jpy).

              url
              url Not PII

              The absolute URL of the resource.

              TerminatingCallPrices record

              プロパティ 概要
              BasePrice In the current version of the API, this value will always be null
              CurrentPrice この番号に通話を発信する現在の 1 分あたりの料金(数量割引またはカスタム割引の適用対象)です。
              OriginationPrefixes Set of origination phone number prefixes for the requested country with the same pricing. Valid set elements include specific prefixes, ALL (representing the entire set of all valid prefixes), or ROW (representing the rest-of-world, which is the set of remaining prefixes that aren't specifically listed)

              Retrieve trunking prices for phone number +15108675310.

                    
                    
                    

                    Resource URL by Origination Number

                    https://pricing.twilio.com/v2/Trunking/Numbers/{Destination Number}?OriginationNumber={Origination Number}
                    

                    Filter by Origination Number Example

                    Retrieve trunking prices for phone number +15108675310 where the Origination Number is +18001234567.

                          
                          
                          
                          ページを評価:

                          ヘルプが必要ですか?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Community Forums or browsing the Twilio tag on Stack Overflow.

                                
                                
                                

                                フィードバックくださりありがとうございます!

                                We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                Refer us and get $10 in 3 simple steps!

                                ステップ1

                                Get link

                                Get a free personal referral link here

                                ステップ2:

                                Give $10

                                Your user signs up and upgrade using link

                                ステップ3

                                Get $10

                                1,250 free SMSes
                                OR 1,000 free voice mins
                                OR 12,000 chats
                                OR more