Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guide iconUser guide
Developer guide iconDeveloper guide
Admin guide iconAdmin guide
English
  • Русский
  • English
Login
    User API documentationAPI interactionMatching
      Profilesarrow
    • Import profileUpdate profileImport multiple profilesUpdate multiple profilesAdd multiple profilesAdd profile to databaseQuick profile importImport profile to RabbitMQGet profile dataUploading profiles to a fileSuspend all database profilesUnsuspend all profiles in a databaseDelete profileSubscription fields functional updateDatabase fields functional updateMerging multiple profilesUnsubscribe profile from resourceProfile splitting
        Subscriptionsarrow
      • Add or edit subscriptionGet all profile subscriptionsGet all subscriptions from multiple profilesGet profile subscriptionDelete profile subscriptionRestore deleted subscriptionSuspend all subscriptionsUnsuspend all suspended subscriptions
        Action historyarrow
      • Get profile action historyGet multiple profiles action history
        Profile relationsarrow
      • Attach relationDetach relationModify relation propertiesOverwrite relation propertiesGet profile relations infoGet profile relations info
      Get data for multiple profiles
      Databasesarrow
    • Get database statisticsUpdate statistics on databaseGet database listGet database informationGet database fieldsDatabase wipe
      Resourcesarrow
    • Get resource statisticsUpdate statistics on resourceGet resources listGet resource informationGet resource subscription fields
      Segmentsarrow
    • Get statistics on resourceUpdate statistics on segmentAdd or remove profileGet profile data in a static segmentCreate segmentUpdate segmentGet segment informationGet segments listDelete segment
      Suppression listsarrow
    • Create suppression listUpdate suppression listGet suppression list infoGet the list of suppression listsDelete suppression listUpload suppression list data to file
        Suppression list actionsarrow
      • Check if email is suppressedAdd email to suppression listAdd multiple emails to suppression listRemove email from suppression listRemove all emails from suppression listCheck if domain is suppressedAdd domain to suppression listAdd multiple domains to suppression listRemove domain from suppression listRemove all domains from suppression listCheck if phone number is suppressedAdd phone number to suppression listAdd multiple phones to suppression listRemove phone number from suppression listRemove all phone numbers from suppression list
      Templates and fragmentsarrow
    • Get templates listGet template infoDelete templateAdd templateUpdate templateChannel object
      Campaignsarrow
    • Get campaign informationGet campaign listActivate campaignComplete campaignDeactivate campaignGet campaign status
      Mailingsarrow
    • Activate mailingDeactivate mailingGet mailing listGet mailing informationGet mailing logClone mailingDelete mailingGet mailing status
        Broadcast mailingsarrow
      • Get broadcasts listGet broadcast informationCreate broadcast mailingUpdate broadcast mailingLaunch a broadcast mailing
        Regular mailingsarrow
      • Get regular mailings listGet regular mailing informationCreate regular mailingUpdate regular mailingLaunch a regular mailing
        Trigger mailingsarrow
      • Get trigger mailings listGet trigger mailing informationCreate trigger mailingUpdate trigger mailingTrigger launch (API call)Profile import + trigger mailing launchTask for bulk trigger launchTask for bulk profiles import + trigger launchBulk trigger launchBulk profiles import + trigger mailing launchClone a trigger mailingData array
      Automation scenariosarrow
    • Engage profile in scenarioImport and engage profile in scenarioBatch import and engage profiles in a scenarioTask for batch import and engaging profiles in the scenarioGet scenarios listActivate scenarioDeactivate scenario
      Loyalty Programsarrow
    • Get profile tier in a loyalty programExport points transactionsExpiring points for a periodGet profile account transactionsGet trigger promotions listAccrue points to a memberRedeem member pointsCommit temporary transactionPreliminary Order CalculationOrder ConfirmationRoll back temporary transactionCancel points transactionGet points account balanceRegister member in a loyalty programRemove member from loyalty program
      Promo codesarrow
    • Import promo codesGet promo code informationActivate promo codeUpdate promo codeAttach promo codeDetach promo codeGet all promo codes
      Goalsarrow
    • Goals and goal values registration
      Application push notificationsarrow
    • Processing and adding a subscriptionAdd app push events
      Marketarrow
      • Market objectsarrow
      • Order data objectProduct data objectSKU data objectCategories arrayCustom fields array
        Ordersarrow
      • Import order and item statusesGet orders listDelete orderGet order statusUpdate order line status
        Products and SKUarrow
      • Import products, SKUs and categoriesImport SKUs and categoriesGet products listGet SKUs listDelete productsDelete SKU
      Analytic reportsarrow
    • Get summary reportGet soft bounces reportGet undeliveries report
      SendersDevarrow
    • Get senders list
        Virtual senders (Smart accounts only)arrow
      • Get virtual senders listGet virtual sender informationClone virtual senderCreate virtual senderUpdate virtual senderDelete virtual sender
      External datatables queriesarrow
      • Segmentation queriesarrow
      • Add segmentation queryUpdate segmentation queryGet segmentation query informationGet segmentation queries listDelete segmentation query
        Template queriesarrow
      • Add template queryUpdate template queryGet template query informationGet template queries listDelete template query
      Objectsarrow
    • AKMTA objectContent objectEmail rule objectFile objectProfile data objectSMS rule objectSender objectSender typesStart schedule objectSubscription objectTrigger types
      Miscellaneousarrow
    • Upload fileGet message web versionPush providersDeduplication of requestsHow to send API request with RabbitMQList of gender identificationsObtain valid values for fields: browsers, devices, tz, oses, languages
    Importing the API collection in PostmanList of API endpoints
      SDKarrow
      • mSDKarrow
        • Androidarrow
        • Quick StartSDK FunctionalitySDK ConfigurationPublic SDK API
            Provider configuration androidarrow
          • Firebase Cloud MessagingHuawei Mobile ServicesRuStore
          iOSarrow
        • Quick StartSDK FunctionalitySDK ConfigurationPublic SDK API
            Provider configurationarrow
          • Apple Push Notification ServiceFirebase Cloud MessagingHuawei Mobile Services
          React Native (Android/iOS)arrow
        • Quick StartSDK ConfigurationSDK FunctionalityPublic SDK APIProvider setup
        Managing JWT and Role Token
  • Loyalty Programs
  • Order Confirmation

