Prices
Prices represent prices associated with a client. They can be used to calculate the cost of a project for a client.
The Price object
Properties
idstring
Unique identifier for the object.
currencyobject
The currency.domainobject
The domain of expertise.languagePairobject
The language pair.matchesarray
The matches.matchesTypestring
How the matches are calculated. Valid values are
fixed
orpercentage
.quantityTypeobject
The quantity type.serviceobject
The service.unitCostnumber
The cost per unit.
Price object
{
"id": "6548c1965136b418fd626e83",
"currency": {
"code": "EUR",
"symbol": "€"
},
"matches": [
{
"percentage": 1,
"unitCost": 0.16,
"id": "655c61aa0ecf6202a9edb710",
"name": "0%"
},
{
"percentage": 1,
"unitCost": 0.08,
"id": "655c61a70ecf6202a9edb70e",
"name": "100%"
},
{
"percentage": 1,
"unitCost": 0.12,
"id": "655c61af0ecf6202a9edb712",
"name": "Fuzzies"
}
],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.16
}
List all prices
This endpoint allows you to retrieve all the prices.
Request
curl -G https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices \
-u {key}:
Response
[
{
"id": "6548c1965136b418fd626e83",
"currency": {
"code": "EUR",
"symbol": "€"
},
"matches": [
{
"percentage": 1,
"unitCost": 0.16,
"id": "655c61aa0ecf6202a9edb710",
"name": "0%"
},
{
"percentage": 1,
"unitCost": 0.08,
"id": "655c61a70ecf6202a9edb70e",
"name": "100%"
},
{
"percentage": 1,
"unitCost": 0.12,
"id": "655c61af0ecf6202a9edb712",
"name": "Fuzzies"
}
],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.16
},
{...},
{...}
]
Create a price
This endpoint allows you to add a new price.
Parameters
currencystring Required
The currency code (ISO, e.g., EUR).
domainstring
The domain of expertise id.
languagePairstring
The language pair id.
matchesTypestring Required
How the matches are calculated. Valid values are
fixed
orpercentage
.quantityTypestring Required
The quantity type id.
servicestring Required
The service id.
unitCostnumber Required
The cost per unit.
Request
curl https://api.lsp.expert/v2/clients/:id/prices \
-u {key}: \
-d currency="EUR" \
-d quantityType="6548c16d5136b418fd626e61" \
-d service="6548c16d5136b418fd626e5f"
-d languagePair="659bf8f35959fed584cd38e1"
-d unitCost=0.16
-d matchesType="fixed"
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"languagePair": {
"id": "659bf8f35959fed584cd38e1",
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"bidirectional": false
},
"matches": [],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.16,
}
Update a price
This endpoint allows you to perform an update on a price. Any parameters not provided will be left unchanged.
Parameters
matchesTypestring
How the matches are calculated. Valid values are
fixed
orpercentage
.unitCostnumber Required
The cost per unit.
Request
curl -X PUT https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d \
-u {key}: \
-d unitCost="0.18"
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"languagePair": {
"id": "659bf8f35959fed584cd38e1",
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"bidirectional": false
},
"matches": [],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.18,
}
Delete a price
This endpoint allows you to delete a price.
Request
curl -X DELETE https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d \
-u {key}:
Add a match for a price
This endpoint allows you to add a match category on a price.
Parameters
matchstring Required
The match id.
percentagenumber
The percentage of the price unit cost. (If matchesType is
percentage
)unitCostnumber
The cost per unit. (If matchesType is
fixed
)
Request
curl https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d/match \
-u {key}: \
-d match="655c61aa0ecf6202a9edb710" \
-d unitCost=0.16
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"languagePair": {
"id": "659bf8f35959fed584cd38e1",
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"bidirectional": false
},
"matches": [{
"id": "655c61aa0ecf6202a9edb710",
"name": "0%",
"percentage": 1,
"unitCost": 0.16
}],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.18
}
Update a match for a price
This endpoint allows you to add a match category on a price.
Parameters
percentagenumber
percentage
unitCostnumber
The cost per unit.
Request
curl https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d/match/655c61aa0ecf6202a9edb710 \
-u {key}: \
-d unitCost=0.18
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"languagePair": {
"id": "659bf8f35959fed584cd38e1",
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"bidirectional": false
},
"matches": [{
"id": "655c61aa0ecf6202a9edb710",
"name": "0%",
"percentage": 1,
"unitCost": 0.18
}],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.18
}
Move a match for a price
This endpoint allows you to modify a match category order. Note that this order is used when adding a price.
Request
curl https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d/matches/655c61aa0ecf6202a9edb710/move/1 \
-u {key}: \
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"languagePair": {
"id": "659bf8f35959fed584cd38e1",
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"bidirectional": false
},
"matches": [{
"id": "655c61aa0ecf6202a9edb710",
"name": "0%",
"percentage": 1,
"unitCost": 0.16
}],
"matchesType": "fixed",
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"unitCost": 0.18
}
Remove a match for a price
This endpoint allows you to remove a match category on a price.
Request
curl https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d/matches/655c61aa0ecf6202a9edb710 \
-u {key}:
Response
{
"id": "66e830a5a9d8b6741f4a4423",
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"languagePair": {
"source": {
"code": "en",
"name": "English"
},
"target": {
"code": "fr",
"name": "French"
},
"id": "659bf8f35959fed584cd38e1",
"bidirectional": false
},
"quantityType": {
"id": "6548c16d5136b418fd626e61",
"name": "Words"
},
"currency": {
"code": "EUR",
"symbol": "€"
},
"unitCost": 0.18,
"matchesType": "fixed",
"matches": []
}