Back to API docs Back to createproposal guide

apicreateproposal — complete JSON reference all fields field-by-field

POST /api/createproposal — maximal request schema, accepted values, defaults, and server overrides. For shorter examples, see apicreateproposal.html.

How to read this page

Full maximal JSON

Every supported key in one payload. Placeholder values illustrate types and typical shapes.

{
  "key": "YOUR_API_KEY",

  "proposal": {
    "name": "Website project",
    "type": 0,
    "url": "custom-url-only-when-type-1",
    "created": "2026-07-08",
    "deadline": "2026-08-07",
    "currency": "EUR",
    "language": "lt",
    "author": 3,
    "owner": 3,
    "edited": 3,
    "status": 0,
    "discount": 5,
    "tax": 0,
    "comment": "Internal comment shown in editor",
    "usercomment": "Client-visible comment",
    "confirmable": 1,
    "accepted": 0,
    "hide": 0,
    "hidecus": 0,
    "hidepronr": 0,
    "deleted": 0,
    "locked": 0,
    "client": "Client Company",
    "code": "300000001",
    "person": "Jane Doe",
    "project": "Project code",
    "selling": "2026-07-15",
    "arriving": "2026-07-20",
    "done": "2026-09-01",
    "soldby": 3,
    "colors": "",
    "people": 10,
    "gramsperperson": 250,
    "proprice": 0,
    "margin": 0,
    "marginper": 0,
    "turnover": 0,
    "total": 0,
    "edit_amount": 0,
    "showpriceperperson": 0,
    "showgroup": 0,
    "template": 0,
    "listtype": 0,
    "header": "",
    "opacity": 0,
    "archive": 0,
    "shop": 0,
    "started": "",
    "form_id": 0,
    "video": "",
    "zoho": "",
    "zohod": 0,
    "scoro": 0,
    "bitrix": "",
    "bitrixlead": 0,
    "bitrixdeal": 0,
    "unicode": "auto-generated-if-omitted"
  },

  "name": "Alternative top-level name (ignored if proposal.name is set)",
  "author": 3,
  "owner": 3,

  "contact": 123,
  "contact_object_example": {
    "id": 123,
    "name": "Client Company",
    "code": "300000001",
    "phone": "+37060000000",
    "email": "info@client.example",
    "address": "Example street 1",
    "person": "Jane Doe",
    "manager": 3,
    "lead": "",
    "lead_data": "",
    "zoho_id": "",
    "vat": "LT123456789",
    "website": "https://client.example",
    "city": "Vilnius",
    "meta": {
      "payment_terms": "14 days",
      "custom_field": "any value"
    }
  },

  "settings": {
    "advanceper": 30,
    "showgroup": 1,
    "thediscount": "5%",
    "hidepronr": 0,
    "textcolor": "#111827",
    "offtags": 0,
    "selectoff": 0,
    "groupinstotal": 0,
    "dicper": 0,
    "perpos": 0,
    "decprice": 0,
    "fiveround": 0,
    "hidecusrr": 0,
    "proptitle": "",
    "expandheadfoot": 0,
    "movebuttons": 0,
    "thepayon": 0,
    "setcompany": 0,
    "shop_image": "",
    "shop_text": ""
  },

  "advanceper": 30,
  "showgroup": 1,
  "thediscount": "5%",

  "groups": [
    {
      "name": "Main work",
      "title": "Alternative group title key",
      "product": "Alternative group title key",
      "advance": 30,
      "price": 30,
      "entries": [
        {
          "product_ref": 15,
          "product": "Line title override",
          "link": 15,
          "sku": "SKU-001",
          "product_variation_id": 0,
          "variation": "",
          "ammount": 2,
          "ammount2": 1,
          "amount": 2,
          "amount2": 1,
          "unit": "vnt",
          "unit2": "vnt",
          "price": 100,
          "prime": 80,
          "discount": 0,
          "discount_type": 0,
          "pvm": 21,
          "withpvm": 0,
          "supplier": "Supplier A",
          "marper": 0,
          "deli": 0,
          "price_per_unit": 0,
          "comment": "Short description / HTML",
          "notes": "Internal notes",
          "image": "gallery-id-or-path",
          "tags": "1,2,3",
          "group": "Main work",
          "attribute": "",
          "grams": 0,
          "accepted": 0,
          "acceptable": 0,
          "selectable": 0,
          "required": 0,
          "periodical": 0,
          "pricetype": 0,
          "amounttype": 0,
          "edit_amount": 0,
          "hide_amount": 0,
          "addup": 0,
          "amname": "",
          "template": 0,
          "counterpri": 0,
          "preview": 0,
          "translations": {
            "en": { "product": "English line title", "comment": "English description" }
          },
          "feature_values": {
            "12": [44, 45],
            "15": "custom text"
          },
          "feature_custom_text": { "15": "custom text" },
          "feature_custom_number": { "20": "5" },
          "children": [
            {
              "product_ref": "INCLUDED-SKU-001",
              "ammount": 1,
              "selectable": 1,
              "accepted": 1
            }
          ]
        },
        {
          "product": "Informational row",
          "attribute": "text_sep",
          "comment": "<p>HTML content</p>"
        }
      ]
    }
  ],

  "entries": [
    {
      "product_ref": {
        "name": "Inline created product",
        "sku": "INLINE-001",
        "category": "API products",
        "price": {
          "Supplier A": {
            "1": [50, 75, 0, 5]
          }
        }
      },
      "ammount": 1
    }
  ]
}

