ShoppingCart
Validate non-persisted shopping carts
Changed onValidates and retrieves the validation summary of the specified shopping cart payload
post/v3/checkout/shoppingCarts/validation
Request
- Base URLhttps://marketplace.appdirect.com/api
- Authnone declared. Required headers: AD-ShoppingCart-Partner
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Query parameters
level'PRE_FINALIZE' | 'PREVENT_FINALIZE' | 'PREVENT_PROVISIONING' required
Level of validation. Run PRE_FINALIZE validations before the shopping cart is finalized. Run PREVENT_FINALIZE and PREVENT_PROVISIONING at the time of finalization and provisioning respectively to prevent those operations if validation fails.
Headers
AD-ShoppingCart-Partnerstring required
The partner code of a marketplace
Request body
Example request
{
"id": "4f59d160-0e63-45c4-bb91-7ebe873da29f",
"createdOn": "2020-10-12 07:20:50.52Z",
"ownerUserId": "83407ce8-373f-11e6-ac61-9e71128cae77",
"ownerCompanyId": "a411dc54-d46f-4002-ab00-3ea52e4eb118",
"status": "ACTIVE",
"paymentMethodId": "a411dc54-d46f-4002-ab00-3ea52e4eb118",
"preAuthId": "a411dc54-d46f-4002-ab00-3ea52e4eb118",
"locale": "en_US",
"buyerUserId": "83407ce8-373f-11e6-ac61-9e71128cae77",
"buyerCompanyId": "a411dc54-d46f-4002-ab00-3ea52e4eb118",
"items": [
{
"id": "45ae34b7-ffc1-4d74-be78-dce34008cd2e",
"referenceId": "45",
"subscriptionId": "83407ce8-373f-11e6-ac61-9e71128cae77",
"pricingPlanId": "3dcc468d-fd4c-41ce-b700-f88c0c74561f",
"serviceConfiguration": {
"date": "2010-10-19T00:00:00.000Z"
},
"billingConfiguration": {
"date": "1546300800000",
"strategy": "CUSTOM"
},
"discountCode": "DISCOUNT",
"discountId": "30",
"customPrices": [
{
"costId": "9742e09a-e1b4-4b9e-b1a7-66df3e41cebe",
"price": 20
}
],
"units": [
{
"quantity": "8",
"unit": "USER"
}
],
"customAttributes": {
"vendorRequiredFields": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
},
"subscription": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
}
},
"customContractConfiguration": {
"minimumServiceLengthUnit": "MONTHLY",
"endOfContractGracePeriodUnit": "INFINITY",
"contractCancellationPeriodUnit": "NONE",
"terminationFeeGracePeriodUnit": "INFINITY"
}
}
],
"customAttributes": {
"purchase": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
},
"buyerUser": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
},
"buyerCompany": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
},
"ownerUser": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
},
"ownerCompany": {
"customAttributes": {
"preferredColours": [
"key_red",
"key_white"
],
"preferredTime": "12:00"
}
}
},
"fees": [
{
"id": "ce402858-4fe8-4254-8b69-73c41142f4ba",
"externalId": "a8bf31a8-fe75-4ab9-9559-dcd41eca9d12",
"createdOn": "2020-10-12 07:20:50.52Z",
"key": "SHIPPING_FEE_100",
"currency": "USD",
"description": {
"defaultDescription": "Some description here. Valid from {$fromDate} until {$toDate}"
}
}
],
"accreditedAgents": [
{
"userId": "83407ce8-373f-11e6-ac61-9e71128cae77",
"companyId": "a411dc54-d46f-4002-ab00-3ea52e4eb118"
}
]
}Response
OK
object required
Changes
- info
endpoint added
- info