Cartum B2B features
New block customer_details in Get order list
New parameters for dropshipping orders
For /api/customer-groups/export
:
dropshipping - shows whether dropshipping options are enabled for this group
For Get order list:
new dropshipping_details parameter block
in the delivery_data array, a new parameter ownTTNPicked - indicates whether dropshipper has added the invoice number and/or uploaded the invoice file.
Export of customer groups
Function/api/customer-groups/export
// query
{
"token" : "1b360dca3d4e837b6091fdb07470eaf3"
}
Response example:
{
"status": "OK",
"response": {
"customer_groups": [
{
"id": 1,
"title": "Unregistered visitors",
"visible_price_level": {
"id": 2,
"title": "Retail price"
},
"product_visibility": {
"id": 3,
"title": "Full access to products"
},
"show_residues_near_status": false,
"show_price_list": false,
"dropshipping": false,
"available_payment_methods": ["12", "13"],
"available_delivery_methods": ["3", "8"]
},
{
"id": 3,
"title": "Wholesale customers",
"visible_price_level": {
"id": 2,
"title": "Retail price"
},
"product_visibility": {
"id": 3,
"title": "Full access to products"
},
"show_residues_near_status": false,
"show_price_list": false,
"dropshipping": true,
"available_payment_methods": ["12", "13", "14", "15", "16"],
"available_delivery_methods": ["3", "8", "22"]
}
]
}
}
Users import
Added parameters to users import:
customer group
account balance
balance currency
manager
website link
company
position
// query
{
"token": "4bb2ecabecb205256c20ac0d37c050e8",
"users": [{
"email": "email.123@gmail.com",
"customer_group_id": 3, //customer group id
"balance": 5000,
"balance_currency": 1,
"manager_id": 61,
"site_link": "url.com",
"company": "Company name",
"role": "Position"
}]
}
Export users
Added fields to export users:
customer group
account balance
balance currency
manager
website link
company
position
// ответ
{
"status": "OK",
"response": {
"users": [{
"id": 1,
"title": "asdasdasd",
"email": "email.123@gmail.com",
"phone": "",
"country": "",
"city": "",
"address": "",
"registered": "2020-01-16 15:42:27",
"customer_group_id": 3, //customer group id
"balance": 122,
"balance_currency": 2,
"manager": {
"id": 61,
"name": "aasdasdasd",
"phone": 380994565789
},
"site_link": "asdasdasd",
"company": "dasdasdasd",
"role": ""
}]
}
}
Import products into catalog
Added import of prices of different types to Import products:
// query
{
"token": "{{token}}",
"products": [
{
"article": "BH-12345",
"price": 1500,
"price_old": 1600,
"price_levels": [
{
"level_id": 3,
"price": 1000
},
{
"level_id": 4,
"price": 900
},
{
"level_id": 5,
"price": 800
},
{
"level_id": 6,
"price": 700
}
]
}
]
}
Price levels should be passed in a separateprice_levels
array .
Please note: in the price_levels
array, only the price tiers you created in Customers → Price tiers need to be passed in.
The retail price still needs to be passed through the price
property. Otherwise, you will get an error:
Import of prices for level "2" ("level_id") of the "price_levels" array object is performed in a different way
Export price levels
Function/api/price-levels/export
Query example:
{
"token" : "1b360dca3d4e837b6091fdb07470eaf3"
}
Response example:
{
"status": "OK",
"response": {
"price_levels": [
{
"id": 1,
"title": "Hide prices"
},
{
"id": 2,
"title": "Price"
},
{
"id": 3,
"title": "Wholesale price 1"
},
{
"id": 4,
"title": "Wholesale price 2"
}
]
}
}
Additional data in Get order list customer_details
In Get order list additional data about the customer is added - the group he belongs to and the type of price assigned to this group.
customer_details — array of additional customer data for B2B projects
group
id - ID of the customer group to which the customer belongs
title - name of the customer group to which the customer belongs
price_level
id - ID of the price tier for the customer group
title - name of the price tier for the customer group
Response example:
{
"status": "OK",
"response": {
"orders": [
{
"order_id": 7,
"user": 6,
"delivery_name": "John Doe",
"delivery_email": "john.doe@gmail.com",
"delivery_phone": "+38 (055) 555-55-55",
"delivery_city": "Kyiv",
"delivery_address": "Branch №13: Dorohozhytska St, 4",
"delivery_type": {
"id": 3,
"title": "Nova Poshta Branch"
},
"delivery_price": -1,
"comment": "Order comment",
"payment_type": {
"id": 13,
"title": "In cash"
},
"payment_price": 0,
"payed": 0,
"total_default": 3413,
"total_sum": 3413,
"total_quantity": 2,
"discount_percent": 0,
"discount_value": 0,
"coupon_code": "",
"coupon_percent": 0,
"coupon_discount_value": 0,
"coupon_type": 0,
"stat_status": 2,
"stat_created": "2021-04-09 12:09:01",
"currency": "UAH",
"order_without_callback": false,
"customer_details": {
"group": {
"id": 4,
"title": "Dealers"
},
"price_level": {
"id": 3,
"title": "Wholesale price"
}
................
Additional data in the Get order list dropshipping_details
In the Get orders list a new block of parameters was added for orders that were placed with the dropshipping option. The dropshipping_details block will be present only if the order was placed by a user from a group with dropshipping enabled.
Response example:
{
"status": "OK",
"response": {
"orders": [
{
"order_id": 158,
"user": 12,
...
"customer_details": {
"group": {
"id": 2,
"title": "Registered customers"
},
"price_level": {
"id": 2,
"title": "Retail price"
}
},
"dropshipping_details": {
"recipient_payment_price": 40211,
"dropshiper": {
"name": "asdasdasd",
"phone": "+38 (065) 465-46-54"
}
}
}
]
}
}
Own invoice in the order
In the Get order list in the delivery_data array, a new parameter ownTTNPicked, which indicates whether the dropshipper has indicated his invoice number and/or uploaded his invoice file.
Response example:
"delivery_data": {
"ownTTNPicked": true,
}