Types
Remote Orders
Statuses for remote orders
pendingprocessingsaledcancelleddeliveringdeliveredreceivedrefundarrived- Or your custom string
InfoType
info is an object with additional order data. All keys are optional. HugeProfit understands the keys below and
uses them in the interface; any other keys are stored as is and are not shown.
Orders of other integrations of the account may contain other keys in info — ignore keys you don't know.
Note. If you send an order with an existing order_id again, info is replaced entirely, not merged — send all
the keys every time.
Example:
{
"is_paid": false,
"payment_type": "Накладений платіж",
"order_text": "#1001",
"comment": "Call before delivery",
"account_id": 12,
"channel_id": 3,
"commission": 42.5,
"utm": {
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "summer_sale"
},
"coupons": [
{"code": "SALE10", "amount": 100}
],
"custom": {
"Gift wrapping": "Yes"
}
}
| Key | Type | What it does in HugeProfit |
|---|---|---|
is_paid |
bool | "Paid" mark in the orders list and in the push notification about a new order |
payment_type |
string | Payment method name. Shown in the orders list and in the orders export. If it looks like cash on delivery (Накладений платіж, Післяплата, Оплата при отриманні, Cash On Delivery...), the cash-on-delivery account is selected in the sale form. See the note below |
order_text |
string | Order number shown instead of order_id, e.g. #1001: orders list, order card, sale form, orders search |
comment |
string | Buyer's comment. Shown in the orders list and in the order card, copied to the sale comment |
account_id |
int | ID of the account preselected in the sale form (see accounts in Reference). For cash on delivery the cash-on-delivery account is selected instead |
channel_id |
int | ID of the sales channel preselected in the sale form (see sales_channels in Reference). Used only when no sales channel is linked to your API integration |
commission |
number | Marketplace commission for the order, in the order currency. Shown in the sale form and added to the sale as a commission. If the sales channel has its own commission, the channel commission is used |
utm |
object | UTM tags: utm_source, utm_medium, utm_campaign, utm_term, utm_content. In the sale form the active marketing campaign with the same utm_source, utm_medium and utm_campaign is selected |
coupons |
array | Order coupons: [{"code": "SALE10", "amount": 100}]. Shown in the sale form: code and amount in the order currency |
custom |
object | Any extra fields as {"Label": "value"}. Shown in the sale form as "Label: value" |
promotions |
array of strings | Promotions or delivery conditions of the order. Shown as "Delivery type" in the orders list and in the sale form — only together with promo_delivery: true |
promo_delivery |
bool | Show promotions as the delivery type |
currency_conversion |
object | Order sum in the base currency of the account, for orders in another currency. See currency_conversion |
system_status |
string | One of the standard statuses, if status holds your own status name. When the order is sent again with cancelled, canceled, refund, failed or voided in system_status (or in status), the product reserve for the order is released |
Note about payment_type. The orders list and the sale form take payment_type of the first item in
order_data first, and info.payment_type only if it is empty. If an item has no payment_type, HugeProfit sets
Unknown, so send the same payment method in info and in the OrderDataType items.
currency_conversion
For orders in a currency other than the base currency of the account. The orders list shows
≈ converted_price base_currency next to the order sum, and the rate in the tooltip. price and currency of the
order stay in the original currency.
| Field | Type | Meaning |
|---|---|---|
original_currency |
string | Order currency, e.g. USD |
base_currency |
string | Base currency of the account, e.g. UAH |
rate |
number | How much of the base currency one unit of the order currency costs |
converted_price |
number | Order sum in the base currency |
To create the sale in the base currency, also send price_converted in the OrderDataType items —
the sale form takes the item price from it.
Example:
{
"original_currency": "USD",
"base_currency": "UAH",
"rate": 41.2,
"converted_price": 1030.0
}
Service keys
HugeProfit writes these keys itself, don't send them:
manual_unreserved— products whose reserve for the order was removed manually; HugeProfit doesn't reserve them again.is_manual— marks orders created manually in HugeProfit.
OrderDataType
A list of order items. An item without one of the required keys is dropped.
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | yes | Item ID in your system |
name |
string | yes | Product name |
product_id |
int / null | yes | Product ID on a marketplace, if the product is linked to it. Send null and use local_product_id |
quantity |
number | yes | Quantity |
price |
number | yes | Price per unit |
total |
number | yes | price × quantity |
is_paid |
bool | yes | Whether the item is paid |
local_product_id |
int | no | Product ID in HugeProfit. With it the product is found and reserved |
sku |
string | no | SKU |
payment_type |
string | no | Payment method name in your system |
measure_unit |
string | no | Unit of measure, e.g. pcs |
price_converted |
number | no | Price per unit in the base currency of the account, see currency_conversion |
Example
[
{
"id": 501,
"name": "Green cotton hat",
"product_id": null,
"local_product_id": 41901,
"sku": "HAT-01",
"quantity": 2,
"price": 475,
"total": 950,
"is_paid": false,
"payment_type": "Cash on delivery"
}
]
RemoteAddressType
| Field | Type | Required | Description |
|---|---|---|---|
address_1 |
string | yes | Delivery address or branch |
city |
string | yes | Delivery city |
delivery_cost |
number | yes | Delivery cost |
ttn |
string | no | Waybill number |
delivery_operator |
string | no | nova_poshta or ukrposhta |
Example
{
"address_1": "Branch 5",
"city": "Kyiv",
"delivery_cost": 80,
"delivery_operator": "nova_poshta"
}
SalesDataStructure
Default Statuses of sales
- saled
- reserve_sale
- cod
- delivery
- delivering
- on-delivering
- refund
- arrived