POST /previews/orders
Previews an order. Use this operation to preview a draft order before making an order.
Servers
- https://api-sandbox.rebilly.com/organizations/{organizationId}
- https://api.rebilly.com/organizations/{organizationId}
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
deliveryAddress |
Object | No |
Delivery address details. |
discounts[] |
Array | No |
Discounts applied to the purchase. |
discounts[].description |
String | No |
Description of the discount. |
discounts[].amount |
Number | No |
Total amount of discount from the coupon. |
discounts[].couponId |
String | No |
ID of a coupon that is associated with the purchase. |
subtotalAmount |
Number | No |
Subtotal amount of the purchase. |
couponIds[] |
Array | No |
List of coupons that are applied to the order. |
taxAmount |
Number | No |
Tax amount of the purchase. |
shippingAmount |
Number | No |
Shipping amount of the purchase. |
items[] |
Array | Yes |
Items details. |
items[].planId |
String | Yes |
ID of the plan. |
items[].quantity |
Integer | No |
Number of product units in the specified plan. |
billingAddress |
Object | No |
Billing address details. |
currency |
String | No |
Merchant's reporting currency. |
discountsAmount |
Number | No |
Total discount amount of the purchase. |
websiteId |
Object | Yes | |
total |
Number | No |
Total amount of the purchase. |
shippingRates[] |
Array | No |
Available shipping rates. |
shippingRates[].id |
String | No |
ID of the shipping rate. |
shippingRates[].price |
Number | Yes |
Price of the shipping rate.
If |
shippingRates[].name |
String | Yes |
Name of the shipping rate. |
shippingRates[].description |
String | No |
Description of the shipping rate. |
shippingRates[].currency |
String | Yes |
Currency of the order. |
shipping |
Object | No |
Shipping settings. |
initialAmounts |
Object | No |
Total amounts of the initial invoice. This displays the amount the customer pays initially. |
initialAmounts.subtotalAmount |
Number | No |
Subtotal amount of the initial invoice. |
initialAmounts.amount |
Number | No |
Total amount of the initial invoice. |
initialAmounts.shippingAmount |
Number | No |
Shipping amount applied to the initial invoice. |
initialAmounts.taxAmount |
Number | No |
Tax amount applied to the initial invoice. |
initialAmounts.discountAmount |
Number | No |
Discount amount applied to the initial invoice. |
recurringAmounts |
Object | No |
Total amounts of the recurring invoice.
This includes recurring items only.
If the order does not have recurring items, the value of this field is |
recurringAmounts.subtotalAmount |
Number | No |
Subtotal amount of the recurring invoice. |
recurringAmounts.amount |
Number | No |
Total amount of the recurring invoice. |
recurringAmounts.shippingAmount |
Number | No |
Shipping amount applied to the recurring invoice. |
recurringAmounts.taxAmount |
Number | No |
Tax amount applied to the recurring invoice. |
recurringAmounts.discountAmount |
Number | No |
Discount amount applied to the recurring invoice. |
lineItems[] |
Array | No |
List of purchase items. |
lineItems[].price |
Number | No |
Total cost of the purchase item. |
lineItems[].productId |
String | No |
ID of the related product. |
lineItems[].description |
String | No |
Description of the purchase item. |
lineItems[].planId |
String | No |
ID of the related plan. |
lineItems[].quantity |
Number | No |
Total quantity of the purchase item. |
lineItems[].type |
String | No |
Type of transaction. Valid values:
|
lineItems[].unitPrice |
Number | No |
Unit price of the purchase item. |
taxes[] |
Array | No |
Taxes applied to the purchase. |
taxes[].description |
String | No |
Description of the tax. |
taxes[].amount |
Number | No |
Amount of tax that is due. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.