curl --request POST \
--url https://sg.sandbox.api.reap.global/agentic/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"items": [
{
"variantId": "var_123",
"quantity": 1
}
],
"email": "lin.example@reap.hk",
"offerCode": "SAVE10"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{variantId: 'var_123', quantity: 1}],
email: 'lin.example@reap.hk',
offerCode: 'SAVE10'
})
};
fetch('https://sg.sandbox.api.reap.global/agentic/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/agentic/quotes"
payload = {
"items": [
{
"variantId": "var_123",
"quantity": 1
}
],
"email": "lin.example@reap.hk",
"offerCode": "SAVE10"
}
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"shippingOptions": [
{
"id": "<string>",
"name": "<string>",
"selected": true,
"price": {
"amount": 123,
"currency": "<string>"
},
"details": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"amountBreakdown": {
"itemsSubtotal": {
"amount": 123,
"currency": "<string>"
},
"discounts": [
{
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
}
}
],
"additionalCharges": [
{
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
}
}
],
"finalAmount": {
"amount": 123,
"currency": "<string>"
},
"shipping": {
"amount": 123,
"currency": "<string>"
},
"tax": {
"amount": {
"amount": 123,
"currency": "<string>"
},
"includedInPrices": true
}
},
"expiresAt": "<string>"
}{
"error": {
"code": "AGENTIC_REQUEST_REJECTED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_PAYMENTS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_RESOURCE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "QUOTE_EXPIRED",
"message": "<string>",
"detail": null
}
}{
"error": {
"code": "AGENTIC_SERVICE_UNAVAILABLE",
"message": "<string>",
"detail": {}
}
}Create quote
Opens and prices a merchant checkout from product variants or a checkout URL assembled by the client. Send exactly one of items and externalCheckout. Prices always come from the merchant. The response itemizes the total and lists the available shipping options. Quotes are short-lived: create the checkout before expiresAt passes, or open a fresh quote. shippingAddress is required for external checkout quotes and when any item requires shipping. Use offerCode to price an offer before approval. Reap makes one quote attempt and does not retry a failed merchant request. The error code states whether to correct the request or create a new quote.
curl --request POST \
--url https://sg.sandbox.api.reap.global/agentic/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"items": [
{
"variantId": "var_123",
"quantity": 1
}
],
"email": "lin.example@reap.hk",
"offerCode": "SAVE10"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{variantId: 'var_123', quantity: 1}],
email: 'lin.example@reap.hk',
offerCode: 'SAVE10'
})
};
fetch('https://sg.sandbox.api.reap.global/agentic/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/agentic/quotes"
payload = {
"items": [
{
"variantId": "var_123",
"quantity": 1
}
],
"email": "lin.example@reap.hk",
"offerCode": "SAVE10"
}
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"shippingOptions": [
{
"id": "<string>",
"name": "<string>",
"selected": true,
"price": {
"amount": 123,
"currency": "<string>"
},
"details": [
{
"key": "<string>",
"value": "<string>"
}
]
}
],
"amountBreakdown": {
"itemsSubtotal": {
"amount": 123,
"currency": "<string>"
},
"discounts": [
{
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
}
}
],
"additionalCharges": [
{
"name": "<string>",
"amount": {
"amount": 123,
"currency": "<string>"
}
}
],
"finalAmount": {
"amount": 123,
"currency": "<string>"
},
"shipping": {
"amount": 123,
"currency": "<string>"
},
"tax": {
"amount": {
"amount": 123,
"currency": "<string>"
},
"includedInPrices": true
}
},
"expiresAt": "<string>"
}{
"error": {
"code": "AGENTIC_REQUEST_REJECTED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_PAYMENTS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_RESOURCE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "QUOTE_EXPIRED",
"message": "<string>",
"detail": null
}
}{
"error": {
"code": "AGENTIC_SERVICE_UNAVAILABLE",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).
1 - 255Body
Create and price a quote. The request shape depends on its source.
- Reap discovery
- Checkout URL
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$1 - 20 elementsShow child attributes
Show child attributes
Offer code to apply while pricing the quote
1 - 128\SShow child attributes
Show child attributes
Response
Response for status 200
Show child attributes
Show child attributes
Show child attributes
Show child attributes
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$