Update a Bill

Update a Bill

API for Updating a Bill

API Configuration

HTTP Request

POST /v1/bill/update-shipping

ParameterTypeRequireDescription
partner_idNumberAlt textPartner ID, that created on Web portal
bill_codeStringAlt textBill code
cod_amountDoubleAmount of COD to collect when package delivered to receiver
cargo_valueDoubleBrief value of Package Product Items
weightDoubleWeight of package
lengthDoubleLength of package
heightDoubleHeight of package
widthDoubleWidth of package
cargo_contentStringBrief description of Package Product Items
receiver_phoneStringReceiver's contact phone number
receiver_nameStringFull name of receiver
receiver_addressStringFull address of receiver (should be format: 52A Nguyễn Thái Bình)
package_noNumberNumber of packages
is_return_docNumberIf yes, return the correct service, if not, return all services
noteStringNote for shipping

JSON body respone

NameTypeDescription
successbooleanReturn true if create bill success, all other false means error. See message for further description.
messagestringReturn Message of API Respond.
dataobjectData of API response.

Sample Request

{
   "partner_id": 123736,
   "bill_code": "TEST-009",
   "cod_amount": 200000,
   "is_return_doc": 0
}

Sample Response

   {
    "success": true,
    "message": "Update successful",
    "data": {
        "bill_id": 159839,
        "bill_code": "CP15983901",
        "ref_code": "TEST-009",
        "status_id": 2,
        "cod_amount": 200000,
        "service_id": 10,
        "payment_method": 10,
        "created_at": "2022-12-01 15:31:30",
        "main_fee": 33462,
        "cod_fee": 0,
        "insurr_fee": 5500,
        "lifting_fee": 0,
        "remote_fee": 0,
        "counting_fee": 0,
        "packing_fee": 0,
        "total_fee": 38962,
        "partner_address_id": 24371,
        "receiver_name": "Nguyễn Văn A",
        "receiver_phone": "09xxxxxxxx",
        "receiver_address": "52A, Nguyễn Thái Bình, P4, Tân Bình, TP.HCM",
        "package_no": 1,
        "weight": 1.3,
        "cargo_content": "Quần áo",
        "cargo_value": 1000000,
        "note": "ghi chú đơn hàng"
    }
}

Response Failed

{
    "success": false,
    "message": "descriptions for detail error",
    "data": {}
}