Create a sales quote
POST/api/service/sales-quotes
Creates a quote for a customer. Needs a read-write API key. Send the lines, the discount, tax and shipping settings, and the document totals (subtotal, discountAmount, taxAmount, totalAmount) as your system computed them. The quote is created in the status you give, DRAFT by default, and the response is the stored quote. Send an Idempotency-Key so a retry never creates a second quote. Creating a quote counts against the workspace plan's monthly quote limit.
Request
Responses
- 201
- 400
- 401
- 402
- 403
- 409
- 429
The quote that was created.
Response Headers
Requests per minute this API key is allowed.
Requests left in the current one-minute window.
Seconds until the current window ends and the count resets.
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The request is invalid: a field failed validation, an id is malformed, or the request is not allowed in the current state. message says which.
Response Headers
Requests per minute this API key is allowed.
Requests left in the current one-minute window.
Seconds until the current window ends and the count resets.
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The API key is missing, malformed, revoked or expired, the user who created the key is no longer active, the request comes from an address the key does not allow, or the key is read-only and the route writes. The rate-limit headers are not sent.
Response Headers
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The workspace has reached a limit of its plan, so the document was not created. requiredPlan names the plan that lifts the limit when one does.
Response Headers
Requests per minute this API key is allowed.
Requests left in the current one-minute window.
Seconds until the current window ends and the count resets.
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The key is valid but not allowed to do this: the workspace's plan does not include API access, or the user who created the key lacks the permission this route needs. The rate-limit headers are not sent when the plan is the reason.
Response Headers
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The Idempotency-Key cannot be used for this request. code says why: IDEMPOTENCY_KEY_CONFLICT — the key was already used with a different request body (send the original body again, or use a new key for a new request); IDEMPOTENCY_IN_PROGRESS — the first request with this key is still running (retry the same request shortly); IDEMPOTENCY_OUTCOME_UNKNOWN — the earlier attempt may have created the document (look for it before trying again; a new key does not resolve this).
Response Headers
Requests per minute this API key is allowed.
Requests left in the current one-minute window.
Seconds until the current window ends and the count resets.
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
The API key exceeded its requests-per-minute limit; wait Retry-After seconds. A 429 can also come from the separate per-address limit (600 requests a minute), which sends X-RateLimit-* headers instead of the X-ApiKey-RateLimit-* ones.
Response Headers
Requests per minute this API key is allowed.
Requests left in the current one-minute window.
Seconds until the current window ends and the count resets.
Identifier of this request. Send your own x-request-id to have it echoed back; otherwise one is generated. Quote it when contacting support.
Seconds to wait before retrying.