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 product = await client.products.lookup({ url: 'url' });
console.log(product.id);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
)
product = client.products.lookup(
url="url",
)
print(product.id)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.products.Product;
import com.rye.models.products.ProductLookupParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
ProductLookupParams params = ProductLookupParams.builder()
.url("url")
.build();
Product product = client.products().lookup(params);
}
}curl https://staging.api.rye.com/api/v1/products/lookup \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/products/lookup",
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/products/lookup"
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/products/lookup")
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{
"isPurchasable": true,
"availability": "in_stock",
"price": {
"currencyCode": "USD",
"amountSubunits": 1500
},
"images": [
{
"isFeatured": true,
"url": "https://example.com/images/product-123.jpg"
}
],
"description": "A high-quality widget designed for professionals.",
"brand": "Acme",
"name": "Widget Pro",
"sku": "SKU-12345",
"retailer": "Amazon",
"url": "https://example.com/products/widget-pro",
"id": "amazon.com:B0DFC9MT8Q",
"variants": [
{
"images": [
{
"isFeatured": true,
"url": "https://example.com/images/product-123.jpg"
}
],
"price": {
"currencyCode": "USD",
"amountSubunits": 1500
},
"dimensions": [
{
"value": "Small, Red, XS, L, etc.",
"label": "Size, Color, etc."
}
],
"name": "<string>",
"sku": "<string>",
"id": "<string>"
}
],
"variantDimensions": [
{
"values": [
"<string>"
],
"label": "<string>"
}
]
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"status": 123,
"fields": {},
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}Products
Lookup product
Lookup a product’s information by URL.
GET
/
api
/
v1
/
products
/
lookup
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 product = await client.products.lookup({ url: 'url' });
console.log(product.id);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
)
product = client.products.lookup(
url="url",
)
print(product.id)package com.rye.example;
import com.rye.client.CheckoutIntentsClient;
import com.rye.client.okhttp.CheckoutIntentsOkHttpClient;
import com.rye.models.products.Product;
import com.rye.models.products.ProductLookupParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
CheckoutIntentsClient client = CheckoutIntentsOkHttpClient.fromEnv();
ProductLookupParams params = ProductLookupParams.builder()
.url("url")
.build();
Product product = client.products().lookup(params);
}
}curl https://staging.api.rye.com/api/v1/products/lookup \
-H "Authorization: Bearer $CHECKOUT_INTENTS_API_KEY"<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.rye.com/api/v1/products/lookup",
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/products/lookup"
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/products/lookup")
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{
"isPurchasable": true,
"availability": "in_stock",
"price": {
"currencyCode": "USD",
"amountSubunits": 1500
},
"images": [
{
"isFeatured": true,
"url": "https://example.com/images/product-123.jpg"
}
],
"description": "A high-quality widget designed for professionals.",
"brand": "Acme",
"name": "Widget Pro",
"sku": "SKU-12345",
"retailer": "Amazon",
"url": "https://example.com/products/widget-pro",
"id": "amazon.com:B0DFC9MT8Q",
"variants": [
{
"images": [
{
"isFeatured": true,
"url": "https://example.com/images/product-123.jpg"
}
],
"price": {
"currencyCode": "USD",
"amountSubunits": 1500
},
"dimensions": [
{
"value": "Small, Red, XS, L, etc.",
"label": "Size, Color, etc."
}
],
"name": "<string>",
"sku": "<string>",
"id": "<string>"
}
],
"variantDimensions": [
{
"values": [
"<string>"
],
"label": "<string>"
}
]
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"status": 123,
"fields": {},
"stack": "<string>"
}{
"name": "<string>",
"message": "<string>",
"stack": "<string>"
}Authorizations
Rye API key
Query Parameters
Response
Product information
Example:
true
The availability status of a product.
in_stock: Product is available for immediate purchaseout_of_stock: Product is currently unavailablepreorder: Product is available for pre-order before releasebackorder: Product is temporarily out of stock but can be orderedunknown: Availability could not be determined
Available options:
in_stock, out_of_stock, preorder, backorder, unknown Example:
"in_stock"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"A high-quality widget designed for professionals."
Example:
"Acme"
Example:
"Widget Pro"
Example:
"SKU-12345"
Example:
"Amazon"
Example:
"https://example.com/products/widget-pro"
Example:
"amazon.com:B0DFC9MT8Q"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I