Note: send either entries or groups, not both as required lists. The example above shows both only for documentation. contact_object_example is not a real key — use contact with one of the supported formats below.

Top-level fields

key
string, required

API key. Removed before processing.

proposal
object, optional

Container for proposal table fields. If omitted, proposal fields may be sent at top level instead.

contact
int | string | object, optional

Existing contact id, or a contact object (see Contact object). On success, client, code, and person are copied onto the proposal.

entries
array of objects, required unless groups is provided

Flat list of proposal lines. Each item is an entry object (see Entry fields).

groups
array of objects, optional alternative to entries

Creates grouped lines with a group_sep row per group. See Groups.

settings
object, optional

Per-proposal settings stored in the settings table. See Settings object. Individual setting keys may also be sent at top level.

author, owner
int (user id), optional at top level

May be sent at top level even when using a proposal object. Merged into proposal payload when not already inside proposal.

Proposal fields

All columns mass-assignable on the proposals table. Send inside proposal or at top level.

FieldTypeDefault / notes
namestringRequired. Proposal title.
nrintServer-generated. Any submitted value is ignored.
urlstringOnly accepted when type = 1 (Global). Otherwise always generated server-side.
typeintDefault 0. See proposal types.
createddate stringDefault today (Y-m-d).
deadlinedate stringDefault created + ofexp days from app settings (usually 30).
currencystringDefault from app setting currency (e.g. EUR).
languagestringDefault from app setting mainlang.
authorintUser id. Default from API user resolution logic when omitted.
ownerintUser id. Defaults to author.
editedintUser id. Defaults to author.
statusintDefault 0 (Pending). See status values.
discountnumberProposal-level discount percent. Default 0.
taxnumberDefault 0.
commentstringDefault empty string.
usercommentstringClient-facing comment field.
confirmable0 | 1Whether client can confirm the offer. Default from app setting confirmable.
accepted0 | 1Proposal acceptance flag. Default 0.
hide0 | 1Hide proposal. Default 0.
hidecus0 | 1Hide customer block. Default 0.
hidepronr0 | 1Hide proposal number on frontend.
deleted0 | 1Soft-delete flag. Default 0.
locked0 | 1Lock proposal editing.
clientstringClient company name. Set automatically when contact resolves.
codestringClient code / company code. Set from contact when resolved.
personstringContact person name. Set from contact when resolved.
projectstringProject reference.
sellingdate stringSelling date.
arrivingdate stringArrival date.
donedate stringCompletion date.
soldbyintUser id of salesperson.
colorsstringColor configuration (app-specific).
peopleintPeople count (catering module).
gramsperpersonnumberGrams per person (catering module).
propricenumberPer-person price.
marginnumberMargin amount.
marginpernumberMargin percent.
turnovernumberTurnover value.
totalnumberRecalculated after entries are created.
edit_amount0 | 1Allow amount editing on frontend.
showpriceperperson0 | 1Show per-person price.
showgroup0 | 1Show group prices. Stored as a proposal setting and copied onto the proposals.showgroup column so getproposals returns the saved value.
templateintPublic offer layout (0, 1, 2). Default from company template setting when omitted.
listtypeintList display type.
headerstringCustom header content.
opacitynumberHeader/footer opacity.
archive0 | 1Archive flag.
shop0 | 1Shop/global shop flag.
startedstringStarted timestamp/text.
form_idintLinked form id.
videostringVideo URL or embed.
unicodestringRandom 32-char string if omitted.
zohostringZoho integration id.
zohodintZoho deal flag.
scorointScoro integration id.
bitrixstringBitrix id string.
bitrixleadintBitrix lead id.
bitrixdealintBitrix deal id.

Contact object

When contact is an object, it is created or updated via the same logic as POST /api/createcontact. See apicreatecontact.html for full details.