Order Confirmation

Description​

The preorder_commit method performs the final order confirmation after a successful preliminary calculation via the preorder method. The method creates the order in the system, applies all calculated discounts, accrues and redeems points, and activates promo codes.

URL​

Method: POST

https://example.com/api/v1.1/market/orders/preorder_commit

Request Parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
external_idstring"order_12345"YesExternal order ID in the client's system
profile_idstring"696e304f547840a7286619e0"Yes*Profile identifier. Field used for matching
emailstring"user@example.com"Yes*Member's email. Field used for matching
phonestring"+79991234567"Yes*Member's phone number. Field used for matching
skip_triggersbooleanfalseNoDisable trigger execution when creating the order. Default is false
dataobject
"data": {
"endpoint": "bot",
"status": "confirmed",
"currency": "RUB",
"total_price": "2500.00",
"final_total_price": "2150.00",
"delivery_cost": "300.00",
"lines": [...],
"promocodes": [...],
"redeem_points": [...],
"region": "region_moscow",
"custom_fields": ,
"tags": ["tag1", "tag2"]
}
YesObject with order data

* — to identify the profile, one of the parameters must be provided: profile_id, email, or phone

data object​

ParameterTypeExampleRequiredDescription
endpointstring"bot", "website"YesOrder source (touchpoint). Must be configured in the Market module
statusstring"new", "confirmed", "paid"YesOrder status. Uses statuses configured in the platform
currencystring"RUB", "USD", "EUR"YesOrder currency (three-letter ISO code)
total_pricestring"2500.00"YesTotal order cost before discounts
final_total_pricestring"2150.00"YesFinal order cost after applying all discounts
delivery_coststring"300.00"NoDelivery cost
create_timestring (ISO 8601)"2026-02-18T13:01:05.141Z"NoOrder creation date and time. If not provided, the current server time is used
regionstring"region_moscow"NoRegion identifier for applying regional prices and promotions
linesarraySee "lines array" section belowYesArray of order items. Must contain at least 1 element
promocodesarraySee "promocodes array" section belowNoArray of promo codes applied to the order
requested_promotionsarraySee "requested_promotions array" section belowNoPromotions applied to this order.

This field should contain the structure from the applied_promotions field of the /preorder method response
redeem_pointsarraySee "redeem_points array" section belowYes, if type="redeem_points" is specified in requested_promotionsArray of point redemptions by point currency types
custom_fieldsobject
{
"field1": "value1",
"field2": "value2"
}
NoOrder custom fields
tagsarray
[
"summer_sale",
"first_order"
]
NoTags for labeling the order

lines array​

The array contains information about the order items. Must contain at least 1 item.

Each item is a separate object within the array with the following parameters:

ParameterTypeExampleRequiredDescription
external_idstring"line_1"YesExternal line ID in the client's system
productstring"iphone17pmb256"Yes*Product identifier
skustring"IPHONE17-256-BLACK"Yes*SKU identifier
line_numberinteger1NoSequential line number in the order
countinteger1YesQuantity of the product
base_price_per_itemstring"139999.00"YesBase price per unit
min_price_per_itemstring"130000.00"NoMinimum allowable price per unit
final_price_per_itemstring"139500.00"YesFinal price per unit after applying all discounts
statusstring"new"NoOrder line status
custom_fieldsobject{"color": "black", "size": "XL"}NoLine custom fields
requested_promotionsarraySee "requested_promotions array" section belowNoPromotions applied to this line.

