Services
Services represent services and services associated with a supplier. They can be used to find a supplier for a specific job or to calculate the cost of a project for a supplier.
The Service object
Properties
idstring
Unique identifier for the object.
clientobject
The client (if the service is only applicable for a specific client).currencyobject
The currency.domainobject
The domain of expertise.hasPriceboolean
True if the service has a price.
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.
Service object
{
"id": "6548c1965136b418fd626e83",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 services
This endpoint allows you to retrieve all the services.
Request
curl -G https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services \
-u {key}:
Response
[
{
"id": "6548c1965136b418fd626e83",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to add a new service.
Parameters
clientstring
The client id.
currencystring Required
The currency code (ISO, e.g., EUR).
domainstring
The domain of expertise id.
hasPriceboolean
True if the service has a price.
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/suppliers/:id/services \
-u {key}: \
-d currency="EUR" \
-d hasPrice=true \
-d quantityType="6548c16d5136b418fd626e61" \
-d service="6548c16d5136b418fd626e5f"
-d languagePair="659bf8f35959fed584cd38e1"
-d unitCost=0.16
-d matchesType="fixed"
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to perform an update on a service. Any parameters not provided will be left unchanged.
Parameters
hasPriceboolean
True if the service has a price.
matchesTypestring
How the matches are calculated. Valid values are
fixed
orpercentage
.unitCostnumber
The cost per unit.
Request
curl -X PUT https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d \
-u {key}: \
-d unitCost="0.18"
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to delete a service.
Request
curl -X DELETE https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d \
-u {key}:
Add a match for a service
This endpoint allows you to add a match category on a service.
Parameters
matchstring Required
The match id.
percentagenumber
The percentage of the service unit cost. (If matchesType is
percentage
)unitCostnumber
The cost per unit. (If matchesType is
fixed
)
Request
curl https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d/match \
-u {key}: \
-d match="655c61aa0ecf6202a9edb710" \
-d unitCost=0.16
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to add a match category on a service.
Parameters
percentagenumber
percentage
unitCostnumber
The cost per unit.
Request
curl https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d/match/655c61aa0ecf6202a9edb710 \
-u {key}: \
-d unitCost=0.18
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to modify a match category order. Note that this order is used when adding a service.
Request
curl https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d/matches/655c61aa0ecf6202a9edb710/move/1 \
-u {key}: \
Response
{
"id": "66e7f69da9d8b6741f4a441d",
"currency": {
"code": "EUR",
"symbol": "€"
},
"hasPrice": true,
"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 service
This endpoint allows you to remove a match category on a service.
Request
curl https://api.lsp.expert/v2/suppliers/6548c72a13162e1d7ade0290/services/66e7f69da9d8b6741f4a441d/matches/655c61aa0ecf6202a9edb710 \
-u {key}:
Response
{
"id": "66e830a5a9d8b6741f4a4423",
"service": {
"id": "6548c16d5136b418fd626e5f",
"name": "Translation"
},
"hasPrice": true,
"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": []
}