FieldTypeNotes
idintIf provided and found, existing contact is used (no create).
namestringRequired when creating/updating by object.
codestringUpsert key — matching code updates existing contact.
phone, email, address, personstringCore contact columns.
managerintManager user id.
lead, lead_datamixedLead tracking fields.
zoho_idstringZoho contact id.
vat, website, citystringLegacy convenience keys saved to contact_meta.
meta or metasobjectCustom meta fields. Keys → contact_meta.field, values → contact_meta.value.

Settings object

Stored per proposal in the settings table. Keys may be sent inside settings or at top level.

KeyTypeDescription
advancepernumberAdvance payment percent for groups / proposal.
showgroup0 | 1Show group subtotals on the offer. Returned by getproposals as top-level showgroup and inside settings.
thediscountstringDiscount label/text shown on offer (e.g. "5%"). Value "0" is stored as empty.
hidepronr0 | 1Hide proposal number on frontend.
textcolorstringText color (hex or CSS color).
offtags0 | 1Offer tags display option.
selectoff0 | 1Hide parent SELECT! / accept buttons on the public offer (1 = hide, editor: “Hide select button”). Default 0 shows them. Does not hide child selectable: 1 toggles. Distinct from entry selectable.
groupinstotal0 | 1Include group rows in total calculation.
dicpernumberDictionary / display percent setting.
perposnumberPer-position setting.
decprice0 | 1Decimal price display.
fiveround0 | 1Round prices to nearest 5.
hidecusrr0 | 1Hide customer on offer.
proptitlestringCustom proposal title override.
expandheadfoot0 | 1Auto-expand header and footer in editor.
movebuttons0 | 1Move action buttons on frontend.
thepayon0 | 1Enable payment on offer.
setcompany0 | 1Company display setting.
shop_imagestringShop/global offer image.
shop_textstringShop/global offer text.

Any other proposal setting key accepted by the app's settings helper may also be stored if sent inside settings. Array values are JSON-encoded before storage. Do not send tunc. tunc is a company setting (“Separate prices for included products”), not a proposal setting. The public offer and /accepting read it from company settings. A proposal-level tunc value is ignored and does not update group subtotals or the sticky/footer total. Group subtotals use showgroup. When company tunc is on and the parent has addup: 1, a bundle sumbox is shown next to included children. There is no showvat or showtax createproposal setting. The public offer hides the VAT row when the proposal tax rate and every commercial line are 0%.

Groups

Each group creates one group_sep entry, then creates the group's entries with the group name assigned.

FieldTypeNotes
namestringGroup title. Used for group_sep row and entry group value.
titlestringAlias for name.
productstringAlias for name.
advancenumberAdvance percent stored on the group_sep row price field.
pricenumberAlias for advance on the separator row.
entriesarrayEntry objects belonging to this group.

Entry fields

Each item in entries[] or groups[].entries[]. All entries table fillable columns are accepted.

Product linking

FieldTypeNotes
product_refint | string | objectPrimary product reference. See Product references.
product_objectobjectAlias for inline product_ref object.
productstring | int | objectLine title when string. When numeric or object, treated as product reference (like product_ref).
linkintProduct id. Same as numeric product_ref.
skustringUsed as SKU lookup when no product_ref and no string product title.
product_variation_idintVariation id for the line.
variationstringVariation label/text.

Line content and pricing

FieldTypeDefault / notes
productstringLine title. Defaults to linked product name when product resolves.
ammountnumberPrimary quantity. Default 1. Alias: amount.
ammount2numberSecondary quantity. Default 1. Alias: amount2.
unitstringPrimary unit. Default vnt or product units.
unit2stringSecondary unit. Default vnt or product units2.
pricenumberSale/unit price. Default from product tier when linked.
primenumberCost price. Default from product tier when linked.
supplierstringSupplier name for pricing tier.
discountnumberLine discount. Default 0.
discount_type0 | 10 = percent, 1 = fixed currency amount.
pvmnumberVAT rate percent. Default from product or app mainpvm.
withpvm0 | 1Price includes VAT.
marpernumberMargin percent. Default 0.
delinumberDelivery cost component. Default 0.
price_per_unitnumberDisplayed price per unit override.
gramsnumberWeight in grams (catering).
pricetype0 | 10 = percent-based calc, 1 = currency-based.
amounttype0 | 10 = one amount column, 1 = two amount columns.
periodical0 | 1Recurring / periodical line (e.g. monthly hosting).
addup0 | 1Add-up row behavior.
counterprinumberCounter price field.

Display, structure, and flags

