Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Get presets list

RequestGET /editor/plugins_matchanalysis_pricingpreset
Paramsno params needed
Response
{
    "total": 3,
    "rows": [
        {
            "id": "1",
            "customerId": null,
            "name": "Translate5-Standard",
            "unitType": "word",
            "description": "",
            "priceAdjustment": "0.00",
            "isDefault": "0"
        },
        {
            "id": "2",
            "customerId": null,
            "name": "asd",
            "unitType": "word",
            "description": null,
            "priceAdjustment": "0.00",
            "isDefault": "1"
        }
    ],
    ...
}

Clone preset

RequestPOST /editor/plugins_matchanalysis_pricingpreset/clone
Params

presetId Required. ID of preset to be cloned


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

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

Response
{
    "success": true,
    "clone": {
        "id": "5",
        "customerId": null,
        "name": "asd1",
        "unitType": "word",
        "description": null,
        "priceAdjustment": "0.00",
        "isDefault": "0"
    }
}

Edit preset

RequestPUT /editor/plugins_matchanalysis_pricingpreset
Params

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 mentioned or not empty

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. Decimal value with up to 2 digits after floating point to be appended to final price


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

Response
{
    "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
ParamspresetId Required. ID of preset to be deleted
Response
{
    "success": true
}
  • No labels