跳转到内容
免费试用 7 天
简体中文
在 Claude 中打开 就此页面提问在 ChatGPT 中打开 就此页面提问

Requests and responses

The request format, response shapes, paging, status values and the per-minute limits that apply to every endpoint.

此内容尚不支持你的语言。

  • Base URL: https://quote.samita.io/api/public/v1
  • Protocol: HTTPS only.
  • Authentication: an API key in the X-SAMITA-API-KEY header. See Authentication.
  • Body: send JSON with Content-Type: application/json, and ask for JSON with Accept: application/json.
  • IDs in URLs: the quote id (a number), not the quote number.

Every response is JSON.

  • A single record is wrapped in its name, such as {"quote": { ... }}.
  • A list comes with a page object.
  • An error is always {"errors": [ ... ]}. See Errors.
ValueFormat
TimesISO 8601 in UTC, such as 2026-11-18T07:21:10Z.
MoneyA decimal string such as "98.00", with the quote's currency alongside. A missing price is null.
IDs from ShopifyStrings of digits, such as "40512345678901".
Empty valuesnull, or an empty list.

A quote’s status is a word:

StatusCan you set it?Meaning
unreadYesNew, not opened yet.
readYesOpened by your team.
purchasedYesThe customer bought.
fulfilledYesThe order was fulfilled.
rejectedYesDeclined.
convertingNoA draft order is being created.
draft_order_createdNoA draft order exists for it.

The last two are set by the app when you convert a quote to a draft order, so the API only reads them.

GET /quotes pages with a cursor:

  1. Call GET /quotes?limit=50. The default is 50 and the maximum 100.
  2. Read page.has_next. If true, call again with cursor set to page.next_cursor.
  3. Stop when has_next is false.
"page": { "has_next": true, "next_cursor": "29238180" }

Quotes come newest first. Cursors stay correct when quotes are added while you page. Only quotes that were actually submitted are listed — an unsent quote basket is not.

Requests are limited per minute, per store, in groups:

GroupLimit per minuteEndpoints
Read120/ping, /form, GET /quotes/{id}
List60GET /quotes
Write60PATCH, DELETE and bulk_delete
Create20POST /quotes
Delete volume200 quotesQuotes removed by DELETE and bulk_delete combined

The limit counts the store’s requests across all of its keys, so a second key does not give you more room.

When you go over, the API answers 429 rate_limited with a Retry-After header holding the seconds to wait:

{ "errors": [ { "code": "rate_limited", "message": "Too many requests. Retry after 23 seconds." } ] }

Wait that long, then retry. For a large sync, page with limit=100, spread the calls out, and back off when you see 429.

  • Store the highest updated_at you have seen and ask only for newer quotes with updated_at_min.
  • Filter by status to fetch only what you need.
  • Read GET /quotes/{id} only for quotes that changed.
  • Quotes — the endpoints in detail
  • Errors — every error and what to do

这对您有帮助吗?