Custom Search - Register Schema API¶
Introduction¶
This API allows the developer to register or create a data representation schema associated with their project for Custom search database. The data representation schema is used by the search engine to configure and index the added records so that intended filters and search criteria can be applied on the added records by the consuming solution.
URL¶
https://search.mappls.com/search/byod/schema
HTTPS Method¶
POST
Getting Access¶
Before using the API in the your solution, please ensure that the related access is enabled in the Mappls Console, within your app - be it for Mobile OR Web or Cloud integration.
- Copy and paste the key from your
credentialssection from your API keys into theaccess_tokenquery parameter.- Your static key can be secured by whitelisting its usage for particular IPs (in case of cloud app usage) OR a set of domains (in case of a web app)
- Your static key obtained from your Console is to be passed as a query parameter:
access_token.
Authentication Object - access_token mandatory query parameter.¶
access_token: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
Response Type¶
application/json
Response Codes¶
Success¶
- 201: To denote a successful data created.
Client-Side Issues¶
- 400: Bad Request, User made an error while creating a valid request.
- 401: Unauthorized, Developer’s key is not allowed to send a request.
- 403: Forbidden, Developer’s key has hit its daily/hourly limit.
- 409: Conflict.
Server-Side Issues¶
- 500: Internal Server Error, the request caused an error in our systems.
- 503: Service Unavailable, during our maintenance break or server downtimes.
Response Messages¶
- 201: Created.
- 204: No matches we’re found for the provided query.
- 400: Something’s just not right with the request.
- 401: Access Denied.
- 403: Forbidden, Services for this key has been suspended due to daily/hourly transactions limit.
- 409: Conflict.
- 500: Something went wrong.
- 503: Maintenance Break.
Request Parameters¶
Mandatory Parameters¶
searchFields(object): list of attributes of records as key value pairs where values are in boolean. This list of attributes are the ones on which textual search will be active and they will be accordinly indexed. Example:"facilityName": truefilterFields(object): list of attributes of records as key value pairs where describe the type of filtering active on the respective attribute. This list of attributes are the ones on which nearby search with custom filtering criteria will be active and they will be accordinly indexed. Example:"ownership": "exact"Types of accepted filter values are below in annexure table 2.extendedFields(object): A list of all the custom attributes of a record that are maintained in the project's schema. This list of extended attributes are the ones on which either textual search or nearby search with filters will be active. Example:
"ownership": {
"dataType": "text"
}
- `dataType` (string): data types of different custom attributes that are acceptable. Valid values are listed in annexure table 1 below.
Optional Parameters¶
isCustomSearch(boolean): Used to enable or disable custom textual search on custom fields defined inextendedFieldsabove.isCustomFilter(boolean): Used to enable or disable filter based nearby search on custom fields defined inextendedFieldsabove.
Response Parameters¶
None
Sample cURL Request¶
Sample 1¶
curl --location 'https://search.mappls.com/search/byod/schema?access_token=hklmgbwzrxncdyavtsuojqpiefrbhqplnm' \
--header 'Content-Type: application/json' \
--data-raw '{
"extendedFields": {
"ownership": {
"dataType": "text"
},
"medicineSystem": {
"dataType": "text"
},
"facilityName": {
"dataType": "text"
},
"specialities": {
"dataType": "text"
},
"state": {
"dataType": "text"
},
"district": {
"dataType": "text"
}
},
"searchFields": {
"facilityName": true
},
"filterFields": {
"ownership": "exact",
"medicineSystem": "logical",
"specialities": "logical",
"state": "logical",
"district": "logical"
},
"isCustomSearch": true,
"isCustomFilter": true
}'
Sample Response¶
{
"message": "CREATED",
"responseCode": 201
}
Appendix Table 1¶
| Serial | dataType | Description |
|---|---|---|
| 1 | text |
Supports textual data. |
| 2 | double |
This datatype allows only fractional numbers. |
| 3 | long |
The data type can store whole numbers from -9223372036854775808 to 9223372036854775807 |
| 4 | integer |
The data type can store whole numbers from -2147483648 to 2147483647 |
| 5 | boolean |
Support Boolean values true or false |
Appendix Table 2¶
| Serial | Filter Name | Filter Operation | Supported dateTypes | Description |
|---|---|---|---|---|
| 1 | exact |
: | text, integer, long, double, boolean |
This is used for full text search queries. |
| 2 | range |
-le, -ge, -lt, -gt, -bt | Integer, long, double |
Is used with comparison operators |
| 3 | logical |
;(or), $(and) | text, integer, long, double, boolean |
Is used to combine two filter criteria. |
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!
@ Copyright 2025 CE Info Systems Ltd. All Rights Reserved.
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report
Customer Care: +91-9999333223
