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 or percentage.

  • 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
}

GET/v2/clients/:id/prices

List all prices

This endpoint allows you to retrieve all the prices.

Request

GET
/v2/clients/:id/prices
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
  },
  {...},
  {...}
]


POST/v2/clients/:id/prices

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 or percentage.

  • quantityTypestring Required

    The quantity type id.

  • servicestring Required

    The service id.

  • unitCostnumber Required

    The cost per unit.

Request

POST
/v2/clients/6548c72a13162e1d7ade0290/prices
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,
}

PUT/v2/clients/:id/prices/:priceId

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 or percentage.

  • unitCostnumber Required

    The cost per unit.

Request

PUT
/v2/clients/:id/prices/:priceId
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/v2/clients/:id/prices/:priceId

Delete a price

This endpoint allows you to delete a price.

Request

DELETE
/v2/clients/:id/prices/:priceId
curl -X DELETE https://api.lsp.expert/v2/clients/6548c72a13162e1d7ade0290/prices/66e7f69da9d8b6741f4a441d \
  -u {key}:

POST/v2/clients/:id/prices/:priceId/matches

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

POST
/v2/clients/:id/prices/:priceId/matches
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
}


PUT/v2/clients/:id/prices/:priceId/matches/:matchId

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

PUT
/v2/clients/:id/prices/:priceId/matches/:matchId
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
}

PUT/v2/clients/:id/prices/:priceId/matches/:matchId/move/:newPosition

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

PUT
/v2/clients/:id/prices/:priceId/matches/:matchId/move/:newPosition
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
}


DEL/v2/clients/:id/prices/:priceId/matches/:matchId

Remove a match for a price

This endpoint allows you to remove a match category on a price.

Request

POST
/v2/clients/:id/prices/:priceId/matches/:matchId
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": []  
}