Carting

Introduction

The carting system in Connect API allows consumers to get user carts, update item and payment information for those carts, and ultimately checkout and process the cart to complete the order.

How It Works

Carting was designed around a typical ecommerce shopping cart system where a user can build a cart with multiple items, add methods to pay for those items, and eventually checkout where they would actually purchase their items and process payments.

The carting system stores shopping carts per user and subscriber, so a user can have multiple open shopping carts but only one per subscriber or client.

How To Use It

  • Working With Shopping Carts

    • The carting system allows users to get a cart, see the contents of that cart (items, payments, discounts, etc.) and ultimately delete the cart if necessary.
    • Get current shopping cart for user and subscriber

      • Request
      • Response
        • Cart object
        • New and/or empty cart example
        • Cart with items and payments example
    • Delete current shopping cart for user and subscriber

      • Request
        • /Sales/{Subscriber ID}/Carts
        • Type = DELETE
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data = NULL
      • Response
        • HTTP Response 202 accepted
  • Working With Cart Items

    • Once you have your item from the catalog search you can add that item to the cart. If the item needs to change (say, updating gift card information) you can update the item after it has been added to the cart, as well as delete the item from the cart.
    • Any required metadata values (required = true in rules) will need to have their values set correctly when adding the item to the cart.
      For example, gift cards require the RecipientFullName, ReceipientEmail, RecipientName, SenderName, DeliveryDate, Title, and LayoutId to be populated in order to store correctly.
    • Add item to cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Items
        • Type = POST
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data
          • CatalogItem object
          • Example (Gift Card)
      • Response
        • Cartitem object
        • Example
    • Update item in cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Items
        • Type = PUT
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data
          • CatalogItem object
          • Example
        • Response
          • Cartitem object
          • Example
    • Delete item from cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Items/{Cart Item ID}
        • Type = DELETE
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data = NULL
      • Response
        • HTTP Response 202 accepted
  • Working With Cart Payments

    • The carting payments system is used to add, update, or remove payments from a cart; the storage and retrieval of user payments is done via the payments system.
      Please see payments.mbodev.me for more info on storing and retrieving user payments.
    • Add payment to cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Payments
        • Type = POST
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data
          • PaymentMethod object
          • Example
      • Response
        • CartPaymentItem object
        • Example
    • Update payment in cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Payments
        • Type = PUT
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data
          • CartPaymentItem object
          • Example
      • Response
        • CartPaymentItem object
        • Example
    • Delete payment from cart

      • Request
        • /Sales/{Subscriber ID}/Carts/Payments/{Cart Payment ID}
        • Type = DELETE
        • Header
          • Content Type = Application/json
          • Authorization = Bearer {Authorization Token}
        • Data = NULL
      • Response
        • HTTP Response 202 accepted
  • Checking Out

    Now that you've added all your items and payment to the shopping cart, you can checkout!

    To learn more about the checkout process, see the Checkout page

Miscellaneous

Cart States

  • Creating

    • Cart is in process of being created
  • Created

    • Cart has been created
  • Active

    • Cart is ready for use and has been used
  • Abandoned

    • Cart is no longer being used and cannot be used
  • Locked

    • Cart is being worked on and cannot be modified
  • OrderCreated

    • Cart has been transformed into an order and cannot be modified
  • OrderProcessingFailed

    • Order processing failed
  • Finalized

    • The cart's order has been processed

Current Limitations

  • 5/11/2015

    • Supported payment methods: Credit Card, Gift Card

Helpful Links