Skip to main content

Purchases

List of endpoints to place, fetch, update and cancel order.

The Purchases Object

Attributes

AttributeData typeRequiredDescription
actTotalFeestringtrueUnique identifier for the customer
outOrderNointegertrueUnique identifier for the customer's order
productListarraytrueThe cart items
storeIdstringtruethe store id obtained from lipalater team

Product List Attributes

AttributeData typeRequiredDescription
actTotalFeeintegertrueTotal paid price of goods
brandstringtrueThe item brand
priceintegertrueproduct price
productLogostringtrueProduct logo
productNamestringtrueProduct name
productNostringtrueProduct id
productNumintegertrueproduct quantity
salepriceintegertrueTotal sales price of goods
skuDescstringtrueThe product description

API request

POST {BASE_URL}/op/order/{memberId}/create

curl -i -X POST '{BASE_URL}/op/order/{memberId}/create' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-H 'Noncestr: <none>' \
-H 'Sign: <sign>' \
-H 'Timestamp: <timestamp>' \
-d '{
"actTotalFee": 0,
"outOrderNo": "",
"productList": [
{
"actTotalFee": 0,
"brand": "",
"price": 0,
"productLogo": "",
"productName": "",
"productNo": "",
"productNum": 0,
"salePrice": 0,
"skuDesc": ""
}
],
"storeId": ""
}'

Request object

{
"actTotalFee": 0,
"outOrderNo": "",
"productList": [
{
"actTotalFee": 0,
"brand": "",
"price": 0,
"productLogo": "",
"productName": "",
"productNo": "",
"productNum": 0,
"salePrice": 0,
"skuDesc": ""
}
],
"storeId": ""
}

JSON response

{
"apiVersion": "2.0",
"status": 201,
"order_id": "113",
"data": [
{
"interest_rate": 4.2,
"loan_duration": 12,
"facility_status": "pending_collection_customer",
"preferred_option": "pick_up",
"facility_plan": 0,
"created_at": "2020-11-25T07:55:27.364Z",
"updated_at": "2020-11-25T07:55:27.364Z",
"item_type": "other",
"item_brand": "36GB A Series Walkman Video MP3",
"item_code": "H0148VPS1T",
"store_name": "QUEENS MOBILE",
"item_value": 50000.0,
"delivery_option": "customer_store_pickup",
"item_description": "16GB A Series Walkman Video MP3",
"item_topup": 0.0,
"topup_ref": "",
"upfront_fees": 0.0,
"source": "sales-rep",
"accepted_terms": "accepted",
"id": "33ac6c2d-5b4e-47a8-b107-6d1f0e5cc73f",
"loan_application_detail_id": "28fcaa6e-6fd3-4caf-9db5-b39cdd8734b3",
"partner_store_id": "61d273cf-6584-4429-af01-7b4dd2ae9f78",
"loan_product_id": "e55e5ec9-13b1-4dbf-ac14-40b482c5d677"
},...
]
}

Get Repayment Schedule

params

AttributeData typeRequiredDescription
countryIdintegertruethe country id options ke=10001
orderNostringtrueThe order number
loanProductIdintegertrueproduct id

request

POST {BASE_URL}/op/order/calculateSchedule/

curl -i -X POST '{BASE_URL}/op/order/calculateSchedule/' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-H 'Noncestr: <none>' \
-H 'Sign: <sign>' \
-H 'Timestamp: <timestamp>'