FieldTypeNotes
attributestringRow type. Default "0" for product rows (empty is stored as "0"). See attribute values.
groupstringGroup name. Set automatically for lines inside groups[].
commentstringDescription / HTML. Defaults to product description when linked.
notesstringInternal notes (not shown to client).
imagestringImage reference. Defaults to product gallery when linked.
tagsstringComma-separated tag ids.
accepted0 | 1Row is selected/accepted (selection offers).
acceptable0 | 1Row can be accepted by client.
selectable0 | 1Child rows only. 1 = this included child has its own SELECT toggle on the public offer. 0 = not individually toggleable (mandatory included / packing). Does not hide the parent product's SELECT! button — use proposal selectoff: 1 for that. selectable: 0 on a top-level parent is stored but unused for parent SELECT!.
required0 | 1Required included item.
edit_amount0 | 1Allow client to edit quantity.
hide_amount0–30 show, 1 hide both, 2 hide primary, 3 hide secondary.
amnamestringCustom amount column label.
templateintTemplate line reference.
preview0 | 1Preview-only row.
translationsobjectPer-language overrides, e.g. { "en": { "product": "...", "comment": "..." } }.
childrenarrayNested child entries. See Child entries.

order, orderp, parent, and proposal are assigned automatically. Do not send them unless you have a specific reason.

Product references

product_ref (or numeric/object product, or link, or bare sku) resolves in this order:

  1. Integer id — existing product by products.id
  2. String SKU — existing product by products.sku
  3. Object with id — lookup by id
  4. Object with sku — lookup by SKU
  5. Object without match — inline create via apicreateproduct logic

Inline product object

Full product schema: apicreateproduct.html. Common keys:

{
  "name": "Created inline product",
  "sku": "INLINE-001",
  "category": "Services",
  "price": {
    "Supplier A": {
      "1": [50, 75, 0, 5]
    }
  },
  "description": "Short description",
  "withpvm": 0,
  "attributes": [],
  "variations": []
}

Price tier array: [cost, sale_price, delivery, discount]. Tier keys are strings ("1", "10", etc.).

When a product resolves, these entry fields are auto-filled from the product if not explicitly sent: link, product (name), sku, unit, unit2, pvm, withpvm, grams, amounttype, hide_amount, comment, image, price, prime, supplier.

Feature values on entries

Save product feature selections on a line. Keys are product_features.id values.

feature_values
object, optional

General feature values. Value may be a string, number, or array of option ids.

feature_custom_text
object, optional

Custom text features (type 2). Keys = feature id, value = text.

feature_custom_number
object, optional

Amount/calculation features (type 3). Keys = feature id, value = number as string.

{
  "product_ref": "SKU-001",
  "feature_values": {
    "12": [44, 45],
    "15": "custom text"
  },
  "feature_custom_text": { "15": "custom text" },
  "feature_custom_number": { "20": "5" }
}

Child entries

children[] creates nested lines linked to the parent through the parent / orderp system (included products, selectable add-ons, etc.).

Enums and constants

Proposal type

ValueMeaning
0Normal proposal
1Global proposal (custom url accepted)
2Merch
3Merch Global
4Template (used by getproposals templates_only)

Proposal status

ValueMeaning
0Pending
1Ready
2Sent
3Negotiations/updating
4Confirmed
5Invoice sent
6In process
7Completed/follow-up
8Rejected
9Expired
10Order sent

Entry attribute

ValueMeaning
"" (empty) or omittedNormalized to 0 (normal product / service line)
0Normal product / service line
group_sepGroup separator (created automatically for groups[])
text_sepInformational text row (HTML in comment)
headerHeader block row
footerFooter block row

Entry hide_amount

ValueMeaning
0Do not hide amount
1Hide both amounts
2Hide primary amount (price may be multiplied by hidden amount on display)
3Hide secondary amount

Aliases and server rules

Responses

Success

{
  "status": "ok",
  "data": {
    "proposal": {
      "id": 123,
      "name": "Website project",
      "url": "abc123def456",
      "nr": 1042,
      "client": "Client Company",
      "code": "300000001",
      "total": 1500,
      "...": "all proposal columns"
    },
    "entries": [
      {
        "id": 501,
        "proposal": 123,
        "product": "Design work",
        "link": 15,
        "ammount": 1,
        "price": 500,
        "...": "all entry columns",
        "images": [],
        "feature_values": []
      }
    ],
    "url": "https://your-domain/offer/abc123def456"
  }
}

Errors

Response dataCause
api disabledAPI access not enabled for tenant/plan
no keyMissing key
wrong keyInvalid API key
name requiredNo name at top level or inside proposal
entries requiredNeither entries nor groups provided
contact not foundcontact id does not exist
contact must be id or objectInvalid contact type
name invalidInline contact object missing name
bad proposal dataProposal row failed to persist
Related docs