curl --request PUT \
--url https://app.blinksale.test/api/v1/estimates/{estimateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "01jtbf0c9zaraqx3swthf88n5y",
"currency": "USD",
"tax_distribution": "PER_DOCUMENT",
"discount_distribution": "NO_DISCOUNT",
"line_items": [
{
"name": "Consulting Services",
"quantity": 10,
"price": 150,
"id": "01jtbf0c9zaraqx3swthf88n5y",
"description": "Professional consulting services",
"unit_of_measurement_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"discount_type": "PERCENTAGE",
"discount_value": 0
}
],
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"discount_type": "PERCENTAGE",
"discount_value": 10,
"shipping": 0,
"notes": "Please review at your earliest convenience",
"options": {}
}
'{
"success": true,
"message": "Estimate updated successfully",
"data": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"organization_id": "01jtbf0c9zaraqx3swthf88n5y",
"client_id": "01jtbf0c9zaraqx3swthf88n5y",
"estimate_number": "EST-00001",
"prefix": "EST-",
"number": 1,
"currency": "USD",
"currency_name": "US Dollar",
"currency_symbol": "$",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"tax_distribution": "PER_DOCUMENT",
"tax_distribution_name": "Per Document",
"discount_type": "PERCENTAGE",
"discount_type_name": "Percentage",
"discount_value": 10,
"discount_distribution": "PER_DOCUMENT",
"discount_distribution_name": "Per Document",
"shipping": 15,
"total": 1642.5,
"notes": "Please review and approve at your earliest convenience.",
"options": {},
"status": "DRAFT",
"status_name": "Draft",
"is_editable": true,
"client": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Acme Inc",
"email": "[email protected]",
"kind": "BUSINESS",
"kind_name": "Business",
"profile": {
"company_name": "Acme Inc",
"website": "https://acme.com"
},
"address": {
"line1": "123 Main St",
"line2": "Suite 101",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "US"
},
"document_defaults": {
"currency": "USD"
},
"contact_count": 3,
"note_count": 2,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"organization": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Acme Inc",
"stripe_id": "<string>",
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ACTIVE",
"plan": "FREE",
"trial_ends_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"profile": {},
"role": "OWNER",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"line_items": [
{
"id": "01jtbf0c9zaraqx3swthf88n5y",
"organization_id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Consulting Services",
"description": "Professional consulting services",
"quantity": 10,
"price": 150,
"unit_of_measurement_id": "01jtbf0c9zaraqx3swthf88n5y",
"unit_name": "Hour",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"discount_type": "PERCENTAGE",
"discount_value": 10,
"subtotal": 1500,
"tax_amount": 127.5,
"total": 1627.5
}
],
"subtotal": 1500,
"document_discount": 0,
"tax_amount": 127.5,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"declined_at": "2023-11-07T05:31:56Z",
"converted_at": "2023-11-07T05:31:56Z"
}
}Update an existing estimate
curl --request PUT \
--url https://app.blinksale.test/api/v1/estimates/{estimateId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "01jtbf0c9zaraqx3swthf88n5y",
"currency": "USD",
"tax_distribution": "PER_DOCUMENT",
"discount_distribution": "NO_DISCOUNT",
"line_items": [
{
"name": "Consulting Services",
"quantity": 10,
"price": 150,
"id": "01jtbf0c9zaraqx3swthf88n5y",
"description": "Professional consulting services",
"unit_of_measurement_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"discount_type": "PERCENTAGE",
"discount_value": 0
}
],
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"discount_type": "PERCENTAGE",
"discount_value": 10,
"shipping": 0,
"notes": "Please review at your earliest convenience",
"options": {}
}
'{
"success": true,
"message": "Estimate updated successfully",
"data": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"organization_id": "01jtbf0c9zaraqx3swthf88n5y",
"client_id": "01jtbf0c9zaraqx3swthf88n5y",
"estimate_number": "EST-00001",
"prefix": "EST-",
"number": 1,
"currency": "USD",
"currency_name": "US Dollar",
"currency_symbol": "$",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"tax_distribution": "PER_DOCUMENT",
"tax_distribution_name": "Per Document",
"discount_type": "PERCENTAGE",
"discount_type_name": "Percentage",
"discount_value": 10,
"discount_distribution": "PER_DOCUMENT",
"discount_distribution_name": "Per Document",
"shipping": 15,
"total": 1642.5,
"notes": "Please review and approve at your earliest convenience.",
"options": {},
"status": "DRAFT",
"status_name": "Draft",
"is_editable": true,
"client": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Acme Inc",
"email": "[email protected]",
"kind": "BUSINESS",
"kind_name": "Business",
"profile": {
"company_name": "Acme Inc",
"website": "https://acme.com"
},
"address": {
"line1": "123 Main St",
"line2": "Suite 101",
"city": "San Francisco",
"state": "CA",
"zip": "94107",
"country": "US"
},
"document_defaults": {
"currency": "USD"
},
"contact_count": 3,
"note_count": 2,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"organization": {
"id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Acme Inc",
"stripe_id": "<string>",
"subscription": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ACTIVE",
"plan": "FREE",
"trial_ends_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"profile": {},
"role": "OWNER",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"line_items": [
{
"id": "01jtbf0c9zaraqx3swthf88n5y",
"organization_id": "01jtbf0c9zaraqx3swthf88n5y",
"name": "Consulting Services",
"description": "Professional consulting services",
"quantity": 10,
"price": 150,
"unit_of_measurement_id": "01jtbf0c9zaraqx3swthf88n5y",
"unit_name": "Hour",
"tax_id": "01jtbf0c9zaraqx3swthf88n5y",
"tax_name": "Sales Tax",
"tax_percent": 8.5,
"discount_type": "PERCENTAGE",
"discount_value": 10,
"subtotal": 1500,
"tax_amount": 127.5,
"total": 1627.5
}
],
"subtotal": 1500,
"document_discount": 0,
"tax_amount": 127.5,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"approved_at": "2023-11-07T05:31:56Z",
"declined_at": "2023-11-07T05:31:56Z",
"converted_at": "2023-11-07T05:31:56Z"
}
}Access token obtained from the /v1/auth/login endpoint
The ID of the estimate to update
"01jtbf0c9zaraqx3swthf88n5y"
"USD"
"PER_DOCUMENT"
"NO_DISCOUNT"
Show child attributes
"01jtbf0c9zaraqx3swthf88n5y"
"PERCENTAGE"
10
0
"Please review at your earliest convenience"