Skip navigation
REST › orders.quote

orders.quote

POST/orders/quote

Quotes one item with a discount code for the key's account without creating an order: list price, discount and amount to pay. Needs a key from an account with a verified email.

Parameters

ParameterInDescription
skubodyRequired. Item to buy, taken from prices.list: plan-1m, plan-3m, plan-12m for a prepaid plan, or a retail guide's slug.
discountCodebodyRequired. Discount code to check, up to 32 characters.

Request

curl
curl -X POST "https://api.modernengineer.dev/orders/quote" \
  -H "Authorization: Bearer $SE_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sku":"plan-3m","discountCode":"WELCOME10"}'

Response

200 OK · application/json
{
  "sku": "plan-3m",
  "listAmountVnd": 269000,
  "amountVnd": 242100,
  "discountVnd": 26900,
  "discountCode": "WELCOME10"
}

Errors

StatusErrorWhen
401unauthenticatedThe API key is missing or invalid. Comes with a WWW-Authenticate header.
403forbiddenThe account's email is not verified yet.
400invalid_inputA parameter is missing or invalid, for example a locale other than vi or en.
404not_foundNo item on sale has this sku.
409conflictYou already bought this retail guide.
422unprocessableThe discount code does not apply. details.reason says why: unknown, inactive, not_started, expired, wrong_item, already_used or exhausted.
429too_many_requestsMore than 30 quotes in an hour for this account.

In MCP