لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/quotes.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Quotes

CRM quote management: create, retrieve, update, delete, line items.

Bitrix24 API: crm.item.* Scope: crm

Create a quote

POST /v1/quotes

Creates a new quote in CRM.

Request fields (body)

Parameter Type Required Description
Parametertitle Typestring Requiredno DescriptionQuote name. If omitted, Bitrix24 assigns a name containing the quote number
Parameteropportunity Typenumber Requiredno DescriptionAmount. To prevent the amount from being recalculated from line items, pass it together with isManualOpportunity: true. The camelCase name amount is also accepted
ParameterisManualOpportunity Typeboolean Requiredno Descriptiontrue — manual amount mode (required if you set opportunity/amount directly). Accepts a boolean or the string "Y"
ParametercurrencyId Typestring Requiredno DescriptionCurrency. List: GET /v1/currencies
ParameterstageId Typestring Requiredno DescriptionStatus: DRAFT, SENT, APPROVED. List: GET /v1/statuses?filter[entityId]=QUOTE_STATUS
ParameterdealId Typenumber Requiredno DescriptionDeal ID. Lookup: GET /v1/deals
ParametercontactId Typenumber Requiredno DescriptionContact ID. Lookup: GET /v1/contacts
ParametercompanyId Typenumber Requiredno DescriptionCompany ID. Lookup: GET /v1/companies
ParameterassignedById Typenumber Requiredno DescriptionAssignee ID. Employee list: GET /v1/users
Parametercomments Typestring Requiredno DescriptionComment
Parameterbegindate Typedatetime Requiredno DescriptionStart date
Parameterclosedate Typedatetime Requiredno DescriptionClose date

No field is required, but the body must contain at least one field.

Field names. In responses, fields are returned in camelCase: amount, currency, beginDate, closeDate. On write, both forms are accepted: these camelCase names and the Bitrix24-native opportunity / currencyId / begindate / closedate. The API layer maps them to the names Bitrix24 expects.

Full list of fields: GET /v1/quotes/fields. User fields (ufCrm_*) are also accepted.

Examples

curl — personal key

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/quotes \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Quote for server hardware",
    "opportunity": 1500,
    "isManualOpportunity": true,
    "currencyId": "USD",
    "stageId": "DRAFT",
    "dealId": 741,
    "assignedById": 1
  }'

curl — OAuth application

Terminal
curl -X POST https://vibecode.bitrix24.com/v1/quotes \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Quote for server hardware",
    "opportunity": 1500,
    "isManualOpportunity": true,
    "currencyId": "USD",
    "stageId": "DRAFT",
    "dealId": 741,
    "assignedById": 1
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/quotes', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Quote for server hardware',
    opportunity: 1500,
    isManualOpportunity: true,
    currencyId: 'USD',
    stageId: 'DRAFT',
    dealId: 741,
    assignedById: 1,
  }),
})

const { success, data } = await res.json()
console.log('Quote ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/quotes', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Quote for server hardware',
    opportunity: 1500,
    isManualOpportunity: true,
    currencyId: 'USD',
    stageId: 'DRAFT',
    dealId: 741,
    assignedById: 1,
  }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue when the quote is created
Fielddata Typeobject DescriptionThe created quote. The main fields are listed in the rows below; all fields — Quote fields
Fielddata.id Typenumber DescriptionID of the created quote
Fielddata.title Typestring DescriptionName
Fielddata.amount Typenumber DescriptionAmount
Fielddata.currency Typestring DescriptionCurrency
Fielddata.stageId Typestring DescriptionStatus
Fielddata.dealId Typenumber DescriptionDeal ID
Fielddata.assignedById Typenumber DescriptionAssignee
Fielddata.createdBy Typenumber DescriptionCreator
Fielddata.createdTime Typedatetime DescriptionCreation date
Fielddata.updatedTime Typedatetime DescriptionModification date

The response contains all quote fields, including user fields (ufCrm_*). The main ones are shown above.

The URL of the quote card in Bitrix24 is built from id:

https://<portal>.bitrix24.com/crm/type/7/details/<id>/

7 — the entityTypeId of a quote in Bitrix24. <portal> — the Bitrix24 portal domain. Access is restricted by the employee's permissions in Bitrix24.

Response example

JSON
{
  "success": true,
  "data": {
    "id": 412,
    "title": "Quote for server hardware",
    "amount": 1500,
    "isManualOpportunity": true,
    "currency": "USD",
    "stageId": "DRAFT",
    "dealId": 741,
    "contactId": 0,
    "companyId": 0,
    "assignedById": 1,
    "createdBy": 1,
    "comments": "",
    "beginDate": "2026-04-15T00:00:00.000Z",
    "closeDate": "2026-05-15T00:00:00.000Z",
    "createdTime": "2026-04-15T10:30:00.000Z",
    "updatedTime": "2026-04-15T10:30:00.000Z"
  }
}

Error response example

403 — no scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'crm' scope"
  }
}

Errors

HTTP Code Description
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP400 CodeEMPTY_CREATE_BODY DescriptionThe request body is empty — pass at least one field
HTTP400 CodeINVALID_REQUEST DescriptionInvalid fields
HTTP400 CodeREADONLY_FIELD DescriptionThe request body contains a read-only field, such as clientTitle. Such fields are marked in the RO column of Quote fields

Full list of common API errors — Errors.

See also