Cart model

The carts model has the following endpoints:

Get CartsGET/carts
Get Order OptionsGET/order_options
Update Order OptionsPUT/order_options
Add ProductPOST/carts/add_product
Remove ProductPOST/carts/remove_product
Update ProductPOST/carts/update_product
Clear CartPOST/carts/clear
Apply couponPOST/carts/apply_coupon
Change driver tipPOST/carts/change_driver_tip
Find CartGET/carts/:cart_id
Place Order CartPOST/carts/:cart_id/place
Confirm Order CartPOST/carts/:cart_id/confirm
Add offerPOST/carts/add_offer


Cart info

  • Only Cart's owner and admins can use this endpoints
  • the cart is creating depending on user and business it is mean, an user only can have one cart per business at time.

The order model is composed of the following attributes:

statusIntegernoThe status of the cart.Yes
business_idIntegernoThe identifier of the business where the cart belong.Yes
user_idIntegerno, required to placeThe identifier of the customerYes
offer_idIntegerno, required without offer_idThe identifier of the offer is usedYes
paymethod_idIntegerYesThe identifier of the pay method used in to place orderYes
pay_referenceStringA reference which is used to confirm the cart if pay method requires confirmationYes
paymethod_dataSummary of payment dataYes
delivery_zone_idIntegerNo, required if order type 1.The identifier of the delivery zone if deliveryYes
address_idIntegerThe identifier of the customer addressYes
addressThe address data of the customerYes
order_typeIntegerThe of order will be placeYes
momenttimestampWill be the delivery time of the orderYes
couponstringNo, required whitout offer_idTo apply a discount coupon, it must have a length between 1 and 255yes
use_walletbooleannoTo allow the cart to use the wallet
commentstringnoCart comment information

Cart Statuses

Below mentioned are the values of the status parameters of the respective Cart Status:

Open0The cart can be modified products and data
Close1Cart completed
Pending payment2This status is used for paymethos which required a extra step to confrm the order
Payment fail4Payment failed, can retry place order and payment in this status.