OGWUGO API DOCUMENTATION

  1. Home
  2. Docs
  3. OGWUGO API DOCUMENTATION
  4. Ogwugo International
  5. Cart

Cart

ADD PRODUCT TO CART
DEBRICATED! International do not have cart.

[POST] /cart/product/add

PARAMETERS

     product_id INT
          quantity INT
          user_id INT
          cart_id INT
          filters[] (warning: critically learn how to post this..==> such that if we JSON ENCODE it we get:: {"Color":"Black","Size":"S"} ::
          variations[] (follow the same rules for filters array. ask about getting it right.)
))

variations are items that give us change in price while they are selected, eg, you select red color and the product price increases.
filters are almost the same but they do not change the price.

 

posting filter array: string: {“Color”:”Black”,”Size”:”L”,”Soup Type”:”Ora”}

posting variations as string also : {“1″:”22″,”3″:”6″,”34″:”66”}
the difference is that variations you post index of the varying property(eg Color = 1) with id of the value(eg Black = 22). eg 1 means color and 22 means Black
in the product data, you see see Color with id 1, and the value, black,… etc

RESPONSE
if response action = take_to_product_page
redirect to product page.

// the following endpoints must come from international API, even though they exist in main db, user will view the two.
1. wallet discharge history.. (stored in the two servers for ref.)

Was this article helpful to you? Yes No

How can we help?