Quote API Examples
Base quote
- Request
- Response
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotation": {
"items": [{
"id": "MH01",
"quantity": 1
}]
}
}
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotes": [{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"total_cents": 1000
}]
}
With delivery address & single shipping option
- Request
- Response
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotation": {
"items": [{
"id": "MH01",
"quantity": 1
}],
"ship_to": {
"street": "128 City Road",
"city": "London",
"postcode": "EC1V 2NX",
"country": "GB"
}
}
}
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotes": [{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"shipping_option": {
"id": "shipping_option_id",
"title": "Courier Delivery",
"total_cents": 500,
"type": "DELIVERY"
}
"total_cents": 1500
}]
}
With delivery address & multiple shipping options
- Request
- Response
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotation": {
"items": [{
"id": "MH01",
"quantity": 1
}],
"ship_to": {
"street": "128 City Road",
"city": "London",
"postcode": "EC1V 2NX",
"country": "GB"
}
}
}
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotes": [
{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"shipping_option": {
"id": "shipping_option_id",
"title": "Courier Delivery",
"total_cents": 500,
"type": "DELIVERY"
}
"total_cents": 1500
},
{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"shipping_option": {
"id": "store_pickup_option_id",
"title": "Store Pickup",
"total_cents": 0,
"type": "LOCAL_PICKUP"
}
"total_cents": 1000
}
]
}
With user supplied coupon
- Request
- Response
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotation": {
"items": [{
"id": "MH01",
"quantity": 1
}],
"coupon": "15OFF"
}
}
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotes": [{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"discount_cents": 150,
"total_cents": 850
}]
}
With automatic discount for returning customer
- Request
- Response
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotation": {
"items": [{
"id": "MH01",
"quantity": 1
}],
"email": "hello@simpler.so"
}
}
{
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quotes": [{
"items": [{
"id": "MH01",
"quantity": 1,
"subtotal_cents": 1000
}],
"total_cents": 900
"fees": [{
"title": "10% Off your second purchase",
"cost_cents": -100
}]
}]
}