Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v75
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
    • Get profile tier in a loyalty program
    • Export points transactions
    • Expiring points for a period
    • Get profile account transactions
    • Get trigger promotions list
    • Accrue points to a member
    • Redeem member points
    • Commit temporary transaction
    • Preliminary Order Calculation (Preorder)
    • Confirm Order (Preorder Commit)
    • Roll back temporary transaction
    • Cancel points transaction
    • Get points account balance
    • Register member in a loyalty program
    • Remove member from loyalty program
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Loyalty Programs
  • Confirm Order (Preorder Commit)
Documentation for version v75

Confirm Order (Preorder Commit)

Description​

The preorder_commit method performs the final order confirmation after a successful preliminary calculation via the preorder method. This method creates an 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 ID. One of the matching fields must be provided.
emailstring"user@example.com"Yes*Participant's email. One of the matching fields must be provided.
phonestring"+79991234567"Yes*Participant's phone number. One of the matching fields must be provided.
skip_triggersbooleanfalseNoDisable trigger execution upon order creation. Default is false.
dataobject
{
   "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 containing order data. Includes required fields and structure.

* — 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.
statusstring"new", "confirmed", "paid"YesOrder status. Use statuses configured in the system.
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 all discounts. Required field for preorder_commit!
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 server's current time is used.
regionstring"region_moscow"NoRegion identifier for applying regional prices and promotions.
linesarraySee Order Lines ObjectYesArray of order items. Must contain at least 1 element.
promocodesarraySee Promocode ObjectNoArray of promo codes applied to the order.
redeem_pointsarraySee Redeem Points ObjectYes, if requested_promotions contains type="redeem_points"Array of point redemptions by currency type.
custom_fieldsobject{"field1": "value1", "field2": "value2"}NoAdditional order fields.
tagsarray["summer_sale", "first_order"]NoTags for labeling the order.

Required Fields in data Object​

ParameterTypeExampleDescription
endpointstring"bot"Touchpoint (order source). Must be configured.
statusstring"confirmed"Order status.
currencystring"RUB"Order currency (three-letter ISO code).
total_pricestring"2500.00"Total order cost before discounts.
final_total_pricestring"2150.00"Final order cost after all discounts. Required!
linesarraySee belowArray of order items. Minimum 1 element.

Order Lines Object (commit)​

ParameterTypeExampleRequiredDescription
external_idstring"line_1"YesExternal line ID in the client's system.
productstring"iphone17pmb256"Yes*Product ID. Either product or sku must be provided.
skustring"IPHONE17-256-BLACK"Yes*SKU ID. Either product or sku must be provided.
line_numberinteger1NoSequential number of the line within the order.
countinteger1YesQuantity of the item.
base_price_per_itemstring"139999.00"YesBase price per item.
min_price_per_itemstring"130000.00"NoMinimum allowed price per item.
final_price_per_itemstring"139500.00"YesFinal price per item after all discounts. Required field!
statusstring"new"NoStatus of the order line.
custom_fieldsobject{"color": "black", "size": "XL"}NoAdditional fields for the line.
requested_promotionsarraySee Promotion ObjectNoPromotions applied to this specific line (from the /preorder response).
Pass the structure from the applied_promotions field of the /preorder response for the corresponding order line.

* — Either product or sku is required.

Required Fields in Order Lines Object​

ParameterTypeExampleDescription
external_idstring"line_1"External line ID.
product or skustring"popit"Product ID or SKU ID (one is required).
base_price_per_itemstring"1500.00"Base price per item.
final_price_per_itemstring"1350.00"Final price per item after all discounts. Required!
countinteger1Quantity of the item.

Promocode Object​

For a full description of the promo code structure, see the Promocode Object section in the developer documentation.

ParameterTypeExampleRequiredDescription
codestring"SUMMER20"YesPromo code.
pool_idinteger42YesPromo code pool ID.

Redeem Points Object​

For a full description of the points redemption structure, see the Redeem Points section in the developer documentation.

ParameterTypeExampleRequiredDescription
points_currency_iidinteger1Yes*Internal ID of the points currency type.
points_currency_eidstring"bonus1"Yes*External ID of the points currency type.
namestring"Bonus Points"NoName of the points currency type.
amountinteger499YesNumber of points to redeem.

* — Either points_currency_iid or points_currency_eid is required.


Promotion Object​

ParameterTypeExampleRequiredDescription
typestring"discount", "accrue_points", "redeem_points", "code_issue", "message"YesPromotion type.
promotionobject{"external_id": "promo_1", "name": "Summer Sale"}YesObject containing the promotion's ID and name.
amountstring"150.00"For type=discount/accrue_points/redeem_pointsDiscount amount or number of points.
points_infoobjectSee Points Info ObjectFor type=accrue_points/redeem_pointsInformation about points.

Points Info Object​

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

* — Either points_currency_iid or points_currency_eid is required.


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": "Accrue Points"
},
"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": "Redeem Points"
},
"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>Accrue Points</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>Redeem Points</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 Parameters​

