JavaScript
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
const shipment = await client.shipments.retrieve('id');
console.log(shipment);import os
from checkout_intents import CheckoutIntents
client = CheckoutIntents(
api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"), # This is the default and can be omitted
)
shipment = client.shipments.retrieve(
"id",
)
print(shipment)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.shipments.Shipment;
import com.rye.models.shipments.ShipmentRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
Shipment shipment = client.shipments().retrieve("id");
}
}curl https://staging.api.rye.com/api/v1/shipments/$ID \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/shipments/{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: <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://staging.api.rye.com/api/v1/shipments/{id}"
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))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.rye.com/api/v1/shipments/{id}")
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{
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"marketplaceOrderId": "<string>",
"checkoutIntentId": "<string>",
"id": "<string>",
"trackingEvents": [
{
"location": {
"country": "<string>",
"province": "<string>",
"city": "<string>"
},
"timestamp": {
"local": "<string>",
"utc": "2023-11-07T05:31:56Z"
},
"description": "<string>"
}
],
"shippedAt": "2023-11-07T05:31:56Z",
"tracking": {
"number": "<string>",
"carrierName": "<string>",
"deliveryDate": {
"estimated": "2023-11-07T05:31:56Z"
},
"url": "<string>"
},
"externalId": "<string>",
"status": "shipped"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}Shipments
Retrieve shipment by id
Retrieve a shipment by id
Returns shipment information if the lookup succeeds.
GET
/
api
/
v1
/
shipments
/
{id}
JavaScript
import CheckoutIntents from 'checkout-intents';
const client = new CheckoutIntents({
apiKey: process.env['CHECKOUT_INTENTS_API_KEY'], // This is the default and can be omitted
});
const shipment = await client.shipments.retrieve('id');
console.log(shipment);import os
from checkout_intents import CheckoutIntents
client = CheckoutIntents(
api_key=os.environ.get("CHECKOUT_INTENTS_API_KEY"), # This is the default and can be omitted
)
shipment = client.shipments.retrieve(
"id",
)
print(shipment)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.shipments.Shipment;
import com.rye.models.shipments.ShipmentRetrieveParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
Shipment shipment = client.shipments().retrieve("id");
}
}curl https://staging.api.rye.com/api/v1/shipments/$ID \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/shipments/{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: <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://staging.api.rye.com/api/v1/shipments/{id}"
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))
}require 'uri'
require 'net/http'
url = URI("https://staging.api.rye.com/api/v1/shipments/{id}")
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{
"updatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"marketplaceOrderId": "<string>",
"checkoutIntentId": "<string>",
"id": "<string>",
"trackingEvents": [
{
"location": {
"country": "<string>",
"province": "<string>",
"city": "<string>"
},
"timestamp": {
"local": "<string>",
"utc": "2023-11-07T05:31:56Z"
},
"description": "<string>"
}
],
"shippedAt": "2023-11-07T05:31:56Z",
"tracking": {
"number": "<string>",
"carrierName": "<string>",
"deliveryDate": {
"estimated": "2023-11-07T05:31:56Z"
},
"url": "<string>"
},
"externalId": "<string>",
"status": "shipped"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}Authorizations
Rye API key
Path Parameters
The id of the shipment to look up
Response
Shipment information
- Shipped
- Delivered
- Delayed
- Out for Delivery
- Ordered
- Canceled
Shipments that have tracking information (shipped, delayed, or delivered states)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The external ID is provided by the marketplace and matches the shipment to their system.
Available options:
shipped Was this page helpful?
⌘I

