Modelling Cart APIs

Hello,

Has anyone tried modeling APIs for CART functionality in APIGEE? Can any discuss/share the general pattern?

e.g.,

  1. POST /carts
  2. POST /carts/validations
  3. POST /carts/quotations to return a full quote
  4. POST /orders { cartId=1234, CC-CVV=123 } - returns the full order
0 1 150
1 REPLY 1

Hi @VikashKodati,

Apigee has an OpenCommerce Solution that can be used as a starting point.

It includes products, product search, carts and order status. It treats cart items as a single entity or sub-resource on the cart, rather than a collection of items. So its a bit unclear how you would modify a single cart item. In any case here is a summary, but do check out the site.

  • POST /carts
  • GET /carts/{cartId}
  • PUT /carts/{cartId}
  • DELETE /carts/{cartId}
  • POST /carts/{cartId}/items
  • PUT /carts/{cartId}/items
  • DELETE /carts/{cartId}/items

Order status

  • GET /orders
  • GET /orders/{orderId}

There is no order creation or payment capture APIs, but it would make sense to have something like:

  • POST /payments { auth amount }
  • POST /orders { cart details, payment details for capture }

The question remains on how to validate the cart for eligible combinations, to calculate total taxes, shipping charges, etc., perhaps:

  • POST /quotations { cart details }

Hope that helps,

Kurt