콘텐츠로 이동
7일 무료 체험
한국어
Claude에서 열기 이 페이지에 대해 질문하기ChatGPT에서 열기 이 페이지에 대해 질문하기

Quote form

Read the fields of your quote form and the key of each field, so you can create quotes through the API.

이 콘텐츠는 아직 번역되지 않았습니다.

GET /form returns the fields of your quote form. You need it before creating a quote through the API, because POST /quotes identifies each answer by the field’s key.

Permission: form:read (shown as Quote form — View).

Terminal window
curl https://quote.samita.io/api/public/v1/form \
-H "X-SAMITA-API-KEY: sqt_your_key_here"

The example below is illustrative. Your sections, field keys and labels come from your own form.

{
"form": {
"sections": [
{
"key": "contact_info",
"title": "Contact information",
"fields": [
{ "key": "contact_info[first_name]", "label": "First name", "type": "text", "required": true },
{ "key": "contact_info[email]", "label": "Email address", "type": "text", "required": true },
{ "key": "contact_info[phone]", "label": "Phone number", "type": "phone", "required": true }
]
},
{
"key": "company_info",
"title": "Company information",
"fields": [
{ "key": "company_info[name]", "label": "Company name", "type": "text", "required": true }
]
},
{
"key": "payment_terms",
"title": "Payment terms",
"fields": [
{
"key": "payment_terms[type]",
"label": "Payment terms",
"type": "select",
"required": false,
"options": [
{ "label": "Net 30", "value": "net30" },
{ "label": "Net 60", "value": "net60" }
]
}
]
}
]
}
}

A field key can contain square brackets, such as contact_info[email]. Use it exactly as shown, as the name of a property in the fields object.

FieldMeaning
sections[].key, titleThe section as set up in the form builder.
fields[].keyThe identifier to use in fields when you create a quote.
labelThe text customers see.
typeThe field type, such as text, email, select, textarea or file.
requiredtrue if the form requires an answer. A required field must be sent when you create a quote.
optionsFor choice fields, the allowed values, each with its label.

Only fields customers fill in are listed. Headings, paragraphs, dividers, HTML blocks and hidden fields are left out.

  • Quotes — create a quote using these keys

도움이 되었나요?