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
  • Preliminary Order Calculation (Preorder)
Documentation for version v75

Preliminary Order Calculation (Preorder)

Description​

The preorder method performs a preliminary order calculation considering promotions and loyalty program participant points.
The request result can be used to display final amounts, discounts, and redemptions before creating the final order.

tip

This method does not create an order in the system; it returns the calculated order state with applied market and loyalty rules. To create the calculated order after a successful preorder, use the preorder_commit method.

URL​

Method: POST

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

Request Parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
external_idstring"12"YesExternal order ID
matchingstring

"email"
"phone"
"profile_id"
"custom"

Yes

Method for finding the loyalty program participant's profile.

emailstring"example@example.com"If matching = emailParticipant's email
phonestring"+79000000000"If matching = phoneParticipant's phone number
profile_idstring"696e304f547840a7286619e0"If matching = profile_idProfile ID
dataJSON object
{
   "endpoint": "site",
   "status": "new",
   "currency": "RUB",
   "total_price": "139999.00",
   "lines": [...]
}
Yes

The data object contains the order data.

tip

The lines field is required and must contain at least one order item.

Required Fields in data Object​

ParameterTypeExampleDescription
endpointstring"site"Touchpoint (order source). Must be configured in the Market.
statusstring"new"Order status.
currencystring"RUB"Order currency (three-letter ISO code).
total_pricestring"139999.00"Total order cost.
linesarraySee belowThe lines array contains information about order items. Minimum 1 element.

Required Fields in Order Lines Object​

ParameterTypeExampleDescription
external_idstring"line_1"External line ID.
product or skustring"iphone17pmb256"Product ID or SKU ID (one is required).
base_price_per_itemstring"139999.00"Base price per item.
countinteger1Quantity of the item.

Request Example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"external_id": "12",
"matching": "email",
"email": "example@example.com",
"data": {
"endpoint": "site",
"status": "new",
"delivery_cost": "0.00",
"total_price": "139999.00",
"currency": "RUB",
"redeem_points": [
{
"points_currency_iid": 1,
"amount": 499
}
],
"lines": [
{
"external_id": "line___ASTGRf",
"product": "iphone17pmb256",
"base_price_per_item": "139999.00",
"min_price_per_item": "0.00",
"final_price_per_item": "139999.00",
"count": 1,
"custom_fields": {},
"currency": "RUB"
}
]
}
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<external_id>12</external_id>
<matching>email</matching>
<email>example@example.com</email>
<data>
<endpoint>site</endpoint>
<status>new</status>
<delivery_cost>0.00</delivery_cost>
<total_price>139999.00</total_price>
<currency>RUB</currency>
<redeem_points>
<points_currency_iid>1</points_currency_iid>
<amount>499</amount>
</redeem_points>
<lines>
<external_id>line___ASTGRf</external_id>
<product>iphone17pmb256</product>
<base_price_per_item>139999.00</base_price_per_item>
<min_price_per_item>0.00</min_price_per_item>
<final_price_per_item>139999.00</final_price_per_item>
<count>1</count>
<currency>RUB</currency>
</lines>
</data>
</xml>

Response Parameters​

ParameterTypeDescription
dataobjectData resulting from the calculation
errorintError code
error_textstringError text

data Object​

ParameterTypeDescription
profileobjectParticipant profile. Contains the profile ID.
orderobjectCalculated order. More details

Response Example​

  • JSON
  • XML
{
"data": {
"profile": {
"profile_id": "696e304f547840a7286619e0"
},
"order": {
"processing_target": "calculated",
"total_price": "139999.00",
"final_total_price": "139500.00",
"delivery_cost": "0.00",
"currency": "RUB",
"lines": [
{
"external_id": "line___ASTGRf",
"line_number": 0,
"count": 1,
"product": "iphone17pmb256",
"base_price_per_item": "139999.00",
"min_price_per_item": "0.00",
"final_price_per_item": "139500.00",
"custom_fields": {},
"applied_promotions": [
{
"type": "accrue_points",
"promotion": {
"external_id": "bonus",
"name": "Accrue Points"
},
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Main Point",
"amount": "6999"
}
},
{
"type": "redeem_points",
"promotion": {
"external_id": "bonus",
"name": "Redeem Points"
},
"points_info": {
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Main Point",
"amount": "499"
}
}
]
}
],
"custom_fields": {},
"applied_promotions": [],
"points_info": [
{
"points_currency_iid": 1,
"points_currency_eid": "bonus1",
"name": "Main Point",
"status": "success",
"active_amount_for_current_order": "20999",
"accrue_points_amount_for_current_order": "6999",
"redeemed_points_amount_for_current_order": "499"
}
],
"promocodes_info": []
}
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<profile>
<profile_id>696e304f547840a7286619e0</profile_id>
</profile>
<order>
<processing_target>calculated</processing_target>
<total_price>139999.00</total_price>
<final_total_price>139500.00</final_total_price>
<delivery_cost>0.00</delivery_cost>
<currency>RUB</currency>
<lines>
<external_id>line___ASTGRf</external_id>
<line_number>0</line_number>
<count>1</count>
<product>iphone17pmb256</product>
<base_price_per_item>139999.00</base_price_per_item>
<min_price_per_item>0.00</min_price_per_item>
<final_price_per_item>139500.00</final_price_per_item>
<custom_fields/>
<applied_promotions>
<type>accrue_points</type>
<promotion>
<external_id>bonus</external_id>
<name>Accrue Points</name>
</promotion>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Main Point</name>
<amount>6999</amount>
</points_info>
</applied_promotions>
<applied_promotions>
<type>redeem_points</type>
<promotion>
<external_id>bonus</external_id>
<name>Redeem Points</name>
</promotion>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Main Point</name>
<amount>499</amount>
</points_info>
</applied_promotions>
</lines>
<custom_fields/>
<applied_promotions/>
<points_info>
<points_currency_iid>1</points_currency_iid>
<points_currency_eid>bonus1</points_currency_eid>
<name>Main Point</name>
<status>success</status>
<active_amount_for_current_order>20999</active_amount_for_current_order>
<accrue_points_amount_for_current_order>6999</accrue_points_amount_for_current_order>
<redeemed_points_amount_for_current_order>499</redeemed_points_amount_for_current_order>
</points_info>
<promocodes_info/>
</order>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Last updated on Feb 18, 2026
Previous
Commit temporary transaction
Next
Confirm Order (Preorder Commit)
  • Description
  • URL
  • Request Parameters
    • Required Fields in data Object
    • Required Fields in Order Lines Object
  • Request Example
  • Response Parameters
    • data Object
  • Response Example
© 2015 - 2026 Altcraft, LLC. All rights reserved.