jualan
caution
akaun demo
id: demo@gmail.com
pwd: demo
Merekod jualan (tambah baru & edit)
Request method: POST
Endpoint: http://www.eas-pro.my/eas/api/external/transaction/create
Header:
- partner: [dapatkan value dari admin easpro]
- user-id: [dapatkan input dari user]
| Variable | Mandatory | Description | Type | Example |
|---|---|---|---|---|
| Value | yes | Total transaction | number | 30 |
| transactionDate | yes | Transaction date | string | "2023-05-04T09:43" |
| billType | yes | Value options
| string | "INVOICE" |
| billStatus | yes | Value options
| string | "UNPAID" |
| billReferenceId | yes | unique key from partner to determine invoice (use same id for update) | string | "b5971eba-c246-4053-994c-d18ec0a7213123c" |
| delivery | no | delivery charge | number | 5 |
| partner | no | customer details | json object | caution type & name adalah mandatory kalau partner object diberi |
| products | no | product details | json array | caution invProductId adalah product id dari easpro, partner perlu ambil input dari user untuk mapping setiap product discountType options
|
Sample body request
{
"data": {
"value": 25,
"transactionDate": "2023-05-04T09:43",
"billType": "INVOICE",
"billStatus": "UNPAID",
"products": [
{
"description": "-",
"discount": "20",
"discountType": "flat",
"invFeId": "6fd515ef-4d90-49f7-a857-9241758974f0",
"invProductId": "68668492-e16b-4b5c-82e6-8e5d843ffbdc",
"name": "airpod",
"priceSellPerUnit": "20",
"stockToCount": "10",
"subTotal": 180
}
],
"delivery": 5,
"billReferenceId": "b5971eba-c246-4053-994c-d18ec0a721312c",
"partner": {
"type": "CUSTOMER",
"name": "Adam",
"email": "adam@gmail.com",
"telNo": "013484593",
"address": "No 21, Taman isaed, 09232, pangkor, perak"
}
}
}
Sample body response
info
response sentiasa HTTP:200
{
"data": {
"result": "Success",
"demo": false
},
"response": {
"date": "2023/05/09 19:44:10",
"status": {
"code": "0",
"httpMessage": "success processed"
}
}
}