OGWUGO API DOCUMENTATION

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

Start Order

method: POST

path:

/start/order/invoice

 

DataType [default] Detail
product_id int. req
quantity int. req
offer_price double. req
request_sample boolean(true(1),false(0)) reg
customization boolean(true(1),false(0)) reg
quotation boolean(true(1),false(0)) reg
user_id  int.
coupon str. opt. if we have coupon
shipping_address int. req.
payment_method int. req
delivery_time int. req
shipping_company int. reg
comment str.
shipping_fee double. optional
total_amount double. optional
user_new_address boolean(true(1),false(0)) reg
shipping_company int. reg
shipping_company int. reg
shipping_company int. reg
filters []
variations []

During start order may decide to add new address. then set “user_new_address=1” else “user_new_address=0”

// if we are having new address from user. if user_new_address = 1, we collect the address inputted by the user at checkout and also store it as the user address.. provide the following details then:

          title    str  [title of address eg my house]
          address  str    reg
          city int reg
          phone    str    reg
          latitude str
          longitude str
          ogwugo_area_location INT required

 

POST ‘filters’ ONLY if the product has filters (these are selectable properties like color during order)

if the product has data.attributes post the selected value and the index thus: {“Color”:”Black”,”Size”:”S”} for which the user has selected.

VARIATIONS:

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

 
THUS SEE SAMPLE FOR HTML FORM: name=”variations[{{ variation.var_id }}]”
name=”filters[{{ attr.name }}]”
 
// WARNING: POSTING filters AND variations curl, kindly encode to json
// set param curl = true,

RESPONSE:

{
    "data": [
        {
            "invoice_id": "1",
            "user_id": "ogwugo",
            "invoice_number": "ogw1000454333", // unique id used for card payment posting
            "amount": "5000", // along with shipping fee
            "with_paystack_fee": "5250", // if user will use card payment, we have added the bank fee here.. pass to paystack direct.
             .
             .
             .
             .
             ,

        }
    ],
    "status": "success",
    "message": "",
    "error": {
        "detail": "",
        "code": "202"
    }
}

in the response you see “with_paystack_fee

this is the total amount plus paystack transaction fee added, should user will pay with paystack, you already have the figure to post to paystack.

 

Was this article helpful to you? Yes No

How can we help?