Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Get pricelists

RequestGET /editor/plugins_matchanalysis_pricingpresetprices
ParamspresetId Required. ID of preset for which you want to get the pricelists


Code Block
languagejs
titleResponse
collapsetrue
{
     "metaData": [                // Match rate ranges defined for the preset
        {
            "id": "11",
            "from": "104",
            "till": "104"
        },
        ...
        {
            "id": "15",
            "from": "100",
            "till": "100"
        },
        {
            "id": "16",
            "from": "90",
            "till": "99"
        },
        ...
        {
            "id": "19",
            "from": "60",
            "till": "69"
        }
    ],
    "rows": [

        // Each item in "rows" array is a pricelist for a certain pair of source and target languages
        {
            "id": "1",
            "presetId": "2",
            "sourceLanguageId": "273",
            "targetLanguageId": "274",
            "currency": "\u20ac", // Euro character, i.e €
            "pricesByRangeIds": "{\"11\":0.2,\"12\":0.1,\"13\":0.05,\"14\":0,\"15\":0,\"16\":0,\"17\":0,\"18\":0,\"19\":0}",
            "noMatch": "0.0000",
            "range11": 0.2,
            "range12": 0.1,
            "range13": 0.05,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        }
    ],

    // Total quantity of pricelists for the given preset
    "total": 1
}



Create pricelist(s)

RequestPOST /editor/plugins_matchanalysis_pricingpreset
Params

presetId Required. ID of preset for which you want to create new pricelist(s)


sourceLanguageIds RequiredComma-separated list of IDs of source and target languages to create the
pricelists
pricelist for
all
each possible combinations of, except the ones for which the pricelist do already exist.

targetLanguageIds Required. 


Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true,
    "append": [
        {
            "id": "3",
            "presetId": "2",
            "sourceLanguageId": "273",
            "targetLanguageId": "339",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "4",
            "presetId": "2",
            "sourceLanguageId": "273",
            "targetLanguageId": "340",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "5",
            "presetId": "2",
            "sourceLanguageId": "330",
            "targetLanguageId": "339",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "6",
            "presetId": "2",
            "sourceLanguageId": "330",
            "targetLanguageId": "340",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        }
    ]
}



Clone

preset

pricelist

RequestPOST /editor/plugins_matchanalysis_
pricingpreset
pricingpresetprices/clone
Params
presetId

priceId Required. ID of preset

to be clonedname Required. Name for the clone, it should be unique across the all presets

pricelist which you want to clone


sourceLanguageIds RequiredComma-separated list of IDs of source and target languages to clone the current pricelist for each possible combinations of, except the ones for which the pricelist do already exist.

targetLanguageIds Required. 
customerId Optional. ID of customer. This param should be provided if you want new preset to be customer-specific one


Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true,
    "
clone
append": [
        {
            "id": "
5
3",
            "
customerId
presetId": 
null
"2",
            "
name
sourceLanguageId": "
asd1
273",
            "
unitType
targetLanguageId": "
word
339",
            "
description
currency": 
null
"€",
            "
priceAdjustment
pricesByRangeIds": "
0.00", "isDefault": "0" } }

Edit preset

RequestPUT /editor/plugins_matchanalysis_pricingpresetParams

presetId Required. ID of preset to be edited

name Optional. Name for the clone, it should be unique across the all presets, should be either not empty or not mentioned among the params

unitType=(word|character) Optional. Type of units that the preset should be based on, i.e. word-based or character-based

description Optional. Short description for the preset up to 255 characters long

priceAdjustment Optional. Value to be appended to final price. Should be a decimal value with up to 2 digits after floating point.

{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "4",
            "presetId": "2",
            "sourceLanguageId": "273",
            "targetLanguageId": "340",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "5",
            "presetId": "2",
            "sourceLanguageId": "330",
            "targetLanguageId": "339",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        },
        {
            "id": "6",
            "presetId": "2",
            "sourceLanguageId": "330",
            "targetLanguageId": "340",
            "currency": "€",
            "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
            "noMatch": "0.0000",
            "range11": 0,
            "range12": 0,
            "range13": 0,
            "range14": 0,
            "range15": 0,
            "range16": 0,
            "range17": 0,
            "range18": 0,
            "range19": 0
        }
    ]
}



Edit pricelist

RequestPUT /editor/plugins_matchanalysis_pricingpresetprices
Params

pricesId Required. ID of pricelist to be edited


currency Optional. Currency of prices. Must be not longer than 3 alphanumeric or $€£¥ characters. Should be either not empty or not mentioned among the params

noMatch Optional. Price for match-rates that do not belong to any range. Should be a decimal value with up to 4 digits after floating point.


range123 Optional. Price for match-rates within the range having ID=123. Should be a decimal value with up to 4 digits after floating point.


Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true,
	"id": "6",
    "presetId": "2",
    "sourceLanguageId": "330",
    "targetLanguageId": "340",
    "currency": "€",
    "pricesByRangeIds": "{\"11\":0, \"12\":0, \"13\":0, \"14\":0, \"15\":0, \"16\":0, \"17\":0, \"18\":0, \"19\":0}",
    "noMatch": "0.0000",
    "range11": 0,
    "range12": 0,
    "range13": 0,
    "range14": 0.0010,
    "range15": 0,
    "range16": 0,
    "range17": 0,
    "range18": 0,
    "range19": 0
}



Delete pricelist

isDefault=(0|1) Optional. Set this preset to be the default one for it's customer, if it's a customer-specific preset, or the generally default

Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true,
    "updated": {
        "id": "5",
        "customerId": null,
        "name": "Some preset",
        "unitType": "word",
        "description": "asd",
        "priceAdjustment": "0.00",
        "isDefault": "0"
    }
}
Delete preset

RequestDELETE /editor/plugins_matchanalysis_
pricingpreset
pricingpresetprices
Params
presetId
pricesId Required. ID of
preset
pricelist to be deleted


Code Block
languagejs
titleResponse
collapsetrue
{
    "success": true
}