Shipping Addresses
Retrieve
Retrieve a shipping address.
GET
/
shipping
/
retrieve
/
{id}
Retrieve
curl --request GET \
--url https://api.buybase.ai/shipping/retrieve/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.buybase.ai/shipping/retrieve/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.buybase.ai/shipping/retrieve/{id}', 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.buybase.ai/shipping/retrieve/{id}",
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: <authorization>"
],
]);
$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.buybase.ai/shipping/retrieve/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.buybase.ai/shipping/retrieve/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buybase.ai/shipping/retrieve/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"shipping": {
"id": "ship_12345",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "+1234567890",
"address_1": "456 Park Ave",
"address_2": "Suite 789",
"city": "New York",
"country_code": "US",
"province_code": "NY",
"postal_code": "10022",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-16T10:15:22Z"
},
"code": "SHIPPING_RETRIEVED"
}
Headers
string
required
Your API key for authorization.
Path Parameters
string
required
The ID of the shipping address to retrieve.
Response
boolean
Indicates whether the operation was successful.
object
The shipping address object.
string
A code indicating the result of the operation. Possible values:
SHIPPING_RETRIEVED: Shipping address retrieved successfullySHIPPING_NOT_FOUND: Shipping address not found
string
Error message if the request fails.
{
"success": true,
"shipping": {
"id": "ship_12345",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "+1234567890",
"address_1": "456 Park Ave",
"address_2": "Suite 789",
"city": "New York",
"country_code": "US",
"province_code": "NY",
"postal_code": "10022",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-16T10:15:22Z"
},
"code": "SHIPPING_RETRIEVED"
}
⌘I
Retrieve
curl --request GET \
--url https://api.buybase.ai/shipping/retrieve/{id} \
--header 'authorization: <authorization>'import requests
url = "https://api.buybase.ai/shipping/retrieve/{id}"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.buybase.ai/shipping/retrieve/{id}', 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.buybase.ai/shipping/retrieve/{id}",
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: <authorization>"
],
]);
$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.buybase.ai/shipping/retrieve/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
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.buybase.ai/shipping/retrieve/{id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buybase.ai/shipping/retrieve/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"success": true,
"shipping": {
"id": "ship_12345",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@example.com",
"phone": "+1234567890",
"address_1": "456 Park Ave",
"address_2": "Suite 789",
"city": "New York",
"country_code": "US",
"province_code": "NY",
"postal_code": "10022",
"profile_id": "prof_67890",
"created_at": "2023-09-15T14:22:31Z",
"updated_at": "2023-09-16T10:15:22Z"
},
"code": "SHIPPING_RETRIEVED"
}