Previews an order. Use this operation to preview a draft order before making an order.
Previews an order. Use this operation to preview a draft order before making an order.
websiteId required | string <= 50 characters ID of the website. A website is where an organization obtains a customer. For more information, see Obtain an organization ID and website ID. |
required | Array of objects non-empty Items details. |
ContactObject (object) or null Billing address details. | |
ContactObject (object) or null Delivery address details. | |
couponIds | Array of strings List of coupons that are applied to the order. |
object (Shipping) Shipping settings. |
{ "websiteId": "web_0YV7DE4Z26DQSA1AC92FBJ7SEG", "items": [ { "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "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": "512-710-1640", "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": "512-710-1640", "primary": true } ], "emails": [ { "label": "main", "value": "rebilly@example.com", "primary": true } ], "dob": "1980-04-01", "jobTitle": "CEO" }, "couponIds": [ "string" ], "currency": "USD", "shipping": { "amount": 0.1, "calculator": "manual" } }
200
Order preview retrieved.
401
Unauthorized access. Invalid credentials used.
403
Access forbidden.
422
Invalid data sent.
{ "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": "512-710-1640", "primary": true } ], "emails": [ { "label": "main", "value": "rebilly@example.com", "primary": true } ], "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": [ { "label": "main", "value": "512-710-1640", "primary": true } ], "emails": [ { "label": "main", "value": "rebilly@example.com", "primary": true } ], "dob": "1980-04-01", "jobTitle": "CEO", "hash": "056ae6d97c788b9e98b049ebafd7b229bf852221" }, "currency": "USD", "lineItems": [ { "type": "debit", "description": "string", "unitPrice": 49.95, "quantity": 0, "price": 0.1, "planId": "plan_0YV7DENSVGDBW9S71XZNNYYQ0X", "productId": "prod_0YV7DES3WPC5J8JD8QTVNZBZNZ" } ], "shippingRates": [ { "id": "ship_rate_0YVDN408G4DQE9G1RV1QCFHJ3P", "name": "string", "description": "string", "price": 0.1, "currency": "USD" } ], "taxes": [ { "amount": 0.1, "description": "string" } ], "discounts": [ { "couponId": "cpn_0YVCNKF81GD778N4YNVGDJK558", "amount": 0.1, "description": "string" } ], "subtotalAmount": 0.1, "taxAmount": 0.1, "shippingAmount": 0.1, "discountsAmount": 0.1, "total": 0.1, "shipping": { "amount": 0.1, "calculator": "manual" } }