Skip to main content

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:

  1. partner: [dapatkan value dari admin easpro]
  2. user-id: [dapatkan input dari user]
VariableMandatoryDescriptionTypeExample
ValueyesTotal transactionnumber30
transactionDateyesTransaction datestring"2023-05-04T09:43"
billTypeyesValue options
  • INVOICE
  • QUOTATION
string"INVOICE"
billStatusyesValue options
  • UNPAID
  • PAID
string"UNPAID"
billReferenceIdyesunique key from partner to determine invoice (use same id for update)string"b5971eba-c246-4053-994c-d18ec0a7213123c"
deliverynodelivery chargenumber5
partnernocustomer detailsjson object
{
"type": "CUSTOMER",
"name": "Adam",
"email": "adam@gmail.com",
"telNo": "013484573",
"address": "No 12, jalan istean, 09739, pangkor, perak"
}

caution

type & name adalah mandatory kalau partner object diberi

productsnoproduct detailsjson array
[
{
"description": "-",
"discount": "20",
"discountType": "flat",
"invProductId": "68668492-e16b-4b5c-82e6-8e5d843ffbdc", // product id
"name": "airpod",
"priceSellPerUnit": "20", // price per unit
"stockToCount": "10", // quantity
"subTotal": 180 // sub total: "priceSellPerUnit" * "stockToCount" (- or *) discount
}
]
caution

invProductId adalah product id dari easpro, partner perlu ambil input dari user untuk mapping setiap product

discountType options

  1. flat
  2. percent

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"
}
}
}