Previews an order. Use this operation to preview a draft order before making an order.
Security
SecretApiKey or JWT
ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID.
Example:"web_0YV7DE4Z26DQSA1AC92FBJ7SEG"
- Mock serverhttps://www.rebilly.com/_mock/catalog/all/previews/orders
- Sandbox serverhttps://api-sandbox.rebilly.com/organizations/{organizationId}/previews/orders
- Live serverhttps://api.rebilly.com/organizations/{organizationId}/previews/orders
curl -i -X POST \
https://www.rebilly.com/_mock/catalog/all/previews/orders \
-H 'Content-Type: application/json' \
-H 'REB-APIKEY: YOUR_API_KEY_HERE' \
-d '{
"websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG",
"items": [
{
"planId": null,
"plan": {
"id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21"
},
"quantity": 0
}
],
"billingAddress": {
"firstName": "Benjamin",
"lastName": "Franklin",
"organization": "Rebilly",
"address": "36 Craven St",
"address2": "string",
"city": "Austin",
"region": "Texas",
"country": "GB",
"postalCode": "WC2N 5NF",
"phoneNumbers": [
{
"label": "main",
"value": "1-512-777-0269",
"primary": true
}
],
"emails": [
{
"label": "main",
"value": "rebilly@example.com",
"primary": true
}
],
"dob": "1980-04-01",
"jobTitle": "CEO"
},
"deliveryAddress": {
"firstName": "Benjamin",
"lastName": "Franklin",
"organization": "Rebilly",
"address": "36 Craven St",
"address2": "string",
"city": "Austin",
"region": "Texas",
"country": "GB",
"postalCode": "WC2N 5NF",
"phoneNumbers": [
{
"label": "main",
"value": "1-512-777-0269",
"primary": true
}
],
"emails": [
{
"label": "main",
"value": "rebilly@example.com",
"primary": true
}
],
"dob": "1980-04-01",
"jobTitle": "CEO"
},
"couponIds": [
"string"
],
"shipping": {
"amount": 0.1,
"calculator": "manual"
}
}'Order preview retrieved.
Headers
Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.
Example:500
Number of requests still available for this rate limit. For more information, see Rate limits.
Example:499
Total amounts of the initial invoice. This displays the amount the customer pays initially.
Response
{ "billingAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "deliveryAddress": { "firstName": "Benjamin", "lastName": "Franklin", "organization": "Rebilly", "address": "36 Craven St", "address2": "string", "city": "Austin", "region": "Texas", "country": "GB", "postalCode": "WC2N 5NF", "phoneNumbers": [ … ], "emails": [ … ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "currency": "USD", "lineItems": [ { … } ], "shippingRates": [ { … } ], "taxes": [ { … } ], "discounts": [ { … } ], "subtotalAmount": 0.1, "taxAmount": 0.1, "shippingAmount": 0.1, "discountsAmount": 0.1, "total": 0.1, "initialAmounts": { "amount": 0.1, "subtotalAmount": 0.1, "discountAmount": 0.1, "shippingAmount": 0.1, "taxAmount": 0.1 }, "recurringAmounts": { "amount": 0.1, "subtotalAmount": 0.1, "discountAmount": 0.1, "shippingAmount": 0.1, "taxAmount": 0.1 } }