This field should contain the structure from the applied_promotions field of the /preorder method response for the corresponding order line.

* — one of the parameters is required: product or sku

promocodes array​

The array contains objects with information about promo codes.

A full description of the promo code structure can be found in this article.

ParameterTypeExampleRequiredDescription
codestring"SUMMER20"YesPromo code
pool_idinteger42YesPromo code pool identifier

redeem_points array​

An array with information about loyalty point redemption. Each object describes a separate redemption.

A full description of the point redemption structure can be found in this article.

ParameterTypeExampleRequiredDescription
points_currency_iidinteger1Yes*Internal identifier of the point type
points_currency_eidstring"bonus1"Yes*External identifier of the point type
namestring"Bonus points"NoName of the point type
amountinteger499YesNumber of points to redeem

* — one of the parameters is required: points_currency_iid or points_currency_eid

requested_promotions array​

tip

The requested_promotions array can be contained both in the data object and in the lines array within that object. In the first case, the array will contain promotions applied to the order, in the second — promotions applied to the products/lines.

An array of promotions applied to the order. Each object in the array describes a separate promotion.

ParameterTypeExampleRequiredDescription
typestring"discount", "accrue_points", "redeem_points", "code_issue", "message"YesPromotion type
promotionobject
"promotion": {
"external_id": "promo_1",
"name": "Summer Sale"
}
YesObject with the promotion's identifier and name
amountstring"150.00"Yes, if type is discount, accrue_points, or redeem_pointsDiscount amount or number of points
points_infoobject
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Bonus points",
"amount": "50"
}
Yes, if type is accrue_points or redeem_pointsObject with point information

The structure of the points_info object is as follows:

ParameterTypeExampleRequiredDescription
points_currency_iidinteger1Yes*Internal identifier of the point type
points_currency_eidstring"bonus1"Yes*External identifier of the point type
namestring"Bonus points"NoName of the point type
amountstring"6999"YesNumber of points
expiration_datestring (ISO 8601)"2027-02-18T00:00:00.000Z"NoExpiration date for accrued points

* — one of the parameters is required: points_currency_iid or points_currency_eid

Request Example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"external_id": "order_12345",
"profile_id": "696e304f547840a7286619e0",
"skip_triggers": false,
"data": {
"endpoint": "bot",
"status": "confirmed",
"currency": "RUB",
"total_price": "2500.00",
"final_total_price": "2150.00",
"delivery_cost": "300.00",
"create_time": "2026-02-18T13:01:05.141Z",
"region": "region_moscow",
"lines": [
{
"external_id": "line_1",
"product": "popit",
"base_price_per_item": "1500.00",
"final_price_per_item": "1350.00",
"count": 1,
"requested_promotions": [
{
"type": "discount",
"promotion": {
"external_id": "promo_1",
"name": "Summer Sale"
},
"amount": "150.00"
},
{
"type": "accrue_points",
"promotion": {
"external_id": "bonus_promo",
"name": "Point Accrual"
},
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Bonus points",
"amount": "75"
}
}
]
},
{
"external_id": "line_2",
"sku": "skuf",
"base_price_per_item": "700.00",
"min_price_per_item": "650.00",
"final_price_per_item": "650.00",
"count": 2,
"requested_promotions": [
{
"type": "redeem_points",
"promotion": {
"external_id": "redeem_promo",
"name": "Point Redemption"
},
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Bonus points",
"amount": "50"
}
}
]
}
],
"promocodes": [
{
"code": "HYDO-4728-DZGU",
"pool_id": 42
}
],
"redeem_points": [
{
"points_currency_eid": "bonus1",
"amount": 100
}
],
"requested_promotions": [
{
"type": "code_issue",
"promotion": {
"external_id": "welcome_promo",
"name": "Welcome Gift"
}
}
],
"custom_fields": {
"source": "telegram_bot",
"campaign": "spring_sale"
},
"tags": ["premium", "first_order"]
}
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<external_id>order_12345</external_id>
<profile_id>696e304f547840a7286619e0</profile_id>
<skip_triggers>false</skip_triggers>
<data>
<endpoint>bot</endpoint>
<status>confirmed</status>
<currency>RUB</currency>
<total_price>2500.00</total_price>
<final_total_price>2150.00</final_total_price>
<delivery_cost>300.00</delivery_cost>
<create_time>2026-02-18T13:01:05.141Z</create_time>
<region>region_moscow</region>
<lines>
<external_id>line_1</external_id>
<product>popit</product>
<base_price_per_item>1500.00</base_price_per_item>
<final_price_per_item>1350.00</final_price_per_item>
<count>1</count>
<requested_promotions>
<type>discount</type>
<promotion>
<external_id>promo_1</external_id>
<name>Summer Sale</name>
</promotion>
<amount>150.00</amount>
</requested_promotions>
<requested_promotions>
<type>accrue_points</type>
<promotion>
<external_id>bonus_promo</external_id>
<name>Point Accrual</name>
</promotion>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Bonus points</name>
<amount>75</amount>
</points_info>
</requested_promotions>
</lines>
<lines>
<external_id>line_2</external_id>
<sku>skuf</sku>
<base_price_per_item>700.00</base_price_per_item>
<min_price_per_item>650.00</min_price_per_item>
<final_price_per_item>650.00</final_price_per_item>
<count>2</count>
<requested_promotions>
<type>redeem_points</type>
<promotion>
<external_id>redeem_promo</external_id>
<name>Point Redemption</name>
</promotion>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Bonus points</name>
<amount>50</amount>
</points_info>
</requested_promotions>
</lines>
<promocodes>
<code>HYDO-4728-DZGU</code>
<pool_id>42</pool_id>
</promocodes>
<redeem_points>
<points_currency_eid>bonus1</points_currency_eid>
<amount>100</amount>
</redeem_points>
<requested_promotions>
<type>code_issue</type>
<promotion>
<external_id>welcome_promo</external_id>
<name>Welcome Gift</name>
</promotion>
</requested_promotions>
</data>
</xml>

