Retrieve One Way Synonyms
This endpoint is used to retrieve synonyms associated with the given key.
If a parent phrase is provided, only the one-way synonyms associated with the parent phrase for the given key will be returned. If no parent phrase is provided, all parent phrases for the given key will be returned.
The child phrase may contain the "automatically_generated" flag which indicates whether the phrase was created by the customer or by the Constructor.io platform.
- Shell
- JavaScript
- Python
- Java
- iOS
- Android
- C#
curl -X GET -H "Content-Type: application/json" \
-u"[your token]:" "https://ac.cnstrc.com/v2/one_way_synonyms?key=[your API key]"
curl -X GET -H "Content-Type: application/json" \
-u"[your token]:" "https://ac.cnstrc.com/v2/one_way_synonyms/spices?key=[your API key]"
// Node
// Please refer to https://constructor-io.github.io/constructorio-node/module-catalog.html#~getOneWaySynonyms
# This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
// This method is not currently supported.
info
The above command returns a 204 No Content response on success.
HTTP Request
GET https://ac.cnstrc.com/v2/one_way_synonyms?key=[your API key]
GET https://ac.cnstrc.com/v2/one_way_synonyms/[parent phrase]?key=[your API key]
Response format
Response Format
{
"one_way_synonym_relations": [
{
"parent_phrase": "spices",
"child_phrases": [
{ "phrase": "pepper", "automatically_generated": false },
{ "phrase": "cinnamon", "automatically_generated": false }
]
}
],
"total_count": 1
}
Query Parameters
Parameter | Required? | Description |
---|---|---|
parent phrase | No | The phrase for which all synonym groups containing it will be returned. |
num_results_per_page | No | The number of synonym groups to return. Defaults to 100. |
page | No | The page of results to return. Defaults to 1. Can't be used together with 'offset' |
offset | No | The number of results to skip from the beginning. Can't be used together with 'page' |