MobiariDocs
Admin APIQuotes

Create a quote

POST
/stores/{store_id}/quotes

Builds a cart at storefront prices (stock is checked and reserved like a shopper's add to cart), applies the negotiated discount and, when the seller picked one, re-quotes and applies the freight. Answers with the link to send the customer, who pays it through the normal checkout.

freight_applied is false when the seller's carrier was not offered on the re-quote (the customer then picks one on the link); freight_price_changed when it was, at a different price.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.

Lengthlength <= 255

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/quotes" \  -H "Content-Type: application/json" \  -d '{    "items": [      {        "quantity": 0,        "variant_id": "string"      }    ]  }'
{
  "cart_id": "b5b98de2-0f5f-4a68-b8c7-2aa7bb7683bb",
  "expires_at": "2019-08-24T14:15:22Z",
  "freight_applied": true,
  "freight_price_changed": true,
  "quote_url": "string",
  "share_token": "string",
  "shipping_cents": 0,
  "total_cents": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}