Accept a sent quote
POST/api/v1/quotes/{id}/accept
Records that the customer said yes. When the quote asks for a deposit (deposit_cents), its deposit invoice is issued in the same request: an invoice of kind deposit for that amount, tax included, numbered like any invoice, dated and due today and carrying the quote's quote_id. Nobody is emailed; send it with sendInvoice. A quote is accepted once, so it has one deposit invoice.
- Needs an API key, and runs with the access of the member who made the key.
- Send an
Idempotency-Key. The same key with the same request within 24 hours gives the first answer again and changes nothing. - A connected AI assistant can use it too, as
acceptQuote.
Parameters
In the address
idstring (uuid)required
Headers
Idempotency-KeystringrequiredUnique user-scoped key for safely retrying this mutation for 24 hours.
At least 1 character. Up to 200 characters.
Request body
Sent as application/json.
lock_versionintegerAt least 0.
acceptanceobjectrequiredFields(2)
accepted_by_namestringrequiredAt least 1 character.
accepted_by_emailstring (email) or null
Responses
200Quote details.
dataobjectrequiredFields(31)
lock_versionintegerrequiredAt least 0.
created_atstring (date-time)requiredupdated_atstring (date-time)requiredidstring (uuid)requiredsource_visit_idstring (uuid) or nullAssessment which produced this quote; retained when archived or converted to a job.
account_idstring (uuid)requiredcustomer_idstring (uuid)requiredproperty_idstring (uuid) or nullnumberstringrequiredtitlestringrequireddescriptionstring or nullstatusstringrequiredOne of: draft, sent, accepted, declined.
expiredbooleanrequiredcurrencystringrequiredsubtotal_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
discount_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
tax_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
total_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
deposit_centsinteger (int64)The deposit asked for when the quote is accepted, tax included; 0 when none is. Accepting the quote issues an invoice of `kind` `deposit` for it, which carries this quote's `quote_id`.
At least 0.
valid_untilstring (date) or nullsent_atstring (date-time) or nullsent_to_emailstring (email) or nullWhere the quote was last emailed.
email_messagestringThe note the quote is emailed with unless the sender edits it, from the account's template. [Link] and any placeholder without a value yet are filled in on sending.
public_urlstring (uri) or nullThe customer's link. Null while the quote is a draft or archived.
accepted_atstring (date-time) or nullaccepted_by_namestring or nullaccepted_by_emailstring (email) or nulldeclined_atstring (date-time) or nulltermsstring or nullnotesstring or nullitemsarray of objectrequiredEach item(12)
idstring (uuid)requiredservice_idstring (uuid) or nullpositionintegerrequireddescriptionstringrequiredquantitystringrequiredMatches ^\d{1,9}(\.\d{1,3})?$.
unit_namestring or nullunit_price_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
tax_rate_basis_pointsintegerrequiredAt least 0. At most 10000.
tax_inclusivebooleanrequiredsubtotal_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
tax_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
total_centsinteger (int64)requiredInteger minor currency units, such as pence.
At least 0.
A refusal answers in the one error shape every operation shares.
Example
A request our own tests send. The ids are made up: put your own in their place.
curl -X POST "https://app.tradesender.co.uk/api/v1/quotes/7b5058e5-2d85-572f-8904-aff17cc66328/accept" \
-H "Authorization: Bearer $TRADESENDER_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"acceptance": {
"accepted_by_name": "Taylor Customer",
"accepted_by_email": "taylor@example.test"
}
}'