Update
Update an order.
Overview
The BAP will send the update request to the BPP with the details of which parts of the order is to be updated and the updated values.
Request
URL
/update
Method
POST
Request Body Schema
Field | Type |
---|---|
context* | ContextForUpdate |
message | MessageForUpdate |
Request Body Example
{
"context": {
"domain": "nic2004:60221",
"country": "IND",
"city": "std:080",
"action": "update",
"core_version": "0.9.1",
"bap_id": "https://mock_bap.com/",
"bap_uri": "https://mock_bap.com/beckn/",
"bpp_id": "https://mock_bpp.com/",
"bpp_uri": "https://mock_bpp.com/beckn/",
"transaction_id": "1209849124",
"message_id": "123412423130",
"timestamp": "2021-03-23T10:00:40.065Z"
},
"message": {
"update_target": "fulfillment",
"order": {
"id":"trip_1",
"state":"enroute Destination",
"items":[
{
"id": "sedan_spot",
"quantity": {
"count": 1
}
}
],
"billing": {
"name": "John Doe",
"address": {
"door": "21A",
"name": "ABC Appartments",
"locality": "HSR Layout",
"city": "Bengaluru",
"state": "Karnataka",
"country": "India",
"area_code": "560102"
},
"email": "[email protected]",
"phone": "+919876543210"
},
"fulfillment": {
"tracking": true,
"start": {
"location": {
"id": "user-location",
"descriptor": {
"name": "Current user location"
},
"gps": "12.9349377,77.6055586"
},
"instructions": {
"name": "pick up instructions",
"short_desc": "Ask doorman to ring 21A"
},
"time": {
"label": "ETA",
"duration": "P12M"
},
"contact": {
"phone": "+919999999999",
"email": "[email protected]"
}
},
"end": {
"location": {
"gps": "12.914028, 77.638698"
}
}
},
"quote": {
"price": {
"currency": "INR",
"value": "180"
},
"breakup": [
{
"title": "Sedan Spot Booking",
"price": {
"currency": "INR",
"value": "170"
}
},
{
"title": "Service Charge",
"price": {
"currency": "INR",
"value": "10"
}
}
]
},
"payment": {
"uri": "https://api.bpp.com/pay?amt=$180&mode=upi&vpa=bpp@upi",
"tl_method": "http/get",
"params": {
"amount": "180",
"mode": "upi",
"vpa": "bpp@upi"
},
"type": "ON-FULFILMENT",
"status": "NOT-PAID"
}
}
}
}
Here the BAP sends the update_target as fulfillment to indicate that the fulfillment object is indicated. The update target is a comma separated values of order objects being updated. For example: “update_target”:”item,billing,fulfillment”. Here the user may have chosen to change the drop location for the trip.
Response
Response Body Schema
Field | Type |
---|---|
message* | { Ack } |
error | Error |
Response Body Example
{
"message": {
"ack": {
"status": "ACK"
}
}
}
Acknowldegement response
Response Codes
Code | Description |
---|---|
200 | Acknowledgement of message received |