ShoppingCart

Preview non-persisted carts

Changed on

Returns a preview of the shopping cart with pricing summary information and a list of errors, if any

post/v3/checkout/shoppingCarts/preview

Request

Headers

AD-Timezonestring
AD-ShoppingCart-Partnerstring required

The partner code of a marketplace

Request body

idstring

Shopping cart ID

createdOnstring

Shopping cart creation date

ownerUserIdstring

Cart owner user ID

ownerCompanyIdstring

Cart owner company ID

buyerType'CUSTOMER' | 'PLATFORM_OWNER' | 'PARTNER'

Describes the buyer's relationship with the platform, either CUSTOMER (end user), PLATFORM_OWNER (sales representative) or PARTNER (reseller)

currency'USD' | 'CAD' | 'EUR' | 'JPY' | 'GBP' | 'KRW' | 'CHF' | 'SEK' | 'SGD' | 'MYR' | 'AUD' | 'MXN' | 'INR' | 'BRL' | 'DKK' | 'NZD' | 'NOK' | 'ZAR' | 'PHP' | 'CNY' | 'SAR' | 'GTQ' | 'IDR' | 'ARS' | 'COP' | 'PEN'

Supported currencies for the system

statusstring

Shopping cart status

isBlockedboolean

Shopping Cart is locked waiting for an external event

paymentMethodIdstring

Payment method ID

preAuthIdstring

Cart payment pre-authorization ID

localestring

Locale of shopping cart (ISO 639 language, ISO 3166 country, variant).

buyerUserIdstring

User ID of the buyer (customer, reseller, sales representative) who initiates the purchase

buyerCompanyIdstring

Buyer company ID

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