Quote shipping rates for a marketplace listing
curl --request POST \
--url https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"height": 1,
"length": 1,
"width": 1,
"weight": 1
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({height: 1, length: 1, width: 1, weight: 1})
};
fetch('https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates"
payload = {
"height": 1,
"length": 1,
"width": 1,
"weight": 1
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"rateGroups": [
{
"carrier": "UPS",
"rates": [
{
"rateId": "<string>",
"service": "Ground",
"price": "42.50",
"currency": "USD",
"deliveryDays": 1,
"deliveryDateGuaranteed": true,
"estDeliveryDate": "2023-12-25"
}
]
}
]
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Marketplace Listings
Quote shipping rates for a marketplace listing
Scope: listings:read.
Returns carrier rates for shipping this listing from the seller to the
caller (buyer). Use the returned rateId in a subsequent purchase call
if the buyer chooses EasyPost-managed shipping. The buyer can instead
skip this call and supply manual carrier / trackingCode /
shippingLabelUrl at purchase time.
POST
/
marketplace-listings
/
{id}
/
shipping-rates
Quote shipping rates for a marketplace listing
curl --request POST \
--url https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates \
--header 'Content-Type: application/json' \
--header 'X-InStockRx-Api-Key: <api-key>' \
--data '
{
"height": 1,
"length": 1,
"width": 1,
"weight": 1
}
'const options = {
method: 'POST',
headers: {'X-InStockRx-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({height: 1, length: 1, width: 1, weight: 1})
};
fetch('https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.instockrx.com/marketplace-listings/{id}/shipping-rates"
payload = {
"height": 1,
"length": 1,
"width": 1,
"weight": 1
}
headers = {
"X-InStockRx-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"rateGroups": [
{
"carrier": "UPS",
"rates": [
{
"rateId": "<string>",
"service": "Ground",
"price": "42.50",
"currency": "USD",
"deliveryDays": 1,
"deliveryDateGuaranteed": true,
"estDeliveryDate": "2023-12-25"
}
]
}
]
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"type": "https://api.instockrx.com/problems/listing-not-available",
"title": "<string>",
"status": 349,
"detail": "<string>",
"instance": "<string>",
"requestId": "<string>",
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}Authorizations
Headers
Which pharmacy in your group you are acting as. Required whenever your group holds more than one pharmacy — omitting it is then 400 missing-pharmacy-context. With exactly one pharmacy it may be omitted, but send it anyway: the call starts failing the day a second pharmacy is added.
Body
application/json