Open tanyamadaan opened 9 months ago
Based on the discussion, we intend to use /confirm API to place bid and hence for better understanding of the complete auction flow, trying to map high level auction flow with beckn APIs.
Use Case: Agri Mandi
Proposed Flow:
"message": {
"catalog": {
"providers": [
{
"id": "P1",
"items": [
{
"id": "I1",
"descriptor": {...},
"price": {
"currency": "INR",
"minimum_value": "1000.00"
},
"quantity": {
"unitized": {
"measure": {
"unit": "quintal",
"value": "1"
}
},
"available": {
"count": "10"
}
}}
] } ]}}
/select - Intent to Bid
/on_select
/init
/on_init
/confirm
"message": {
"order": {
"id": "O1",
"state": "Created",
"provider": {
"id": "P1"
},
"items": [
{
"id": "I1",
"fulfillment_ids": [
"F1"
],
"quantity": {
"selected": {
"count": 10
}
}
}
],
"billing": { ... },
"fulfillments": [
{
"id": "F1",
"type": "self_pickup",
"stops": [ .... ]
}
],
"bid": {
"price": {
"currency": "INR",
"value": "1100"
},
"breakup": [
{
"title": "Potato Lot",
"price": {
"currency": "INR",
"value": "1100"
},
"item": {
"id": "I1",
"quantity": {
"selected": {
"measure": {
"unit": "quintal",
"value": "1"
},
"count": "10"
}
},
"price": {
"currency": "INR",
"value": "1100"
}
}
}
]
},
"payments": [
{
"params": {
"currency": "INR",
"amount": "1100"
},
"status": "Paid",
"type": "PRE-FULFILLMENT",
"collected_by": "BAP"
}
],
"created_at": "2024-01-12T09:30:00.000Z"
}
}
/on_confirm - Bid Submission
/on_update (unsolicited)
/update
message.order.bid
object.Multiple update and on_update calls may occur for the each transaction_id.
Final /on_update (Post Auction Window)
{
"message": {
"order": {
"id": "O1",
"state": "Accepted",
"provider": {
"id": "P1"
},
"items": [
{
"id": "I1",
"fulfillment_ids": [
"F1"
],
"quantity": {
"selected": {
"count": 200
}
}
}
],
"billing": { ... },
"fulfillments": [
{
"id": "F1",
"state": {
"descriptor": {
"code": "Pending"
}
},
"type": "self_pickup",
"stops": [ ... ]
}
],
"quote": {
"price": {
"currency": "INR",
"value": "1200"
},
"breakup": [
{
"title": "Potato Lot",
"price": {
"currency": "INR",
"value": "1100"
},
"item": {
"id": "I1",
"quantity": {
"selected": {
"measure": {
"unit": "quintal",
"value": "1"
},
"count": 10
}
}
}
},
{
"title": "Convenience Fee",
"price": {
"currency": "INR",
"value": "100"
}
}
],
"ttl": "P1D"
},
"payments": [
{
"params": {
"currency": "INR",
"amount": "1200"
},
"status": "PAID",
"uri": "https://snp.com/pg",
"type": "PRE-FULFILLMENT"
}
],
"created_at": "2024-01-12T09:30:00.000Z",
"updated_at": "2024-01-12T12:30:00.000Z"
}
}
}
And multiple /on_update to all other bidders with error object defining - bid did not match highest bid.
{
"context": { ... },
"message": {
"order": {
"id": "O1",
"state": "Accepted",
"provider": {
"id": "P1"
},
"items": [
{
"id": "I1"
}
],
"quote": {
"price": {
"currency": "INR",
"value": "0"
},
"breakup": [
{
"title": "Potato Lot",
"price": {
"currency": "INR",
"value": "0"
},
"item": {
"id": "I1",
"quantity": {
"available": {
"measure": {
"unit": "quintal",
"value": "1"
},
"count": 0
}
}
}
}
]
},
"created_at": "2024-01-12T09:30:00.000Z",
"updated_at": "2024-01-12T12:30:00.000Z"
}
},
"error": {
"code": "xxxxx",
"message": "Proposed bid did not match highest bid"
}
}
Open Points:
item.quantity
, attributes like available
, maximum
, and minimum
can only be updated by BPP. On the other hand, item.quantity.selected
is updated by BAP only.
Similarly in item.price
, we currently have attributes like offered_value
, maximum_value
, and minimum_value
. To enhance flexibility, we can also introduce item.price.proposed_value
apart from order.bid, which aligns with the structure of item.quantity.selected
. This new attribute is intended to be updated only by the BAP, similar to item.quantity.selected.order.quote.price
will change and might not match order.bid.price
. Which also means that the /confirm - /on-confirm does not become the final digital contract. Kindly provide your thoughts, suggestions, or any alternative approaches regarding the considerations in the overall flow.
Minutes of Meeting (MOM) - Discussion Highlights:
Order.Bid Definition:
message.order.bid
as a new object, similar tomessage.order.quote
.order.bid
is the responsibility of the buyer/buyer apps (BAP) and can only be updated by BAP.order.quote
is the responsibility of the seller/seller apps (BPP) and can only be updated by BPP.Usage of Bid Object:
bid
object may be utilized by BAP to send the total proposed price or proposed price at each item level.Confirmation and Status Update:
/confirm
API to be used./on_status
to provide the newitem.price.minimum_value
based on bids received within a specified timeframe (e.g., every 5 mins).Negotiation Flows:
order.bid
is sent as part of/select
.order.quote
based on the buyer's proposed price in/on_select
./select - /on_select
./init
API.