Accept or decline a quote
const url = 'https://api.sevigram.com/storefront/v1/customer/documents/example/response';const options = { method: 'POST', headers: { 'X-Sevigram-Customer-Session': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"action":"accept","note":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.sevigram.com/storefront/v1/customer/documents/example/response \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Sevigram-Customer-Session: example' \ --data '{ "action": "accept", "note": "example" }'Refused with demo_shop_read_only on a read-only demo shop. note is at most 2000 characters. A quote that can no longer be answered (already accepted or declined, expired or withdrawn) is 409 quote_not_respondable: reload the document and show its current status.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Header Parameters
Section titled “Header Parameters”The customer session token from verifyCustomerCode (1 to 512 printable ASCII characters). A credential: never logged or echoed.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”OK
object
object
object
Example
{ "data": { "type": "quote" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Invalid request. Codes validation_error, invalid_cursor, invalid_buyer_ip.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "validation_error" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Code invalid_token, customer_session_invalid (missing, malformed, expired or another business’s session) or customer_code_invalid (wrong or expired sign-in code on verify).
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "invalid_token" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Codes origin_not_allowed, storefront_disabled, demo_shop_read_only, private_token_required.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "origin_not_allowed" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Unknown handle, session or order, or one that belongs to another business or the wrong type; also a wrong or missing guest token on GET /orders/{id}. Code not_found.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "not_found" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
The quote can no longer be answered. Code quote_not_respondable.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "quote_not_respondable" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Too many requests. Code rate_limited.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "rate_limited" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Whole seconds to wait, rounded up.
An upstream is unavailable. Code service_unavailable.
object
object
Optional structured detail (for example per-field validation messages). Omitted when there is none.
Example
{ "error": { "code": "service_unavailable" }}Headers
Section titled “Headers”Request correlation id, echoed or generated.
Never cached.
Always 5.