Product availability
curl --request POST \
--url https://api.example.com/{proxy_path_prefix}/product_availability_checks \
--header 'Content-Type: application/json' \
--data '
{
"product_ids": [
123,
456
],
"rental_start": "2025-02-25T09:00:00Z",
"rental_end": "2025-02-28T17:00:00Z",
"location_id": 1001
}
'import requests
url = "https://api.example.com/{proxy_path_prefix}/product_availability_checks"
payload = {
"product_ids": [123, 456],
"rental_start": "2025-02-25T09:00:00Z",
"rental_end": "2025-02-28T17:00:00Z",
"location_id": 1001
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
product_ids: [123, 456],
rental_start: '2025-02-25T09:00:00Z',
rental_end: '2025-02-28T17:00:00Z',
location_id: 1001
})
};
fetch('https://api.example.com/{proxy_path_prefix}/product_availability_checks', 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.example.com/{proxy_path_prefix}/product_availability_checks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_ids' => [
123,
456
],
'rental_start' => '2025-02-25T09:00:00Z',
'rental_end' => '2025-02-28T17:00:00Z',
'location_id' => 1001
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{proxy_path_prefix}/product_availability_checks"
payload := strings.NewReader("{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{proxy_path_prefix}/product_availability_checks")
.header("Content-Type", "application/json")
.body("{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{proxy_path_prefix}/product_availability_checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"shopifyId": 123,
"title": "Product 1",
"availableVariants": [
{
"shopifyId": 1001,
"title": "Variant 1"
},
{
"shopifyId": 1002,
"title": "Variant 2"
}
]
},
{
"shopifyId": 456,
"title": "Product 2",
"availableVariants": []
}
]
}Endpoints
Product availability
Fetch the availability of every variant for a set of products
POST
/
{proxy_path_prefix}
/
product_availability_checks
Product availability
curl --request POST \
--url https://api.example.com/{proxy_path_prefix}/product_availability_checks \
--header 'Content-Type: application/json' \
--data '
{
"product_ids": [
123,
456
],
"rental_start": "2025-02-25T09:00:00Z",
"rental_end": "2025-02-28T17:00:00Z",
"location_id": 1001
}
'import requests
url = "https://api.example.com/{proxy_path_prefix}/product_availability_checks"
payload = {
"product_ids": [123, 456],
"rental_start": "2025-02-25T09:00:00Z",
"rental_end": "2025-02-28T17:00:00Z",
"location_id": 1001
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
product_ids: [123, 456],
rental_start: '2025-02-25T09:00:00Z',
rental_end: '2025-02-28T17:00:00Z',
location_id: 1001
})
};
fetch('https://api.example.com/{proxy_path_prefix}/product_availability_checks', 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.example.com/{proxy_path_prefix}/product_availability_checks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'product_ids' => [
123,
456
],
'rental_start' => '2025-02-25T09:00:00Z',
'rental_end' => '2025-02-28T17:00:00Z',
'location_id' => 1001
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{proxy_path_prefix}/product_availability_checks"
payload := strings.NewReader("{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/{proxy_path_prefix}/product_availability_checks")
.header("Content-Type", "application/json")
.body("{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{proxy_path_prefix}/product_availability_checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"product_ids\": [\n 123,\n 456\n ],\n \"rental_start\": \"2025-02-25T09:00:00Z\",\n \"rental_end\": \"2025-02-28T17:00:00Z\",\n \"location_id\": 1001\n}"
response = http.request(request)
puts response.read_body{
"products": [
{
"shopifyId": 123,
"title": "Product 1",
"availableVariants": [
{
"shopifyId": 1001,
"title": "Variant 1"
},
{
"shopifyId": 1002,
"title": "Variant 2"
}
]
},
{
"shopifyId": 456,
"title": "Product 2",
"availableVariants": []
}
]
}Path Parameters
The Shopify proxy path prefix configured for the app (e.g., 'customer_portal')
Body
application/json
Array of Shopify product IDs to check
Start date of the rental period
End date of the rental period
Optional Shopify location ID. When the shop has locations enabled, only items at this location count toward a variant's availability. Ignored when locations are disabled. Oversellable variants are always returned as available.
Response
Successful response with product availability
Show child attributes
Show child attributes
Was this page helpful?