ParameterTypeDescription
dataobjectData resulting from the confirmation
errorintError code (0 on success)
error_textstringError text

data Object​

ParameterTypeDescription
statusstringProcessing status:
• success — order successfully created
• outdated — price changed since pre-calculation (need to repeat /preorder)
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). See object structure below.
points_changesarrayArray of point balance changes by currency type. See object structure below.
contentsarrayArray of content for display (text messages from promotions). See object structure below.

Issued Promocodes Object​

ParameterTypeDescription
codesarrayArray of issued promo codes.
poolobjectInformation about the promo code pool.
pool.pool_idintegerPool ID.
pool.namestringPool name.
promotionobjectInformation about the promotion.
promotion.external_idstringExternal ID of the promotion.
promotion.namestringName of the promotion.

Points Changes Object​

ParameterTypeDescription
points_infoobjectInformation about the points currency type.
points_info.points_currency_iidintegerInternal ID of the points currency type.
points_info.points_currency_eidstringExternal ID of the points currency type.
points_info.namestringName of the points currency type.
points_info.amountstringCurrent balance after the operation.
accrue_pointsintegerNumber of points accrued.
redeem_pointsintegerNumber of points redeemed.

Contents Object​

ParameterTypeDescription
promotionobjectInformation about the promotion that generated the content.
promotion.external_idstringExternal ID of the promotion.
promotion.namestringName of the promotion.
contentsarrayArray of content items.
contents[].typestringType of content (e.g., "text").
contents[].messagestringThe content message.

Response Example​

  • JSON (success)
  • JSON (outdated)
  • XML (success)
{
"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": "Info Message"
},
"contents": [
{
"type": "text",
"message": "Thank you for your purchase! You received 75 bonus points."
}
]
}
]
},
"error": 0,
"error_text": "Successful operation"
}
{
"data": {
"status": "outdated",
"external_id": "order_12345"
},
"error": 0,
"error_text": "Price has been changed since preorder calculation"
}
<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>Info Message</name>
</promotion>
<contents>
<type>text</type>
<message>Thank you for your purchase! You received 75 bonus points.</message>
</contents>
</contents>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>

Error Codes​

CodeDescription
0Successful execution.
400Validation error or business logic error.
401Invalid or missing token.
404Profile not found.
409Conflict: an order with this external_id already exists.
500Internal service error.
Last updated on Feb 26, 2026
Previous
Preliminary Order Calculation (Preorder)
Next
Roll back temporary transaction
  • Description
  • URL
  • Request Parameters
    • data Object
      • Required Fields in data Object
    • Order Lines Object (commit)
      • Required Fields in Order Lines Object
    • Promocode Object
    • Redeem Points Object
    • Promotion Object
    • Points Info Object
  • Request Example
  • Response Parameters
    • data Object
    • Issued Promocodes Object
    • Points Changes Object
    • Contents Object
  • Response Example
  • Error Codes
© 2015 - 2026 Altcraft, LLC. All rights reserved.