Response Example​

  • JSON
  • XML
{
"data": {
"status": "success",
"processing_target": "immediate",
"external_id": "order_12345",
"issued_promocodes": [
{
"codes": ["HYDO-4728-DZGU"],
"pool": {
"pool_id": 100,
"name": "Welcome Promocodes"
},
"promotion": {
"external_id": "welcome_promo",
"name": "Welcome Gift"
}
}
],
"points_changes": [
{
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Bonus points",
"amount": "21500"
},
"accrue_points": 75,
"redeem_points": 150
}
],
"contents": [
{
"promotion": {
"external_id": "message_promo",
"name": "Information Message"
},
"contents": [
{
"type": "text",
"message": "Thank you for your purchase! You have received 75 bonus points."
}
]
}
]
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<status>success</status>
<processing_target>immediate</processing_target>
<external_id>order_12345</external_id>
<issued_promocodes>
<codes>HYDO-4728-DZGU</codes>
<pool>
<pool_id>100</pool_id>
<name>Welcome Promocodes</name>
</pool>
<promotion>
<external_id>welcome_promo</external_id>
<name>Welcome Gift</name>
</promotion>
</issued_promocodes>
<points_changes>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Bonus points</name>
<amount>21500</amount>
</points_info>
<accrue_points>75</accrue_points>
<redeem_points>150</redeem_points>
</points_changes>
<contents>
<promotion>
<external_id>message_promo</external_id>
<name>Information Message</name>
</promotion>
<contents>
<type>text</type>
<message>Thank you for your purchase! You have received 75 bonus points.</message>
</contents>
</contents>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Response Parameters​

ParameterTypeDescription
dataobjectConfirmation result data
errorintError code (0 on success)
error_textstringError description

Parameters returned in the data object:

ParameterTypeDescription
statusstringProcessing status:
• success — order successfully created
• outdated — price has changed since the preliminary calculation (/preorder must be repeated)
processing_targetstringOnly for success status. Value: immediate or processed
external_idstringExternal order ID (from the request)
issued_promocodesarrayArray of issued promo codes (for code_issue type promotions)
points_changesarrayArray of point balance changes by point currency types
contentsarrayArray of content for display (text messages from promotions)

The issued_promocodes array consists of objects with information about applied promo codes:

ParameterTypeDescription
codesarrayArray of issued promo codes
poolobjectInformation about the promo code pool
pool.pool_idintegerPool identifier
pool.namestringPool name
promotionobjectObject with promotion information
promotion.external_idstringExternal promotion identifier
promotion.namestringPromotion name

The points_changes array consists of objects with information about point balance changes:

ParameterTypeDescription
points_infoobjectObject with point type information
points_info.points_currency_iidintegerInternal identifier of the point type
points_info.points_currency_eidstringExternal identifier of the point type
points_info.namestringName of the point type
points_info.amountstringCurrent balance after the operation
accrue_pointsintegerNumber of points accrued
redeem_pointsintegerNumber of points redeemed
Last updated on Mar 12, 2026
Previous
Preliminary Order Calculation
Next
Roll back temporary transaction
  • Description
  • URL
  • Request Parameters
    • data object
      • lines array
      • promocodes array
      • redeem_points array
      • requested_promotions array
  • Request Example
  • Response Example
  • Response Parameters
© 2015 - 2026 Altcraft, LLC. All rights reserved.