On_Search

Send catalog

Overview

The BPP will send the catalog of logistics options matching the search intent to the BAP.

Request

URL

/on_search

Method

POST

Request Body Schema

Field Type
context* ContextForOn_search
message.catalog { Catalog }
error Error

Request Body Example

{
    "context": {
        "domain": "nic2004:55204",
        "country": "IND",
        "city": "std:080",
        "action": "on_search",
        "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": "12341242343",
        "timestamp": "2021-03-23T10:00:40.065Z"
    },
    "message": {
        "catalog": {
            "bpp/descriptor": {
                "name": "Mock BPP"
            },
            "bpp/providers": [
                {
                    "id": "fast-logistics",
                    "descriptor" : {
                        "name": "Fast Logistics"
                    },
                    "categories": [
                        {
                            "id": "normal-delivery",
                            "descriptor": {
                                "name": "Normal Delivery"
                            }
                        },
                        {
                            "id": "priority",
                            "descriptor": {
                                "name": "Priority"
                            }
                        }
                    ],
                    "items": [
                        {
                            "id": "normal-documents",
                            "descriptor" : {
                                "name" : "Documents normal delivery",
                                "images" : [
                                    "https://mock_bpp.com/images/docs.jpg"
                                ]
                            },
                            "category_id": "normal-delivery",
                            "price" : {
                                "currency": "INR",
                                "value": "170"
                            },
                            "matched": true
                        },
                        {
                            "id": "normal-fragile",
                            "descriptor" : {
                                "name" : "Fragile items normal delivery",
                                "images" : [
                                    "https://mock_bpp.com/images/fragile.jpg"
                                ]
                            },
                            "category_id": "normal-delivery",
                            "price" : {
                                "currency": "INR",
                                "value": "290"
                            },
                            "matched": true
                        },
                        {
                            "id": "priority-documents",
                            "descriptor" : {
                                "name" : "Documents priority delivery",
                                "images" : [
                                    "https://mock_bpp.com/images/docs-priority.jpg"
                                ]
                            },
                            "category_id": "priority",
                            "price" : {
                                "currency": "INR",
                                "value": "300"
                            }
                            "matched": true
                        },
                    ]
                },
                {
                    "id": "logistics4all",
                    "descriptor": {
                        "name": "Logistics 4 All"
                    },
                    "categories": [
                        {
                            "id": "standard-delivery",
                            "descriptor": {
                                "name": "Standard Delivery"
                            }
                        }
                    ],
                    "items": [
                        {
                            "id": "standard-document-delivery",
                            "descriptor" : {
                                "name" : "Standard Document Delivery",
                                "images" : [
                                    "https://mock_bpp.com/images/standard.jpg"
                                ]
                            },
                            "category_id": "standard-delivery",
                            "price" : {
                                "currency": "INR",
                                "value": "100"
                            }
                            "matched": true
                        }
                    ]
                }
            ]
        }
    }
}

The provider catalogs with objects according to the search intent are returned

Response

Response Body Schema

Field Type
message* { Ack }
error Error

Response Body Example

{
  "message": {
    "ack": {
      "status": "ACK"
    }
  }
}

Acknowledgement response

Response Codes

Code Description
200 Acknowledgement of message received
On this page