Get eSIM offer
curl --request GET \
--url https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"currency": "eur",
"interval": "MONTHLY",
"setup_price_cents": 1234,
"tiers": [
{
"code": "ESIM_5GB",
"data_mb": 5120,
"price_cents": 2345
},
{
"code": "ESIM_20GB",
"data_mb": 20480,
"price_cents": 3456
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}Partner
Obtenir l'offre eSIM
Returns the eSIM setup fee and the data tiers you can order for an account you provisioned, priced on the subscription you pay for that account: its currency, its billing interval and your partner discount. Amounts are in the smallest currency unit (e.g. cents). Requires the PARTNER scope.
GET
/
v2
/
api
/
partner
/
accounts
/
{account_id}
/
esims
/
offer
Get eSIM offer
curl --request GET \
--url https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/partner/accounts/{account_id}/esims/offer")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"currency": "eur",
"interval": "MONTHLY",
"setup_price_cents": 1234,
"tiers": [
{
"code": "ESIM_5GB",
"data_mb": 5120,
"price_cents": 2345
},
{
"code": "ESIM_20GB",
"data_mb": 20480,
"price_cents": 3456
}
]
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}{
"error": {}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {}
}Scope requis :
PARTNER- Les prix suivent l’abonnement que vous payez pour ce compte : sa devise, sa périodicité de facturation et votre remise partenaire. Deux comptes sur des périodicités différentes ont des offres différentes.
- Les montants sont exprimés dans la plus petite unité de la devise (centimes pour l’EUR).
- Les montants de l’exemple de réponse sont fictifs : les prix réels sont ceux que cet endpoint renvoie pour le compte.
setup_price_centscorrespond à des frais uniques par eSIM. Ils sont débités avec la première période du palier.tiers[].price_centsest le prix du palier par période de facturation (interval). Passez untiers[].codecommetierà la commande.tiers[].data_mbest la quantité de données mobiles incluse dans le palier, en Mo (1 Go = 1024 Mo).- Vous ne pouvez consulter l’offre que des comptes créés par votre propre clé API. Tout autre id échoue avec
PARTNER_ACCOUNT_NOT_FOUND. - Si les eSIM ne peuvent pas être commandées pour ce compte pour le moment, la requête échoue avec
ESIM_UNAVAILABLE.
Cette page vous a-t-elle été utile ?