Read Mapping

The second endpoint that you have to now is the mapping read. This endpoint is not a must to be hit. This endpoint will return all fields in your data. There are two types of fields, the first one is mandatory fields. This is the default field that provided by our system when you create the engine. The second one is custom fields, which are the fields that you add by using sync custom fields' endpoint. Basically this endpoint is used to check all of your fields, and you can check it in client panel (Performance Settings -> Custom Rankings -> Mapping Field). So here is the example and all params that you have to provide.

GET#

https://api.altoshift.com/api/mapping/read

Header#

FieldTypeDescription
x-tokenStringtoken Users unique token

Request Header Example#

{
"x-token": "2b46ad0b537229cf450777dcc655a8620571e18556c473f065f44739"
}

Success 200#

FieldTypeDescription
successBooleanRequest was successful
mappingObjectMapping data
    customFieldsObject[]Mapping data
        applySynonymsBooleanIf true, the field will be used to be applied in synonyms
        indexBooleanIf true, the field will be used to index the data
        nameStringField name
        typeStringField data type
        responseStringBoolean to determine either this field will be return as response from our search engine or not
        ignoreNonAlphanumStringBoolean to determine either this field will ignore special character or not
        filterStringBoolean to determine either this field will be a filter or not
    mandatoryFieldsObject[]Mapping data
        applySynonymsBooleanIf true, the field will be used to be applied in synonyms
        indexBooleanIf true, the field will be used to index the data
        nameStringField name
        typeStringField data type

Success Example#

{
"success": true,
"mapping": {
"customFields": [
{
"name": "title",
"type": "text",
"response": true,
"filter": "",
"applySynonyms": false,
"index": true,
"ignoreNonAlphanum": false
},
{
"name": "brand",
"type": "text",
"response": true,
"filter": "term",
"applySynonyms": false,
"index": true,
"ignoreNonAlphanum": false
},
{
"name": "thumb_link",
"type": "text",
"response": true,
"filter": "",
"applySynonyms": false,
"index": false,
"ignoreNonAlphanum": false
},
{
"name": "price",
"type": "double",
"response": true,
"filter": "range",
"applySynonyms": false,
"index": true,
"ignoreNonAlphanum": false
},
{
"name": "link",
"type": "text",
"response": true,
"filter": "",
"applySynonyms": false,
"index": false,
"ignoreNonAlphanum": false
},
{
"name": "availability",
"type": "boolean",
"response": true,
"filter": "",
"applySynonyms": false,
"index": true,
"ignoreNonAlphanum": false
},
{
"name": "image_link",
"type": "text",
"response": true,
"filter": "",
"applySynonyms": false,
"index": false,
"ignoreNonAlphanum": false
}
],
"mandatoryFields": [
{
"applySynonyms": false,
"index": true,
"name": "productId",
"type": "keyword"
}
]
}
}