Quote
Quote CRUD, lifecycle, and conversion to invoices
Display a listing of quotes#
GET /api/v1/quotes
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
status |
query |
string |
no |
|
date_from |
query |
string |
no |
|
date_to |
query |
string |
no |
|
per_page |
query |
string |
no |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
Example request#
curl -X GET "https://app.encryptinvoice.com/api/v1/quotes" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Store a newly created quote#
POST /api/v1/quotes
Requires authentication (Bearer token) and the X-Organization-Id header.
Request body#
| Field |
Type |
Required |
Description |
customer_id |
integer |
yes |
|
issue_date |
string |
yes |
|
currency |
string |
yes |
|
notes |
string |
no |
|
terms |
string |
no |
|
valid_until |
string |
yes |
|
items |
array |
yes |
|
Responses#
| Status |
Description |
| 201 |
For non-paginated data, return as before |
| 422 |
|
| 403 |
|
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"customer_id": 1,
"issue_date": "string",
"currency": "string",
"notes": "string",
"terms": "string",
"valid_until": "string",
"items": []
}'
Display the specified quote#
GET /api/v1/quotes/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
Example request#
curl -X GET "https://app.encryptinvoice.com/api/v1/quotes/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Update the specified quote#
PUT /api/v1/quotes/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Request body#
| Field |
Type |
Required |
Description |
customer_id |
integer |
no |
|
issue_date |
string |
no |
|
currency |
string |
no |
|
notes |
string |
no |
|
terms |
string |
no |
|
valid_until |
string |
no |
|
items |
array |
no |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
| 409 |
#762 part 3: modifying a locked (sent/accepted) quote is a domain conflict, not a server error — surface 409, not 500. |
| 422 |
|
| 403 |
|
Example request#
curl -X PUT "https://app.encryptinvoice.com/api/v1/quotes/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"customer_id": 1,
"issue_date": "string",
"currency": "string",
"notes": "string",
"terms": "string",
"valid_until": "string",
"items": []
}'
Remove the specified quote#
DELETE /api/v1/quotes/{id}
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
Example request#
curl -X DELETE "https://app.encryptinvoice.com/api/v1/quotes/{id}" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Convert quote to invoice#
POST /api/v1/quotes/{id}/convert-to-invoice
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses#
| Status |
Description |
| 201 |
For non-paginated data, return as before |
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes/{id}/convert-to-invoice" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Duplicate a quote#
POST /api/v1/quotes/{id}/duplicate
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses#
| Status |
Description |
| 201 |
For non-paginated data, return as before |
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes/{id}/duplicate" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Mark quote as accepted#
POST /api/v1/quotes/{id}/mark-accepted
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Request body#
| Field |
Type |
Required |
Description |
accepted_at |
string |
no |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
| 422 |
|
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes/{id}/mark-accepted" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"accepted_at": "string"
}'
Mark quote as rejected#
POST /api/v1/quotes/{id}/mark-rejected
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Request body#
| Field |
Type |
Required |
Description |
rejected_at |
string |
no |
|
rejection_reason |
string |
no |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
| 422 |
|
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes/{id}/mark-rejected" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"rejected_at": "string",
"rejection_reason": "string"
}'
Download quote PDF#
GET /api/v1/quotes/{id}/pdf
Requires authentication (Bearer token) and the X-Organization-Id header.
Uses method injection for the PDF service (only this method needs it).
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Responses#
Example request#
curl -X GET "https://app.encryptinvoice.com/api/v1/quotes/{id}/pdf" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json"
Send quote via email#
POST /api/v1/quotes/{id}/send
Requires authentication (Bearer token) and the X-Organization-Id header.
Parameters#
| Name |
In |
Type |
Required |
Description |
id |
path |
integer |
yes |
|
Request body#
| Field |
Type |
Required |
Description |
recipients |
string |
no |
|
message |
string |
no |
|
attach_pdf |
string |
no |
|
Responses#
| Status |
Description |
| 200 |
For non-paginated data, return as before |
Example request#
curl -X POST "https://app.encryptinvoice.com/api/v1/quotes/{id}/send" \
-H "Authorization: Bearer {{access_token}}" \
-H "X-Organization-Id: {{organization_id}}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"recipients": "string",
"message": "string",
"attach_pdf": "string"
}'