Get Quote for Non-ONDC
The Non-ONDC Get Quote API allows you to retrieve pricing information and buyer commission for items before placing an order. This endpoint calculates the total quote amount and commission based on the selected items and quantities.
Endpoint Details
This endpoint allows you to get pricing quotes and commission information for items from the catalogue.
endpoint: path: /catalogue/get-quote method: POST headers: - name: X-API-KEY required: true description: Unique API key provided to authenticate requests - name: Content-Type required: true description: application/json requestBody: required: true content: application/json: schema: type: object properties: companyId: type: string description: Unique identifier of the company initiating the request required: true items: type: array description: Array of items for which to get quotes required: true items: type: object properties: itemId: type: string description: Item ID from the catalogue quantity: type: number description: Quantity of the item denomination: type: number description: Denomination of the gift card
Endpoint Url:
/catalogue/get-quote
Note: Append this path to the base URL as mentioned in the Prerequisites section.
Endpoint Description and Usage:
This endpoint retrieves pricing quotes for gift cards from the Non-ONDC catalogue. It requires a company ID for authentication and an array of items with their quantities and denominations. The response provides the total quote amount and buyer commission details.
Security
All requests to this endpoint must be authenticated using the required headers as specified in the Prerequisites section. Ensure that your API key is kept secure and not exposed in client-side code. Failure to provide valid authentication headers will result in a 401 Unauthorized error.
Sample Request:
Here is an example of a cURL command to get a quote using this endpoint:
curl -X POST \ {{base_url}}/catalogue/get-quote \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "companyId": "YOUR_COMPANY_ID", "items": [ { "itemId": "YOUR_ITEM_ID", "quantity": 1, "denomination": 100 } ] }'
Request Body
The POST request requires the following parameters in the JSON request body:
requestBody: required: true content: application/json: schema: type: object properties: companyId: type: string description: Unique identifier of the company initiating the request required: true example: "YOUR_COMPANY_ID" items: type: array description: Array of items for which to get quotes required: true items: type: object properties: itemId: type: string description: Item ID from the catalogue example: "YOUR_ITEM_ID" quantity: type: number description: Quantity of the item example: 1 denomination: type: number description: Denomination of the gift card example: 100
Success Response
When the request is successful, the API returns a JSON response with quote amount and commission:
{ "status": { "code": "200", "error": false }, "message": "success", "result": { "quoteAmount": "100", "buyerCommission": "10" } }
Error Response
If there is an error with the request (e.g., invalid parameters, server error), the API will return a JSON object with error details:
{ "status": { "code": "400", "error": true }, "message": "failed", "result": null }
Response Schema (YAML)
The response schema for both success and error responses is as follows:
Note: The quoteAmount field contains the total amount for the quote, and the buyerCommission field shows the commission for the buyer. Result will be null in case of an error.parameters: - name: status in: body description: Contains response metadata. required: true schema: type: object properties: code: type: string description: HTTP-style status code. error: type: boolean description: Indicates if the API encountered an error. - name: message in: body description: Human-readable message describing the result or error. required: true schema: type: string - name: result in: body description: Contains details of the result in case of success; will be null in case of an error. required: true schema: type: object nullable: true properties: quoteAmount: type: string description: Total amount for the quote example: "100" buyerCommission: type: string description: Commission amount for the buyer example: "10"
Integration Support
For assistance during the integration process, please contact Non-ONDC support at help@meribachat.in