GET /v1/analyze (parameter)

Analyze API computes the labels for product vendor, product brand, product series and product models. Full URL for requests is https://jbbj.l.dedikuoti.lt/v1/analyze. Only successful requests are counted towards soft limits and are billed.

Request parameters

query=string

Sentence or similar readable data possibly containing product information.

api_key=your_personal_api_key

Api key is provided after registration. Api key is used for service configuration like soft limits and billing.

Response codes

200 - Successful response

Request was successfully. Response body contains distance and duration of the fastest route between all pairs of supplied coordinates.

400 - Bad request exception

Returned if parameters are not provided or provided in an invalid format.

401 - Unauthorized

Returned if api key is invalid.

429 - Too many requests

Returned if soft limits are reached.

402 - Payment required

Returned if user has insufficient funds to make a request.

500 - Internal server error

Returned if unexpected error has occurred. We are working on it to resolve it.

Response body

{
    "code": "Ok",
    "query": "LENOVO ThinkCentre",
    "entities": [
        {
            "start": 0,
            "end": 6,
            "label": "U-VENDOR-PC",
            "value": "LENOVO",
            "confidence": "0.9998006"
        },
        {
            "start": 7,
            "end": 18,
            "label": "U-BRAND-PC",
            "value": "ThinkCentre",
            "confidence": "0.99897563"
        }
    ]
}

code - "Ok" or "Error"

query - Query provided during request

entities[i] - An array of entities found in query.

entities[i].start - Starting character position of entity.

entities[i].end - End character position of entity.

entities[i].label - Type of label found in query:
    U-VENDOR-LAPTOP: Laptop vendor, such as 'Lenovo', 'HP', 'Dell'.
    U-BRAND-LAPTOP: Laptop brand, such as 'ThinkPad', 'ThinkBook', etc.
    U-SERIES-LAPTOP: Laptop series, such as 'X1 Carbon Gen 12'.
    U-MODEL-LAPTOP: Laptop model, such as '14ABR8'.

entities[i].value - Value of label found in query.

entities[i].confidence - Value of confidence for label.


 

POST /v1/analyze_batch (payload)

Analyze batch API computes the labels for product vendor, product brand, product series and product models. Full URL for requests is https://jbbj.l.dedikuoti.lt/v1/analyze_batch. Only successful requests are counted towards soft limits and are billed.

Request parameters

api_key=your_personal_api_key

Api key is provided after registration. Api key is used for service configuration like soft limits and billing.

Request body

{
    "api_key": "your_personal_api_key",
    "queries": [
            "LENOVO ThinkCentre I",
            "LENOVO ThinkCentre II",
            "LENOVO ThinkCentre III",
            "LENOVO ThinkCentre IV"
    ]
}

api_key - Your personal API key provided via json payload or request parameter.

queries[i] - An array of up to 1000 queries.

Response codes

200 - Successful response

Request was successfully. Response body contains distance and duration of the fastest route between all pairs of supplied coordinates.

400 - Bad request exception

Returned if parameters are not provided or provided in an invalid format.

401 - Unauthorized

Returned if api key is invalid.

429 - Too many requests

Returned if soft limits are reached.

402 - Payment required

Returned if user has insufficient funds to make a request.

500 - Internal server error

Returned if unexpected error has occurred. We are working on it to resolve it.

Response body

{
    "code": "Ok",
    "results": [
        {
            "query": "LENOVO ThinkCentre...",
            "entities": [
                {
                    "start": 0,
                    "end": 6,
                    "label": "U-VENDOR-PC",
                    "value": "LENOVO",
                    "confidence": "0.9998006"
                },
                {
                    "start": 7,
                    "end": 18,
                    "label": "U-BRAND-PC",
                    "value": "ThinkCentre",
                    "confidence": "0.99897563"
                }
            ]
        }, ...
    ]
}

code - "Ok" or "Error"

results[i] - An array of resuls generated for batch.

results[i].entities[j] - An array of entities found in query.

results[i].entities[j].start - Starting character position of entity.

results[i].entities[j].end - End character position of entity.

results[i].entities[j].label - Type of label found in query:
    U-VENDOR-LAPTOP: Laptop vendor, such as 'Lenovo', 'HP', 'Dell'.
    U-BRAND-LAPTOP: Laptop brand, such as 'ThinkPad', 'ThinkBook', etc.
    U-SERIES-LAPTOP: Laptop series, such as 'X1 Carbon Gen 12'.
    U-MODEL-LAPTOP: Laptop model, such as '14ABR8'.

results[i].entities[j].value - Value of label found in query.

results[i].entities[j].confidence - Value of confidence for label.