/sales/quotes/{id}/lines
This endpoint allows you to create a Quote Line for a specific Quote.
createQuoteLine
| Name | Type | Description |
|---|---|---|
id
required
|
string |
The Quote ID |
Content-Type: application/json
description
string
The description of the Quote Line. Required if the type is "SERVICE".
type
string
Type of the item in the Quote Line.
discount
integer
Discount applied to the item in the Quote Line.
material_id
integer
ID of the associated Material. Required if the type is "MATERIAL".
observations
string
Observation or notes of the Quote Line.
other_cost_id
integer
ID of the associated Other Cost. Required if the type is "OTHER_COST".
quantity
integer
Quantity of the item in the Quote Line.
received_quote_request_line_id
integer | null
received_quote_request_line_uuid
string | null
unit
string
Units of the item in the Quote Line.
unit_price
integer
Price per unit of the item in the Quote Line.
vat
integer
VAT applied to the item in the Quote Line.
data
object
Quote Line model structure details
id
string
required
read-only
ID of the Quote Line
type
string
required
read-only
Model type
quote_line
attributes
object
required
material_id
integer | null
ID of the associated Material, if the type is "MATERIAL".
description
string | null
The description of the Quote Line, if the type is "SERVICE".
type
string
Type of the item in the Quote Line.
MATERIAL
SERVICE
OTHER_COST
base_total
number
Total base price of the Quote Line.
discount
number
Discount applied to the item in the Quote Line.
discount_total
number
Total discount of the Quote Line.
observations
string | null
Observation or notes of the Quote Line.
other_cost_id
integer | null
ID of the associated Other Cost, if the type is "OTHER_COST".
quantity
number
Quantity of the item in the Quote Line.
quote_line_uuid
string
Uuid for Quote Line.
received_quote_request_line_id
integer | null
ID of the Received Quote Request Line.
received_quote_request_line_uuid
string | null
ID of the Received Quote Request Line.
total
number
Total price of the Quote Line.
unit
string | null
Units of the item in the Quote Line.
unit_price
number
Price per unit of the item in the Quote Line.
vat
number
VAT applied to the item in the Quote Line.
vat_total
number
Total VAT applied to the Quote Line.
status
string
error
error
object
properties
object
Only present when related to property validation error
dev_message
string
Example: Property validation error. Check the "properties" section in the response.
http_code
integer
400
message
string
Example: Property validation error.
more_info
string
status
string
error
error
object
http_code
integer
401
message
string
Example: Authentication token invalid.
more_info
string
status
string
error
error
object
http_code
integer
403
message
string
Example: Action unauthorized
more_info
string
status
string
error
error
object
http_code
integer
429
message
string
Example: Too Many Requests.
more_info
string
status
string
error
error
object
http_code
integer
500
message
string
Example: An error has occurred during the request.
more_info
string
curl -X POST \
'https://api.sandbox.infraspeak.com/v3/sales/quotes/{id}/lines' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_TOKEN' \
-d '{
"description": "",
"type": "",
"discount": 0,
"material_id": 0,
"observations": "",
"other_cost_id": 0,
"quantity": 0,
"received_quote_request_line_id": 0,
"received_quote_request_line_uuid": "",
"unit": "",
"unit_price": 0,
"vat": 0
}'
const response = await fetch('https://api.sandbox.infraspeak.com/v3/sales/quotes/{id}/lines', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
body: JSON.stringify({
"description": "",
"type": "",
"discount": 0,
"material_id": 0,
"observations": "",
"other_cost_id": 0,
"quantity": 0,
"received_quote_request_line_id": 0,
"received_quote_request_line_uuid": "",
"unit": "",
"unit_price": 0,
"vat": 0
}),
});
const data = await response.json();
$response = Http::withHeaders([
'Accept' => 'application/json',
'Content-Type' => 'application/json',
])->withToken('YOUR_API_TOKEN')
->post('https://api.sandbox.infraspeak.com/v3/sales/quotes/{id}/lines',
array (
'description' => '',
'type' => '',
'discount' => 0,
'material_id' => 0,
'observations' => '',
'other_cost_id' => 0,
'quantity' => 0,
'received_quote_request_line_id' => 0,
'received_quote_request_line_uuid' => '',
'unit' => '',
'unit_price' => 0,
'vat' => 0,
)
);
import requests
response = requests.post(
'https://api.sandbox.infraspeak.com/v3/sales/quotes/{id}/lines',
headers={
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
},
json={
{
"description": "",
"type": "",
"discount": 0,
"material_id": 0,
"observations": "",
"other_cost_id": 0,
"quantity": 0,
"received_quote_request_line_id": 0,
"received_quote_request_line_uuid": "",
"unit": "",
"unit_price": 0,
"vat": 0
}
},
)
data = response.json()