Cart model

The carts model has the following endpoints:

Action

Method

resource

Description

Get Carts

GET

/carts

Get Order Options

GET

/order_options

Update Order Options

PUT

/order_options

Add Product

POST

/carts/add_product

Remove Product

POST

/carts/remove_product

Update Product

POST

/carts/update_product

Clear Cart

POST

/carts/clear

Apply coupon

POST

/carts/apply_coupon

Change driver tip

POST

/carts/change_driver_tip

Find Cart

GET

/carts/:cart_id

Place Order Cart

POST

/carts/:cart_id/place

Confirm Order Cart

POST

/carts/:cart_id/confirm

Add offer

POST

/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:

Attribute

Type

Required

Description

Whereable

status

Integer

no

The status of the cart.

Yes

business_id

Integer

no

The identifier of the business where the cart belong.

Yes

user_id

Integer

no, required to place

The identifier of the customer

Yes

offer_id

Integer

no, required without offer_id

The identifier of the offer is used

Yes

paymethod_id

Integer

Yes

The identifier of the pay method used in to place order

Yes

pay_reference

String

A reference which is used to confirm the cart if pay method requires confirmation

Yes

paymethod_data

Summary of payment data

Yes

delivery_zone_id

Integer

No, required if order type 1.

The identifier of the delivery zone if delivery

Yes

address_id

Integer

The identifier of the customer address

Yes

address

The address data of the customer

Yes

order_type

Integer

The of order will be place

Yes

moment

timestamp

Will be the delivery time of the order

Yes

coupon

string

No, required whitout offer_id

To apply a discount coupon, it must have a length between 1 and 255

yes

force

boolean

Cart Statuses

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

Nane

Value

Description

Open

0

The cart can be modified products and data

Close

1

Cart completed

Pending payment

2

This status is used for paymethos which required a extra step to confrm the order

Payment fail

4

Payment failed, can retry place order and payment in this status.