Catalogue Endpoint for Non-ONDC
The Non-ONDC Catalogue API allows you to retrieve a comprehensive list of catalog items with advanced filtering, sorting, and pagination capabilities. This endpoint provides access to all available gift cards and vouchers outside the ONDC network.
Endpoint Details
This endpoint allows you to retrieve catalog items with comprehensive filtering and pagination options.
endpoint: path: /catalogue method: GET headers: - name: x-api-key required: true description: API key for authentication. This header will be used to identify the consuming channel of the API. parameters: - name: companyId in: query description: Helps with the authentication of the API request required: true schema: type: string - name: page in: query description: Indicates the page number for pagination required: false schema: type: integer - name: count in: query description: Specifies the number of items to return per page required: false schema: type: integer responses: description: JSON object containing the list of catalogue items.
Endpoint Url:
/catalogue
Note: Append this path to the base URL as mentioned in the Prerequisites section.
Endpoint Description and Usage:
This endpoint retrieves a list of catalog items available in the Non-ONDC network. It supports pagination through page and count parameters, and requires company authentication via companyId. The response includes detailed information about each catalog item including denominations, pricing, redemption options, and brand 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 retrieve catalog items using this endpoint:
curl -X GET \ "{{base_url}}/catalogue?companyId=12345&page=1&count=10" \ -H "x-api-key: YOUR_API_KEY"
Query Parameters
The GET request supports the following query parameters for filtering and pagination:
parameters: - name: companyId in: query description: Helps with the authentication of the API request required: true schema: type: string - name: page in: query description: Indicates the page number for pagination required: false schema: type: integer - name: count in: query description: Specifies the number of items to return per page required: false schema: type: integer
Success Response
When the request is successful, the API returns a JSON response with catalog items and total count:
"status": { "code": "200", "error": false }, "message": "Success", "result": [ { "updatedAt": "2024-09-17T02:20:09.163Z", "createdAt": "2024-09-17T02:20:09.163Z", "id": "ccd2cb9a-dcb2-4517-954b-e219e25df756", "name": "Amazon Gift Card", "shortDescription": "Amazon gift card for online shopping", "images": ["https://example.com/image1.jpg"], "longDescription": "Detailed description of Amazon gift card", "brandLogo": "https://example.com/amazon-logo.jpg", "category": "C1", "subCategory": "Electronics", "denominations": "100,200,500", "multipleGiftCardsRedemption": true, "partialRedemption": false, "brandName": "Amazon", "brandTC": "Terms and conditions apply", "HowToRedeem": "Instructions for redemption", "giftCardExpiryPeriod": "1Y", "redemption": "Online", "usability": "Online", "maxPrice": "5000", "minPrice": "100", "customAmount": true, "discount": 5 } ], "count": 150 }
Error Response
If there is an error with the request (e.g., invalid parameters, authentication failure), the API will return a JSON object with error details:
"status": { "code": "500", "error": true }, "message": "Internal Server Error", "result": null }
Response Schema (YAML)
The response schema for both success and error responses is as follows:
Note: The result field contains an array of catalog items on success, and the count field indicates the total number of items available. In case of errors, both fields will be null.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: id: type: string description: Unique identifier for the catalogue item name: type: string description: Name of the catalogue item brandName: type: string description: Brand name of the item shortDescription: type: string description: Brief description of the item longDescription: type: string description: Detailed description of the item brandLogo: type: string description: Brand logo URL of the item brandTC: type: string description: Terms and conditions applicable to the item HowToRedeem: type: string description: Instructions on how to redeem the item denominations: type: string description: Available denominations for the item customAmount: type: boolean description: Indicates if custom denominations are supported category: type: string description: Category of the item subCategory: type: string description: Sub category of the item multipleGiftCardsRedemption: type: boolean description: Multiple redemption allowed or not partialRedemption: type: boolean description: Partial redemption allowed or not giftCardExpiryPeriod: type: string description: Expiry period of the gift card redemption: type: string description: Redemption type (Online/Offline) usability: type: string description: Online/offline usability of the item minPrice: type: string description: Minimum redeemable value for the item maxPrice: type: string description: Maximum redeemable value for the item discount: type: number description: Discount percentage for the item count: type: number description: Total number of catalogue items in the system
Integration Support
For assistance during the integration process, please contact Non-ONDC support at help@meribachat.in