The Quote order preview api is designed to surface the following details to the consumers before the actual order is placed:
processingInfo
object for each item. NEW
, UPGRADE
, DOWNGRADE
, RENEW
, NA
.1 2POST /api/v2/order-intent/preview
Request Headers | Type | Description |
---|---|---|
X-transaction-account | String REQUIRED | Transaction account ID to use for the quote. |
1 2{ "source": "QUOTE", "quote": { "id": "<string>", "version": 2154 } }
1 2{ "orderId": "<string>", "slug": "<string>", "transactionAccountId": "<string>", "invoiceGroupId": "<string>", "items": [ { "offeringId": "<string>", "orderItemId": "<string>", "optedUsageOptions": { "chargingDetails": {}, "trial": {}, "billingBehaviour": { "type": "PAUSE_BILLING" }, "effectiveTime": { "endsAt": { "type": "TIMESTAMP" } } }, "type": "CREATION_ORDER", "processingInfo": { "status": "PROCESSING", "entitlement": { "id": "<string>", "version": "<string>" }, "transitionTimestamp": 2154, "transitionTime": "IMMEDIATE", "saleTransitionDetails": {}, "saleTransitionType": "NEW", "computedDetails": {}, "accountModification": {}, "additionalTriggeredOrderItems": [ {} ], "prorationBehaviour": "NONE", "impactedEntitlements": [ { "entitlementId": "<string>" } ] }, "billingOptions": { "preBill": {} }, "reasonCode": "<string>", "metadata": {}, "triggeredByOrderItem": { "orderId": "<string>", "orderItemId": "<string>" }, "promotions": [ { "promotionInstanceId": "<string>", "promotionDefinition": {} } ], "isImmediate": true, "originalOrderItemId": "<string>", "quoteLineItemDetailsReference": { "quoteId": "<string>", "version": 2154, "quoteLineItemId": "<string>" }, "subscriptionStartTime": 2154, "transition": { "offering": {}, "pricingPlan": {}, "applyAfterTimestamp": 2154 }, "rewindToOrderItemId": "<string>", "billingAnchorTime": 2154, "nextBillingAnchorTimestamp": 2154, "backdateTimestamp": 2154, "rebillOptions": { "billFromTimestamp": 2154 }, "relatesFromEntitlements": [ {} ] } ], "additionalTriggeredOrders": [], "createdDate": 2154 }
1 2{ "title":"Not found.", "code":"E1001", "detail":"Promotion not found", "status":"404 NOT_FOUND", "id":"", "items":[ { "itemId":"2345", "errors":[ { "errorCode":"W2002", "errorName":"INVALID_ORDER_REQUEST_DATA", "message":"", "field":"" } ] } ] }
Response Arguments | Description |
---|---|
code | Error code for validation errors at the order level. If the code is populated and errors array size is 0, then the failure is caused by an invalid order. |
detail | Error message describing the error. |
id | Trace ID for the error. |
items | Erroneous items received in the request. |
itemId | Item identifier itemId . |
errors | Contains an array of errors for the item it is listed under. |
errorCode | Error code. |
errorName | Error name. |
message | Detailed description of the error. |
field | If error is due to a specific parameter, JSON path to the field. Optional field. |
Order preview for quote will give 2xx response for DRAFT
and OPEN
quotes.
For the stale quotes order preview will return the validation errors regarding what needs to be updated in the quote to move it back to DRAFT/OPEN
.
Rate this page: