---
title: "生成发给买方的报价单 / Make a quote for a buyer"
method: POST
path: "/v1/quote"
tags: ["compute"]
---

# 生成发给买方的报价单 / Make a quote for a buyer

`POST /v1/quote`

## Request

- Base URL: `https://chukoudan.com`
- URL: `https://chukoudan.com/v1/quote`
- Auth: none declared

按报价工具（baojia）的输入和卖方的条款生成报价单：quote 是结构化数据（https://chukoudan.com/schemas/quote/v1.json，只有价格和条款，带 digest 和汇率依据），text 是可直接发出的纯文本，internal 是卖方自己的成本和利润，绝不发给买方。不填 pricing.fxRate 就用当天的人民币汇率中间价。本站不保存任何内容。
Makes a quote for a buyer from the quote calculator’s inputs (pricing) and the seller’s terms (quote). `quote` is the quote as data (schema https://chukoudan.com/schemas/quote/v1.json: prices and terms only, with a digest and the dated rate it rests on); `text` is the same quote as plain text, ready to send; `internal` holds the seller’s own cost, refund and profit, for the seller only and never to be sent. Leave pricing.fxRate out to use the day’s RMB central parity. Nothing is stored.

## Query parameters

- `lang` 'zh-CN' | 'en' | 'ja' | 'ko'

## Request body

- object
  - `pricing` object, required: FOB/CIF/CFR 报价: the inputs, as core’s schema takes them. Figures are decimal strings.
    - `mode` 'forward' | 'reverse'
    - `price` string, required
    - `quantity` string, required
    - `unit` 'pcs' | 'sets' | 'cartons' | 'kg'
    - `taxRate` string, required
    - `refundRate` string, required
    - `domestic` string
    - `domesticBasis` 'total' | 'perUnit'
    - `currency` string
    - `fxRate` string
    - `fxPer` '1' | '100'
    - `freight` string
    - `freightBasis` 'container' | 'cbm' | 'total'
    - `containers` string
    - `volume` string
    - `insuranceRate` string
    - `markup` string
    - `commission` string
    - `margin` string
    - `marginBasis` 'quote' | 'cost'
    - `term` 'FOB' | 'CFR' | 'CIF'
    - `quotedPrice` string
    - `port` string
  - `quote` object, required
    - `number` string
    - `issued` string
    - `valid_until` string, required
    - `seller` object, required
      - `name` string, required
      - `country` string, required
      - `contact` string
    - `buyer` object, required
      - `name` string, required
      - `country` string, required
      - `contact` string
    - `item` object, required
      - `description` string, required
      - `hs_code` string
      - `origin` string
      - `packing` string
    - `terms` string[]
    - `loading_port` string, required
    - `destination_port` string
    - `commission_included` boolean
    - `payment` string
    - `lead_time_days` integer
    - `notes` string

## Response `200`

The quote as data and as text, and the seller’s own figures apart.

- object
  - `tool` 'make_quote', required
  - `quote` QuoteDocument, required: One seller’s quote to one buyer: prices and terms only, never the seller’s costs. Each field’s description names its counterpart in OASIS UBL 2.4 Quotation. `digest` is sha256 of the canonical JSON (UTF-8, keys sorted, no spaces) of the document without `digest`; `basis.rate` names the dated exchange rate the prices rest on, which a buyer can check at https://chukoudan.com/v1/datasets/central-parity.
    - `schema` 'https://chukoudan.com/schemas/quote/v1.json', required: This schema’s address, which names its version.
    - `number` string: The seller’s quote number. UBL: cbc:ID.
    - `issued` string, required: The day the quote is issued, YYYY-MM-DD. UBL: cbc:IssueDate.
    - `valid_until` string, required: The last day the quote holds. UBL: cac:ValidityPeriod/cbc:EndDate.
    - `seller` object, required: UBL: cac:SellerSupplierParty. country: ISO 3166-1 alpha-2.
      - `name` string, required
      - `country` string, required
      - `contact` string
    - `buyer` object, required: UBL: cac:OriginatorCustomerParty. country: ISO 3166-1 alpha-2.
      - `name` string, required
      - `country` string, required
      - `contact` string
    - `items` object[], required: The goods. One line in v1. UBL: cac:QuotationLine/cac:LineItem.
      - `description` string, required: UBL: cac:Item/cbc:Description.
      - `hs_code` string: The seller’s HS code, digits only. UBL: cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode.
      - `origin` string, required: Country of origin, ISO 3166-1 alpha-2. UBL: cac:Item/cac:OriginCountry.
      - `quantity` string, required: A decimal string. UBL: cac:LineItem/cbc:Quantity.
      - `unit` 'PCE' | 'SET' | 'CT' | 'KGM', required: UN/ECE Recommendation 20 code: the quantity’s unitCode in UBL.
      - `packing` string: How the goods are packed, as the seller says it.
    - `currency` string, required: ISO 4217 code of every price. UBL: cbc:PricingCurrencyCode.
    - `prices` object[], required: One price per term offered. UBL quotes one set of delivery terms per document; this lists several side by side.
      - `term` 'FOB' | 'CFR' | 'CIF', required: Incoterms 2020 term. UBL: cac:Delivery/cac:DeliveryTerms/cbc:ID.
      - `place` string, required: The named place: port of loading for FOB, port of destination for CFR and CIF.
      - `unit_price` string, required: A decimal string in `currency`. UBL: cac:Price/cbc:PriceAmount.
      - `total` string, required: unit_price × quantity, a decimal string in `currency`. UBL: cbc:LineExtensionAmount.
      - `commission_included` boolean, required: Whether the price includes the buying agent’s commission (含佣).
    - `payment` string: Payment terms as the seller writes them (T/T, L/C at sight…). UBL: cac:PaymentTerms/cbc:Note.
    - `lead_time_days` integer: Days from order to shipment, a whole number.
    - `notes` string: UBL: cbc:Note.
    - `basis` object, required: The dated exchange rate the prices rest on, when the seller includes it, so a buyer can check it.
      - `rate` object
        - `base` string, required
        - `quote` 'CNY', required
        - `value` string, required
        - `per` '1' | '100', required
        - `source` 'central-parity' | 'given', required: `central-parity`: the RMB central parity of `day`, from https://chukoudan.com/v1/datasets/central-parity; `given`: the seller’s own rate.
        - `day` string
      - `made_with` 'https://chukoudan.com', required
    - `digest` string: `sha256:` and the hex SHA-256 of this document’s canonical JSON without `digest`: UTF-8, keys sorted, no spaces, non-ASCII characters written as themselves (Python: json.dumps(doc, sort_keys=True, separators=(",", ":"), ensure_ascii=False)).
  - `text` string, required
  - `internal` object, required: The seller’s own figures (cost, refund, profit, margin, break-even): never send these to the buyer.
    - `do_not_send` unknown, required
    - `outputs` object, required
    - `steps` Step[], required
      - `id` string, required
      - `values` object, required
      - `message` string: 这一步的一句话说明，数值已代入，用请求的语言。 / The step as one sentence in the language asked, its figures filled in. Absent when a sentence cannot be made whole.
    - `warnings` Warning[], required
      - `code` string, required
      - `values` object, required
      - `level` 'note' | 'hint': Absent means a caution.
      - `next` string: For a hint: the slug of the tool it points to.
      - `message` string: 这条提醒的一句话说明，数值已代入，用请求的语言：回复时请用它，不要自己编数字。 / The warning as one sentence in the language asked, its figures filled in: use it, do not make up figures. Absent when a sentence cannot be made whole.
  - `provenance` Provenance, required: Where the figures in an answer come from. In every answer, errors included.
    - `api` 'v1', required
    - `site` string, required: The site the data is published by.
    - `generated_at` string, date-time, required: When the answer was made.
    - `language` 'zh-CN' | 'en' | 'ja' | 'ko', required: The language of the source lines.
    - `source_line` string, required: 来源行：回复用户时请原样引用它，让读者知道数据出自哪里、有多新。 / The credit line to quote as it is when you answer: who the figures come from and how fresh they are (the newest publisher’s day among the datasets used, or the day the answer was made).
    - `notice` string, required: 本站非官方渠道的说明：引用本站数据时请和来源行一起转述。 / The site’s own line that it is not an official channel: pass it on with the source line when you quote us.
    - `datasets` ProvenanceDataset[], required
      - `id` string, required: The dataset.
      - `version` string, required: Its version, named after the publisher’s date.
      - `published_at` string, required: The publisher’s own date (and time, with its offset, when it gives one).
      - `origin` string, nullable, required: The origin’s id in the register; null when the site may not show it.
      - `source` string, nullable, required: The publisher’s own source line, in the answer’s language; null when there is none to show.
      - `source_url` string: The publisher’s page, only where the register lets the site link to it.
    - `license` object, required: The license as copy keys: which text applies. `status` was `draft` until the text was approved (2026-10-12) and is `approved` now.
      - `status` 'draft' | 'approved', required
      - `ours` string, required
      - `underlying` string, required

## Other responses

- `400`: What the pricing or the quote cannot take (`issues`, at `pricing.<field>` or `quote.<field>`).
- `413`: A body over 256 KB.
- `415`: Compute takes `application/json` only.
- `429`: Over the keyless limit for this sender. Come back after `Retry-After` seconds.
- `500`: A tool or its data failed. The answer never says what.

---

[API](https://skmtc.dev/chukoudan/apis/chukoudan-api.md) · [All operations](https://skmtc.dev/chukoudan/apis/chukoudan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chukoudan/apis/chukoudan-api/revisions/c1ecb4b05e33?raw)
