GET
/api/api-versions
Getting the list of available api versions
Getting the list of available api versions
Method allows to get all API-versions, which can be used on current account
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
versions
array
Available API versions
GET
/api/credentials
Getting the list of available api methods and stores for current key
Getting the list of available api methods and stores for current key
Method allows to get list of methods and information about access to stores for current API-key.
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
credentials[]
array of strings
deprecated Available API methods
scopes[]
array of strings
Permissions allowed for the key
siteAccess
string
Stores access mode. Possible values: access_full - access to all stores; access_selective - access to a particular store. Available stores are listed at field sitesAvailable
sitesAvailable[]
array of strings
Available stores
Cost
GET
/api/v5/costs
Getting of the cost list, adequate for the given filter
Getting of the cost list, adequate for the given filter
To access the method, the following permission is required cost_read.
The result is returned page by page. In the field pagination there is information on pagination.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CostFilterData)
filter[ids][]
array of integers
Costs ID
filter[costItems][]
array of strings
Array of symbolic codes of costs items
filter[sites][]
array of strings
Array of symbolic codes of stores related with cost
filter[createdBy][]
array of integers
Array of users ID, which created the cost
filter[orderNumber]
string
{length: {max: 255}}
Number of order related with cost
filter[costGroups][]
array of strings
Array of symbolic codes of costs groups
filter[users][]
array of integers
Array of users ID related with cost
filter[comment]
string
{length: {max: 1000}}
Comment
filter[orderIds][]
array of integers
Array of order internal ID
filter[orderExternalIds][]
array of strings
Array of order external ID
filter[createdAtFrom]
DateTime
Y-m-d
Cost creation date (from)
filter[createdAtTo]
DateTime
Y-m-d
Cost creation date (to)
filter[dateFrom]
DateTime
Y-m-d
Cost period (from)
filter[dateTo]
DateTime
Y-m-d
Cost period (to)
filter[minSumm]
integer
Cost minimum sum
filter[maxSumm]
integer
Cost maximum sum
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
costs[]
array of objects (Cost)
Cost
costs[][currency]
string
Currency
costs[][source]
object (SerializedSource)
Customer source data
costs[][source][source]
string
Source
costs[][source][medium]
string
Medium
costs[][source][campaign]
string
Campaign
costs[][source][keyword]
string
Keyword
costs[][source][content]
string
Ad content
costs[][id]
integer
Cost ID
costs[][dateFrom]
DateTime
Date (from)
costs[][dateTo]
DateTime
Date (to)
costs[][summ]
float
Sum (in base currency)
costs[][costItem]
string
Cost item code
costs[][comment]
string
Comment
costs[][createdAt]
DateTime
Created at
costs[][createdBy]
string
User ID
costs[][order]
object (Order)
Order
costs[][order][id]
integer
Order ID
costs[][order][number]
string
Order number
costs[][order][externalId]
string
Order external ID
costs[][userId]
integer
User ID related with cost
costs[][sites][]
array of strings
Symbolic codes of stores, for which the expense is incurred
To access the method, the following permission is required cost_write.
When creating costs for attracting customers in fields cost[source][...] it`s possible to specify meanings of appropriate tags.
Default meanings of tags will be taken from a cost item, whose character code is specified in field cost[costItem].
For specifying stores to which the cost will be attached it`s necessary to specify array of their character codes in field cost[sites][].
Cost will be created by default for all stores, which have access to API-key.
Cost can be bound with existing order only if the cost item has "Refers to the costs on orders" attribute. For this purpose it is necessary to set the value for one of the following field:
cost[order][id] – order internal ID;
cost[order][externalId] – order external ID;
cost[order][number] – order number.
If the values of several fields are set, they will be processed in order specified above.
Order search by externalId/number will be performed within the store specified in the site parameter.
Parameters
Parameter
Type
Format
Description
site
string
Symbolic code of store. Is specified in case of relation to order by externalId or number
cost
object (SerializedCost)
The data about cost
cost[dateFrom]
DateTime
Date (from)
cost[dateTo]
DateTime
Date (to)
cost[summ]
float
Sum (in base currency)
cost[comment]
string
Comment
cost[costItem]
string
Cost item code
cost[order]
object (SerializedEntityOrder)
Order
cost[order][id]
integer
Order internal ID
cost[order][externalId]
string
Order external ID
cost[order][number]
string
Order number
cost[userId]
integer
ID of user related with cost
cost[sites]
array
Symbolic codes of stores, for which the expense is incurred
To access the method, the following permission is required cost_write.
Method allows to upload as packet up to
50 costs.
More detailed information on data format you can find in description of method /api/v*/costs/create.
When batch uploading costs for attracting customers in fields cost[][source][...] it`s possible to specify meanings of appropriate tags
Default meanings of tags will be taken from a cost item, which character code is specified in the field costs[][costItem].
Parameters
Parameter
Type
Format
Description
costs[]
array of objects (SerializedCost)
The data about cost
costs[][dateFrom]
DateTime
Date (from)
costs[][dateTo]
DateTime
Date (to)
costs[][summ]
float
Sum (in base currency)
costs[][comment]
string
Comment
costs[][costItem]
string
Cost item code
costs[][order]
object (SerializedEntityOrder)
Order
costs[][order][id]
integer
Order internal ID
costs[][order][externalId]
string
Order external ID
costs[][order][number]
string
Order number
costs[][userId]
integer
ID of user related with cost
costs[][sites]
array
Symbolic codes of stores, for which the expense is incurred
To access the method, the following permission is required cost_write.
When editing costs for attracting customers in fields cost[source][...] it`s possible to specify meanings of appropriate tags.
Cost can be bound with existing order only if the cost item has "Refers to the costs on orders" attribute. For this purpose it is necessary to set the value for one of the following field:
cost[order][id] – order internal ID;
cost[order][externalId] – order external ID;
cost[order][number] – order number.
If the values of several fields are set, they will be processed in order specified above.
Order search by externalId/number will be performed within the store specified in the site parameter.
Parameters
Parameter
Type
Format
Description
site
string
Symbolic code of store. Is specified in case of relation to order by externalId or number
cost
object (SerializedCost)
The data about cost
cost[dateFrom]
DateTime
Date (from)
cost[dateTo]
DateTime
Date (to)
cost[summ]
float
Sum (in base currency)
cost[comment]
string
Comment
cost[costItem]
string
Cost item code
cost[order]
object (SerializedEntityOrder)
Order
cost[order][id]
integer
Order internal ID
cost[order][externalId]
string
Order external ID
cost[order][number]
string
Order number
cost[userId]
integer
ID of user related with cost
cost[sites]
array
Symbolic codes of stores, for which the expense is incurred
POST
/api/v5/custom-fields/{entity}/create
Custom fields creation
Custom fields creation
To access the method, the following permission is required custom_fields_write.
{entity}, customField[type], customField[code] fields are specified only at creation of custom field.
If customField[type] = dictionary, then customField[default] takes code element of the directory.
Available values of customField[displayArea] field depends on {entity}.
If {entity} = order, then customField[displayArea] field can take the following values:
customer – Customer
legal_details – Legal details
shipment – Shipment
dimensions – Dimensions
delivery – Delivery
payment – Payment
If {entity} = customer, then customField[displayArea] field can take the following values:
main_data – Main data
delivery – Delivery
legal_details – Legal details
If {entity} = customer_corporate, then customField[displayArea] field can take the following values:
main_data – Main data
If {entity} = company, then customField[displayArea] field can take the following values:
main_data – Main data
legal_details – Legal details
customField[required] field takes false value by default.
customField[inFilter] field takes true value by default.
customField[inList] field takes true value by default.
customField[inGroupActions] field takes false value by default.
customField[viewMode] field takes editable value by default.
customField[viewModeMobile] field takes editable value by default.
customField[ordering] field takes 50 value by default.
If customField[type] = dictionary, then customField[dictionary] field is mandatory and contains code of related directory. It is filled only at creation of custom field.
GET
/api/v5/customers
Getting the list of customers matched the specified filter
Getting the list of customers matched the specified filter
To access the method, the following permission is required customer_read.
The result is returned page by page. In the field pagination there is information on pagination.
In the filters
filter[sourceName], filter[mediumName], filter[campaignName],
filter[keywordName], filter[adContentName]
the name of the elements are specified.
In the filter[managers][] filters
the internal IDs of the system elements are specified.
In the filter[managerGroups] filter the symbol codes of the elements are specified.
The filter filter[discountCardNumber] is available, if the field "Discount card" in the "Loyalty" module is active.
In the following filters filter[ids][] and filter[externalIds][] the array of internal and external identifiers are passed.
Filter filter[classSegment] allows to get segments of customers RFM-analysis. There are available the following values:
monetary[0..2]_recency[0..2]frequency[0..2]_recency[0..2]monetary[0..2]_frequency[0..2].
By filter filter[name] possible to search by customer name and phone.
With the help of the filter[customFields][] filter you can search by the custom fields value.
For the "Data book" fields the symbol code of data book value is specified.
For the "Date" and "Date-time" fields the date is specified in the Y-m-d format.
For other field types exactly the value is specified.
For the Integer, Numeric, Date and Date-time custom fields
the filtration is realized over the range, for other fields types — by the exact value.
Filter name is the same as field symbol code. E.g.: for the Date field with the symbol code
birth_date there are filters
filter[customFields][birth_date][min] and
filter[customFields][birth_date][max]. For the DataBook field
with the symbol code quality there is multiple filter
filter[customFields][quality][].
One of three values can be specified in filter[attachments]:
1 - returns customers, which have no attached files;
2 - returns customers, which have attached files;
3 - returns customers, which have attached files and attachments to letters.
One of three values can be specified in the filter[tasksCounts]:
1 - returns customers having no uncompleted tasks;
2 - returns customers with any uncompleted tasks (both expired and not expired ones);
3 - returns only those customers who have expired tasks among uncompleted ones.
The filter[mgChannels] filter specifies an array of internal IDs of channels in the system. The filter selects customers with chats in the specified channels.
Filter customers by tags using filter[tags][] and filter[attachedTags][].
If filter[tags][] is applied, the system will return customers with all tags mentioned
in the list. This means that the AND condition is used for filtering.
If filter[attachedTags][] is applied, the system will return customers for whom one
of the tags mentioned in the list is an attached one. This means that the OR condition is used
for filtering.
The values of filter[tags][] and filter[attachedTags][] should not be
empty or have duplicates or tags with more than two consecutive spaces. Otherwise, a corresponding
error will be shown for the request.
The fields personalDiscount, cumulativeDiscount and discountCardNumber
are returned, if they are active in the "Loyalty" module settings.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CustomerFilterData)
filter[ids][]
array of integers
Array of customers ID
filter[externalIds][]
array of strings
Array of customers externalID
filter[name]
string
{length: {max: 255}}
Customer
filter[city]
string
{length: {max: 255}}
City
filter[region]
string
{length: {max: 255}}
Region
filter[sites][]
array of strings
Stores
filter[managers][]
array of integers
Managers
filter[managerGroups][]
array of strings
Manager groups
filter[notes]
string
Notes
filter[vip]
boolean
VIP customer
filter[bad]
boolean
BAD customer
filter[discountCardNumber]
string
{length: {max: 255}}
Discount card number
filter[attachments]
integer
[1|2|3]
Attachments
filter[tasksCounts]
integer
[1|2|3]
Tasks
filter[email]
string
{length: {max: 255}}
E-mail
filter[contragentName]
string
{length: {max: 255}}
Full name
filter[contragentTypes][]
array of strings
{choice of [enterpreneur|individual|legal-entity]}
POST
/api/v5/customers/combine
Combining of customers
Combining of customers
To access the method, the following permission is required customer_write.
Allows to combine customers.
When conflict of fields, only resultCustomer customer data will be saved, other customers data by certain field will be removed.
All phones will be added to resultCustomer customer.
Customers from customers parameter will be irreversibly removed.
While combining of customers the related data will be combined.
Up to 50 customers can be combined at once.
The operation is performed asynchronously. The successful response success=true means that the operation will be executed
but it hasn't been completed yet. The actual result of the operation can be tracked using the /api/v5/customers/history method
for those customers that will be deleted when combining (history[][combinedTo] response parameter).
To access the method, the following permission is required customer_write.
Method creates the customer and returns internal ID of created customer.
If customer[createdAt] is not specified, then current time will be used as the date/time of
customer creation.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
The fields customer[personalDiscount] and customer[discountCardNumber]
are received, if they are active in the "Loyalty" module settings.
You can pass the custom fields value array in the field customer[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
The customer address customer[address] you can specify either in a string form
in the customer[address][text] field or in a detailed view, filled
all the fields except customer[address][text].
Parameters
Parameter
Type
Format
Description
site
string
Symbolic code of store
customer
object (SerializedCustomer)
customer[externalId]
string
Customer external ID
customer[isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
customer[createdAt]
DateTime
Created at
customer[vip]
boolean
VIP customer
customer[bad]
boolean
Bad customer
customer[contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
POST
/api/v5/customers/fix-external-ids
The mass recording of customers external ID
The mass recording of customers external ID
To access the method, the following permission is required customer_write.
This method is useful in case of reverse synchronization of customers, which were created in system initially.
The store requests customers created in system, and creates them in its own base.
When creating of customers in store there are customers' own ID generated
(externalId of customers in system notation).
Immediately after customers creation the web-store calls
method /api/v*/customers/fix-external-ids, keeping in system
customers' own ID.
GET
/api/v5/customers/history
Getting the customer change history
Getting the customer change history
To access the method, the following permission is required customer_read.
Returns the changes in customer data, which were made in the specified range of dates,
or the set of incremental changes for carrying out the permanent synchronization
The result is returned per-page. In the field pagination there is an information about the pagination.
To paginate through history records, it is necessary to use filter[sinceId]. It is not recommended to use the page parameter.
More information about the work with history you can find in other article.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CustomerHistoryFilterV4Type)
filter[customerId]
integer
{range: {>=0, <=4294967295}}
Customer ID
filter[sinceId]
integer
{range: {>=0, <=4294967295}}
Starting with customers history ID
filter[customerExternalId]
string
{length: {max: 255}}
Customer external ID
filter[startDate]
DateTime
Y-m-d H:i:s
Start DateTime of change
filter[endDate]
DateTime
Y-m-d H:i:s
End DateTime of change
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
generatedAt
DateTime
Time of response formation
history[]
array of objects (CustomerHistory)
history[][id]
integer
Internal identifier of entry in the history
history[][createdAt]
DateTime
Date of making change
history[][created]
boolean
Notes that the entity is created
history[][deleted]
boolean
Notes that the entity is deleted
history[][source]
string
Date of making change
history[][user]
object (User)
User
history[][user][id]
integer
User ID
history[][field]
string
Name of changed field
history[][oldValue]
custom handler result for (mixed)
Old value of field
history[][newValue]
custom handler result for (mixed)
New value of field
history[][apiKey]
object (ApiKey)
Information about api key used for making this change
history[][apiKey][current]
boolean
The change was made with the api key currently in use
history[][apiKey][id]
integer
Api key ID
history[][customer]
object (Customer)
Customer
history[][customer][id]
integer
Customer ID
history[][customer][externalId]
string
Customer external ID
history[][customer][site]
string
Store, from which the customer came
history[][address]
object (CustomerAddressWithIsMain)
Customer address
history[][address][id]
integer
Customer address ID
history[][address][externalId]
string
External ID
history[][address][name]
string
Name
history[][address][isMain]
boolean
Customer address is main
history[][combinedTo]
object (Customer)
Information about the customer that was created after combining with the current customer
To access the method, the following permission is required customer_write.
Method creates the note and returns its internal ID in case of success.
It is possible to specify manager internal ID, whom the note will be bound to,
in the note[managerId] field.
It is necessary to specify the note content in the note[text] field.
Text length must be not less than 1 symbol and not more than 2000 symbols. It is allowed to use
HTML tags (p, a, ul, ol, strong,
em, blockquote). When using HTML in text, it is important to follow the
semantics and monitor the presence of closing tags, otherwise the system will give an error.
It is necessary to specify the customer, whom
the note will be bound to, in the note[customer] field. It is possible to do, using
internal note[customer][id] or external note[customer][externalId].
During uploading the errors occurred. The part of customers is not loaded (the response also contains an "errors" array)
GET
/api/v5/customers/{externalId}
Getting information on customer
Getting information on customer
To access the method, the following permission is required customer_read.
Method returns full information on the customer. You may refer to customer either by external customer ID (by=externalId),
or by internal ID (by=id).
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
Empty fields without values are not returned.
In the managerId field the internal ID of system entity is returned.
The fields personalDiscount, cumulativeDiscount and discountCardNumber
are returned, if they are active in the "Loyalty" module settings.
In the customFields field the value array of custom fields is returned.
For the "DataBook" fields the symbol code of data book value is specified.
For the date fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
If the customer address was specified in the string form it will be returned to the
customer[address][text]. If the address was specified in detailed view,
there will be returned all delivery filled fields, and in the
customer[address][text] there will be automatically
generated textual representation of the address.
Parameters
Parameter
Type
Format
Description
externalId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
customer
object (Customer)
Customer
customer[type]
string
Customer type
customer[id]
integer
Customer ID
customer[externalId]
string
Customer external ID
customer[isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
customer[createdAt]
DateTime
Created at
customer[managerId]
integer
Customer manager
customer[vip]
boolean
VIP customer
customer[bad]
boolean
Bad customer
customer[site]
string
Store, from which the customer came
customer[contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
customer[contragent][contragentType]
string
Contragent type
customer[contragent][legalName]
string
Legal name
customer[contragent][legalAddress]
string
Registration address
customer[contragent][INN]
string
TIN
customer[contragent][OKPO]
string
RNNBO
customer[contragent][KPP]
string
IECC
customer[contragent][OGRN]
string
PSRN
customer[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
customer[contragent][certificateNumber]
string
Certificate number
customer[contragent][certificateDate]
DateTime
Certificate date
customer[contragent][BIK]
string
RCBIC
customer[contragent][bank]
string
Bank
customer[contragent][bankAddress]
string
Bank address
customer[contragent][corrAccount]
string
Corresponding account
customer[contragent][bankAccount]
string
Settlement account
customer[tags][]
array of objects (CustomerTagLink)
[array] Tags
customer[tags][][color]
string
customer[tags][][name]
string
customer[tags][][colorCode]
string
customer[tags][][attached]
boolean
customer[firstClientId]
string
First Google Analytics clientId
customer[lastClientId]
string
Last Google Analytics clientId
customer[customFields]
array
Associative array of custom fields
customer[personalDiscount]
double
Personal discount
customer[cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)
customer[discountCardNumber]
string
Discount card number
customer[avgMarginSumm]
float
Average gross profit of customer orders (in base currency)
Customer not found (if the customer was deleted as a result of a merge, the data of the target customer will be in the "combinedTo" field)
POST
/api/v5/customers/{externalId}/edit
Customer editing
Customer editing
To access the method, the following permission is required customer_write.
Method allows to edit the customer. You may refer to customer either by external customer ID (by=externalId), or by internal ID (by=id).
In case of trying to edit the removed customer,
the system returns state=removed in the answer.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
The fields customer[personalDiscount] and customer[discountCardNumber]
are received, if they are active in the "Loyalty" module settings.
You can pass the custom fields value array in the field customer[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
The customer address customer[address] you can specify either in a string form
in the customer[address][text] field or in a detailed view, filled
all the fields except customer[address][text].
The fields customer[addTags] and customer[removeTags] cannot be used
together with the field customer[tags]. Values of these fields should be lowercase
and should not contain whitespace characters other than regular whitespace and whitespaces
at the beginning and end of the string.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
string
Symbolic code of store
customer
object (SerializedCustomer)
customer[externalId]
string
Customer external ID
customer[isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
customer[createdAt]
DateTime
Created at
customer[vip]
boolean
VIP customer
customer[bad]
boolean
Bad customer
customer[contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
POST
/api/v5/customers/{externalId}/subscriptions
Subscribe/unsubscribe customer to mailings
Subscribe/unsubscribe customer to mailings
To access the method, the following permission is required customer_write.
Method allows to subscribe or unsubscribe the customer from the mailing list.
The array of customer's subscriptions is passed in the field customer[subscriptions].
If the field customer[subscriptions][][subscription] is not provided, a subscription or unsubscription is made for all subscription types to the channel customer[subscriptions][][channel].
The field customer[subscriptions][][messageId] is used to pass the identifier of the message from which the customer subscribed/unsubscribed. If this message is from a chat, the message identifier in MG is expected.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
GET
/api/v5/customers-corporate
Getting the list of corporate customers matched the specified filter
Getting the list of corporate customers matched the specified filter
To access the method, the following permission is required customer_read.
The result is returned page by page. In the field pagination there is information on pagination.
In the filter[managers][] filters
the internal IDs of the system elements are specified.
In the filter[managerGroups] filter the symbol codes of the elements are specified.
The filter filter[discountCardNumber] is available, if the field "Discount card" in the "Loyalty" module is active.
In the following filters filter[ids][] and filter[externalIds][] the array of internal and external identifiers are passed.
By filter filter[name] possible to search by customer name and phone.
With the help of the filter[customFields][] filter you can search by the custom fields value.
For the "Data book" fields the symbol code of data book value is specified.
For the "Date" and "Date-time" fields the date is specified in the Y-m-d format.
For other field types exactly the value is specified.
For the Integer, Numeric, Date and Date-time custom fields
the filtration is realized over the range, for other fields types — by the exact value.
Filter name is the same as field symbol code. E.g.: for the Date field with the symbol code
birth_date there are filters
filter[customFields][birth_date][min] and
filter[customFields][birth_date][max]. For the DataBook field
with the symbol code quality there is multiple filter
filter[customFields][quality][].
One of three values can be specified in filter[attachments]:
1 - returns customers, which have no attached files;
2 - returns customers, which have attached files;
3 - returns customers, which have attached files and attachments to letters.
One of three values can be specified in the filter[tasksCounts]:
1 - returns customers having no uncompleted tasks;
2 - returns customers with any uncompleted tasks (both expired and not expired ones);
3 - returns only those customers who have expired tasks among uncompleted ones.
The fields personalDiscount, cumulativeDiscount and discountCardNumber
are returned, if they are active in the settings.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
POST
/api/v5/customers-corporate/combine
Combining of corporate customers
Combining of corporate customers
To access the method, the following permission is required customer_write.
Allows to combine customers.
When conflict of fields, only resultCustomer customer data will be saved, other customers data by certain field will be removed.
All addresses, companies and contact persons will be added to resultCustomer customer.
Customers from customers parameter will be irreversibly removed.
While combining of customers the related data will be combined.
POST
/api/v5/customers-corporate/create
Corporate customer creation
Corporate customer creation
To access the method, the following permission is required customer_write.
Method creates the customer and returns internal ID of created customer.
If customerCorporate[createdAt] is not specified, then current time will be used as the date/time of
customer creation.
externalId should be unique for customers and corporate customers within one store. To separate different types of customers, it is possible to add a prefix into a string (for example, use i123234 for the customer and l123234 for the corporate customer)
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
The fields customerCorporate[personalDiscount] and customerCorporate[discountCardNumber]
are received, if they are active in the module settings.
You can pass the custom fields value array in the field customerCorporate[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
The customer address customerCorporate[addresses] you can specify either in a string form
in the customerCorporate[addresses][][text] field or in a detailed view, filled
all the fields except customerCorporate[addresses][][text].
POST
/api/v5/customers-corporate/fix-external-ids
The mass recording of corporate customers external ID
The mass recording of corporate customers external ID
To access the method, the following permission is required customer_write.
This method is useful in case of reverse synchronization of customers, which were created in system initially.
The store requests customers created in system, and creates them in its own base.
When creating of customers in store there are customers' own ID generated
(externalId of customers in system notation).
Immediately after customers creation the web-store calls
method /api/v*/customers-corporate/fix-external-ids, keeping in system
customers' own ID.
externalId should be unique for customers and corporate customers within one store. To separate different types of customers, it is possible to add a prefix into a string (for example, use i123234 for the customer and l123234 for the corporate customer)
GET
/api/v5/customers-corporate/history
Getting the corporate customer change history
Getting the corporate customer change history
To access the method, the following permission is required customer_read.
Returns the changes in customer data, which were made in the specified range of dates,
or the set of incremental changes for carrying out the permanent synchronization
The result is returned per-page. In the field pagination there is an information about the pagination.
To paginate through history records, it is necessary to use filter[sinceId]. It is not recommended to use the page parameter.
More information about the work with history you can find in other article.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CustomerHistoryFilterV4Type)
filter[customerId]
integer
{range: {>=0, <=4294967295}}
Customer ID
filter[sinceId]
integer
{range: {>=0, <=4294967295}}
Starting with customers history ID
filter[customerExternalId]
string
{length: {max: 255}}
Customer external ID
filter[startDate]
DateTime
Y-m-d H:i:s
Start DateTime of change
filter[endDate]
DateTime
Y-m-d H:i:s
End DateTime of change
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
generatedAt
DateTime
Time of response formation
history[]
array of objects (CustomerCorporateHistory)
Corporate customer change
history[][id]
integer
Internal identifier of entry in the history
history[][createdAt]
DateTime
Date of making change
history[][created]
boolean
Notes that the entity is created
history[][deleted]
boolean
Notes that the entity is deleted
history[][source]
string
Date of making change
history[][user]
object (User)
User
history[][user][id]
integer
User ID
history[][field]
string
Name of changed field
history[][oldValue]
custom handler result for (mixed)
Old value of field
history[][newValue]
custom handler result for (mixed)
New value of field
history[][apiKey]
object (ApiKey)
Information about api key used for making this change
history[][apiKey][current]
boolean
The change was made with the api key currently in use
history[][apiKey][id]
integer
Api key ID
history[][customer]
object (CustomerCorporate)
Corporate customer
history[][customer][id]
integer
Corporate customer ID
history[][customer][externalId]
string
Corporate customer external ID
history[][customer][site]
string
Store, from which the corporate customer came
history[][address]
object (CustomerAddressWithIsMain)
Customer address
history[][address][id]
integer
Customer address ID
history[][address][externalId]
string
External ID
history[][address][name]
string
Name
history[][address][isMain]
boolean
Customer address is main
history[][combinedTo]
object (CustomerCorporate)
Information about the customer that was created after combining with the current customer
POST
/api/v5/customers-corporate/notes/create
Note creation
Note creation
To access the method, the following permission is required customer_write.
Method creates the note and returns its internal ID in case of success.
It is possible to specify manager internal ID, whom the note will be bound to,
in the note[managerId] field.
It is necessary to specify the note content in the note[text] field.
Text length must be not less than 1 symbol and not more than 2000 symbols. It is allowed to use
HTML tags (p, a, ul, ol, strong,
em, blockquote). When using HTML in text, it is important to follow the
semantics and monitor the presence of closing tags, otherwise the system will give an error.
It is necessary to specify the customer, whom
the note will be bound to, in the note[customer] field. It is possible to do, using
internal note[customer][id] or external note[customer][externalId].
During uploading the errors occurred. The part of customers is not loaded (the response also contains an "errors" array)
GET
/api/v5/customers-corporate/{externalId}
Getting information on corporate customer
Getting information on corporate customer
To access the method, the following permission is required customer_read.
Method returns full information on the customer. You may refer to customer either by external customer ID (by=externalId),
or by internal ID (by=id).
Empty fields without values are not returned.
In the managerId field the internal ID of system entity is returned.
The fields personalDiscount, cumulativeDiscount and discountCardNumber
are returned, if they are active in the "Loyalty" module settings.
In the customFields field the value array of custom fields is returned.
For the "DataBook" fields the symbol code of data book value is specified.
For the date fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
Parameters
Parameter
Type
Format
Description
externalId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
customerCorporate
object (CustomerCorporate)
Corporate customer
customerCorporate[type]
string
Customer type
customerCorporate[id]
integer
Corporate customer ID
customerCorporate[externalId]
string
Corporate customer external ID
customerCorporate[mainAddress]
object (EntityWithExternalIdNameOutput)
Main corporate customer address
customerCorporate[mainAddress][id]
integer
ID
customerCorporate[mainAddress][externalId]
string
External ID
customerCorporate[mainAddress][name]
string
Name
customerCorporate[createdAt]
DateTime
Created at
customerCorporate[managerId]
integer
Corporate customer manager
customerCorporate[vip]
boolean
VIP corporate customer
customerCorporate[bad]
boolean
Bad corporate customer
customerCorporate[site]
string
Store, from which the corporate customer came
customerCorporate[tags][]
array of objects (CustomerTagLink)
[array] Tags
customerCorporate[tags][][color]
string
customerCorporate[tags][][name]
string
customerCorporate[tags][][colorCode]
string
customerCorporate[tags][][attached]
boolean
customerCorporate[firstClientId]
string
First Google Analytics unique clientId
customerCorporate[lastClientId]
string
Last Google Analytics unique clientId
customerCorporate[customFields]
array
Associative array of custom fields
customerCorporate[personalDiscount]
double
Personal discount
customerCorporate[cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)
customerCorporate[discountCardNumber]
string
Discount card number
customerCorporate[avgMarginSumm]
float
Average gross profit of corporate customer orders (in base currency)
GET
/api/v5/customers-corporate/{externalId}/addresses
List of addresses for a corporate customer
List of addresses for a corporate customer
To access the method, the following permission is required customer_read.
The result is returned page by page. In the field pagination there is information on pagination.
You may refer to customer addresses either by external customer ID (by=externalId),
or by internal ID (by=id).
If the customer address was specified in the string form it will be returned to the
address[text]. If the address was specified in detailed view,
there will be returned all delivery filled fields, and in the
address[text] there will be automatically
generated textual representation of the address.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CustomerAddressFilterData)
filter[ids]
string
filter[name]
string
{length: {max: 255}}
filter[city]
string
{length: {max: 255}}
filter[region]
string
{length: {max: 255}}
externalId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
addresses[]
array of objects (CustomerAddress)
Customer address
addresses[][id]
integer
Address ID
addresses[][index]
string
Postal code
addresses[][countryIso]
string
Country ISO code
addresses[][region]
string
Region
addresses[][regionId]
integer
Region ID in Geohelper
addresses[][city]
string
City
addresses[][cityId]
integer
City ID in Geohelper
addresses[][cityType]
string
Locality type
addresses[][street]
string
Street
addresses[][streetId]
integer
Street ID in Geohelper
addresses[][streetType]
string
Street type
addresses[][building]
string
Building
addresses[][flat]
string
Flat/office
addresses[][floor]
integer
Floor
addresses[][block]
integer
Entrance
addresses[][house]
string
House
addresses[][housing]
string
Housing
addresses[][metro]
string
Underground
addresses[][notes]
string
Notes to address
addresses[][text]
string
Address as string
addresses[][isMain]
boolean
The address is the main for the customer
addresses[][externalId]
string
External ID
addresses[][name]
string
Name
POST
/api/v5/customers-corporate/{externalId}/addresses/create
Creating an address for a corporate customer
Creating an address for a corporate customer
To access the method, the following permission is required customer_write.
The customer address address you can specify either in a string form
in the address[text] field or in a detailed view, filled
all the fields except address[text].
No more than 100 addresses can be created for a customer.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
address
object (SerializedCustomerAddress)
address[index]
string
Postal code
address[countryIso]
string
Country ISO code
address[region]
string
Region
address[regionId]
integer
Region ID in Geohelper
address[city]
string
City
address[cityId]
integer
City ID in Geohelper
address[cityType]
string
Locality type
address[street]
string
Street
address[streetId]
integer
Street ID in Geohelper
address[streetType]
string
Street type
address[building]
string
Building
address[flat]
string
Flat/office
address[floor]
integer
Floor
address[block]
integer
Entrance
address[house]
string
House
address[housing]
string
Housing
address[metro]
string
Underground
address[notes]
string
Notes to address
address[text]
string
Address as string
address[isMain]
boolean
The address is the main for the customer
address[externalId]
string
External ID
address[name]
string
Name
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
POST
/api/v5/customers-corporate/{externalId}/addresses/{entityExternalId}/edit
Editing the address of the corporate customer
Editing the address of the corporate customer
To access the method, the following permission is required customer_write.
You may refer to customer addresses either by external customer ID (by=externalId),
or by internal ID (by=id).
You may edit customer address (entityExternalId) either by external customer address ID (entityBy=externalId),
or by internal ID (entityBy=id).
The customer address address you can specify either in a string form
in the address[text] field or in a detailed view, filled
all the fields except address[text].
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId, entityBy=externalId)
entityBy
string
Is specified what is transmitted in parameter entityExternalId: internal (entityBy=id) or external (entityBy=externalId) ID. By default it is externalId.
address
object (SerializedCustomerAddress)
address[index]
string
Postal code
address[countryIso]
string
Country ISO code
address[region]
string
Region
address[regionId]
integer
Region ID in Geohelper
address[city]
string
City
address[cityId]
integer
City ID in Geohelper
address[cityType]
string
Locality type
address[street]
string
Street
address[streetId]
integer
Street ID in Geohelper
address[streetType]
string
Street type
address[building]
string
Building
address[flat]
string
Flat/office
address[floor]
integer
Floor
address[block]
integer
Entrance
address[house]
string
House
address[housing]
string
Housing
address[metro]
string
Underground
address[notes]
string
Notes to address
address[text]
string
Address as string
address[isMain]
boolean
The address is the main for the customer
address[externalId]
string
External ID
address[name]
string
Name
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
GET
/api/v5/customers-corporate/{externalId}/companies
List of companies of a contact person
List of companies of a contact person
To access the method, the following permission is required customer_read.
The result is returned page by page. In the field pagination there is information on pagination.
You may refer to customer companies either by external customer ID (by=externalId),
or by internal ID (by=id).
If the customer address was specified in the string form it will be returned to the
address[text]. If the address was specified in detailed view,
there will be returned all delivery filled fields, and in the
address[text] there will be automatically
generated textual representation of the address.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CompanyFilterData)
filter[ids]
string
Array of companies IDs
externalId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
companies[]
array of objects (Company)
Company
companies[][isMain]
boolean
The company is the main for the customer
companies[][id]
integer
Company ID
companies[][externalId]
string
Company external ID
companies[][customer]
object (SerializedEntityCustomer)
Customer
companies[][customer][site]
string
Symbolic code of store
companies[][customer][id]
integer
Customer internal ID
companies[][customer][externalId]
string
Customer external ID
companies[][customer][type]
string
Customer type
companies[][active]
boolean
Activity
companies[][name]
string
Name
companies[][brand]
string
Brand
companies[][site]
string
Company website
companies[][createdAt]
DateTime
Creation date
companies[][contragent]
object (CompanyContragent)
Requisites
companies[][contragent][contragentType]
string
Contragent type
companies[][contragent][legalName]
string
Legal name
companies[][contragent][legalAddress]
string
Registration address
companies[][contragent][INN]
string
TIN
companies[][contragent][OKPO]
string
RNNBO
companies[][contragent][KPP]
string
IECC
companies[][contragent][OGRN]
string
PSRN
companies[][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
companies[][contragent][certificateNumber]
string
Certificate number
companies[][contragent][certificateDate]
DateTime
Certificate date
companies[][contragent][BIK]
string
RCBIC
companies[][contragent][bank]
string
Bank
companies[][contragent][bankAddress]
string
Bank address
companies[][contragent][corrAccount]
string
Corresponding account
companies[][contragent][bankAccount]
string
Settlement account
companies[][address]
object (CustomerAddress)
Address
companies[][address][id]
integer
Address ID
companies[][address][index]
string
Postal code
companies[][address][countryIso]
string
Country ISO code
companies[][address][region]
string
Region
companies[][address][regionId]
integer
Region ID in Geohelper
companies[][address][city]
string
City
companies[][address][cityId]
integer
City ID in Geohelper
companies[][address][cityType]
string
Locality type
companies[][address][street]
string
Street
companies[][address][streetId]
integer
Street ID in Geohelper
companies[][address][streetType]
string
Street type
companies[][address][building]
string
Building
companies[][address][flat]
string
Flat/office
companies[][address][floor]
integer
Floor
companies[][address][block]
integer
Entrance
companies[][address][house]
string
House
companies[][address][housing]
string
Housing
companies[][address][metro]
string
Underground
companies[][address][notes]
string
Notes to address
companies[][address][text]
string
Address as string
companies[][address][externalId]
string
External ID
companies[][address][name]
string
Name
companies[][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)
companies[][marginSumm]
float
LTV (in base currency)
companies[][totalSumm]
float
Orders total sum (in base currency)
companies[][averageSumm]
float
Order average sum (in base currency)
companies[][costSumm]
float
Amount of costs (in base currency)
companies[][ordersCount]
integer
Orders quantity
companies[][customFields]
array
Associative array of custom fields
POST
/api/v5/customers-corporate/{externalId}/companies/create
Creating a company for a corporate customer
Creating a company for a corporate customer
To access the method, the following permission is required customer_write.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
You can pass the custom fields value array in the field company[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
company
object (SerializedCompany)
company[isMain]
boolean
The company is the main for the customer
company[externalId]
string
Company external ID
company[active]
boolean
Activity
company[name]
string
Name
company[brand]
string
Brand
company[site]
string
Company website
company[createdAt]
DateTime
Y-m-d H:i:s
Creation date
company[contragent]
object (SerializedCompanyContragent)
Requisites
company[contragent][contragentType]
string
Contragent type
company[contragent][legalName]
string
Legal name
company[contragent][legalAddress]
string
Registration address
company[contragent][INN]
string
TIN
company[contragent][OKPO]
string
RNNBO
company[contragent][KPP]
string
IECC
company[contragent][OGRN]
string
PSRN
company[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
company[contragent][certificateNumber]
string
Certificate number
company[contragent][certificateDate]
DateTime
Y-m-d
Certificate date
company[contragent][BIK]
string
RCBIC
company[contragent][bank]
string
Bank
company[contragent][bankAddress]
string
Bank address
company[contragent][corrAccount]
string
Corresponding account
company[contragent][bankAccount]
string
Settlement account
company[customFields]
array
Associative array of custom fields
company[address]
object (EntityWithExternalIdInput)
Address
company[address][id]
integer
ID
company[address][externalId]
string
External ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
POST
/api/v5/customers-corporate/{externalId}/companies/{entityExternalId}/edit
Editing the company of the corporate customer
Editing the company of the corporate customer
To access the method, the following permission is required customer_write.
You may refer to customer companies either by external customer ID (by=externalId),
or by internal ID (by=id).
You may edit customer company (entityExternalId) either by external customer company ID (entityBy=externalId),
or by internal ID (entityBy=id).
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
You can pass the custom fields value array in the field company[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId, entityBy=externalId)
entityBy
string
Is specified what is transmitted in parameter entityExternalId: internal (entityBy=id) or external (entityBy=externalId) ID. By default it is externalId.
company
object (SerializedCompany)
company[isMain]
boolean
The company is the main for the customer
company[externalId]
string
Company external ID
company[active]
boolean
Activity
company[name]
string
Name
company[brand]
string
Brand
company[site]
string
Company website
company[createdAt]
DateTime
Y-m-d H:i:s
Creation date
company[contragent]
object (SerializedCompanyContragent)
Requisites
company[contragent][contragentType]
string
Contragent type
company[contragent][legalName]
string
Legal name
company[contragent][legalAddress]
string
Registration address
company[contragent][INN]
string
TIN
company[contragent][OKPO]
string
RNNBO
company[contragent][KPP]
string
IECC
company[contragent][OGRN]
string
PSRN
company[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
company[contragent][certificateNumber]
string
Certificate number
company[contragent][certificateDate]
DateTime
Y-m-d
Certificate date
company[contragent][BIK]
string
RCBIC
company[contragent][bank]
string
Bank
company[contragent][bankAddress]
string
Bank address
company[contragent][corrAccount]
string
Corresponding account
company[contragent][bankAccount]
string
Settlement account
company[customFields]
array
Associative array of custom fields
company[address]
object (EntityWithExternalIdInput)
Address
company[address][id]
integer
ID
company[address][externalId]
string
External ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
GET
/api/v5/customers-corporate/{externalId}/contacts
List of contact persons of the corporate customer
List of contact persons of the corporate customer
To access the method, the following permission is required customer_read.
The result is returned page by page. In the field pagination there is information on pagination.
You may refer to customer contact person either by external customer ID (by=externalId),
or by internal ID (by=id).
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (CustomerContactFilterData)
filter[ids]
string
Array of contact persons IDs
externalId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
contacts[]
array of objects (CustomerContact)
Contact person
contacts[][isMain]
boolean
contacts[][id]
integer
Contact ID
contacts[][customer]
object (SerializedRelationAbstractCustomer)
Customer
contacts[][customer][id]
integer
Customer internal ID
contacts[][customer][externalId]
string
Customer external ID
contacts[][customer][browserId]
string
Device ID in Collector
contacts[][customer][site]
string
Store code, required when externalId is specified
contacts[][companies][]
array of objects (CustomerContactCompany)
Contact person`s company
contacts[][companies][][id]
integer
Company ID
contacts[][companies][][company]
object (EntityWithExternalIdNameOutput)
Company
contacts[][companies][][company][id]
integer
ID
contacts[][companies][][company][externalId]
string
External ID
contacts[][companies][][company][name]
string
Name
POST
/api/v5/customers-corporate/{externalId}/contacts/create
Creating a link between a corporate customer and a contact person
Creating a link between a corporate customer and a contact person
To access the method, the following permission is required customer_write.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
contact
object (SerializedCustomerContact)
contact[isMain]
boolean
Contact person is main for customer
contact[customer]
object (SerializedRelationAbstractCustomer)
Customer
contact[customer][id]
integer
Customer internal ID
contact[customer][externalId]
string
Customer external ID
contact[customer][browserId]
string
Device ID in Collector
contact[customer][site]
string
Store code, required when externalId is specified
contact[companies][]
array of objects (SerializedCustomerContactCompany)
Contact person`s companies
contact[companies][][company]
object (EntityWithExternalIdInput)
Company
contact[companies][][company][id]
integer
ID
contact[companies][][company][externalId]
string
External ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
POST
/api/v5/customers-corporate/{externalId}/contacts/{entityExternalId}/edit
Editing the link between the corporate customer and the contact person
Editing the link between the corporate customer and the contact person
To access the method, the following permission is required customer_write.
You may refer to customer contact person either by external customer ID (by=externalId),
or by internal ID (by=id).
You may edit customer contact person (entityExternalId) either by external customer contact person ID (entityBy=externalId),
or by internal ID (entityBy=id).
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId, entityBy=externalId)
entityBy
string
Is specified what is transmitted in parameter entityExternalId: internal (entityBy=id) or external (entityBy=externalId) ID. By default it is externalId.
contact
object (SerializedCustomerContact)
contact[isMain]
boolean
Contact person is main for customer
contact[companies][]
array of objects (SerializedCustomerContactCompany)
Contact person`s companies
contact[companies][][company]
object (EntityWithExternalIdInput)
Company
contact[companies][][company][id]
integer
ID
contact[companies][][company][externalId]
string
External ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
POST
/api/v5/customers-corporate/{externalId}/edit
Corporate customer editing
Corporate customer editing
To access the method, the following permission is required customer_write.
Method allows to edit the customer.
In case of trying to edit the removed customer,
the system returns state=removed in the answer.
The fields customer[personalDiscount] and customer[discountCardNumber]
are received, if they are active in the "Loyalty" module settings.
You can pass the custom fields value array in the field customer[customFields].
For the "DataBook" fields the symbol code of value is specified in the data book.
For the "Date" field the date in the format Y-m-d is specified.
For other field types the exact value is specified.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) ID. By default it is externalId.
site
string
Symbolic code of store. Is specified in case of handling by externalId (by=externalId)
POST
/api/v5/customer-interaction/{site}/cart/clear
Cleaning the current cart of the customer
Cleaning the current cart of the customer
To access the method, the following permission is required customer_interaction_write.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
If an order is created from the cart, it is passed to this method
Parameters
Parameter
Type
Format
Description
cart
object (SerializedCart)
Cart
cart[clearedAt]
DateTime
Y-m-d H:i:sP
Date/time when the cart was cleared
cart[customer]
object (SerializedRelationAbstractCustomerWithGa)
cart[customer][id]
integer
Customer internal ID
cart[customer][externalId]
string
Customer external ID
cart[customer][browserId]
string
Device ID in Collector
cart[customer][gaClientId]
string
Google Analytics clientId
cart[order]
object (SerializedRelationOrder)
Order created from cart
cart[order][id]
integer
Order internal ID
cart[order][externalId]
string
Order external ID
cart[order][number]
string
Order number
Filter parameters
Parameter
Description
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
POST
/api/v5/customer-interaction/{site}/cart/set
Creating or overwriting cart data
Creating or overwriting cart data
To access the method, the following permission is required customer_interaction_write.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
If the store's customer has a shopping cart with the empty value for clearedAt, the request will overwrite the cart data. Otherwise, a new cart will be created
Parameters
Parameter
Type
Format
Description
cart
object (SerializedCart)
Cart
cart[externalId]
string
External cart ID
cart[droppedAt]
DateTime
Y-m-d H:i:sP
Date/time when the cart was dropped
cart[link]
string
Link
cart[customer]
object (SerializedRelationAbstractCustomerWithGa)
cart[customer][id]
integer
Customer internal ID
cart[customer][externalId]
string
Customer external ID
cart[customer][browserId]
string
Device ID in Collector
cart[customer][site]
string
Store code, required when externalId is specified
cart[customer][gaClientId]
string
Google Analytics clientId
cart[items][]
array of objects (SerializedCartItem)
Products in the cart
cart[items][][quantity]
float
Quantity
cart[items][][price]
float
Price (in entity currency)
cart[items][][offer]
object (SerializedRelationOffer)
SKU
cart[items][][offer][id]
integer
Offer internal ID
cart[items][][offer][externalId]
string
Offer external ID
cart[items][][offer][xmlId]
string
Offer ID in the warehouse system
Filter parameters
Parameter
Description
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
GET
/api/v5/customer-interaction/{site}/cart/{customerId}
Getting the current cart of the customer
Getting the current cart of the customer
To access the method, the following permission is required customer_interaction_read.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
Parameters
Parameter
Type
Format
Description
customerId
string
Customer ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter customerId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
GET
/api/v5/customer-interaction/{site}/favorites/{customerId}
Getting a list of favorites for the customer
Getting a list of favorites for the customer
To access the method, the following permission is required customer_interaction_read.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter customerId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
POST
/api/v5/customer-interaction/{site}/favorites/{customerId}/add
Adding a product offer to the customer's list of favorites
Adding a product offer to the customer's list of favorites
To access the method, the following permission is required customer_interaction_write.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
If the product offer is already in the list of favorites, a successful response success=true is returned.
The maximum number of product offers in the list of favorites is 1000. When adding a new product offer in excess of the specified limit, an unsuccessful response success=false is returned.
Parameters
Parameter
Type
Format
Description
favorite
object (SerializedFavorite)
favorite[offer]
object (SerializedRelationOffer)
Offer
favorite[offer][id]
integer
Offer internal ID
favorite[offer][externalId]
string
Offer external ID
favorite[offer][xmlId]
string
Offer ID in the warehouse system
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter customerId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
POST
/api/v5/customer-interaction/{site}/favorites/{customerId}/remove
Deleting a product offer from the customer's list of favorites
Deleting a product offer from the customer's list of favorites
To access the method, the following permission is required customer_interaction_write.
In the {site} parameter you can transfer either the symbol code of the store or the store ID.
The symbol code will be used by default.
To use the store ID you also have to transfer the siteBy=id parameter.
If the product offer is not in the list of favorites, a successful response is returned success=true.
Parameters
Parameter
Type
Format
Description
favorite
object (SerializedFavorite)
favorite[offer]
object (SerializedRelationOffer)
Offer
favorite[offer][id]
integer
Offer internal ID
favorite[offer][externalId]
string
Offer external ID
favorite[offer][xmlId]
string
Offer ID in the warehouse system
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter customerId: internal (by=id) or external (by=externalId) customer ID. By default it is externalId.
siteBy
Template
id|code
Default value
code
Description
Is specified what is transmitted in parameter site: internal ID (siteBy=id) or code (siteBy=code) of a store. By default it is code.
POST
/api/v5/delivery/calculate
Calculation of the delivery cost
Calculation of the delivery cost
The method calculates the delivery cost for the selected delivery types (deliveryTypeCodes).
Parameters
Parameter
Type
Format
Description
deliveryTypeCodes[]
array of strings
Codes of delivery types
order
object (SerializedOrder)
order[weight]
double
Weight
order[length]
integer
Length
order[width]
integer
Width
order[height]
integer
Height
order[items][]
array of objects (SerializedOrderProduct)
order[items][][initialPrice]
double
Item price/SKU (in entity currency)
order[items][][discountManualAmount]
double
Monetary discount per item (in entity currency)
order[items][][discountManualPercent]
double
Percentage discount per item
order[items][][quantity]
float
Quantity
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][date]
DateTime
Y-m-d
Delivery date
order[delivery][time]
object (TimeInterval)
Information on time range
order[delivery][time][from]
DateTime
H:i
Time "from"
order[delivery][time][to]
DateTime
H:i
Time "to"
order[delivery][time][custom]
string
Time range in free form
order[delivery][address]
object (OrderDeliveryAddress)
Address
order[delivery][address][index]
string
Postal code
order[delivery][address][countryIso]
string
Country ISO code
order[delivery][address][region]
string
Region
order[delivery][address][regionId]
integer
Region ID in Geohelper
order[delivery][address][city]
string
City
order[delivery][address][cityId]
integer
City ID in Geohelper
order[delivery][address][cityType]
string
Locality type
order[delivery][address][street]
string
Street
order[delivery][address][streetId]
integer
Street ID in Geohelper
order[delivery][address][streetType]
string
Street type
order[delivery][address][building]
string
Building
order[delivery][address][flat]
string
Flat/office
order[delivery][address][floor]
integer
Floor
order[delivery][address][block]
integer
Entrance
order[delivery][address][house]
string
House
order[delivery][address][housing]
string
Housing
order[delivery][address][metro]
string
Underground
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
calculations[]
array of objects (DeliveryCalculation)
calculations[][code]
string
Delivery type code
calculations[][available]
boolean
The delivery type corresponds to the specified conditions
calculations[][vatRate]
string
VAT rate
calculations[][cost]
double
Cost
POST
/api/v5/delivery/generic/{subcode}/tracking
Updating of delivery statuses
Updating of delivery statuses
Method allows to transmit statuses separately for each order at the moment of status change or transmit the history of changes for orders group in definite intervals at the discretion of delivery service
Important: Per one request it is possible to update statuses not more than for 100 orders. When transferring a larger number of orders, the method will return error message.
Parameters
Parameter
Type
Format
Description
statusUpdate[]
array of objects (RequestStatusUpdateItem)
JSON with data of order statuses
statusUpdate[][deliveryId]
string
Delivery ID in delivery service
statusUpdate[][trackNumber]
string
Track number (if option configuration[allowTrackNumber] is enabled)
statusUpdate[][cost]
double
Delivery Cost
statusUpdate[][history][]
array of objects (StatusInfo)
History of delivery status changes
statusUpdate[][history][][code]
string
Delivery status code
statusUpdate[][history][][updatedAt]
DateTime
Y-m-d\TH:i:sP
Date of the last status updating
statusUpdate[][history][][comment]
string
Comment to the status
statusUpdate[][extraData][]
array of strings
Array of additional delivery data (deliveryDataField.code => value)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
GET
/api/v5/delivery/shipments
Getting the list of shipments to delivery services
Getting the list of shipments to delivery services
To access the method, the following permission is required delivery_read.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (DeliveryShipmentFilterData)
filter[ids][]
array of integers
Array of shipment's ID
filter[externalId]
string
External ID
filter[orderNumber]
string
{length: {max: 255}}
Order numbre in shipment
filter[deliveryTypes][]
array of strings
Delivery types
filter[managers][]
array of integers
Managers
filter[stores][]
array of strings
Warehouses
filter[statuses][]
array of strings
Statuses
filter[dateFrom]
DateTime
Y-m-d
Shipment date (from)
filter[dateTo]
DateTime
Y-m-d
Shipment date (to)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
deliveryShipments[]
array of objects (DeliveryShipment)
Shipment to delivery service
deliveryShipments[][integrationCode]
string
Integration code
deliveryShipments[][id]
integer
Shipment id
deliveryShipments[][externalId]
string
Shipment id in delivery service
deliveryShipments[][deliveryType]
string
Delivery type
deliveryShipments[][store]
string
Warehouse of shipment
deliveryShipments[][managerId]
integer
Manager responsible for shipping
deliveryShipments[][status]
string
Shipment status (Available values created, processing, shipped, cancelled)
POST
/api/v5/delivery/shipments/create
Shipment creation
Shipment creation
To access the method, the following permission is required delivery_write.
The set of fields depends on delivery type.
Parameters
Parameter
Type
Format
Description
deliveryType
string
Delivery type
site
string
Symbolic code of store (it should be specified when an orders isn shipment are specified via externalId or number)
deliveryShipment
object (DeliveryShipment)
Shipment to delivery service
deliveryShipment[status]
string
Shipment status (Available values created, processing, shipped, cancelled)
deliveryShipment[date]
DateTime
Shipment date
deliveryShipment[time]
object (TimeInterval)
Shipment time
deliveryShipment[time][from]
DateTime
Time "from"
deliveryShipment[time][to]
DateTime
Time "to"
deliveryShipment[time][custom]
string
Time range in free form
deliveryShipment[comment]
string
Comment
deliveryShipment[store]
string
Warehouse of shipment
deliveryShipment[managerId]
integer
Manager responsible for shipping
deliveryShipment[orders][]
array of objects (SerializedEntityOrder)
Shipping orders
deliveryShipment[orders][][id]
integer
Order internal ID
deliveryShipment[orders][][externalId]
string
Order external ID
deliveryShipment[orders][][number]
string
Order number
deliveryShipment[extraData]
array
Additional shipment data (shipmentDataField.code => value) (is specified in case of shipment for delivery type, integrated with delivery services, connected by API)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
Shipment id
status
string
Shipment status
GET
/api/v5/delivery/shipments/{id}
Getting information on shipment
Getting information on shipment
To access the method, the following permission is required delivery_read.
The set of fields depends on delivery type.
Parameters
Parameter
Type
Format
Description
id
string
Shipment id
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
deliveryShipment
object (DeliveryShipment)
Shipment to delivery service
deliveryShipment[integrationCode]
string
Integration code
deliveryShipment[id]
integer
Shipment id
deliveryShipment[externalId]
string
Shipment id in delivery service
deliveryShipment[deliveryType]
string
Delivery type
deliveryShipment[store]
string
Warehouse of shipment
deliveryShipment[managerId]
integer
Manager responsible for shipping
deliveryShipment[status]
string
Shipment status (Available values created, processing, shipped, cancelled)
deliveryShipment[date]
DateTime
Shipment date
deliveryShipment[time]
object (TimeInterval)
Shipment time
deliveryShipment[time][from]
DateTime
Time "from"
deliveryShipment[time][to]
DateTime
Time "to"
deliveryShipment[time][custom]
string
Time range in free form
deliveryShipment[comment]
string
Comment
deliveryShipment[orders][]
array of objects (SerializedEntityOrder)
Shipping orders
deliveryShipment[orders][][id]
integer
Order internal ID
deliveryShipment[orders][][externalId]
string
Order external ID
deliveryShipment[orders][][number]
string
Order number
deliveryShipment[extraData]
array
Additional shipment data (shipmentDataField.code => value) (is specified in case of shipment for delivery type, integrated with delivery services, connected by API)
POST
/api/v5/delivery/shipments/{id}/edit
Shipment editing
Shipment editing
To access the method, the following permission is required delivery_write.
Shipment editing is available only for shipments in created status
The set of fields depends on delivery type.
Parameters
Parameter
Type
Format
Description
site
string
Symbolic code of store (it should be specified when an orders isn shipment are specified via externalId or number)
deliveryShipment
object (DeliveryShipment)
Shipment to delivery service
deliveryShipment[status]
string
Shipment status (Available values created, processing, shipped, cancelled)
deliveryShipment[date]
DateTime
Shipment date
deliveryShipment[time]
object (TimeInterval)
Shipment time
deliveryShipment[time][from]
DateTime
Time "from"
deliveryShipment[time][to]
DateTime
Time "to"
deliveryShipment[time][custom]
string
Time range in free form
deliveryShipment[comment]
string
Comment
deliveryShipment[store]
string
Warehouse of shipment
deliveryShipment[managerId]
integer
Manager responsible for shipping
deliveryShipment[orders][]
array of objects (SerializedEntityOrder)
Shipping orders
deliveryShipment[orders][][id]
integer
Order internal ID
deliveryShipment[orders][][externalId]
string
Order external ID
deliveryShipment[orders][][number]
string
Order number
deliveryShipment[extraData]
array
Additional shipment data (shipmentDataField.code => value) (is specified in case of shipment for delivery type, integrated with delivery services, connected by API)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
Shipment id
status
string
Shipment status
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["autocomplete"]}
Request on getting data for autocomplete field
Request on getting data for autocomplete field
Working with autocomplete fields specified in configuration integrationModule[integrations][delivery]["deliveryDataFieldList"], the system will initialize request to delivery service using GET request of method specified in autocompleteUrl configuration of the appropriate field.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
term
string
Request row
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result[]
array of objects (ResponseAutocompleteItem)
Array of values
result[][value]
string
Value
result[][label]
string
Name
result[][description]
string
Not mandatory field. Hint for option - displayed in small print under the option name
For delivery cost calculation the system initiates POST-call of method specified in integrationModule[integrations][delivery]["actions"]["calculate"] configuration.
Addititonal delivery data (deliveryDataField.code => value)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result[]
array of objects (ResponseCalculate)
Data of available deliveries cost
result[][code]
string
Tariff code
result[][group]
string
Tariffs group
result[][name]
string
Tariff name
result[][type]
string
Tariff type (courier - courier delivery or selfDelivery - pick-up)
result[][description]
string
Description
result[][cost]
float
Delivery cost (If not specified, then tariff will be displayed, but will not be allowed to choose) (in entity currency)
result[][minTerm]
integer
Minimum delivery term
result[][maxTerm]
integer
Maximum delivery term
result[][extraData]
array
Additional delivery data (deliveryDataField.code => value)
result[][extraDataAvailable]
array
Codes array of fields, which must be displayed on the order page. If array is not transferred, all fields will be displayed with additional delivery data.
result[][pickuppointList][]
array of objects (Terminal)
Terminal of shipment/receiving
result[][pickuppointList][][code]
string
Terminal code
result[][pickuppointList][][cost]
float
Delivery cost to pick-up point (it is indicated if it differs from the standard tariff cost)
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["delete"]}
Removing of delivery request
Removing of delivery request
For delivery removing the system initiates POST-call of method specified in integrationModule[integrations][delivery]["actions"]["delete"] configuration.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
delete
object (RequestDelete)
JSON with delivery ID
delete[deliveryId]
string
Delivery ID in delivery service
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["get"]}
Getting the delivery data
Getting the delivery data
For getting delivery data the system initiates GET-request of method specified in integrationModule[integrations][delivery]["actions"]["get"] configuration.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
deliveryId
string
Delivery ID in delivery service
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result
object (ResponseLoadDeliveryData)
Delivery data
result[trackNumber]
string
Track number (if option configuration[allowTrackNumber] is enabled)
result[cost]
float
Cost
result[shipmentDate]
DateTime
Shipment date
result[deliveryDate]
DateTime
Delivery date
result[deliveryTime]
object (TimeInterval)
Delivery time
result[deliveryTime][from]
DateTime
Time "from"
result[deliveryTime][to]
DateTime
Time "to"
result[deliveryTime][custom]
string
Time range in free form
result[tariff]
string
Tariff code
result[tariffName]
string
Tariff name
result[payerType]
string
Payer for delivery (receiver or sender)
result[status]
object (StatusInfo)
Delivery status
result[status][code]
string
Delivery status code
result[status][updatedAt]
DateTime
Date of the last status updating
result[status][comment]
string
Comment to the status
result[extraData]
array
Additional delivery data (deliveryDataField.code => value)
result[shipmentAddress]
object (DeliveryAddress)
Shipment address
result[shipmentAddress][index]
string
Country ISO code (ISO 3166-1 alpha-2)
result[shipmentAddress][countryIso]
string
Country
result[shipmentAddress][region]
string
Region
result[shipmentAddress][regionId]
integer
Region ID in Geohelper
result[shipmentAddress][city]
string
City
result[shipmentAddress][cityId]
integer
City ID in Geohelper
result[shipmentAddress][cityType]
string
Locality type
result[shipmentAddress][street]
string
Street
result[shipmentAddress][streetId]
integer
Street ID in Geohelper
result[shipmentAddress][streetType]
string
Street type
result[shipmentAddress][building]
string
Building
result[shipmentAddress][flat]
string
Flat/office
result[shipmentAddress][floor]
integer
Floor
result[shipmentAddress][block]
integer
Entrance
result[shipmentAddress][house]
string
House
result[shipmentAddress][housing]
string
Housing
result[shipmentAddress][metro]
string
Underground
result[shipmentAddress][notes]
string
Notes to address
result[shipmentAddress][text]
string
Address as string
result[shipmentAddress][terminal]
string
Code of shipment/delivery terminal
result[shipmentAddress][terminalData]
object (Terminal)
Terminal data
result[shipmentAddress][terminalData][code]
string
Terminal code
result[shipmentAddress][terminalData][cost]
float
Delivery cost to pick-up point (it is indicated if it differs from the standard tariff cost)
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["print"]}
Printed forms of delivery service
Printed forms of delivery service
For printing of forms specified when configure in integrationModule[integrations][delivery]["plateList"] the system initiates POST-request of method specified in integrationModule[integrations][delivery]["actions"]["print"] configuration.
Delivery service must generate pdf-file of printing form and return it as a byte array
Entity type for the printed form (order is a printed form for the order (by default), shipment is a printed form for the shipment). The value corresponds to the value of the selected printed form: integrationModule[integrations][delivery][plateList][][type]
print[type]
string
Code of printing form type
print[deliveryIds]
array
Array of delivery IDs in delivery service ([["56376", "798645"]])
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["save"]}
Creation and editing of delivery
Creation and editing of delivery
For creation of new delivery the system initiates POST-call of method specified in integrationModule[integrations][delivery]["actions"]["save"] configuration. Request for delivery editing is similar to request for creation, but it is necessary to transmit order id in delivery service save["deliveryId"].
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
save
object (RequestSave)
JSON with data for delivery creation
save[deliveryId]
string
Delivery ID in delivery service. Is transmitted if needed to edit created delivery
save[order]
string
Order internal ID
save[orderNumber]
string
Order number
save[site]
string
Store code
save[siteName]
string
Store name
save[store]
object (Store)
Warehouse of shipment
save[store][code]
string
Symbolic code
save[store][name]
string
Name
save[store][address]
object (StoreAddress)
Warehouse address
save[store][address][index]
string
Postal code
save[store][address][countryIso]
string
Country ISO code
save[store][address][region]
string
Region
save[store][address][regionId]
integer
Region ID in Geohelper
save[store][address][city]
string
City
save[store][address][cityId]
integer
City ID in Geohelper
save[store][address][cityType]
string
Locality type
save[store][address][street]
string
Street
save[store][address][streetId]
integer
Street ID in Geohelper
save[store][address][streetType]
string
Street type
save[store][address][building]
string
Building
save[store][address][flat]
string
Flat/office
save[store][address][floor]
integer
Floor
save[store][address][block]
integer
Entrance
save[store][address][house]
string
House
save[store][address][housing]
string
Housing
save[store][address][metro]
string
Underground
save[store][address][notes]
string
Notes to address
save[store][address][text]
string
Address as string
save[store][address][coordinates]
object (Point)
Coordinates
save[store][address][coordinates][latitude]
float
Latitude
save[store][address][coordinates][longitude]
float
Longitude
save[store][workTime]
object (SerializedStoreWeekOpeningHours)
Warehouse working hours
save[store][workTime][mo][]
array of objects (StoreWorkTime)
Working hours at Monday
save[store][workTime][mo][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][mo][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][mo][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][mo][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][tu][]
array of objects (StoreWorkTime)
Working hours at Tuesday
save[store][workTime][tu][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][tu][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][tu][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][tu][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][we][]
array of objects (StoreWorkTime)
Working hours at Wednesday
save[store][workTime][we][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][we][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][we][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][we][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][th][]
array of objects (StoreWorkTime)
Working hours at Thursday
save[store][workTime][th][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][th][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][th][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][th][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][fr][]
array of objects (StoreWorkTime)
Working hours at Friday
save[store][workTime][fr][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][fr][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][fr][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][fr][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][sa][]
array of objects (StoreWorkTime)
Working hours at Saturday
save[store][workTime][sa][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][sa][][endTime]
string
End of the warehouse work time interval (in H:i format)
save[store][workTime][sa][][lunchStartTime]
string
Start of the lunch time interval (in H:i format)
save[store][workTime][sa][][lunchEndTime]
string
End of the lunch time interval (in H:i format)
save[store][workTime][su][]
array of objects (StoreWorkTime)
Working hours at Sunday
save[store][workTime][su][][startTime]
string
Start of the warehouse work time interval (in H:i format)
save[store][workTime][su][][endTime]
string
End of the warehouse work time interval (in H:i format)
Delivery cost (specified in the delivery note in case of prepayment)
save[delivery][vatRate]
string
VAT rate for delivery service ("none" - without VAT)
save[delivery][tariff]
string
Tariff code
save[delivery][payerType]
string
Payer for delivery services (receiver or sender)
save[delivery][shipmentDate]
DateTime
Y-m-d
Shipment date
save[delivery][deliveryDate]
DateTime
Y-m-d
Delivery date
save[delivery][deliveryTime]
object (TimeInterval)
Delivery time ("custom" not used)
save[delivery][deliveryTime][from]
DateTime
H:i
Time "from"
save[delivery][deliveryTime][to]
DateTime
H:i
Time "to"
save[delivery][deliveryTime][custom]
string
Time range in free form
save[delivery][extraData][]
array of objects (ExtraDataValue)
Additional delivery data (deliveryDataField.code => value)
save[currency]
string
Currency code
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result
object (ResponseSave)
Result of delivery creation
result[deliveryId]
string
Delivery ID in delivery service
result[trackNumber]
string
Track number (if option configuration[allowTrackNumber] is enabled)
result[cost]
float
Cost
result[status]
string
Delivery status code
result[extraData]
array
Additional delivery data (deliveryDataField.code => value)
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["shipmentDelete"]}
Removing of shipment request
Removing of shipment request
For shipment removing the system initiates POSt-request of method specified in integrationModule[integrations][delivery]["actions"]["shipmentDelete"] configuration.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
shipmentDelete
object (RequestShipmentDelete)
JSON with data for shipment removing
shipmentDelete[shipmentId]
string
Shipment id in delivery service
shipmentDelete[extraData][]
array of objects (ExtraDataValue)
Additional shipment data (shipmentDataField.code => value)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["shipmentPointList"]}
List of the parcel receiving terminals
List of the parcel receiving terminals
For working with terminals the system initiates GET-request of method specified in integrationModule[integrations][delivery]["actions"]["shipmentPointList"] configuration.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
country
string
ISO code of the country (ISO 3166-1 alpha-2)
region
string
Region
regionId
integer
Region ID in Geohelper
city
string
City
cityId
integer
City ID in Geohelper
code
string
Shipment warehouse code
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result[]
array of objects (Terminal)
Terminal of shipment/receiving
result[][code]
string
Terminal code
result[][cost]
float
Delivery cost to pick-up point (it is indicated if it differs from the standard tariff cost)
result[][name]
string
Terminal name
result[][description]
string
Terminal description
result[][address]
string
Address
result[][schedule]
string
Working schedule
result[][phone]
string
Phone number
result[][extraData]
array
Additional data (deliveryDataField.code => value)
result[][coordinates]
object (Coordinates)
Coordinates
result[][coordinates][latitude]
string
Latitude
result[][coordinates][longitude]
string
Longitude
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["shipmentSave"]}
Creation and editing of shipment
Creation and editing of shipment
For creation or editing of shipment the system initiates POSt-request of method specified in integrationModule[integrations][delivery]["actions"]["shipmentSave"] configuration.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
shipmentSave
object (RequestShipmentSave)
JSON with data for shipment creation
shipmentSave[shipmentId]
string
Shipment id in delivery service. Is transmitted if needed to edit created delivery
shipmentSave[manager]
object (Manager)
Manager responsible for shipping
shipmentSave[manager][id]
integer
Manager id
shipmentSave[manager][lastName]
string
Surname
shipmentSave[manager][firstName]
string
Name
shipmentSave[manager][patronymic]
string
Middle name
shipmentSave[manager][phone]
string
Phone number
shipmentSave[manager][email]
string
E-mail
shipmentSave[date]
DateTime
Y-m-d
Shipment date
shipmentSave[time]
object (TimeInterval)
Shipment time
shipmentSave[time][from]
DateTime
H:i
Time "from"
shipmentSave[time][to]
DateTime
H:i
Time "to"
shipmentSave[time][custom]
string
Time range in free form
shipmentSave[address]
object (DeliveryAddress)
Shipment address
shipmentSave[address][index]
string
Country ISO code (ISO 3166-1 alpha-2)
shipmentSave[address][countryIso]
string
Country
shipmentSave[address][region]
string
Region
shipmentSave[address][regionId]
integer
Region ID in Geohelper
shipmentSave[address][city]
string
City
shipmentSave[address][cityId]
integer
City ID in Geohelper
shipmentSave[address][cityType]
string
Locality type
shipmentSave[address][street]
string
Street
shipmentSave[address][streetId]
integer
Street ID in Geohelper
shipmentSave[address][streetType]
string
Street type
shipmentSave[address][building]
string
Building
shipmentSave[address][flat]
string
Flat/office
shipmentSave[address][floor]
integer
Floor
shipmentSave[address][block]
integer
Entrance
shipmentSave[address][house]
string
House
shipmentSave[address][housing]
string
Housing
shipmentSave[address][metro]
string
Underground
shipmentSave[address][notes]
string
Notes to address
shipmentSave[address][text]
string
Address as string
shipmentSave[address][terminal]
string
Code of shipment/delivery terminal
shipmentSave[store]
string
Warehouse of shipment
shipmentSave[orders][]
array of objects (ShipmentOrder)
Shipping orders
shipmentSave[orders][][deliveryId]
string
Delivery ID in delivery service
shipmentSave[orders][][packages][]
array of objects (Package)
Packages
shipmentSave[orders][][packages][][packageId]
string
Package number
shipmentSave[orders][][packages][][weight]
float
Weight
shipmentSave[orders][][packages][][width]
integer
Width
shipmentSave[orders][][packages][][length]
integer
Length
shipmentSave[orders][][packages][][height]
integer
Height
shipmentSave[comment]
string
Comment
shipmentSave[extraData][]
array of objects (ExtraDataValue)
Additional shipment data (shipmentDataField.code => value)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result
object (ResponseShipmentSave)
Result of shipment creation
result[shipmentId]
string
Shipment ID in delivery service
result[extraData]
array
Additional shipment data (shipmentDataField.code => value)
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["delivery"]["actions"]["tariffList"]}
List of tariffs
List of tariffs
To get a list of tariffs, the system initiates a GET request of the method specified in integrationModule[integrations][delivery]["actions"]["tariffList"] configuration.
POST
/api/v5/files/upload
Uploading the file to server
Uploading the file to server
To access the method, the following permission is required file_write.
Method allows to upload the file. For uploading the file, it is necessary to insert its content into the query body.
Some file types are prohibited for uploading. The name API upload is automatically assigned to the file uploaded via API.
To access the method, the following permission is required file_read.
Method allows to download the file. When downloading, the file content is returned as a stream, the file name is returned in the Content-Disposition HTTP header.
To access the method, the following permission is required file_write.
Method allows to edit the file name and links to orders and customers. All required links are passed in file[attachment][]. Links not mentioned in this field will be deleted.
Module symbolic code (must be same as module code, specified in partner cabinet) (same as symbolic code of module instance if multi account is not allowed)
integrationModule[active]
boolean
Activity status
integrationModule[freeze]
boolean
The module is frozen
integrationModule[name]
string
Name (required if module is not publicated in markeplace)
integrationModule[logo]
string
Link to svg logotype (required if module is not publicated in markeplace)
integrationModule[native]
boolean
System module
integrationModule[baseUrl]
string
Basic URL, to which system makes requests
integrationModule[actions][]
array of strings
The relative paths from the basic URL to the specific methods (array "Method code": "Path", allowed methods: activity, settings)
integrationModule[availableCountries]
array
List of countries available for module (ISO 3166-1 alpha-2) (required if module is not publicated in markeplace)
integrationModule[accountUrl]
string
Personal account (clicking on this link sends POST request with clientId parameter)
The relative paths from the basic URL to the specific methods (array "Method code": "Path", allowed methods: calculate, save, get, delete, print, shipmentPointList, tariffList)
Allowed types of payers for delivery (receiver - customer pays the delivery service directly; sender - the store can take money from the customer for delivery and then pays the delivery service)
The status ("isError": true) signals that there are problems in the delivery process. If the delivery gets into this status, the manager will receive a notification
The status ("isPreprocessing": true) means that delivery registration is in progress and you should`t make any changes to the order. This flag may be useful for integrated modules where delivery registration is performed asynchronously
Field type. Possible variants (integer - number field, text - text field, autocomplete - autocomplete field, checkbox, choice - drop-down list, date - date field)
Is the field editable. If "editable": false, then it is the information field - filled only with data, received directly from delivery service (for example, insurance cost - may be filled after delivery formation or when calculating of cost)
The relative paths from the basic URL to the specific methods (array "Method code": "Path", allowed methods: online, visits)
integrationModule[integrations][mgBot]
object (BotConfiguration)
Configuration of integration with MessageGateway bot
integrationModule[integrations][mgBot][isActive]
custom handler result for (bool)
Activity mark
integrationModule[integrations][mgBot][logo]
string
Link to logo
integrationModule[integrations][mgBot][token]
string
Keyword
integrationModule[integrations][mgBot][name]
string
Bot name
POST
/api/v5/integration-modules/{code}/edit
Integration module creation/editing
Integration module creation/editing
To access the method, the following permission is required integration_write.
For receiving notifications about module activation/deactivation or freezing/unfreezing specify baseUrl and path to activity callback - integrationModule[actions][activity]
Module can have one or many different types of configuration, or not have any of configurations.
Recommendations service
(recommendation)
The availability of configurations of this type gives access to use methods from the section "Recommendations".
Delivery service
(delivery)
This type of configuration allows module to use methods from "Deliveries" section.
Payment system
(payment)
Configuration of this type allows to use methods from “Payments” section.
Warehouse system
(store)
This type of configuration allows module to use method {integrationModule["integrations"]["store"]["actions"]["inventoriesUpload"]} from "Store" section.
Instant messaging
(mgTransport)
Configuration of a such type allows to integrate external messengers with the system.
MessageGateway Bot
(mgBot)
Configuration of a such type allows to integrate MessageGateway Bots.
Telephony
(telephony)
This type of configuration allows module to use methods from "Telephony" section.
Field integrationModule[integrations][telephony][inputEventSupported] contains information, does the service support notifications about incoming call. Default value is 0.
Field integrationModule[integrations][telephony][outputEventSupported] contains information, does the service support notifications about outgoing call. Default value is 0.
Field integrationModule[integrations][telephony][hangupEventSupported] contains information, does the service support notification about call completion. Default value is 0.
The field integrationModule[integrations][telephony][additionalCodes] contains JSON, where there is an array of mapping: user id and code - extension code in telephony.
The field integrationModule[integrations][telephony][externalPhones] contains JSON, where there is an array of mapping: siteCode - store code and externalPhone - external phone number. If there are several external numbers specified for one store, the last one will be chosen when initiating the call from this store.
If the field integrationModule[integrations][telephony][changeUserStatusUrl] specified, when changing the manager status in system to the specified address will be sent GET request.
If the module is created or edited successfully, the response will contain information on the cost of the module (the information will be specified in the info[billingInfo] field). If the module isn't published in the marketplace, the information isn't transferred.
Parameters
Parameter
Type
Format
Description
integrationModule
object (IntegrationModule)
Integration module
integrationModule[code]
string
Symbolic code of module instance
integrationModule[integrationCode]
string
Module symbolic code (must be same as module code, specified in partner cabinet) (same as symbolic code of module instance if multi account is not allowed)
integrationModule[active]
boolean
Activity status
integrationModule[name]
string
Name (required if module is not publicated in markeplace)
integrationModule[logo]
string
Link to svg logotype (required if module is not publicated in markeplace)
integrationModule[clientId]
string
Unique client hash-key used, for authorization and identification in external system
integrationModule[baseUrl]
string
Basic URL, to which system makes requests
integrationModule[actions][]
array of strings
The relative paths from the basic URL to the specific methods (array "Method code": "Path", allowed methods: activity, settings)
integrationModule[availableCountries]
array
List of countries available for module (ISO 3166-1 alpha-2) (required if module is not publicated in markeplace)
integrationModule[accountUrl]
string
Personal account (clicking on this link sends POST request with clientId parameter)
The relative paths from the basic URL to the specific methods (array "Method code": "Path", allowed methods: calculate, save, get, delete, print, shipmentPointList, tariffList)
Allowed types of payers for delivery (receiver - customer pays the delivery service directly; sender - the store can take money from the customer for delivery and then pays the delivery service)
The status ("isError": true) signals that there are problems in the delivery process. If the delivery gets into this status, the manager will receive a notification
The status ("isPreprocessing": true) means that delivery registration is in progress and you should`t make any changes to the order. This flag may be useful for integrated modules where delivery registration is performed asynchronously
Field type. Possible variants (integer - number field, text - text field, autocomplete - autocomplete field, checkbox, choice - drop-down list, date - date field)
Is the field editable. If "editable": false, then it is the information field - filled only with data, received directly from delivery service (for example, insurance cost - may be filled after delivery formation or when calculating of cost)
Client account has insufficient funds to activate integration module
POST
/api/v5/integration-modules/{code}/update-scopes
Updating permissions for the API key
Updating permissions for the API key
To access the method, the following permission is required integration_write.
The method allows to get a new API key with the permissions that were passed in the request for the integrated module.
This method is available for modules that support simple connection and can also be used to update API keys by modules that were connected in an outdated way via the creation of API keys in the system interface.
Parameters
Parameter
Type
Format
Description
requires
object (Requires)
requires[scopes][]
array of strings
Permissions required by the API key for the operation of the module
CallbackGET
{configUrl}
Getting data to connect the module
Getting data to connect the module
Callback to get connection configuration. Called before connecting the module.
{configUrl} is the "URL to request a simple connection configuration" from the partner account.
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
scopes[]
array of strings
Permissions required by the API key for the operation of the module
registerUrl
string
URL to register the module
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["actions"]["activity"]}
Notification whenr module activity and freeze changed
Notification whenr module activity and freeze changed
Callback initiates when module activity or freeze status changed or when system is renamed. When deactivated, the module should be terminated. When freezed - module must be suspended. When system renamed - system URL must be updated. The new URL comes from the new system address, you must use clientId to identify the account. Each time this method is initiated, all parameters are passed.
If the module is published in the marketplace, the information on the cost of the module will be specified in the billingInfo field.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
activity
object (IntegrationModule)
Integration module
activity[active]
boolean
Activity status
activity[freeze]
boolean
The module is frozen
systemUrl
string
Current system URL, where integration module is activated (example: https://demo.retailcrm.pro )
billingInfo
object (IntegrationModuleBillingInfo)
Information about the cost of the module
billingInfo[price]
float
Cost of the module
billingInfo[priceWithDiscount]
float
Cost of the module with discount (if there is any)
billingInfo[currency]
object (IntegrationModuleBillingInfoCurrency)
Currency
billingInfo[currency][name]
string
Currency name
billingInfo[currency][shortName]
string
Short name of the currency
billingInfo[currency][code]
string
Currency code
billingInfo[billingType]
string
Payment type (fixed - for the module, byChannel - for the channel)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["actions"]["settings"]}
Notification on changes in system settings
Notification on changes in system settings
The callback method is called when the following system settings are changed:
non-working days
working hours
default currency
system language
system time zone
chat settings
The values of all specified settings are always passed in the request.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
settings
object (Settings)
System settings
settings[default_currency]
object (Value)
deprecated Default currency
settings[default_currency][value]
string
Setting value
settings[default_currency][updated_at]
DateTime
Y-m-d H:i:s
Date and time when the setting was last changed
settings[system_language]
object (Value)
System language
settings[system_language][value]
string
Setting value
settings[system_language][updated_at]
DateTime
Y-m-d H:i:s
Date and time when the setting was last changed
settings[timezone]
object (Value)
Time zone
settings[timezone][value]
string
Setting value
settings[timezone][updated_at]
DateTime
Y-m-d H:i:s
Date and time when the setting was last changed
settings[work_times][]
array of objects (WorkTime)
Working hours
settings[work_times][][day_type]
string
Day of the week
settings[work_times][][start_time]
string
Start of working hours
settings[work_times][][end_time]
string
End of working hours
settings[work_times][][lunch_start_time]
string
Time when lunch starts
settings[work_times][][lunch_end_time]
string
Time when lunch ends
settings[non_working_days][]
array of objects (NonWorkingDay)
Non-working days
settings[non_working_days][][start_date]
DateTime
m.d
Start of non-working days
settings[non_working_days][][end_date]
DateTime
m.d
End of non-working days
settings[mg]
object (IntegrationData)
Chat settings
settings[mg][order_creation]
object (OrderCreationSettings)
Parameters that will be automatically specified in the order when registering from chats
{registerUrl} is the URL to which the request to connect the module will be sent. See documentation to the callback method {configUrl}.
Parameters
Parameter
Type
Format
Description
register
object (Register)
register[token]
string
API key in the form of a hash code generated from the secret token using the sha256 algorithm and the hmac method to authenticate the request
register[systemUrl]
string
Technical domain of the system to which requests should be sent
register[apiKey]
string
API key to access the system API
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
accountUrl
string
Personal account (clicking on this link sends POST request with clientId parameter)
Loyalty
POST
/api/v5/loyalty/account/create
Adding a customer to the loyalty program
Adding a customer to the loyalty program
To access the method, the following permission is required loyalty_write.
Method checks the possibility of customer participation in the loyalty program and adds the customer
In the settings for the Loyalty Program it is possible to specify a list of fields required for filling in in the customer and participation card.
If not all of the specified fields are filled in, the corresponding message is displayed in the response in the warnings field.
If the required fields are not set up and there is no requirement to confirm activation by SMS or all the required fields are transferred, then the participation is created active.
Otherwise, it is created inactive. When the participation is inactive, it is not possible to redeem bonuses and apply discount privileges.
One of the following fields must also be filled in: phoneNumber or cardNumber
Parameters
Parameter
Type
Format
Description
site
string
Store symbolic code
loyaltyAccount
object (SerializedCreateLoyaltyAccount)
loyaltyAccount[phoneNumber]
string
Phone number
loyaltyAccount[cardNumber]
string
Card number
loyaltyAccount[customFields]
array
Associative array of custom fields
loyaltyAccount[customer]
object (SerializedEntityCustomer)
Customer
loyaltyAccount[customer][id]
integer
Customer internal ID
loyaltyAccount[customer][externalId]
string
Customer external ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
loyaltyAccount
object (LoyaltyAccount)
Participation in the loyalty program
loyaltyAccount[active]
boolean
Flag of active participation
loyaltyAccount[id]
integer
Participation ID
loyaltyAccount[phoneNumber]
string
Phone number
loyaltyAccount[cardNumber]
string
Card number
loyaltyAccount[amount]
float
Active bonus amount
loyaltyAccount[level]
object (LoyaltyLevel)
Level of participation
loyaltyAccount[level][id]
integer
Level ID
loyaltyAccount[level][name]
string
Level name
loyaltyAccount[createdAt]
DateTime
Creation date
loyaltyAccount[activatedAt]
DateTime
Activation date of the participation
loyaltyAccount[confirmedPhoneAt]
DateTime
Verification date of the phone number
loyaltyAccount[lastCheckId]
string
ID of the last SMS verification
loyaltyAccount[customFields]
array
Associative array of custom fields
warnings
array
GET
/api/v5/loyalty/account/{id}
Getting information about participation in the loyalty program
Getting information about participation in the loyalty program
To access the method, the following permission is required loyalty_read.
Parameters
Parameter
Type
Format
Description
id
integer
ID of participation in the loyalty program
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
loyaltyAccount
object (LoyaltyAccount)
Participation in the loyalty program
loyaltyAccount[active]
boolean
Flag of active participation
loyaltyAccount[id]
integer
Participation ID
loyaltyAccount[loyalty]
object (Loyalty)
Loyalty program
loyaltyAccount[loyalty][currency]
string
Currency
loyaltyAccount[loyalty][id]
integer
Loyalty program ID
loyaltyAccount[customer]
object (Customer)
Customer
loyaltyAccount[customer][id]
integer
Customer ID
loyaltyAccount[customer][externalId]
string
Customer external ID
loyaltyAccount[customer][site]
string
Store, from which the customer came
loyaltyAccount[customer][customFields]
array
Associative array of custom fields
loyaltyAccount[customer][firstName]
string
Name
loyaltyAccount[customer][lastName]
string
Surname
loyaltyAccount[customer][patronymic]
string
Middle name
loyaltyAccount[phoneNumber]
string
Phone number
loyaltyAccount[cardNumber]
string
Card number
loyaltyAccount[amount]
float
Active bonus amount
loyaltyAccount[ordersSum]
float
Orders total sum (in entity currency)
loyaltyAccount[nextLevelSum]
float
The required sum of purchases to go to the next level
loyaltyAccount[level]
object (LoyaltyLevel)
Level of participation
loyaltyAccount[level][type]
string
Level type. Possible values: bonus_converting, bonus_percent, discount
loyaltyAccount[level][id]
integer
Level ID
loyaltyAccount[level][name]
string
Level name
loyaltyAccount[level][sum]
custom handler result for (int)
The sum required to go to this level (in entity currency)
loyaltyAccount[level][privilegeSize]
float
Discount amount, percentage or rate of bonus accrual for products at a regular price (in entity currency)
loyaltyAccount[level][privilegeSizePromo]
float
Discount amount, percentage or rate of bonus accrual for promotional products (in entity currency)
loyaltyAccount[level][creditConditions][]
array of objects (LoyaltyLevelCondition)
Conditions for accruing bonuses on specific products
POST
/api/v5/loyalty/account/{id}/activate
Activation of participation in the loyalty program
Activation of participation in the loyalty program
To access the method, the following permission is required loyalty_write.
The method allows you to activate the created participation. If the setting of registration in the
loyalty program "Confirmation of registration by SMS" is enabled, it is required to specify a phone
number in the participation of the loyalty program. An SMS message will be sent to this phone number
confirming the activation of the participation in the program. The activation will be performed only
after the confirmation via the SMS code.
To resend SMS, call this method again.
Resending is available in 60 seconds. The validity of the SMS code is 5 minutes.
If it is not required to send an SMS for activation, the activation will be performed according to the
settings of the loyalty program and the LoyaltyAccount object will be returned in the
response. In case of confirmation via SMS, the SmsVerification object will also be returned.
The code received by SMS must be sent in the method of verification confirmation specifying the checkId parameter.
Parameters
Parameter
Type
Format
Description
id
integer
ID of participation in the loyalty program
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
loyaltyAccount
object (LoyaltyAccount)
Participation in the loyalty program
loyaltyAccount[active]
boolean
Flag of active participation
loyaltyAccount[id]
integer
Participation ID
loyaltyAccount[phoneNumber]
string
Phone number
loyaltyAccount[cardNumber]
string
Card number
loyaltyAccount[amount]
float
Active bonus amount
loyaltyAccount[level]
object (LoyaltyLevel)
Level of participation
loyaltyAccount[level][id]
integer
Level ID
loyaltyAccount[level][name]
string
Level name
loyaltyAccount[createdAt]
DateTime
Creation date
loyaltyAccount[activatedAt]
DateTime
Activation date of the participation
loyaltyAccount[confirmedPhoneAt]
DateTime
Verification date of the phone number
loyaltyAccount[lastCheckId]
string
ID of the last SMS verification
loyaltyAccount[customFields]
array
Associative array of custom fields
verification
object (SmsVerification)
SMS-verification
verification[createdAt]
DateTime
Date of creation. (Y-m-d H:i:s)
verification[expiredAt]
DateTime
Expiration date. (Y-m-d H:i:s)
verification[verifiedAt]
DateTime
Verification success date. (Y-m-d H:i:s)
verification[checkId]
string
Code verification ID
verification[actionType]
string
Type of action
POST
/api/v5/loyalty/account/{id}/bonus/charge
Charging off bonuses to a loyalty program participant
Charging off bonuses to a loyalty program participant
To access the method, the following permission is required loyalty_write.
The method allows to charge off bonuses to a loyalty program participant.
Parameters
Parameter
Type
Format
Description
amount
float
Number of bonuses to charge off
comment
string
Comment
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
POST
/api/v5/loyalty/account/{id}/bonus/credit
Accrual of bonuses for participation in the loyalty program
Accrual of bonuses for participation in the loyalty program
To access the method, the following permission is required loyalty_write.
This method allows to accrue bonuses for participation in the loyalty program.
If the activation date of bonuses activationDate wasn’t passed, bonuses will be activated in accordance with the settings of the loyalty program
If the expiration date of bonuses expireDate wasn’t not passed, bonuses will expire in accordance with the settings of the loyalty program
Parameters
Parameter
Type
Format
Description
amount
float
Bonus amount to be accrued
activationDate
DateTime
Y-m-d
Activation date of bonuses
expireDate
DateTime
Y-m-d
Expiration date of bonuses
comment
string
Comment
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
loyaltyBonus
object (LoyaltyBonus)
loyaltyBonus[amount]
float
Amount of accrued bonuses
loyaltyBonus[activationDate]
DateTime
Activation date of bonuses
loyaltyBonus[expireDate]
DateTime
Expiration date of bonuses
GET
/api/v5/loyalty/account/{id}/bonus/operations
History of the bonus account for a specific participation
History of the bonus account for a specific participation
To access the method, the following permission is required loyalty_read.
This method allows to get the history of the bonus account for participation in the loyalty program.
The bonusOperations[][type] field contains the type of action that led to the change of the bonus account.
Possible values:
credit_for_order - accrual for the order
burn - expiration
credit_for_event - accrual for the event
charge_for_order - redemption for the order
charge_manual - redeemed manually
cancel_of_charge - cancellation of redemption
cancel_of_credit - cancellation of accrual
The bonusOperations[][amount] field contains the amount of redeemed, expired or accrued bonuses.
If bonuses were accrued, the value is positive, if they were redeemed or expired - negative.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
GET
/api/v5/loyalty/account/{id}/bonus/{status}/details
Getting details on the bonus account
Getting details on the bonus account
To access the method, the following permission is required loyalty_read.
The method allows to get detailed information about bonuses in the statuses "Waiting for activation" waiting_activation and "Will expire soon" burn_soon.
The filter[date] parameter filters depending on the transferred status
If the status is waiting_activation - inactive bonuses with the activation date up to and including the date passed in the filter
If the status is burn_soon - bonuses that will expire up to and including the date passed in the filter
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
GET
/api/v5/loyalty/bonus/operations
History of the bonus account for all participations
History of the bonus account for all participations
To access the method, the following permission is required loyalty_read.
This method allows to get the history of the bonus account for all participations in all loyalty programs
The bonusOperations[][type] field contains the type of action that led to the change of the bonus account.
Possible values:
credit_for_order - accrual for the order
burn - expiration
credit_for_event - accrual for the event
charge_for_order - redemption for the order
charge_manual - redeemed manually
cancel_of_charge - cancellation of redemption
cancel_of_credit - cancellation of accrual
The bonusOperations[][amount] field contains the amount of redeemed, expired or accrued bonuses.
If bonuses were accrued, the value is positive, if they were redeemed or expired - negative.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
cursor
string
The cursor of the element from which the search starts
POST
/api/v5/loyalty/calculate
Calculation of a maximum discount
Calculation of a maximum discount
To access the method, the following permission is required loyalty_read.
This method calculates the maximum discount for a customer taking into account a personal discount or loyalty level or event.
The method allows transferring the estimated number of bonuses to be redeemed (only for calculations) in the bonuses parameter, 0 by default.
The privilegeType field can contain one of the following values:
personal_discount - the customer’s personal discount;
loyalty_level - calculation of a discount or bonus accrual based on the level settings of the customer’s Loyalty Program;
loyalty_event - calculation of the discount on the event of the Loyalty Program;
none - do not apply discounts of the Loyalty Program to the order;
Parameters
Parameter
Type
Format
Description
site
string
Store symbolic code
order
object (SerializedOrder)
order[privilegeType]
string
Privilege type
order[discountManualAmount]
double
Monetary discount (in entity currency)
order[discountManualPercent]
double
Percentage discount
order[customer]
object (SerializedRelationCustomer)
Customer
order[customer][id]
integer
Customer internal ID
order[customer][externalId]
string
Customer external ID
order[items][]
array of objects (SerializedOrderProduct)
order[items][][initialPrice]
double
Item price/SKU (in entity currency)
order[items][][discountManualAmount]
double
Monetary discount per item (in entity currency)
order[items][][discountManualPercent]
double
Percentage discount per item
order[items][][quantity]
float
Quantity
order[items][][offer]
object (SerializedOrderProductOffer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU external ID
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][cost]
double
Cost
order[applyRound]
boolean
Apply the setting of rounding the order cost
bonuses
float
Amount of bonuses to be redeemed
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
order
object (SerializedLoyaltyOrder)
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[currency]
string
Currency
order[privilegeType]
string
Privilege type
order[totalSumm]
double
Total sum with discount (in entity currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyAccount]
object (LoyaltyAccount)
Participation in the loyalty program
order[loyaltyAccount][id]
integer
Participation ID
order[loyaltyAccount][amount]
float
Active bonus amount
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[customer]
object (Customer)
Customer
order[customer][id]
integer
Customer ID
order[customer][externalId]
string
Customer external ID
order[customer][personalDiscount]
double
Personal discount
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][cost]
double
Cost
order[site]
string
Store
order[items][]
array of objects (OrderProduct)
Order item
order[items][][bonusesChargeTotal]
double
Amount of debited bonuses
order[items][][bonusesCreditTotal]
double
Amount of accrued bonuses
order[items][][id]
integer
ID of order item
order[items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
order[items][][externalIds][][code]
string
Symbolic code
order[items][][externalIds][][value]
string
Value
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[items][][initialPrice]
double
Item price/SKU (in entity currency)
order[items][][discounts][]
array of objects (AbstractDiscount)
Array of discounts
order[items][][discounts][][type]
string
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
order[items][][prices][][quantity]
float
Quantity of the product at the specified price
order[items][][vatRate]
string
VAT rate
order[items][][quantity]
float
Quantity
order[items][][offer]
object (Offer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU ID in store
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
calculations[]
array of objects (LoyaltyCalculation)
calculations[][privilegeType]
string
Privilege type
calculations[][discount]
float
Monetary discount on the order taking into account the bonuses redeemed at the rate specified in the settings
calculations[][creditBonuses]
float
Bonuses to be accrued
calculations[][loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
calculations[][loyaltyEventDiscount][id]
integer
ID
calculations[][maxChargeBonuses]
float
Bonuses available for redeeming
calculations[][maximum]
boolean
Privilege with maximum benefit
loyalty
object (SerializedLoyalty)
loyalty[currency]
string
Currency
loyalty[name]
string
Loyalty program name
loyalty[chargeRate]
float
Rate when redeeming bonuses (in entity currency)
GET
/api/v5/loyalty/loyalties
List of loyalty programs
List of loyalty programs
To access the method, the following permission is required loyalty_read.
The method returns a list of loyalty programs
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (LoyaltyApiFilterData)
filter[ids][]
array of integers
Array ID of loyalty programs
filter[sites][]
array of strings
Stores
filter[active]
boolean
Activity
filter[blocked]
boolean
Blocked
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
loyalties[]
array of objects (Loyalty)
Loyalty program
loyalties[][levels][]
array of objects (LoyaltyLevel)
Loyalty levels
loyalties[][levels][][type]
string
Level type. Possible values: bonus_converting, bonus_percent, discount
loyalties[][levels][][id]
integer
Level ID
loyalties[][levels][][name]
string
Level name
loyalties[][levels][][sum]
custom handler result for (int)
The sum required to go to this level (in entity currency)
loyalties[][levels][][privilegeSize]
float
Discount amount, percentage or rate of bonus accrual for products at a regular price (in entity currency)
loyalties[][levels][][privilegeSizePromo]
float
Discount amount, percentage or rate of bonus accrual for promotional products (in entity currency)
POST
/api/v5/notifications/send
Sending notification
Sending notification
To access the method, the following permission is required notification_write.
The method sends notifications to recipients that are specified in mutually exclusive fields: notification[userIds], notification[userGroups].
Via notification[userIds] you can transfer an array of identifiers of users existing in the system. All array elements must be of type integer.
At the moment, the only valid value of the notification[userGroups] field can be the code of the superadmins group.
Only one of the fields notification[userIds] or notification[userGroups] should be filled in the request.
The notification[type] field can get the following values: api.info - informational, api.error - error.
The notification[message] field allows the use of HTML-code. To ensure the security of using notifications only certain HTML-tagsare allowed in the message text: <b></b>, <i></i>, <strong></strong>, <em></em>, <br>, <span>, <div>, <p>, <a href=""></a>.
Message length should not exceed 160 characters, excluding tags.
When using this method, keep in mind that for each user there is a limit of notifications that he can receive over a period of time from one api key. When sending to multiple recipients at once, the user limit with the minimum notification balance is used. Notifications are not sent if the list of recipients contains a user with zero balance of available notifications. Depending on the type of notification there are two limitations:
notification with api.error type has a limit of 3 messages from the module for a user over the last hour;
notification with api.info type has a limit of 10 notifications from the module for a user over the last 30 minutes.
Information about limits is returned in the response headers:
X-RateLimit-Remaining - number of available notifications;
X-RateLimit-Retry-After - the time when the notifications will be available again;
Request execution error. Request limit has been exceeded over the last time.
Orders
GET
/api/v5/orders
Getting the list of orders matched the specified filter
Getting the list of orders matched the specified filter
To access the method, the following permission is required order_read.
The result is returned page by page. In the field pagination there is information on pagination.
In the filters filter[managers][], filter[couriers][]
the internal IDs of the system elements are specified.
In the filters filter[orderTypes][], filter[paymentStatuses][],
filter[paymentTypes][], filter[deliveryTypes][], filter[orderMethods][],
filter[managerGroups][] the symbol codes of the elements are specified.
In the filters
filter[sourceName], filter[mediumName], filter[campaignName], filter[keywordName], filter[adContentName]
the name of the elements are specified.
In the filter filter[number] the exact comparison with the specified string expression is carried out.
In the following filters filter[ids][] and filter[externalIds][] the array of internal and external identifiers are passed.
In the filter filter[extendedStatus][] you can specify one or more statuses or order status groups.
For filtration by status the symbol code of status is passed. For filtration by the status group
the symbol code of status group and the postfix -group are passed.
E.g.: filter[extendedStatus][]=new&filter[extendedStatus][]=approval-group.
With the help of the filter[customFields][] filter you can search by the custom fields value.
For the "Data book" fields the symbol code of data book value is specified.
For the "Date" and "Date-time" fields the date is specified in the Y-m-d format.
For other field types exactly the value is specified.
For the Integer, Numeric, Date and Date-time custom fields
the filtration is realized over the range, for other fields types — by the exact value.
Filter name is the same as field symbol code. E.g.: for the Date field with the symbol code
birth_date there are filters
filter[customFields][birth_date][min] and
filter[customFields][birth_date][max]. For the DataBook field
with the symbol code quality there is multiple filter
filter[customFields][quality][].
One of three values can be specified in filter[attachments]:
1 - returns orders, which have attached files and attachments to letters;
2 - returns orders, which have attached files;
3 - returns orders, which have no attached files.
One of three values can be specified in the filter[tasksCounts]:
1 - returns orders having no uncompleted tasks;
2 - returns orders with any uncompleted tasks (both expired and not expired ones);
3 - returns only those orders which have expired tasks among uncompleted ones.
The filter[mgChannels] filter specifies an array of internal IDs of channels in the system. The filter selects orders created via the right-hand chat widget.
Empty fields without values are not returned.
In the fields orderType, orderMethod,
payments[][type], payments[][status], status, site,
delivery[code] the symbol code of the element is returned.
In the fields managerId, sourceId the internal ID of the system entity is returned.
In the customFields field the value array of custom fields is returned.
For the "DataBook" fields the symbol code of data book value is specified.
For the date fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
If the customer address was specified in the string form it will be returned to the
delivery[address][text]. If the address was specified in detailed view,
there will be returned all delivery filled fields, and in the
delivery[address][text] there will be automatically
generated textual representation of the address.
The privilegeType field can contain one of the following values:
personal_discount - the customer’s personal discount;
loyalty_level - calculation of a discount or bonus accrual based on the level settings of the customer’s Loyalty Program;
loyalty_event - calculation of the discount on the event of the Loyalty Program;
none - do not apply discounts of the Loyalty Program to the order;
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (OrderFilterData)
filter[ids][]
array of integers
Array of order's ID
filter[externalIds][]
array of strings
Array of order's externalID
filter[numbers][]
array of strings
Array of order's number (no more than 100 numbers in one request)
filter[customerId]
integer
{range: {>=0, <=100000000000}}
Customer ID
filter[customerExternalId]
string
{length: {max: 255}}
Customer external ID
filter[customer]
string
{length: {max: 255}}
Customer (Name or phone number)
filter[customerType]
string
[customer|customer_corporate]
Customer type
filter[email]
string
{length: {max: 255}}
E-mail
filter[managers][]
array of integers
Managers
filter[managerGroups][]
array of strings
Manager groups
filter[paymentStatuses][]
array of strings
Payment statuses
filter[orderTypes][]
array of strings
Order types
filter[orderMethods][]
array of strings
Order channels
filter[product]
string
{length: {max: 255}}
Product (title or article)
filter[productSearchType]
string
filter[extendedStatus][]
array of strings
Order status
filter[statusComment]
string
{length: {max: 255}}
filter[sites][]
array of strings
Stores
filter[vip]
boolean
VIP customer
filter[bad]
boolean
BAD customer
filter[expired]
boolean
Order expired
filter[call]
boolean
Call required
filter[online]
boolean
Customer is online
filter[paymentTypes][]
array of strings
Payment types
filter[deliveryStates][]
array of strings
{choice of [cancel|cancel_force|error|none|processing|success]}
Statuses of delivery registration
filter[deliveryTypes][]
array of strings
Delivery types
filter[deliveryServices][]
array of strings
Services
filter[countries][]
array of strings
Countries
filter[region]
string
{length: {max: 255}}
Region
filter[city]
string
{length: {max: 255}}
City
filter[index]
string
Postal code
filter[metro]
string
{length: {max: 255}}
Subway
filter[sourceName]
string
{length: {max: 255}}
Source
filter[mediumName]
string
{length: {max: 255}}
Medium
filter[campaignName]
string
{length: {max: 255}}
Campaign
filter[keywordName]
string
Keyword
filter[adContentName]
string
Ad content
filter[managerComment]
string
{length: {max: 255}}
Manager comment
filter[customerComment]
string
{length: {max: 255}}
Customer comment
filter[trackNumber]
string
{length: {max: 255}}
Delivery tracking number
filter[deliveryExternalId]
string
Delivery ID
filter[couriers][]
array of integers
Couriers
filter[contragentName]
string
{length: {max: 255}}
Full name
filter[contragentTypes][]
array of strings
{choice of [enterpreneur|individual|legal-entity]}
Contractor types
filter[contragentInn]
string
{match: /\d+/}
VAT
filter[contragentKpp]
string
{match: /\d+/}
IEC
filter[contragentBik]
string
{match: /\d+/}
BIC
filter[contragentCorrAccount]
string
{match: /\d+/}
Corresponding account
filter[contragentBankAccount]
string
{match: /\d+/}
Bank account
filter[companyName]
string
{length: {max: 255}}
Company (name)
filter[deliveryAddressNotes]
string
{length: {max: 255}}
Notes to delivery address
filter[productGroups][]
array of integers
filter[shipmentStores][]
array of strings
Shipment warehouses
filter[shipped]
boolean
Shipped
filter[attachments]
integer
[1|2|3]
Attachments
filter[receiptFiscalDocumentAttribute]
string
{length: {max: 255}}
Fiscal Document Attribute
filter[receiptStatus]
string
[done|fail|wait]
Fiscalization status
filter[receiptOperation]
string
[sell|sell_refund]
Fiscalization operation
filter[receiptOrderStatus]
string
[done|fail|wait]
Full fiscalization status
filter[mgChannels][]
array of integers
Chat channels
filter[tasksCounts]
integer
[1|2|3]
Tasks
filter[tags][]
array of strings
filter[attachedTags][]
array of strings
filter[createdAtFrom]
DateTime
Y-m-d
Order creation date (from)
filter[createdAtTo]
DateTime
Y-m-d
Order creation date (to)
filter[fullPaidAtFrom]
DateTime
Y-m-d
Full payment date (from)
filter[fullPaidAtTo]
DateTime
Y-m-d
Full payment date (to)
filter[deliveryDateFrom]
DateTime
Y-m-d
Delivery date (from)
filter[deliveryDateTo]
DateTime
Y-m-d
Delivery date (to)
filter[statusUpdatedAtFrom]
DateTime
Y-m-d
Last status changing date (from)
filter[statusUpdatedAtTo]
DateTime
Y-m-d
Last status changing date (to)
filter[shipmentDateFrom]
DateTime
Y-m-d
Shipment date (from)
filter[shipmentDateTo]
DateTime
Y-m-d
Shipment date (to)
filter[firstWebVisitFrom]
DateTime
Y-m-d
First visit (from)
filter[firstWebVisitTo]
DateTime
Y-m-d
First visit (to)
filter[lastWebVisitFrom]
DateTime
Y-m-d
Last visit (from)
filter[lastWebVisitTo]
DateTime
Y-m-d
Last visit (to)
filter[firstOrderFrom]
DateTime
Y-m-d
First order (from)
filter[firstOrderTo]
DateTime
Y-m-d
First order (to)
filter[lastOrderFrom]
DateTime
Y-m-d
Last order (from)
filter[lastOrderTo]
DateTime
Y-m-d
Last order (to)
filter[paidAtFrom]
DateTime
Y-m-d
Payment date (from)
filter[paidAtTo]
DateTime
Y-m-d
Payment date (to)
filter[deliveryTimeFrom]
DateTime
HH:MM:SS
Delivery time (from)
filter[deliveryTimeTo]
DateTime
HH:MM:SS
Delivery time (to)
filter[minPrice]
integer
Order price (from)
filter[maxPrice]
integer
Order price (to)
filter[minCostSumm]
integer
Amount of costs (from)
filter[maxCostSumm]
integer
Amount of costs (to)
filter[minPrepaySumm]
integer
Paid (from)
filter[maxPrepaySumm]
integer
Paid (to)
filter[minDeliveryCost]
integer
Delivery cost (from)
filter[maxDeliveryCost]
integer
Delivery cost (to)
filter[minDeliveryNetCost]
integer
Delivery net cost (from)
filter[maxDeliveryNetCost]
integer
Delivery net cost (to)
filter[minMarginSumm]
integer
Gross order profit (from)
filter[maxMarginSumm]
integer
Gross order profit (to)
filter[minPurchaseSumm]
integer
Order purchase price (from)
filter[maxPurchaseSumm]
integer
Order purchase price (to)
filter[customFields]
array
Filter by custom fields
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
orders[]
array of objects (Order)
Order
orders[][slug]
custom handler result for (int)
deprecated Symbolic code
orders[][bonusesCreditTotal]
double
Amount of accrued bonuses
orders[][bonusesChargeTotal]
double
Amount of debited bonuses
orders[][summ]
double
Total for goods/services (in entity currency)
orders[][currency]
string
Currency
orders[][id]
integer
Order ID
orders[][number]
string
Order number
orders[][externalId]
string
Order external ID
orders[][orderType]
string
Order type
orders[][orderMethod]
string
Method
orders[][privilegeType]
string
Privilege type
orders[][countryIso]
string
Country ISO code
orders[][createdAt]
DateTime
Order creation date
orders[][statusUpdatedAt]
DateTime
Date of the last order status change
orders[][totalSumm]
double
Total sum with discount (in entity currency)
orders[][prepaySum]
double
Paid sum (in entity currency)
orders[][purchaseSumm]
double
Total purchase sum (in base currency)
orders[][personalDiscountPercent]
double
Personal discount on the order
orders[][loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
orders[][loyaltyLevel][id]
integer
Level ID
orders[][loyaltyLevel][name]
string
Level name
orders[][loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
orders[][loyaltyEventDiscount][id]
integer
ID
orders[][mark]
integer
Order evaluation
orders[][markDatetime]
DateTime
Date and time of getting evaluation from customer
orders[][lastName]
string
Surname
orders[][firstName]
string
Name
orders[][patronymic]
string
Middle name
orders[][phone]
string
Phone number
orders[][additionalPhone]
string
Additional phone
orders[][email]
string
E-mail
orders[][call]
boolean
Call required
orders[][expired]
boolean
Expired
orders[][customerComment]
string
Customer comment
orders[][managerComment]
string
Operator comment
orders[][managerId]
integer
Manager, responsible for order
orders[][customer]
CustomerCorporate customer
orders[][customer][type]
string
Customer typeCustomer type
orders[][customer][id]
integer
Customer IDCorporate customer ID
orders[][customer][externalId]
string
Customer external IDCorporate customer external ID
orders[][customer][isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
orders[][customer][createdAt]
DateTime
Created atCreated at
orders[][customer][managerId]
integer
Customer managerCorporate customer manager
orders[][customer][vip]
boolean
VIP customerVIP corporate customer
orders[][customer][bad]
boolean
Bad customerBad corporate customer
orders[][customer][site]
string
Store, from which the customer cameStore, from which the corporate customer came
orders[][customer][contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
orders[][customer][contragent][contragentType]
string
Contragent type
orders[][customer][contragent][legalName]
string
Legal name
orders[][customer][contragent][legalAddress]
string
Registration address
orders[][customer][contragent][INN]
string
TIN
orders[][customer][contragent][OKPO]
string
RNNBO
orders[][customer][contragent][KPP]
string
IECC
orders[][customer][contragent][OGRN]
string
PSRN
orders[][customer][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
orders[][customer][contragent][certificateNumber]
string
Certificate number
orders[][customer][contragent][certificateDate]
DateTime
Certificate date
orders[][customer][contragent][BIK]
string
RCBIC
orders[][customer][contragent][bank]
string
Bank
orders[][customer][contragent][bankAddress]
string
Bank address
orders[][customer][contragent][corrAccount]
string
Corresponding account
orders[][customer][contragent][bankAccount]
string
Settlement account
orders[][customer][tags][]
array of objects (CustomerTagLink)
[array] Tags[array] Tags
orders[][customer][tags][][color]
string
orders[][customer][tags][][name]
string
orders[][customer][tags][][colorCode]
string
orders[][customer][tags][][attached]
boolean
orders[][customer][firstClientId]
string
First Google Analytics clientIdFirst Google Analytics unique clientId
orders[][customer][lastClientId]
string
Last Google Analytics clientIdLast Google Analytics unique clientId
orders[][customer][customFields]
array
Associative array of custom fieldsAssociative array of custom fields
orders[][customer][personalDiscount]
double
Personal discountPersonal discount
orders[][customer][cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)deprecated Cumulative discount (Not available starting from version 8 of the system)
orders[][customer][discountCardNumber]
string
Discount card numberDiscount card number
orders[][customer][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)Average gross profit of corporate customer orders (in base currency)
orders[][customer][marginSumm]
float
LTV (in base currency)LTV (in base currency)
orders[][customer][totalSumm]
float
Orders total sum (in base currency)Orders total sum (in base currency)
orders[][customer][averageSumm]
float
Order average sum (in base currency)Order average sum (in base currency)
orders[][customer][ordersCount]
integer
Orders quantityOrders quantity
orders[][customer][costSumm]
float
Amount of costs (in base currency)Amount of costs (in base currency)
Average gross profit of customer orders (in base currency)
orders[][company][marginSumm]
float
LTV (in base currency)
orders[][company][totalSumm]
float
Orders total sum (in base currency)
orders[][company][averageSumm]
float
Order average sum (in base currency)
orders[][company][costSumm]
float
Amount of costs (in base currency)
orders[][company][ordersCount]
integer
Orders quantity
orders[][company][customFields]
array
Associative array of custom fields
orders[][contragent]
object (OrderContragent)
Requisites
orders[][contragent][contragentType]
string
Contragent type
orders[][contragent][legalName]
string
Legal name
orders[][contragent][legalAddress]
string
Registration address
orders[][contragent][INN]
string
TIN
orders[][contragent][OKPO]
string
RNNBO
orders[][contragent][KPP]
string
IECC
orders[][contragent][OGRN]
string
PSRN
orders[][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
orders[][contragent][certificateNumber]
string
Certificate number
orders[][contragent][certificateDate]
DateTime
Certificate date
orders[][contragent][BIK]
string
RCBIC
orders[][contragent][bank]
string
Bank
orders[][contragent][bankAddress]
string
Bank address
orders[][contragent][corrAccount]
string
Corresponding account
orders[][contragent][bankAccount]
string
Settlement account
orders[][delivery]
object (SerializedOrderDelivery)
Data on delivery
orders[][delivery][code]
string
Delivery type code
orders[][delivery][integrationCode]
string
Integration code of delivery type
orders[][delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
orders[][delivery][data][externalId]
string
Delivery id in delivery servicedeprecated Track number (Use trackNumber instead)
orders[][delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack numberTrack number
orders[][delivery][data][status]
string
Delivery status codeDelivery status codeDelivery status codeDelivery status code
orders[][delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
orders[][delivery][data][pickuppointAddress]
string
Pickup point address
orders[][delivery][data][days]
string
Approximate delivery timeApproximate delivery timeApproximate delivery time
orders[][delivery][data][statusText]
string
Delivery status nameDelivery status nameDelivery status name
orders[][delivery][data][statusDate]
DateTime
Delivery status dateDate of the last delivery status updating
orders[][delivery][data][tariff]
string
Tariff code
orders[][delivery][data][tariffName]
string
Tariff name
orders[][delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
orders[][delivery][data][pickuppointSchedule]
string
Pickup point working timeSchedule of pickup point
orders[][delivery][data][pickuppointPhone]
string
Pickup point phone
orders[][delivery][data][payerType]
string
PayerPayer type
orders[][delivery][data][statusComment]
string
Comment to delivery status
orders[][delivery][data][cost]
float
Delivery cost received from delivery service (in entity currency)Delivery cost received from delivery service (in entity currency)
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
orders[][items][][discounts][][amount]
float
Discount amount
orders[][items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
orders[][items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
orders[][items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
orders[][items][][prices][][quantity]
float
Quantity of the product at the specified price
orders[][items][][vatRate]
string
VAT rate
orders[][items][][createdAt]
DateTime
Date of order item creation in the system
orders[][items][][quantity]
float
Quantity
orders[][items][][status]
string
Status of the order item
orders[][items][][comment]
string
Comment to the order item
orders[][items][][offer]
object (Offer)
SKU
orders[][items][][offer][displayName]
string
SKU name
orders[][items][][offer][id]
integer
SKU ID
orders[][items][][offer][externalId]
string
SKU ID in store
orders[][items][][offer][xmlId]
string
SKU ID in the warehouse system
orders[][items][][offer][name]
string
Name
orders[][items][][offer][article]
string
Vendor code
orders[][items][][offer][vatRate]
string
VAT rate
orders[][items][][offer][properties][]
array
SKU properties
orders[][items][][offer][unit]
object (Unit)
Unit
orders[][items][][offer][unit][code]
string
Unit symbolic code
orders[][items][][offer][unit][name]
string
Unit name
orders[][items][][offer][unit][sym]
string
Unit short name
orders[][items][][offer][barcode]
string
Barcode
orders[][items][][isCanceled]
boolean
This order item is cancelled in the order
orders[][items][][properties][]
array
[array] Additional properties of the order item
orders[][items][][properties][][code]
string
Property code (not mandatory field, the code can be transmitted in the property key)
To access the method, the following permission is required order_write.
Allows to combine orders.
Order items in resultOrder parameter will be combined with order items of order,
after that the order will be irreversibly removed.
The operation is performed asynchronously. The successful response success=true means that the operation will be executed
but it hasn't been completed yet. The actual result of the operation can be tracked using the /api/v5/orders/history method
for those orders that will be deleted when combining (history[][combinedTo] response parameter).
In technique parameter you can specify the strategy of combining in case if there are similar items in orders
ours to use item quantity from current order
summ to summarize item quantity in both orders
theirs to use item quantity from order being combined
Parameters
Parameter
Type
Format
Description
order
object (SerializedOrderReference)
Order will be removed as a result of combining
order[id]
integer
{not blank}{range: {>=1, <=4294967295}}}
Order internal ID
resultOrder
object (SerializedOrderReference)
Order, in which the combining will be made
resultOrder[id]
integer
{not blank}{range: {>=1, <=4294967295}}}
Order internal ID
technique
string
Way of combining in case if there are similar items in orders
To access the method, the following permission is required order_write.
Method creates the order and returns internal ID of created order.
If order[createdAt] is not specified, then current time will be used as the date/time of
order creation.
If you need to attach the order to the current customer,
you should pass the customer external ID to the field order[customer][externalId],
the customer internal ID to the field order[customer][id] or
the customer ID in Daemon Collector in order[customer][browserId].
The search of the customer will be realized under the stores, to which the used API-key has an access.
If the order[customer] is not specified,
the customer will be created automatically based on the order data.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
In the fields order[orderType], order[orderMethod],
order[payments][][type], order[payments][][status],
order[status], order[shipmentStore],
order[delivery][code], order[items][][status]
the symbol code of the element is specified.
In the fields order[managerId], order[sourceId] the internal ID of the system entity is specified.
The comment order[statusComment] cannot be changed without changing the order status order[status].
Order items are specified in the field order[items][]. The products that were not passed in the request for editing are deleted from the order.
If item is in the catalog, then it is necessary to set the value for one of the following fields:
order[items][][offer][id] – SKU ID;
order[items][][offer][externalId] – external ID of item or SKU;
order[items][][offer][xmlId] – SKU ID in the warehouse system.
If the values are set for several fields, they will be processed in the following above order.
In case, if the ofeer will be not found by any of criteria, the order item
will be automatically created based on data from fields
order[items][][initialPrice],
order[items][][purchasePrice],
order[items][][productName].
The delivery address order[delivery][address] you can specify either in the string form
in the order[delivery][address][text] field, or in the detailed view, filling
all the fields except order[delivery][address][text].
In the order[customFields] field you can pass the values array of custom fields.
For the "DataBook" fields the symbol code of data book value is specified.
For the "Date" fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
For working with price types, more than one price type must be enabled in data book.
For transferring the price type for order item, code of necessary price type must be transferred to order[items][][priceType][code] field.
It is recommended to transfer actual value of item price together with price type to order[items][][initialPrice].
If order[items][][priceType][code] price type is transferred without the order[items][][initialPrice] price value,
then the current value of this price type for the current item will be taken for the item price.
For new item it is recommended always to transfer order[items][][initialPrice] price clearly,
in case if actual price has not been downloaded to system yet.
If not to transfer order[items][][priceType][code] price type for the item,
then price type for the item in order will be No type.
In case if there is only the basic price type in the system,
then order[items][][priceType][code] parameter should not be considered.
The order of order items order[items][] is saved in response.
Parameters order[items][][externalId] and order[items][][externalIds] are optional.
Either external ID value order[items][][externalId] or array of external IDs order[items][][externalIds] can be specified at the same time.
The external ID value order[items][][externalId] will be written to the array order[items][][externalIds] with default code.
Values of external identifiers order[items][][externalIds][][value] should be unique by code order[items][][externalIds][][code] within one order.
The privilegeType field can contain one of the following values:
personal_discount - the customer’s personal discount;
loyalty_level - calculation of a discount or bonus accrual based on the level settings of the customer’s Loyalty Program;
loyalty_event - calculation of the discount on the event of the Loyalty Program;
none - do not apply discounts of the Loyalty Program to the order;
To apply the Loyalty Program to an order, the following conditions must be met:
the store of the order must coincide with the store of the necessary Loyalty Program;
participation in the Loyalty Program must be created for the customer in the order;
the privilegeType field must be specified with none by default;
If the loyalty_event value is specified in privilegeType and the event gives a discount, then it is required to specify the ID in the loyaltyEventDiscountId field
Parameters
Parameter
Type
Format
Description
site
string
Symbolic code of store
order
object (SerializedOrder)
order[number]
string
Order number
order[externalId]
string
Order external ID
order[privilegeType]
string
Privilege type
order[countryIso]
string
Country ISO code
order[createdAt]
DateTime
Y-m-d H:i:s
Order creation date
order[statusUpdatedAt]
DateTime
Y-m-d H:i:s
Date of the last order status change
order[discountManualAmount]
double
Monetary discount (in entity currency)
order[discountManualPercent]
double
Percentage discount
order[mark]
integer
Order evaluation
order[markDatetime]
DateTime
Y-m-d H:i:s
Date and time of getting evaluation from customer
order[lastName]
string
Surname
order[firstName]
string
Name
order[patronymic]
string
Middle name
order[phone]
string
Phone number
order[additionalPhone]
string
Additional phone
order[email]
string
E-mail
order[call]
boolean
Call required
order[expired]
boolean
Expired
order[customerComment]
string
Customer comment
order[managerComment]
string
Operator comment
order[contragent]
object (OrderContragent)
Requisites
order[contragent][contragentType]
string
Contragent type
order[contragent][legalName]
string
Legal name
order[contragent][legalAddress]
string
Registration address
order[contragent][INN]
string
TIN
order[contragent][OKPO]
string
RNNBO
order[contragent][KPP]
string
IECC
order[contragent][OGRN]
string
PSRN
order[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[contragent][certificateNumber]
string
Certificate number
order[contragent][certificateDate]
DateTime
Y-m-d
Certificate date
order[contragent][BIK]
string
RCBIC
order[contragent][bank]
string
Bank
order[contragent][bankAddress]
string
Bank address
order[contragent][corrAccount]
string
Corresponding account
order[contragent][bankAccount]
string
Settlement account
order[statusComment]
string
Comment to the last status change
order[weight]
double
Weight
order[length]
integer
Length
order[width]
integer
Width
order[height]
integer
Height
order[shipmentDate]
DateTime
Y-m-d
Shipment date
order[shipped]
boolean
Order is shipped
order[dialogId]
object (MGDialog)
Chats dialog identifier
order[customFields]
array
Associative array of custom fields
order[orderType]
string
Order type
order[orderMethod]
string
Method
order[customer]
object (SerializedRelationCustomer)
Customer
order[customer][id]
integer
Customer internal ID
order[customer][externalId]
string
Customer external ID
order[customer][browserId]
string
Device ID in Collector
order[customer][site]
string
Store code, required when externalId is specified
order[customer][type]
string
Customer type (specified when creating new customer)
order[customer][nickName]
string
Corporate customer name (specified when creating new corporate customer)
Property code (not mandatory field, the code can be transmitted in the property key)
order[items][][properties][][name]
string
{not blank}
Property name
order[items][][properties][][value]
string
{not blank}
Property value
order[items][][purchasePrice]
double
Purchasing price (in base currency)
order[items][][ordering]
integer
Ordering
order[items][][offer]
object (SerializedOrderProductOffer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU external ID
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
order[items][][productName]
string
Item name
order[items][][status]
string
Status of the order item
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[items][][externalId]
string
deprecated External ID of order item
order[items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
order[items][][externalIds][][code]
string
Symbolic code
order[items][][externalIds][][value]
string
Value
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][code]
string
Delivery type code
order[delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
order[delivery][data][externalId]
string
Delivery id in delivery service
order[delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack number
order[delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
order[delivery][data][tariff]
string
Tariff code
order[delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
order[delivery][data][payerType]
string
PayerPayer type
order[delivery][data][shipmentpointId]
string
Shipment terminal IDShipment point id
order[delivery][data][extraData]
array
Additional delivery data (deliveryDataField.code => value)
ID of the discount on the event of the loyalty program
order[applyRound]
boolean
Apply the setting of rounding the order cost
order[isFromCart]
boolean
Order created from cart
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
Internal ID of created order
order
object (CreateOrder)
order[slug]
custom handler result for (int)
deprecated Symbolic code
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[summ]
double
Total for goods/services (in entity currency)
order[currency]
string
Currency
order[id]
integer
Order ID
order[number]
string
Order number
order[externalId]
string
Order external ID
order[orderType]
string
Order type
order[orderMethod]
string
Method
order[privilegeType]
string
Privilege type
order[countryIso]
string
Country ISO code
order[createdAt]
DateTime
Order creation date
order[statusUpdatedAt]
DateTime
Date of the last order status change
order[totalSumm]
double
Total sum with discount (in entity currency)
order[prepaySum]
double
Paid sum (in entity currency)
order[purchaseSumm]
double
Total purchase sum (in base currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[mark]
integer
Order evaluation
order[markDatetime]
DateTime
Date and time of getting evaluation from customer
order[lastName]
string
Surname
order[firstName]
string
Name
order[patronymic]
string
Middle name
order[phone]
string
Phone number
order[additionalPhone]
string
Additional phone
order[email]
string
E-mail
order[call]
boolean
Call required
order[expired]
boolean
Expired
order[customerComment]
string
Customer comment
order[managerComment]
string
Operator comment
order[managerId]
integer
Manager, responsible for order
order[customer]
CustomerCorporate customer
order[customer][type]
string
Customer typeCustomer type
order[customer][id]
integer
Customer IDCorporate customer ID
order[customer][externalId]
string
Customer external IDCorporate customer external ID
order[customer][isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
order[customer][createdAt]
DateTime
Created atCreated at
order[customer][managerId]
integer
Customer managerCorporate customer manager
order[customer][vip]
boolean
VIP customerVIP corporate customer
order[customer][bad]
boolean
Bad customerBad corporate customer
order[customer][site]
string
Store, from which the customer cameStore, from which the corporate customer came
order[customer][contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
order[customer][contragent][contragentType]
string
Contragent type
order[customer][contragent][legalName]
string
Legal name
order[customer][contragent][legalAddress]
string
Registration address
order[customer][contragent][INN]
string
TIN
order[customer][contragent][OKPO]
string
RNNBO
order[customer][contragent][KPP]
string
IECC
order[customer][contragent][OGRN]
string
PSRN
order[customer][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[customer][contragent][certificateNumber]
string
Certificate number
order[customer][contragent][certificateDate]
DateTime
Certificate date
order[customer][contragent][BIK]
string
RCBIC
order[customer][contragent][bank]
string
Bank
order[customer][contragent][bankAddress]
string
Bank address
order[customer][contragent][corrAccount]
string
Corresponding account
order[customer][contragent][bankAccount]
string
Settlement account
order[customer][tags][]
array of objects (CustomerTagLink)
[array] Tags[array] Tags
order[customer][tags][][color]
string
order[customer][tags][][name]
string
order[customer][tags][][colorCode]
string
order[customer][tags][][attached]
boolean
order[customer][firstClientId]
string
First Google Analytics clientIdFirst Google Analytics unique clientId
order[customer][lastClientId]
string
Last Google Analytics clientIdLast Google Analytics unique clientId
order[customer][customFields]
array
Associative array of custom fieldsAssociative array of custom fields
order[customer][personalDiscount]
double
Personal discountPersonal discount
order[customer][cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)deprecated Cumulative discount (Not available starting from version 8 of the system)
order[customer][discountCardNumber]
string
Discount card numberDiscount card number
order[customer][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)Average gross profit of corporate customer orders (in base currency)
order[customer][marginSumm]
float
LTV (in base currency)LTV (in base currency)
order[customer][totalSumm]
float
Orders total sum (in base currency)Orders total sum (in base currency)
order[customer][averageSumm]
float
Order average sum (in base currency)Order average sum (in base currency)
order[customer][ordersCount]
integer
Orders quantityOrders quantity
order[customer][costSumm]
float
Amount of costs (in base currency)Amount of costs (in base currency)
Average gross profit of customer orders (in base currency)
order[company][marginSumm]
float
LTV (in base currency)
order[company][totalSumm]
float
Orders total sum (in base currency)
order[company][averageSumm]
float
Order average sum (in base currency)
order[company][costSumm]
float
Amount of costs (in base currency)
order[company][ordersCount]
integer
Orders quantity
order[company][customFields]
array
Associative array of custom fields
order[contragent]
object (OrderContragent)
Requisites
order[contragent][contragentType]
string
Contragent type
order[contragent][legalName]
string
Legal name
order[contragent][legalAddress]
string
Registration address
order[contragent][INN]
string
TIN
order[contragent][OKPO]
string
RNNBO
order[contragent][KPP]
string
IECC
order[contragent][OGRN]
string
PSRN
order[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[contragent][certificateNumber]
string
Certificate number
order[contragent][certificateDate]
DateTime
Certificate date
order[contragent][BIK]
string
RCBIC
order[contragent][bank]
string
Bank
order[contragent][bankAddress]
string
Bank address
order[contragent][corrAccount]
string
Corresponding account
order[contragent][bankAccount]
string
Settlement account
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][code]
string
Delivery type code
order[delivery][integrationCode]
string
Integration code of delivery type
order[delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
order[delivery][data][externalId]
string
Delivery id in delivery servicedeprecated Track number (Use trackNumber instead)
order[delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack numberTrack number
order[delivery][data][status]
string
Delivery status codeDelivery status codeDelivery status codeDelivery status code
order[delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
order[delivery][data][pickuppointAddress]
string
Pickup point address
order[delivery][data][days]
string
Approximate delivery timeApproximate delivery timeApproximate delivery time
order[delivery][data][statusText]
string
Delivery status nameDelivery status nameDelivery status name
order[delivery][data][statusDate]
DateTime
Delivery status dateDate of the last delivery status updating
order[delivery][data][tariff]
string
Tariff code
order[delivery][data][tariffName]
string
Tariff name
order[delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
order[delivery][data][pickuppointSchedule]
string
Pickup point working timeSchedule of pickup point
order[delivery][data][pickuppointPhone]
string
Pickup point phone
order[delivery][data][payerType]
string
PayerPayer type
order[delivery][data][statusComment]
string
Comment to delivery status
order[delivery][data][cost]
float
Delivery cost received from delivery service (in entity currency)Delivery cost received from delivery service (in entity currency)
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
POST
/api/v5/orders/fix-external-ids
The mass recording of orders external ID
The mass recording of orders external ID
To access the method, the following permission is required order_write.
This method is useful in case of reverse synchronization of orders, which were created in system initially.
It is recommended to use the following script of order reverse synchronization between web store and system.
Web store periodically requests method /api/v*/orders/history.
On the basis of received data the store applies changes to existing orders, and also creates new orders,
created in system initially. When creating of orders in store there are orders' own ID generated
(externalId of orders in system notation). Immediately after customers creation the web-store calls
method /api/v*/orders/fix-external-ids, keeping in system
orders' own ID.
GET
/api/v5/orders/history
Getting the order change history
Getting the order change history
To access the method, the following permission is required order_read.
Returns the changes in order data, which were made in the specified range of dates
(using filter[startDate] and filter[endDate] filters)
or the set of incremental changes for carrying out the permanent synchronization
(using filter[sinceId] filter)
Full set of fields in corresponding 'order' or 'item' keys is returned for order
creating or removal entries.
When adding item to order, fieldName=order_product entry is displayed in the history.
By that full object in "item" context is available and only identificating fields
are pointed out in "newValue" field.
The result is returned per-page. In the field pagination there is an information about the pagination.
To paginate through history records, it is necessary to use filter[sinceId]. It is not recommended to use the page parameter.
More information about the work with history you can find in other article.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (OrderHistoryFilterV4Type)
filter[orderId]
integer
{range: {>=0, <=4294967295}}{not blank}}
Order ID
filter[sinceId]
integer
{range: {>=0, <=4294967295}}{not blank}}
Starting with orders history ID
filter[orderExternalId]
string
{length: {max: 255}}
Order external ID
filter[startDate]
DateTime
Y-m-d H:i:s
Start DateTime of change
filter[endDate]
DateTime
Y-m-d H:i:s
End DateTime of change
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
generatedAt
DateTime
Time of response formation
history[]
array of objects (OrderHistory)
history[][id]
integer
Internal identifier of entry in the history
history[][createdAt]
DateTime
Date of making change
history[][created]
boolean
Notes that the entity is created
history[][deleted]
boolean
Notes that the entity is deleted
history[][source]
string
Date of making change
history[][user]
object (User)
User
history[][user][id]
integer
User ID
history[][field]
string
Name of changed field
history[][oldValue]
custom handler result for (mixed)
Old value of field
history[][newValue]
custom handler result for (mixed)
New value of field
history[][apiKey]
object (ApiKey)
Information about api key used for making this change
history[][apiKey][current]
boolean
The change was made with the api key currently in use
history[][apiKey][id]
integer
Api key ID
history[][order]
object (Order)
Order
history[][order][id]
integer
Order ID
history[][order][externalId]
string
Order external ID
history[][order][managerId]
integer
Manager, responsible for order
history[][order][site]
string
Store
history[][order][status]
string
Order status
history[][ancestor]
object (Order)
Information about the order from which the current order was created
history[][item]
object (OrderProduct)
Order item
history[][item][externalId]
string
deprecated External ID of order item
history[][item][id]
integer
ID of order item
history[][item][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
history[][item][externalIds][][code]
string
Symbolic code
history[][item][externalIds][][value]
string
Value
history[][item][discounts][]
array of objects (AbstractDiscount)
Array of discounts
history[][item][discounts][][type]
string
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
history[][item][discounts][][amount]
float
Discount amount
history[][item][offer]
object (Offer)
SKU
history[][item][offer][id]
integer
SKU ID
history[][item][offer][externalId]
string
SKU ID in store
history[][item][offer][xmlId]
string
SKU ID in the warehouse system
history[][item][offer][properties][]
array of strings
SKU properties
history[][item][ordering]
integer
Ordering
history[][item][properties][]
array of strings
[array] Additional properties of the order item
history[][item][properties][][code]
string
Property code (not mandatory field, the code can be transmitted in the property key)
history[][item][properties][][name]
string
Property name
history[][item][properties][][value]
string
Property value
history[][payment]
object (Payment)
Payment
history[][payment][id]
integer
Payment ID
history[][payment][type]
string
Payment Type
history[][payment][externalId]
string
External ID
history[][combinedTo]
object (Order)
Information on order, which is created after combining with current order
POST
/api/v5/orders/loyalty/apply
Applying bonuses according to the loyalty program
Applying bonuses according to the loyalty program
To access the method, the following permission is required order_write.
Method to apply bonuses according to the loyalty program. If the setting of the bonus account of
the loyalty program "Confirm redemption by SMS" is enabled, it is required to specify a phone
number in the participation of the loyalty program. An SMS message will be sent to this phone
number confirming that bonuses will be redeemed. The redemption will be made only after the
confirmation via the SMS code.
To resend SMS, call this method with the current parameters again.
Resending is available in 60 seconds. The validity of the SMS code is 5 minutes.
If it is not required to send an SMS to confirm the redemption of bonuses, the bonuses will be
redeemed and the SerializedLoyaltyOrder object will be returned in the response.
In case of confirmation via SMS, the SmsVerification object will be returned.
Parameters
Parameter
Type
Format
Description
site
string
Store symbolic code
order
object (SerializedEntityOrder)
Order
order[id]
integer
Order internal ID
order[externalId]
string
Order external ID
order[number]
string
Order number
order[applyRound]
boolean
Apply the setting of rounding the order cost
bonuses
float
Amount of bonuses to be redeemed
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
order
object (SerializedLoyaltyOrder)
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[currency]
string
Currency
order[privilegeType]
string
Privilege type
order[totalSumm]
double
Total sum with discount (in entity currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyAccount]
object (LoyaltyAccount)
Participation in the loyalty program
order[loyaltyAccount][id]
integer
Participation ID
order[loyaltyAccount][amount]
float
Active bonus amount
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[customer]
object (Customer)
Customer
order[customer][id]
integer
Customer ID
order[customer][externalId]
string
Customer external ID
order[customer][personalDiscount]
double
Personal discount
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][cost]
double
Cost
order[site]
string
Store
order[items][]
array of objects (OrderProduct)
Order item
order[items][][bonusesChargeTotal]
double
Amount of debited bonuses
order[items][][bonusesCreditTotal]
double
Amount of accrued bonuses
order[items][][id]
integer
ID of order item
order[items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
order[items][][externalIds][][code]
string
Symbolic code
order[items][][externalIds][][value]
string
Value
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[items][][initialPrice]
double
Item price/SKU (in entity currency)
order[items][][discounts][]
array of objects (AbstractDiscount)
Array of discounts
order[items][][discounts][][type]
string
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
order[items][][prices][][quantity]
float
Quantity of the product at the specified price
order[items][][vatRate]
string
VAT rate
order[items][][quantity]
float
Quantity
order[items][][offer]
object (Offer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU ID in store
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
verification
object (SmsVerification)
SMS-verification
verification[createdAt]
DateTime
Date of creation. (Y-m-d H:i:s)
verification[expiredAt]
DateTime
Expiration date. (Y-m-d H:i:s)
verification[verifiedAt]
DateTime
Verification success date. (Y-m-d H:i:s)
verification[checkId]
string
Code verification ID
verification[actionType]
string
Type of action
POST
/api/v5/orders/loyalty/cancel-bonus-operations
Cancellation of bonus operations on the Loyalty Program
Cancellation of bonus operations on the Loyalty Program
To access the method, the following permission is required order_write.
The method cancels the actions performed with bonuses in the order.
In case of cancellation, the customer will get back the bonuses redeemed in the order while the accrued bonuses will be redeemed.
If there are only redeemed or only accrued bonuses in the order, then only the performed operation will be cancelled.
Parameters
Parameter
Type
Format
Description
site
string
Store symbolic code
order
object (SerializedEntityOrder)
Order
order[id]
integer
Order internal ID
order[externalId]
string
Order external ID
order[number]
string
Order number
order[applyRound]
boolean
Apply the setting of rounding the order cost
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
order
object (Order)
Order
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[currency]
string
Currency
order[privilegeType]
string
Privilege type
order[totalSumm]
double
Total sum with discount (in entity currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyAccount]
object (LoyaltyAccount)
Participation in the loyalty program
order[loyaltyAccount][id]
integer
Participation ID
order[loyaltyAccount][amount]
float
Active bonus amount
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][cost]
double
Cost
order[site]
string
Store
order[items][]
array of objects (OrderProduct)
Order item
order[items][][bonusesChargeTotal]
double
Amount of debited bonuses
order[items][][bonusesCreditTotal]
double
Amount of accrued bonuses
order[items][][id]
integer
ID of order item
order[items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
order[items][][externalIds][][code]
string
Symbolic code
order[items][][externalIds][][value]
string
Value
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[items][][initialPrice]
double
Item price/SKU (in entity currency)
order[items][][discounts][]
array of objects (AbstractDiscount)
Array of discounts
order[items][][discounts][][type]
string
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
order[items][][prices][][quantity]
float
Quantity of the product at the specified price
order[items][][vatRate]
string
VAT rate
order[items][][quantity]
float
Quantity
order[items][][offer]
object (Offer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU ID in store
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
POST
/api/v5/orders/payments/create
Payment creation
Payment creation
To access the method, the following permission is required order_write.
Method adds payment to the order and returns internal ID of created payment.
For specifying the order, which payment is related to, it is necessary to set the value for one of the following field:
Property code (not mandatory field, the code can be transmitted in the property key)
orders[][items][][properties][][name]
string
{not blank}
Property name
orders[][items][][properties][][value]
string
{not blank}
Property value
orders[][items][][purchasePrice]
double
Purchasing price (in base currency)
orders[][items][][ordering]
integer
Ordering
orders[][items][][offer]
object (SerializedOrderProductOffer)
SKU
orders[][items][][offer][id]
integer
SKU ID
orders[][items][][offer][externalId]
string
SKU external ID
orders[][items][][offer][xmlId]
string
SKU ID in the warehouse system
orders[][items][][productName]
string
Item name
orders[][items][][status]
string
Status of the order item
orders[][items][][priceType]
object (PriceType)
Price type
orders[][items][][priceType][code]
string
Price type code
orders[][items][][externalId]
string
deprecated External ID of order item
orders[][items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
orders[][items][][externalIds][][code]
string
Symbolic code
orders[][items][][externalIds][][value]
string
Value
orders[][delivery]
object (SerializedOrderDelivery)
Data on delivery
orders[][delivery][code]
string
Delivery type code
orders[][delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
orders[][delivery][data][externalId]
string
Delivery id in delivery service
orders[][delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack number
orders[][delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
orders[][delivery][data][tariff]
string
Tariff code
orders[][delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
orders[][delivery][data][payerType]
string
PayerPayer type
orders[][delivery][data][shipmentpointId]
string
Shipment terminal IDShipment point id
orders[][delivery][data][extraData]
array
Additional delivery data (deliveryDataField.code => value)
ID of the discount on the event of the loyalty program
orders[][applyRound]
boolean
Apply the setting of rounding the order cost
orders[][isFromCart]
boolean
Order created from cart
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
uploadedOrders[]
array of objects (FixExternalRow)
Uploaded objects IDs
uploadedOrders[][id]
integer
Internal ID
uploadedOrders[][externalId]
string
External ID
failedOrders[]
array of objects (EntityWithExternalId)
Non-uploaded objects IDs
failedOrders[][externalId]
string
External ID (if available)
orders[]
array of objects (Order)
Order
orders[][slug]
custom handler result for (int)
deprecated Symbolic code
orders[][bonusesCreditTotal]
double
Amount of accrued bonuses
orders[][bonusesChargeTotal]
double
Amount of debited bonuses
orders[][summ]
double
Total for goods/services (in entity currency)
orders[][currency]
string
Currency
orders[][id]
integer
Order ID
orders[][number]
string
Order number
orders[][externalId]
string
Order external ID
orders[][orderType]
string
Order type
orders[][orderMethod]
string
Method
orders[][privilegeType]
string
Privilege type
orders[][countryIso]
string
Country ISO code
orders[][createdAt]
DateTime
Order creation date
orders[][statusUpdatedAt]
DateTime
Date of the last order status change
orders[][totalSumm]
double
Total sum with discount (in entity currency)
orders[][prepaySum]
double
Paid sum (in entity currency)
orders[][purchaseSumm]
double
Total purchase sum (in base currency)
orders[][personalDiscountPercent]
double
Personal discount on the order
orders[][loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
orders[][loyaltyLevel][id]
integer
Level ID
orders[][loyaltyLevel][name]
string
Level name
orders[][loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
orders[][loyaltyEventDiscount][id]
integer
ID
orders[][mark]
integer
Order evaluation
orders[][markDatetime]
DateTime
Date and time of getting evaluation from customer
orders[][lastName]
string
Surname
orders[][firstName]
string
Name
orders[][patronymic]
string
Middle name
orders[][phone]
string
Phone number
orders[][additionalPhone]
string
Additional phone
orders[][email]
string
E-mail
orders[][call]
boolean
Call required
orders[][expired]
boolean
Expired
orders[][customerComment]
string
Customer comment
orders[][managerComment]
string
Operator comment
orders[][managerId]
integer
Manager, responsible for order
orders[][customer]
CustomerCorporate customer
orders[][customer][type]
string
Customer typeCustomer type
orders[][customer][id]
integer
Customer IDCorporate customer ID
orders[][customer][externalId]
string
Customer external IDCorporate customer external ID
orders[][customer][isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
orders[][customer][createdAt]
DateTime
Created atCreated at
orders[][customer][managerId]
integer
Customer managerCorporate customer manager
orders[][customer][vip]
boolean
VIP customerVIP corporate customer
orders[][customer][bad]
boolean
Bad customerBad corporate customer
orders[][customer][site]
string
Store, from which the customer cameStore, from which the corporate customer came
orders[][customer][contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
orders[][customer][contragent][contragentType]
string
Contragent type
orders[][customer][contragent][legalName]
string
Legal name
orders[][customer][contragent][legalAddress]
string
Registration address
orders[][customer][contragent][INN]
string
TIN
orders[][customer][contragent][OKPO]
string
RNNBO
orders[][customer][contragent][KPP]
string
IECC
orders[][customer][contragent][OGRN]
string
PSRN
orders[][customer][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
orders[][customer][contragent][certificateNumber]
string
Certificate number
orders[][customer][contragent][certificateDate]
DateTime
Certificate date
orders[][customer][contragent][BIK]
string
RCBIC
orders[][customer][contragent][bank]
string
Bank
orders[][customer][contragent][bankAddress]
string
Bank address
orders[][customer][contragent][corrAccount]
string
Corresponding account
orders[][customer][contragent][bankAccount]
string
Settlement account
orders[][customer][tags][]
array of objects (CustomerTagLink)
[array] Tags[array] Tags
orders[][customer][tags][][color]
string
orders[][customer][tags][][name]
string
orders[][customer][tags][][colorCode]
string
orders[][customer][tags][][attached]
boolean
orders[][customer][firstClientId]
string
First Google Analytics clientIdFirst Google Analytics unique clientId
orders[][customer][lastClientId]
string
Last Google Analytics clientIdLast Google Analytics unique clientId
orders[][customer][customFields]
array
Associative array of custom fieldsAssociative array of custom fields
orders[][customer][personalDiscount]
double
Personal discountPersonal discount
orders[][customer][cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)deprecated Cumulative discount (Not available starting from version 8 of the system)
orders[][customer][discountCardNumber]
string
Discount card numberDiscount card number
orders[][customer][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)Average gross profit of corporate customer orders (in base currency)
orders[][customer][marginSumm]
float
LTV (in base currency)LTV (in base currency)
orders[][customer][totalSumm]
float
Orders total sum (in base currency)Orders total sum (in base currency)
orders[][customer][averageSumm]
float
Order average sum (in base currency)Order average sum (in base currency)
orders[][customer][ordersCount]
integer
Orders quantityOrders quantity
orders[][customer][costSumm]
float
Amount of costs (in base currency)Amount of costs (in base currency)
Average gross profit of customer orders (in base currency)
orders[][company][marginSumm]
float
LTV (in base currency)
orders[][company][totalSumm]
float
Orders total sum (in base currency)
orders[][company][averageSumm]
float
Order average sum (in base currency)
orders[][company][costSumm]
float
Amount of costs (in base currency)
orders[][company][ordersCount]
integer
Orders quantity
orders[][company][customFields]
array
Associative array of custom fields
orders[][contragent]
object (OrderContragent)
Requisites
orders[][contragent][contragentType]
string
Contragent type
orders[][contragent][legalName]
string
Legal name
orders[][contragent][legalAddress]
string
Registration address
orders[][contragent][INN]
string
TIN
orders[][contragent][OKPO]
string
RNNBO
orders[][contragent][KPP]
string
IECC
orders[][contragent][OGRN]
string
PSRN
orders[][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
orders[][contragent][certificateNumber]
string
Certificate number
orders[][contragent][certificateDate]
DateTime
Certificate date
orders[][contragent][BIK]
string
RCBIC
orders[][contragent][bank]
string
Bank
orders[][contragent][bankAddress]
string
Bank address
orders[][contragent][corrAccount]
string
Corresponding account
orders[][contragent][bankAccount]
string
Settlement account
orders[][delivery]
object (SerializedOrderDelivery)
Data on delivery
orders[][delivery][code]
string
Delivery type code
orders[][delivery][integrationCode]
string
Integration code of delivery type
orders[][delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
orders[][delivery][data][externalId]
string
Delivery id in delivery servicedeprecated Track number (Use trackNumber instead)
orders[][delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack numberTrack number
orders[][delivery][data][status]
string
Delivery status codeDelivery status codeDelivery status codeDelivery status code
orders[][delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
orders[][delivery][data][pickuppointAddress]
string
Pickup point address
orders[][delivery][data][days]
string
Approximate delivery timeApproximate delivery timeApproximate delivery time
orders[][delivery][data][statusText]
string
Delivery status nameDelivery status nameDelivery status name
orders[][delivery][data][statusDate]
DateTime
Delivery status dateDate of the last delivery status updating
orders[][delivery][data][tariff]
string
Tariff code
orders[][delivery][data][tariffName]
string
Tariff name
orders[][delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
orders[][delivery][data][pickuppointSchedule]
string
Pickup point working timeSchedule of pickup point
orders[][delivery][data][pickuppointPhone]
string
Pickup point phone
orders[][delivery][data][payerType]
string
PayerPayer type
orders[][delivery][data][statusComment]
string
Comment to delivery status
orders[][delivery][data][cost]
float
Delivery cost received from delivery service (in entity currency)Delivery cost received from delivery service (in entity currency)
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
orders[][items][][discounts][][amount]
float
Discount amount
orders[][items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
orders[][items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
orders[][items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
During uploading the errors occurred. The part of orders is not loaded (the response also contains an "errors" array)
GET
/api/v5/orders/{externalId}
Getting information on order
Getting information on order
To access the method, the following permission is required order_read.
Method returns full information on the order. You may refer to order either by external order ID
(by=externalId), or by internal ID (by=id).
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
Empty fields without values are not returned.
In the fields orderType, orderMethod,
payments[][type], payments[][status], status, site,
delivery[code] the symbol code of the element is returned.
In the fields managerId, sourceId the internal ID of the system entity is returned.
In the customFields field the value array of custom fields is returned.
For the "DataBook" fields the symbol code of data book value is specified.
For the date fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
If the customer address was specified in the string form it will be returned to the
delivery[address][text]. If the address was specified in detailed view,
there will be returned all delivery filled fields, and in the
delivery[address][text] there will be automatically
generated textual representation of the address.
The privilegeType field can contain one of the following values:
personal_discount - the customer’s personal discount;
loyalty_level - calculation of a discount or bonus accrual based on the level settings of the customer’s Loyalty Program;
loyalty_event - calculation of the discount on the event of the Loyalty Program;
none - do not apply discounts of the Loyalty Program to the order;
Parameters
Parameter
Type
Format
Description
externalId
string
Order ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) order ID. By default it is externalId.
site
Description
Symbolic code of store
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
order
object (Order)
Order
order[slug]
custom handler result for (int)
deprecated Symbolic code
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[summ]
double
Total for goods/services (in entity currency)
order[currency]
string
Currency
order[id]
integer
Order ID
order[number]
string
Order number
order[externalId]
string
Order external ID
order[orderType]
string
Order type
order[orderMethod]
string
Method
order[privilegeType]
string
Privilege type
order[countryIso]
string
Country ISO code
order[createdAt]
DateTime
Order creation date
order[statusUpdatedAt]
DateTime
Date of the last order status change
order[totalSumm]
double
Total sum with discount (in entity currency)
order[prepaySum]
double
Paid sum (in entity currency)
order[purchaseSumm]
double
Total purchase sum (in base currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[mark]
integer
Order evaluation
order[markDatetime]
DateTime
Date and time of getting evaluation from customer
order[lastName]
string
Surname
order[firstName]
string
Name
order[patronymic]
string
Middle name
order[phone]
string
Phone number
order[additionalPhone]
string
Additional phone
order[email]
string
E-mail
order[call]
boolean
Call required
order[expired]
boolean
Expired
order[customerComment]
string
Customer comment
order[managerComment]
string
Operator comment
order[managerId]
integer
Manager, responsible for order
order[customer]
CustomerCorporate customer
order[customer][type]
string
Customer typeCustomer type
order[customer][id]
integer
Customer IDCorporate customer ID
order[customer][externalId]
string
Customer external IDCorporate customer external ID
order[customer][isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
order[customer][createdAt]
DateTime
Created atCreated at
order[customer][managerId]
integer
Customer managerCorporate customer manager
order[customer][vip]
boolean
VIP customerVIP corporate customer
order[customer][bad]
boolean
Bad customerBad corporate customer
order[customer][site]
string
Store, from which the customer cameStore, from which the corporate customer came
order[customer][contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
order[customer][contragent][contragentType]
string
Contragent type
order[customer][contragent][legalName]
string
Legal name
order[customer][contragent][legalAddress]
string
Registration address
order[customer][contragent][INN]
string
TIN
order[customer][contragent][OKPO]
string
RNNBO
order[customer][contragent][KPP]
string
IECC
order[customer][contragent][OGRN]
string
PSRN
order[customer][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[customer][contragent][certificateNumber]
string
Certificate number
order[customer][contragent][certificateDate]
DateTime
Certificate date
order[customer][contragent][BIK]
string
RCBIC
order[customer][contragent][bank]
string
Bank
order[customer][contragent][bankAddress]
string
Bank address
order[customer][contragent][corrAccount]
string
Corresponding account
order[customer][contragent][bankAccount]
string
Settlement account
order[customer][tags][]
array of objects (CustomerTagLink)
[array] Tags[array] Tags
order[customer][tags][][color]
string
order[customer][tags][][name]
string
order[customer][tags][][colorCode]
string
order[customer][tags][][attached]
boolean
order[customer][firstClientId]
string
First Google Analytics clientIdFirst Google Analytics unique clientId
order[customer][lastClientId]
string
Last Google Analytics clientIdLast Google Analytics unique clientId
order[customer][customFields]
array
Associative array of custom fieldsAssociative array of custom fields
order[customer][personalDiscount]
double
Personal discountPersonal discount
order[customer][cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)deprecated Cumulative discount (Not available starting from version 8 of the system)
order[customer][discountCardNumber]
string
Discount card numberDiscount card number
order[customer][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)Average gross profit of corporate customer orders (in base currency)
order[customer][marginSumm]
float
LTV (in base currency)LTV (in base currency)
order[customer][totalSumm]
float
Orders total sum (in base currency)Orders total sum (in base currency)
order[customer][averageSumm]
float
Order average sum (in base currency)Order average sum (in base currency)
order[customer][ordersCount]
integer
Orders quantityOrders quantity
order[customer][costSumm]
float
Amount of costs (in base currency)Amount of costs (in base currency)
Average gross profit of customer orders (in base currency)
order[company][marginSumm]
float
LTV (in base currency)
order[company][totalSumm]
float
Orders total sum (in base currency)
order[company][averageSumm]
float
Order average sum (in base currency)
order[company][costSumm]
float
Amount of costs (in base currency)
order[company][ordersCount]
integer
Orders quantity
order[company][customFields]
array
Associative array of custom fields
order[contragent]
object (OrderContragent)
Requisites
order[contragent][contragentType]
string
Contragent type
order[contragent][legalName]
string
Legal name
order[contragent][legalAddress]
string
Registration address
order[contragent][INN]
string
TIN
order[contragent][OKPO]
string
RNNBO
order[contragent][KPP]
string
IECC
order[contragent][OGRN]
string
PSRN
order[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[contragent][certificateNumber]
string
Certificate number
order[contragent][certificateDate]
DateTime
Certificate date
order[contragent][BIK]
string
RCBIC
order[contragent][bank]
string
Bank
order[contragent][bankAddress]
string
Bank address
order[contragent][corrAccount]
string
Corresponding account
order[contragent][bankAccount]
string
Settlement account
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][code]
string
Delivery type code
order[delivery][integrationCode]
string
Integration code of delivery type
order[delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
order[delivery][data][externalId]
string
Delivery id in delivery servicedeprecated Track number (Use trackNumber instead)
order[delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack numberTrack number
order[delivery][data][status]
string
Delivery status codeDelivery status codeDelivery status codeDelivery status code
order[delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
order[delivery][data][pickuppointAddress]
string
Pickup point address
order[delivery][data][days]
string
Approximate delivery timeApproximate delivery timeApproximate delivery time
order[delivery][data][statusText]
string
Delivery status nameDelivery status nameDelivery status name
order[delivery][data][statusDate]
DateTime
Delivery status dateDate of the last delivery status updating
order[delivery][data][tariff]
string
Tariff code
order[delivery][data][tariffName]
string
Tariff name
order[delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
order[delivery][data][pickuppointSchedule]
string
Pickup point working timeSchedule of pickup point
order[delivery][data][pickuppointPhone]
string
Pickup point phone
order[delivery][data][payerType]
string
PayerPayer type
order[delivery][data][statusComment]
string
Comment to delivery status
order[delivery][data][cost]
float
Delivery cost received from delivery service (in entity currency)Delivery cost received from delivery service (in entity currency)
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
order[items][][prices][][quantity]
float
Quantity of the product at the specified price
order[items][][vatRate]
string
VAT rate
order[items][][createdAt]
DateTime
Date of order item creation in the system
order[items][][quantity]
float
Quantity
order[items][][status]
string
Status of the order item
order[items][][comment]
string
Comment to the order item
order[items][][offer]
object (Offer)
SKU
order[items][][offer][displayName]
string
SKU name
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU ID in store
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
order[items][][offer][name]
string
Name
order[items][][offer][article]
string
Vendor code
order[items][][offer][vatRate]
string
VAT rate
order[items][][offer][properties][]
array
SKU properties
order[items][][offer][quantity]
float
Available quantity
order[items][][offer][unit]
object (Unit)
Unit
order[items][][offer][unit][code]
string
Unit symbolic code
order[items][][offer][unit][name]
string
Unit name
order[items][][offer][unit][sym]
string
Unit short name
order[items][][offer][barcode]
string
Barcode
order[items][][isCanceled]
boolean
This order item is cancelled in the order
order[items][][properties][]
array
[array] Additional properties of the order item
order[items][][properties][][code]
string
Property code (not mandatory field, the code can be transmitted in the property key)
POST
/api/v5/orders/{externalId}/delivery/cancel
Cancellation of the integrated delivery
Cancellation of the integrated delivery
To access the method, the following permission is required order_write.
This method allows to cancel the integrated delivery for a specific order.
If there is no integrated delivery in the order or the order contains the integrated delivery which
was cancelled or cannot be cancelled, an error returns.
Note to the force parameter: if the value is trueand an error occurs,
when trying to cancel the delivery in the delivery service, we mark such delivery as deleted in
our system. If the value is false, the delivery status won't be changed to the
cancellation status and an error message will be returned explaining why the delivery couldn't be
cancelled in the delivery service.
Parameters
Parameter
Type
Format
Description
by
string
The field allowing to identify the order in which it is necessary to cancel the delivery. Possible values: id, externalId. By default, externalId.
force
boolean
If the value is true, the delivery will be marked as cancelled even if it couldn't be cancelled in the external service. If the value is false and a server error occurs in the delivery service, cancelling is interrupted.
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
POST
/api/v5/orders/{externalId}/edit
Order editing
Order editing
To access the method, the following permission is required order_write.
Method allows to edit the order. You may refer to order either by external order ID (by=externalId), or by internal ID (by=id).
In case of trying to edit the removed order,
the system returns state=removed in the answer.
Field contragent[contragentType] can receive 3 values: individual - private individual,
legal-entity - legal entity, entrepreneur - individual entrepreneur.
For different types of legal entities there are available different set of fields.
For type individual all fields are unavailable, for type legal-entity the fields
contragent[OGRNIP], contragent[certificateNumber], contragent[certificateDate] are unavailable,
for type entrepreneur the fields contragent[OGRN], contragent[KPP] are unavailable.
In the fields order[orderType], order[orderMethod],
order[status], order[shipmentStore],
order[delivery][code], order[items][][status]
the symbol code of the element is specified.
In the fields order[managerId], order[sourceId] the internal ID of the system entity is specified.
The comment order[statusComment] cannot be changed without changing the order status order[status].
Order items are specified in the field order[items][]. The products that were not passed in the request for editing are deleted from the order.
If item is in the catalog, then it is necessary to set the value for one of the following fields:
order[items][][offer][id] – SKU ID;
order[items][][offer][externalId] – external ID of item or SKU;
order[items][][offer][xmlId] – SKU ID in the warehouse system.
If the values are set for several fields, they will be processed in the following above order.
In case, if the ofeer will be not found by any of criteria, the order item
will be automatically created based on data from fields
order[items][][initialPrice],
order[items][][purchasePrice],
order[items][][productName].
The delivery address order[delivery][address] you can specify either in the string form
in the order[delivery][address][text] field, or in the detailed view, filling
all the fields except order[delivery][address][text].
In the order[customFields] field you can pass the values array of custom fields.
For the "DataBook" fields the symbol code of data book value is specified.
For the "Date" fields the date in the format Y-m-d is specified.
For other field types the exact value is specified.
For working with price types, more than one price type must be enabled in data book.
For transferring the price type for order item, code of necessary price type must be transferred to order[items][][priceType][code] field.
It is recommended to transfer actual value of item price together with price type to order[items][][initialPrice].
If order[items][][priceType][code] price type is transferred without the order[items][][initialPrice] price value,
then the current value of this price type for the current item will be taken for the item price.
For new item it is recommended always to transfer order[items][][initialPrice] price clearly,
in case if actual price has not been downloaded to system yet.
If not to transfer order[items][][priceType][code] price type for the item,
then price type for the item in order will be No type.
In case if there is only the basic price type in the system,
then order[items][][priceType][code] parameter should not be considered.
The order of order items order[items][] is saved in response.
Parameters order[items][][externalId] and order[items][][externalIds] are optional.
Either external ID value order[items][][externalId] or array of external IDs order[items][][externalIds] can be specified at the same time.
The external ID value order[items][][externalId] will be written to the array order[items][][externalIds] with default code.
Values of external identifiers order[items][][externalIds][][value] should be unique by code order[items][][externalIds][][code] within one order.
The privilegeType field can contain one of the following values:
personal_discount - the customer’s personal discount;
loyalty_level - calculation of a discount or bonus accrual based on the level settings of the customer’s Loyalty Program;
loyalty_event - calculation of the discount on the event of the Loyalty Program;
none - do not apply discounts of the Loyalty Program to the order;
To apply the Loyalty Program to an order, the following conditions must be met:
the store of the order must coincide with the store of the necessary Loyalty Program;
participation in the Loyalty Program must be created for the customer in the order;
the privilegeType field must be specified with none by default;
If the loyalty_event value is specified in privilegeType and the event gives a discount, then it is required to specify the ID in the loyaltyEventDiscountId field
If there are items with the same SKUs in the order, then it is required to pass identifiers (order[items][][id] or order[items][][externalId] or order[items][][externalIds]) to edit them.
When editing an item via identifiers (order[items][][id] or order[items][][externalId] or order[items][][externalIds]), it is impossible to change the SKU order[items][][offer].
When editing an order, items are updated in the following order:
If API request contains item identifier order[items][][id] but there is no such identifier in the system, the corresponding error message will be displayed.
If API request contains item identifier order[items][][id] which exists in the system but belongs to another order, the corresponding error message will be displayed.
If API request contains item identifier order[items][][id] which exists in the system and belongs to the order that is being edited, the item will be updated.
If API request does NOT contain item identifier order[items][][id] but contains external identifier of the item order[items][][externalId] which exists in the system and belongs to the order that is being edited, the item will be updated.
If API request does NOT contain item identifier order[items][][id] but contains external identifier of the item order[items][][externalId]` which does NOT exist in the system, a new item will be added.
If the API request does NOT contain item identifiers (order[items][][id] and order[items][][externalId]) but there are items with the same SKUs either in the order or in the API request, the corresponding error message will be displayed.
If neither the order nor the API request contain items with the same SKUs, then in order to update the item the search will be made by the ID of the SKU order[items][][offer][id], by the external ID of the SKU order[items][][offer][externalId], by the ID of the SKU in the warehouse system order[items][][offer][xmlId], otherwise a new item will be added.
Please note that it will be possible to edit an order containing items with the same SKUs only if the setting “Possibility of adding the same SKUs to the order as different items” is enabled.
Parameters
Parameter
Type
Format
Description
by
string
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) order ID. By default it is externalId.
site
string
Symbolic code of store
order
object (SerializedOrder)
order[number]
string
Order number
order[externalId]
string
Order external ID
order[privilegeType]
string
Privilege type
order[countryIso]
string
Country ISO code
order[createdAt]
DateTime
Y-m-d H:i:s
Order creation date
order[discountManualAmount]
double
Monetary discount (in entity currency)
order[discountManualPercent]
double
Percentage discount
order[mark]
integer
Order evaluation
order[markDatetime]
DateTime
Y-m-d H:i:s
Date and time of getting evaluation from customer
order[lastName]
string
Surname
order[firstName]
string
Name
order[patronymic]
string
Middle name
order[phone]
string
Phone number
order[additionalPhone]
string
Additional phone
order[email]
string
E-mail
order[call]
boolean
Call required
order[expired]
boolean
Expired
order[customerComment]
string
Customer comment
order[managerComment]
string
Operator comment
order[contragent]
object (OrderContragent)
Requisites
order[contragent][contragentType]
string
Contragent type
order[contragent][legalName]
string
Legal name
order[contragent][legalAddress]
string
Registration address
order[contragent][INN]
string
TIN
order[contragent][OKPO]
string
RNNBO
order[contragent][KPP]
string
IECC
order[contragent][OGRN]
string
PSRN
order[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[contragent][certificateNumber]
string
Certificate number
order[contragent][certificateDate]
DateTime
Y-m-d
Certificate date
order[contragent][BIK]
string
RCBIC
order[contragent][bank]
string
Bank
order[contragent][bankAddress]
string
Bank address
order[contragent][corrAccount]
string
Corresponding account
order[contragent][bankAccount]
string
Settlement account
order[statusComment]
string
Comment to the last status change
order[weight]
double
Weight
order[length]
integer
Length
order[width]
integer
Width
order[height]
integer
Height
order[shipmentDate]
DateTime
Y-m-d
Shipment date
order[shipped]
boolean
Order is shipped
order[dialogId]
object (MGDialog)
Chats dialog identifier
order[customFields]
array
Associative array of custom fields
order[orderType]
string
Order type
order[orderMethod]
string
Method
order[customer]
object (SerializedRelationCustomer)
Customer
order[customer][id]
integer
Customer internal ID
order[customer][externalId]
string
Customer external ID
order[customer][browserId]
string
Device ID in Collector
order[customer][site]
string
Store code, required when externalId is specified
order[customer][type]
string
Customer type (specified when creating new customer)
order[customer][nickName]
string
Corporate customer name (specified when creating new corporate customer)
Property code (not mandatory field, the code can be transmitted in the property key)
order[items][][properties][][name]
string
{not blank}
Property name
order[items][][properties][][value]
string
{not blank}
Property value
order[items][][purchasePrice]
double
Purchasing price (in base currency)
order[items][][ordering]
integer
Ordering
order[items][][offer]
object (SerializedOrderProductOffer)
SKU
order[items][][offer][id]
integer
SKU ID
order[items][][offer][externalId]
string
SKU external ID
order[items][][offer][xmlId]
string
SKU ID in the warehouse system
order[items][][productName]
string
Item name
order[items][][status]
string
Status of the order item
order[items][][priceType]
object (PriceType)
Price type
order[items][][priceType][code]
string
Price type code
order[items][][externalId]
string
deprecated External ID of order item
order[items][][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
order[items][][externalIds][][code]
string
Symbolic code
order[items][][externalIds][][value]
string
Value
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][code]
string
Delivery type code
order[delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
order[delivery][data][externalId]
string
Delivery id in delivery service
order[delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack number
order[delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
order[delivery][data][tariff]
string
Tariff code
order[delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
order[delivery][data][payerType]
string
PayerPayer type
order[delivery][data][shipmentpointId]
string
Shipment terminal IDShipment point id
order[delivery][data][extraData]
array
Additional delivery data (deliveryDataField.code => value)
ID of the discount on the event of the loyalty program
order[applyRound]
boolean
Apply the setting of rounding the order cost
order[isFromCart]
boolean
Order created from cart
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
id
integer
Order internal ID
order
object (Order)
Order
order[slug]
custom handler result for (int)
deprecated Symbolic code
order[bonusesCreditTotal]
double
Amount of accrued bonuses
order[bonusesChargeTotal]
double
Amount of debited bonuses
order[summ]
double
Total for goods/services (in entity currency)
order[currency]
string
Currency
order[id]
integer
Order ID
order[number]
string
Order number
order[externalId]
string
Order external ID
order[orderType]
string
Order type
order[orderMethod]
string
Method
order[privilegeType]
string
Privilege type
order[countryIso]
string
Country ISO code
order[createdAt]
DateTime
Order creation date
order[statusUpdatedAt]
DateTime
Date of the last order status change
order[totalSumm]
double
Total sum with discount (in entity currency)
order[prepaySum]
double
Paid sum (in entity currency)
order[purchaseSumm]
double
Total purchase sum (in base currency)
order[personalDiscountPercent]
double
Personal discount on the order
order[loyaltyLevel]
object (LoyaltyLevel)
Level of participation in the loyalty program
order[loyaltyLevel][id]
integer
Level ID
order[loyaltyLevel][name]
string
Level name
order[loyaltyEventDiscount]
object (LoyaltyEventDiscount)
Discount on the event of the loyalty program
order[loyaltyEventDiscount][id]
integer
ID
order[mark]
integer
Order evaluation
order[markDatetime]
DateTime
Date and time of getting evaluation from customer
order[lastName]
string
Surname
order[firstName]
string
Name
order[patronymic]
string
Middle name
order[phone]
string
Phone number
order[additionalPhone]
string
Additional phone
order[email]
string
E-mail
order[call]
boolean
Call required
order[expired]
boolean
Expired
order[customerComment]
string
Customer comment
order[managerComment]
string
Operator comment
order[managerId]
integer
Manager, responsible for order
order[customer]
CustomerCorporate customer
order[customer][type]
string
Customer typeCustomer type
order[customer][id]
integer
Customer IDCorporate customer ID
order[customer][externalId]
string
Customer external IDCorporate customer external ID
order[customer][isContact]
boolean
The customer is a contact person (created as the contact person and has no orders)
order[customer][createdAt]
DateTime
Created atCreated at
order[customer][managerId]
integer
Customer managerCorporate customer manager
order[customer][vip]
boolean
VIP customerVIP corporate customer
order[customer][bad]
boolean
Bad customerBad corporate customer
order[customer][site]
string
Store, from which the customer cameStore, from which the corporate customer came
order[customer][contragent]
object (CustomerContragent)
deprecated Requisites (The fields of the object should be used only if the "Corporate customers" functionality is disabled)
order[customer][contragent][contragentType]
string
Contragent type
order[customer][contragent][legalName]
string
Legal name
order[customer][contragent][legalAddress]
string
Registration address
order[customer][contragent][INN]
string
TIN
order[customer][contragent][OKPO]
string
RNNBO
order[customer][contragent][KPP]
string
IECC
order[customer][contragent][OGRN]
string
PSRN
order[customer][contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[customer][contragent][certificateNumber]
string
Certificate number
order[customer][contragent][certificateDate]
DateTime
Certificate date
order[customer][contragent][BIK]
string
RCBIC
order[customer][contragent][bank]
string
Bank
order[customer][contragent][bankAddress]
string
Bank address
order[customer][contragent][corrAccount]
string
Corresponding account
order[customer][contragent][bankAccount]
string
Settlement account
order[customer][tags][]
array of objects (CustomerTagLink)
[array] Tags[array] Tags
order[customer][tags][][color]
string
order[customer][tags][][name]
string
order[customer][tags][][colorCode]
string
order[customer][tags][][attached]
boolean
order[customer][firstClientId]
string
First Google Analytics clientIdFirst Google Analytics unique clientId
order[customer][lastClientId]
string
Last Google Analytics clientIdLast Google Analytics unique clientId
order[customer][customFields]
array
Associative array of custom fieldsAssociative array of custom fields
order[customer][personalDiscount]
double
Personal discountPersonal discount
order[customer][cumulativeDiscount]
double
deprecated Cumulative discount (Not available starting from version 8 of the system)deprecated Cumulative discount (Not available starting from version 8 of the system)
order[customer][discountCardNumber]
string
Discount card numberDiscount card number
order[customer][avgMarginSumm]
float
Average gross profit of customer orders (in base currency)Average gross profit of corporate customer orders (in base currency)
order[customer][marginSumm]
float
LTV (in base currency)LTV (in base currency)
order[customer][totalSumm]
float
Orders total sum (in base currency)Orders total sum (in base currency)
order[customer][averageSumm]
float
Order average sum (in base currency)Order average sum (in base currency)
order[customer][ordersCount]
integer
Orders quantityOrders quantity
order[customer][costSumm]
float
Amount of costs (in base currency)Amount of costs (in base currency)
Average gross profit of customer orders (in base currency)
order[company][marginSumm]
float
LTV (in base currency)
order[company][totalSumm]
float
Orders total sum (in base currency)
order[company][averageSumm]
float
Order average sum (in base currency)
order[company][costSumm]
float
Amount of costs (in base currency)
order[company][ordersCount]
integer
Orders quantity
order[company][customFields]
array
Associative array of custom fields
order[contragent]
object (OrderContragent)
Requisites
order[contragent][contragentType]
string
Contragent type
order[contragent][legalName]
string
Legal name
order[contragent][legalAddress]
string
Registration address
order[contragent][INN]
string
TIN
order[contragent][OKPO]
string
RNNBO
order[contragent][KPP]
string
IECC
order[contragent][OGRN]
string
PSRN
order[contragent][OGRNIP]
string
PSRN of Individual entrepreneur
order[contragent][certificateNumber]
string
Certificate number
order[contragent][certificateDate]
DateTime
Certificate date
order[contragent][BIK]
string
RCBIC
order[contragent][bank]
string
Bank
order[contragent][bankAddress]
string
Bank address
order[contragent][corrAccount]
string
Corresponding account
order[contragent][bankAccount]
string
Settlement account
order[delivery]
object (SerializedOrderDelivery)
Data on delivery
order[delivery][code]
string
Delivery type code
order[delivery][integrationCode]
string
Integration code of delivery type
order[delivery][data]
Data of the delivery service, connected by APICourier delivery service dataNew Post delivery service dataDDelivery delivery service dataKazPost delivery service data
order[delivery][data][externalId]
string
Delivery id in delivery servicedeprecated Track number (Use trackNumber instead)
order[delivery][data][trackNumber]
string
Track number (deprecated for write)Track numberTrack numberTrack number
order[delivery][data][status]
string
Delivery status codeDelivery status codeDelivery status codeDelivery status code
order[delivery][data][locked]
boolean
Do not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery serviceDo not synchronize with the delivery service
order[delivery][data][pickuppointAddress]
string
Pickup point address
order[delivery][data][days]
string
Approximate delivery timeApproximate delivery timeApproximate delivery time
order[delivery][data][statusText]
string
Delivery status nameDelivery status nameDelivery status name
order[delivery][data][statusDate]
DateTime
Delivery status dateDate of the last delivery status updating
order[delivery][data][tariff]
string
Tariff code
order[delivery][data][tariffName]
string
Tariff name
order[delivery][data][pickuppointId]
string
Pickup point IDPickup point idPickup point ID
order[delivery][data][pickuppointSchedule]
string
Pickup point working timeSchedule of pickup point
order[delivery][data][pickuppointPhone]
string
Pickup point phone
order[delivery][data][payerType]
string
PayerPayer type
order[delivery][data][statusComment]
string
Comment to delivery status
order[delivery][data][cost]
float
Delivery cost received from delivery service (in entity currency)Delivery cost received from delivery service (in entity currency)
Discount type. Possible values: manual_order - One-time discount on the order; manual_product - Additional discount on the product; loyalty_level - Discount on the level of the loyalty program; loyalty_event - Discount on the event of the loyalty program; personal - Personal discount; bonus_charge - Redemption of bonuses of the loyalty program; round - Discount from rounding
order[items][][discounts][][amount]
float
Discount amount
order[items][][discountTotal]
double
Final monetary discount per item including all item and order discounts (in entity currency)
order[items][][prices][]
array of objects (OrderProductPriceItem)
Set of total sales prices with the quantity
order[items][][prices][][price]
float
Total price including all discounts on the product and order (in entity currency)
GET
/api/v5/orders/{externalId}/plates/{plateId}/print
Getting the file of the printed form for the order
Getting the file of the printed form for the order
To access the method, the following permission is required order_read.
This method allows to download the generated printed form for the template with id={plateId} in the context of the specified order.
When downloading, the content of the file is given as a stream, the name of the file is given in the HTTP header Content-Disposition.
Parameters
Parameter
Type
Format
Description
externalId
string
Order ID
plateId
int
Printed form ID
Filter parameters
Parameter
Description
by
Template
id|externalId
Default value
externalId
Description
Is specified what is transmitted in parameter externalId: internal (by=id) or external (by=externalId) order ID. By default it is externalId.
To access the method, the following permission is required order_write.
The method creates a pack and returns its internal ID. The creation of the pack is not allowed for cancelled SKUs and services. There will be an error message in this case.
To access the method, the following permission is required payments_read.
Method allows to check invoice parameters before debiting
Parameters
Parameter
Type
Format
Description
check
object (ApiCheckRequest)
JSON with data for checking
check[invoiceUuid]
string
{not blank}
Invoice UUID in the system
check[amount]
float
{not blank}
Amount
check[currency]
string
{not blank}
Currency code in ISO-4217 format
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result
object (ApiCheckResponseResult)
Object with the result of checking
result[success]
boolean
Result of checking (successful/unsuccessful)
result[errorMsg]
string
Error message (in case if the checking has failed)
POST
/api/v5/payment/create-invoice
Creating an invoice
Creating an invoice
To access the method, the following permission is required payments_write.
Method allows to create link to pay for the specified payment
Parameters
Parameter
Type
Format
Description
createInvoice
object (ApiCreateInvoiceRequest)
JSON with invoice data
createInvoice[paymentId]
integer
{range: {<=2147483647}}{not blank}}
Internal ID of the payment
createInvoice[returnUrl]
string
{url}
URL to which the user will be redirected after confirmation or cancellation of the payment
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
result
object (ApiCreateInvoiceResponseResult)
JSON with data of the created invoice
result[link]
string
Link to checkout page for buyer
POST
/api/v5/payment/invoice/import
Import the invoice
Import the invoice
To access the method, the following permission is required payments_write.
The method allows importing an invoice. The fields invoice[status] and invoice[refunds][][status] can only have the value succeeded. If invoice[refunds] is specified, all internal fields (except comment) are required.
POST
/api/v5/payment/update-invoice
Changing the invoice
Changing the invoice
To access the method, the following permission is required payments_write.
The method allows you to change the invoice data in the system.
When passing the discount amount updateInvoice[discountAmount], it is necessary to reduce the payment amount updateInvoice[amount] by the corresponding amount.
This discount will be added to the order in the system as a One-time discount.
Changing the payment amount updateInvoice[amount] with the specified discount updateInvoice[discountAmount] is only possible when changing the payment status updateInvoice[status] to waitingForCapture or succeeded.
Parameters
Parameter
Type
Format
Description
updateInvoice
object (ApiUpdateInvoiceRequest)
JSON with invoice data
updateInvoice[invoiceUuid]
string
{not blank}
Invoice UUID in the system
updateInvoice[paymentId]
string
{length: {max: 255}}
Internal ID of payment in the module (UUID)
updateInvoice[amount]
float
Amount payment
updateInvoice[status]
string
{length: {max: 50}}
Code of payment status
updateInvoice[cancellationDetails]
string
{length: {max: 255}}
Reason for payment cancellation
updateInvoice[invoiceUrl]
string
{url}
Link to checkout page for buyer
updateInvoice[paidAt]
string
{DateTime YYYY-MM-DD HH:MM:SS}
Date and time of payment
updateInvoice[expiredAt]
string
{DateTime YYYY-MM-DD HH:MM:SS}
Date and time until which the payment is waiting for confirmation or cancellation (for two-stage payment)
updateInvoice[refund]
object (ModuleRefund)
JSON with return data
updateInvoice[refund][status]
string
Return status. Possible values: pending, succeeded, canceled
To confirm the payment at reserving, the system initiates calling POST method specified in configuration integrationModule["integrations"]["payment"]["actions"]["approve"]
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
approve
object (ModuleApiRequest)
JSON with request data
approve[paymentId]
string
Internal ID of payment in the module
approve[amount]
float
Total amount which will be debited from the customer
To cancel the payment, the system initiates calling POST method specified in configuration integrationModule["integrations"]["payment"]["actions"]["cancel"]
To create a payment, the system initiates calling POST method specified in configuration integrationModule["integrations"]["payment"]["actions"]["create"]. For products with the entered marking codes, each product unit will be passed as a separate string in create[items][]
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
create
object (Create)
JSON with data for payment creation
create[shopId]
string
Store ID
create[invoiceUuid]
string
Invoice ID the (UUID). All requests to API of the system are made via this ID
create[invoiceType]
string
Invoice type. Possible values: link
create[amount]
float
Amount in the selected currency
create[currency]
string
Currency code in ISO-4217 format
create[orderNumber]
string
Order number
create[orderId]
integer
Order internal ID
create[siteUrl]
string
Store URL
create[returnUrl]
string
URL to which the user will be redirected after confirmation or cancellation of the payment
create[items][]
array of objects (Item)
Products list
create[items][][name]
string
Name
create[items][][price]
float
Price
create[items][][quantity]
float
Quantity
create[items][][measurementUnit]
string
Unit of measurement
create[items][][vat]
string
VAT rate. Possible values: none, vat0, vat10, vat110, vat20, vat120
create[items][][paymentMethod]
string
Parameter of payment method. Possible values: full_prepayment, advance
create[items][][paymentObject]
string
Parameter of payment subject. Possible values: commodity, service, payment
To receive a list of recommendations the system initiates a GET method request, which is specified in integrationModule[integrations][recommendation]["actions"]["recommendation"].
The system transmits the product identifiers and the type of requested recommendations.
In response the system expects to receive a list of product identifiers and the field name for identification.
Parameters
Parameter
Type
Format
Description
clientId
string
Client ID in external service
ids[]
array of integers
Products ID
externalIds[]
array of strings
Products external ID
mode
string
Recommendations type: products "Buying with" and products "Analogs". Possible values buying_with, analogs
Response
Parameter
Type
Description
by
string
field name for product identification. Possible values id, externalId
ids[]
array of strings
Array with products identifications
Data book
GET
/api/v5/reference/cost-groups
Getting of the costs groups list
Getting of the costs groups list
To access the method, the following permission is required reference_read.
POST
/api/v5/reference/cost-items/{code}/edit
Editing costs items
Editing costs items
To access the method, the following permission is required reference_write.
When creating or editing a cost item, belonging to the cost group for attracting customers in fields costItem[source][...]
it`s possible to specify meanings of appropriate tags. These tags will be installed by default for all costs, belonging to this item.
Following meanings are available for specifying the cost item type:
GET
/api/v5/reference/currencies
Getting the list of currencies
Getting the list of currencies
To access the method, the following permission is required reference_read.
The base currency has the currencies[][isBase]=true attribute. All other fields returned
refer to the settings of additional currencies.
If the additional currency is in automatic conversion mode currencies[][isAutoConvert]=true,
the extra percent value currencies[][autoConvertExtraPercent] is also returned.
If the additional currency is in manual conversion mode currencies[][isAutoConvert]=false,
the values of the currency nominal currencies[][manualConvertNominal]
and the conversion rate currencies[][manualConvertValue] are also returned.
POST
/api/v5/reference/currencies/create
Currency creation
Currency creation
To access the method, the following permission is required reference_write.
You can only create additional currencies.
Specify the conversion mode in the field currency[isAutoConvert]
(true if automatic and false if manual).
The automatic exchange rate is allowed to be set if the base currency belongs to one of the following currencies — Belarusian Ruble, Kazakhstani Tenge, Russian Ruble,
and the Central Bank of the corresponding base currency forms the exchange rate of the target currency.
When is the automatic conversion mode you can also specify the amount of the extra percent value currency[autoConvertExtraPercent].
When is the manual conversion mode, you can specify the nominal of the currency currency[manualConvertNominal] and the conversion rate currency[manualConvertValue].
POST
/api/v5/reference/currencies/{id}/edit
Currency editing
Currency editing
To access the method, the following permission is required reference_write.
You can edit both the base and additional currencies, but the composition of the fields differs, which
accepted for editing. When you edit the base currency, you can only change
the currency itself currency[code]. When you edit additional currencies
you can change all other fields except currency[code].
Specify the conversion mode in the field currency[isAutoConvert]
(true if automatic and false if manual).
The automatic exchange rate is allowed to be set if the base currency belongs to one of the following currencies — Belarusian Ruble, Kazakhstani Tenge, Russian Ruble,
and the Central Bank of the corresponding base currency forms the exchange rate of the target currency.
When is the automatic conversion mode you can also specify the amount of the extra percent value currency[autoConvertExtraPercent].
When is the manual conversion mode, you can specify the nominal of the currency currency[manualConvertNominal] and the conversion rate currency[manualConvertValue].
POST
/api/v5/reference/delivery-types/{code}/edit
Delivery type creation/editing
Delivery type creation/editing
To access the method, the following permission is required reference_write.
For new delivery type it is necessary to specify the name name and symbolic code code.
The symbolic code must be unique.
In the field integrationCode you may specify the code of that integrated delivery service, which
was activated in the system. Otherwise there will be an error message.
Parameters
Parameter
Type
Format
Description
deliveryType
object (SerializedDeliveryType)
deliveryType[name]
string
{not blank}{length: {max: 255}}}
Name
deliveryType[code]
string
{length: {max: 255}}
Symbolic code
deliveryType[defaultCost]
double
{not blank}{range: {>=0}}}
Default cost (in entity currency)
deliveryType[defaultNetCost]
double
{not blank}{range: {>=0}}}
Default net cost (in entity currency)
deliveryType[sites]
array
Store codes array which the delivery type is available for
deliveryType[integrationModule]
string
deliveryType[regionWeightCostConditions]
string
deliveryType[vatRate]
string
VAT rate
deliveryType[defaultTariffCode]
string
Code of a default tariff
deliveryType[defaultTariffType]
string
Type of a default tariff
deliveryType[defaultTariffName]
string
Name of a default tariff
deliveryType[paymentTypes]
array
deprecated Allowed payment types. Use deliveryPaymentTypes
GET
/api/v5/store/inventories
Getting the leftover stocks and purchasing prices
Getting the leftover stocks and purchasing prices
To access the method, the following permission is required store_read.
The method allows to receive information about the stock balance and cost price of the SKUs. If the parameter
filter[details]=1 is specified, the detailed elaboration of the stock balance and cost price will be returned.
The data is returned by the stores, to which the used API key has the access,
or by the certain store, if the parameter filter[sites][]=site-code is specified.
By default the information about both enabled and disabled products and SKUs is returned. To receive
the information only about enabled products and SKUs, use the parameters filter[productActive]=1 and
filter[offerActive]=1.
The field offers[][site] is returned only if the data is returned by the several stores.
POST
/api/v5/store/inventories/upload
Updating the leftover stocks and purchasing prices
Updating the leftover stocks and purchasing prices
To access the method, the following permission is required store_write.
The method allows to update the leftover stock and purchase prices by warehouses for SKUs.
Per one query it is possible to update up to 250 SKUs.
In one SKU it is possible to specify stocks up to 500 warehouses.
Field offers[][stores][][available] may be integer or fractional.
Using actual stock accounting, 0 should be transmitted - in case of item absence at the warehouse, and 1 - in case of presence.
Each SKU should have at least one of three parameters: id, xmlId or externalId.
If several or all above-mentioned parameters are specified, the search is made, first of all, by id, then by xmlId and then by externalId.
If the SKU relates to a service, the transmitted data will be ignored.
If found several items with the specified xmlId, then the stocks will be changed for all of them.
Parameters
Parameter
Type
Format
Description
offers[]
array of objects (SerializedOffer)
offers[][id]
integer
SKU ID
offers[][externalId]
string
SKU ID in store
offers[][xmlId]
string
SKU ID in the warehouse system
offers[][stores][]
array of objects (SerializedStore)
offers[][stores][][code]
string
Symbolic code
offers[][stores][][available]
float
Quantity of available items or the fact of availability
offers[][stores][][purchasePrice]
float
Purchasing price
site
string
Symbolic code of store. Specified in case of SKUs identification by externalId
Error on leftover stocks uploading, or the current system settings don't allow to edit stocks
GET
/api/v5/store/offers
Getting a list of offers that meet the specified filter
Getting a list of offers that meet the specified filter
The method allows you to get information about offers. Data is returned by stores accessible to the used API key, or
by a specific store if the parameter filter[sites][]=site-code is specified.
By default, information is returned for both active and inactive offers. To get information only for active offers, use the parameter filter[active].
Filters filter[minPrice], filter[maxPrice] filter products by the prices of offers converted to the base currency.
If, along with these filters, you specify a filter by price type filter[priceType] (to which you need to pass a symbolic code of the price type)
then filtering will be carried out by the prices of offers of this price type and in the currency of this price type.
The filter filter[properties][] allows you to get products by their properties. The filter must be
specified in the format filter[properties][property_code_1]=value_1&filter[properties][property_code_2]=value_2.
When passing group identifiers in the filter[groups][] parameter, offers related to products or services from the specified groups, as well as all their subgroups, will be returned.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (OfferFilterData)
filter[ids][]
array of integers
Array of offer IDs
filter[externalIds][]
array of strings
Array of external IDs
filter[xmlIds][]
array of strings
Array of XML IDs
filter[name]
string
{length: {max: 255}}
Name/article of the product or article/barcode of the offer
Error on prices uploading, or the array is too large
GET
/api/v5/store/product-groups
Getting the list of product groups
Getting the list of product groups
To access the method, the following permission is required store_read.
The method allows to receive information about product groups.
The data is returned by the stores, to which the used API key has the access,
or by the certain stores, if the parameter filter[sites][]=site-code is specified.
By default the information about both enabled and disabled product groups is returned. To receive
the information only about enabled product groups use the parameter filter[active].
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
POST
/api/v5/store/product-groups/create
Adding a product group
Adding a product group
To access the method, the following permission is required store_write.
This method allows to create product groups. If successful, the internal ID of the created product group is returned.
To set the store, it is required to specify the store code in the productGroup[site] parameter. The active store will be searched by code.
To set the parent product group, specify one of the following parameters: productGroup[parentId] or productGroup[parentExternalId]. The active product group will be searched, first of all, by the productGroup[parentId] parameter, then by productGroup[parentExternalId] and productGroup[site].
If the productGroup[active] parameter isn't specified, the default value - true will be set.
POST
/api/v5/store/product-groups/{externalId}/edit
Editing a product group
Editing a product group
To access the method, the following permission is required store_write.
This method allows to make changes to product groups. If successful, the internal ID of the modified product group is returned.
The product group can be searched both by external ID (externalId) and internal ID (id) - just specify the corresponding value in the by parameter (by default, externalId). To search by external ID, you should pass the site parameter.
Parameters
Parameter
Type
Format
Description
by
string
You should specify what is passed in the externalId parameter: internal (by=id) or external (by=externalId) ID of the product group. By default, externalId.
site
string
The symbolic code of the store. Specified if the product group is searched by externalId (by=externalId)
GET
/api/v5/store/products
Getting the list of products and SKU
Getting the list of products and SKU
To access the method, the following permission is required store_read.
The method allows to receive information about stock balance and cost price of the SKUs.
The data is returned by the stores, to which the used API key has the access,
or by the certain stores, if the parameter filter[sites][]=site-code is specified.
When implementing a constant transfer of changes to an external system, it is recommended to use the approach of collecting incremental changes via filter[sinceId] passing the id of the product which was received last.
By default the information about both enabled and disabled products is returned. To receive
the information only about enabled products and SKUs, use the parameters filter[active].
The result is returned page by page. In the field pagination there is information on pagination.
Filters filter[minPrice], filter[maxPrice] filter products by the prices of offers converted to the base currency.
If, along with these filters, you specify a filter by price type filter[priceType] (to which you need to pass a symbolic code of the price type)
then filtering will be carried out by the prices of offers of this price type and in the currency of this price type.
filter[properties][] allows to get items by its properties. Filter must be
specified in format filter[properties][property_code_1]=value_1&filter[properties][property_code_2]=value_2.
In the filter filter[groups] there are item group IDs specified.
Filter filter[classSegment] allows to get segments of ABC/XYZ-analysis of items. Available values: abc[0..2]_xyz[0..2].
Filters filter[offerIds][], filter[offerExternalId], filter[offerXmlId]
allow to get items, to which the SKUs with these id, externalId, xmlId accordingly belong
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (ProductFilterData)
filter[ids][]
array of integers
Array of product's ID
filter[name]
string
{length: {max: 255}}
Name/article of the product or article/barcode of the SKU
filter[groups][]
array of integers
Group of the product
filter[sites][]
array of strings
Stores
filter[catalogs][]
array of integers
Array of catalog's ID
filter[priceType]
string
Price type
filter[manufacturer]
string
{length: {max: 255}}
Manufacturer
filter[externalId]
string
{length: {max: 255}}
External ID
filter[xmlId]
string
{length: {max: 255}}
Xml ID
filter[url]
string
{length: {max: 2000}}
URL
filter[urlLike]
string
{length: {max: 2000}}
Partial URL match (ignoring domain and query parameters)
POST
/api/v5/store/products/batch/create
Batch adding of products and services
Batch adding of products and services
To access the method, the following permission is required store_write.
Up to 50 products can be transferred in total per request.
In the type parameter, you can specify whether a product (product) or a service (service) is being created. By default, the product is created.
Such parameters as name and catalogId must be specified for each product.
Each product group must have one of the parameters: id or externalId. If several parameters are specified, the search is carried out, first of all, by id, but only within the product catalog.
For services, the fields "Manufacturer" (manufacturer) and "Subject to marking" (markable) are ignored.
An error occurred while adding products or the array is too large
POST
/api/v5/store/products/batch/edit
Batch editing of products and services
Batch editing of products and services
To access the method, the following permission is required store_write.
Up to 50 products can be transferred in total per request.
Each product must have the id parameter or the externalId and site parameters. If several or all of the above-mentioned parameters are specified, the search is made, first of all, by the id field, then by externalId and site.
Only those product parameters that were passed in the request are involved in editing. When editing the product catalog, the assigned product groups, properties and options are cleared.
Each product group must have one of the parameters: id or externalId. The search is carried out in the same way as for products, but only within the framework of the product catalog. If an empty array is passed in the groups parameter, the assigned product groups will be cleared.
For services, the fields "Manufacturer" (manufacturer) and "Subject to marking" (markable) are ignored.
Parameters
Parameter
Type
Format
Description
products[]
array of objects (ProductEditInput)
products[][catalogId]
integer
Catalog ID
products[][id]
integer
Product ID
products[][article]
string
Vendor code
products[][name]
string
Name
products[][url]
string
Link to item page in the web-store
products[][description]
string
Description
products[][popular]
boolean
Mark Sales leader
products[][stock]
boolean
Mark Best price
products[][novelty]
boolean
Mark New
products[][recommended]
boolean
Mark Recommended
products[][groups][]
array of objects (ProductEditGroupInput)
Item groups, which contains this item
products[][groups][][externalId]
string
External ID of the product group
products[][groups][][id]
integer
Product group ID
products[][externalId]
string
Item external ID
products[][manufacturer]
string
Manufacturer
products[][active]
boolean
Activity
products[][markable]
boolean
Subject to marking
products[][site]
string
Store code; required when transferring the externalId of the product
Error when changing products or the array is too large
GET
/api/v5/store/products/properties
Getting the list of item properties, matching the specified filter
Getting the list of item properties, matching the specified filter
To access the method, the following permission is required store_read.
Method allows to get information on items properties.
The data is returned by the stores, to which the used API key has the access,
or by the certain stores, if the parameter filter[sites][]=site-code is specified.
The visible field determines the visibility of the product property for the buyer.
If the field has the false value, then the property is recommended for displaying only within the system.
The variative field determines whether the property is used when creating variations.
If the field has the true value, then the property is used when creating the product variability.
The result is returned page by page. In the field pagination there is information on pagination.
Item properties can be filtered by identifiers filter[ids],
name filter[name] (partial coincidence), symbolic code
filter[code], visibility filter[visible] and variability filter[variative].
When passing group identifiers in the filter[groups][] parameter, properties for the specified groups as well as all child groups will be returned.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (ProductPropertiesFilterData)
filter[ids][]
array of integers
Array of product or service IDs
filter[name]
string
Name of the product or service
filter[code]
string
Symbolic code of the product or service
filter[sites][]
array of strings
Array of store codes
filter[visible]
boolean
Property visibility
filter[variative]
boolean
Property variability
filter[catalogs][]
array of integers
Array of catalog IDs
filter[groups][]
array of integers
Array of product or service group IDs
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
properties[]
array of objects (ProductProperty)
Item property
properties[][sites][]
array of strings
Symbolic codes of sites, which the catalog is bound to
GET
/api/v5/store/products/properties/values
Getting a list of property values for products or services that match the specified filters
Getting a list of property values for products or services that match the specified filters
The method allows retrieving information about the property values of products or services.
Data is returned for the stores that are accessible using the provided API key.
The result is returned page by page. In the field pagination there is information on pagination.
Item properties can be filtered by identifiers filter[ids],
name filter[name] (partial coincidence), symbolic code
filter[code], visibility filter[visible] and variability filter[variative].
When passing group identifiers in the filter[groups][] parameter, properties for the specified groups as well as all child groups will be returned.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["store"]["actions"]["inventoriesActualize"]}
Actualizing the leftover stocks after warehouse system interaction
Actualizing the leftover stocks after warehouse system interaction
Method allows to update stocks by warehouses for offers.
For updating of stocks the system initiates POST request of the method specified in integrationModule["integrations"]["store"]["actions"]["inventoriesActualize"].
Offers, which are absent in request, will be ignored in the response.
Each SKU should have at least one of three parameters: id, xmlId or externalId.
If several or all above-mentioned parameters are specified, the search is made, first of all, by id, then by xmlId and then by externalId.
In case of error occurrence in external resource, which callback method refers to, data on error will be displayed in action log (Settings > System > Action log).
If the reservation is canceled, the POST request will be initiated for the method specified in the integrationModule["integrations"]["store"]["actions"]["inventoriesActualize"] with the parameter packs[][quantity] set to 0.
Parameters
Parameter
Type
Format
Description
order
object (OrderDataModel)
Order
order[id]
integer
Order ID
order[externalId]
string
Order external ID
order[site]
string
Store
packs[]
array of objects (PackDataModel)
Packs
packs[][item]
object (PackItemModel)
Order item
packs[][item][id]
integer
Order item ID
packs[][item][externalIds][]
array of objects (CodeValueModel)
External IDs of order item
packs[][offer]
object (OfferDataModel)
SKU
packs[][offer][id]
integer
SKU ID
packs[][offer][externalId]
string
SKU ID in store
packs[][offer][xmlId]
string
SKU ID in the warehouse system
packs[][quantity]
float
Item quantity in pack
packs[][store]
string
Warehouse
packs[][purchasePrice]
float
Purchasing price
packs[][shipmentDate]
DateTime
Pack shipment date
packs[][invoiceNumber]
string
Tax number
packs[][deliveryNoteNumber]
string
Packing list number
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
errorMsg
string
Error message
inventories[]
array of objects (InventoriesDataModel)
Leftover stocks
inventories[][offers][]
array of objects (SerializedOffer)
inventories[][offers][][id]
integer
SKU ID
inventories[][offers][][externalId]
string
SKU ID in store
inventories[][offers][][xmlId]
string
SKU ID in the warehouse system
inventories[][offers][][stores][]
array of objects (SerializedStore)
inventories[][offers][][stores][][code]
string
Symbolic code
inventories[][offers][][stores][][available]
float
Quantity of available items or the fact of availability
inventories[][offers][][stores][][purchasePrice]
float
Purchasing price
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["store"]["actions"]["inventoriesUpload"]}
Updating the leftover stocks and purchasing prices
Updating the leftover stocks and purchasing prices
Method allows to update stocks and purchasing prices by warehouses for offers.
For updating of stocks the system initiates POST request of the method specified in integrationModule["integrations"]["store"]["actions"]["inventoriesUpload"].
System transmits the list of offers, for which need to transfer information on stocks, depending on the methods calling context.
Offers, which are absent in request, will be ignored in the response.
Points of method call are set in configuration in the field integrationModule["integrations"]["store"]["actions"]["inventoriesUpload"]["callPoints"].
Each SKU should have at least one of three parameters: id, xmlId or externalId.
If several or all above-mentioned parameters are specified, the search is made, first of all, by id, then by xmlId and then by externalId.
Field offers[][stores][][available] may be integer or fractional.
Using actual stock accounting, 0 should be transmitted - in case of item absence at the warehouse, and 1 - in case of presence.
In case of error occurrence in external resource, which callback method refers to, data on error will be displayed in action log (Settings > System > Action log).
Parameters
Parameter
Type
Format
Description
clientId
string
offers[]
array of objects (SerializedOffer)
offers[][id]
integer
SKU ID
offers[][externalId]
string
SKU ID in store
offers[][xmlId]
string
SKU ID in the warehouse system
offers[][site]
string
deprecated Store. Use getCatalog()
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
errorMsg
string
Error message
offers[]
array of objects (SerializedOffer)
offers[][id]
integer
SKU ID
offers[][externalId]
string
SKU ID in store
offers[][xmlId]
string
SKU ID in the warehouse system
offers[][stores][]
array of objects (SerializedStore)
offers[][stores][][code]
string
Symbolic code
offers[][stores][][available]
float
Quantity of available items or the fact of availability
offers[][stores][][purchasePrice]
float
Purchasing price
offers[][site]
string
deprecated Store. Use getCatalog()
Tasks
GET
/api/v5/tasks
Getting the task list
Getting the task list
To access the method, the following permission is required task_read.
The result is returned page by page. In the field pagination there is information on pagination.
The array of task internal identifiers is being transmitted in filter[ids][].
An array of internal identifiers of users is passed in the filter[creators][].
An array of internal identifiers of users or groups is passed in the filter[performers][].
filter[status] allows to get tasks, which are in certain status. Available values are:
completed - completed tasks;
performing - uncompleted tasks.
By filter filter[customer] possible to search by customer name, email and phone.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
To access the method, the following permission is required task_write.
Method creates the task and returns its internal ID.
If it is needed to change the task execution date, it is necessary to transmit date in Y-m-d H:i format to the task[datetime] field.
Date should be in the future.
In the task[performerId] field it is required to pass the internal ID of the user or group to assign the responsible user/group
If it is needed to relate the task with existing customer, then it is necessary to set the value of one of the following fields:
If the values of several fields are set, they will be processed in the ordering specified above. Customer search will be made within stores, which the used API-key has access to. If customer will not be found, relation will not be set.
If it is needed to relate task with existing order, then it is necessary to set the value of one of the following fields:
task[order][id] – order internal ID;
task[order][externalId] – external order ID;
task[order][number] – order number.
If the values of several fields are set, they will be processed in the ordering specified above. Order search will be made within stores, which the used API-key has access to. If order will not be found, relation will not be set.
When relating the task with existing order, task will be automatically related with customer, which the order belongs to.
When binding the task with customer/order it is necessary to specify data of order or customer.
When creating the task for recall you should specify phone number, which has to be called, in the task[phone] field.
It is desirable to specify the symbolic code of store in task[phoneSite] field for having opportunity to make recall from the certain store phone. This opportunity depends on used telephony and its settings.
GET
/api/v5/tasks/history
Getting the task change history
Getting the task change history
To access the method, the following permission is required task_read.
Returns changes in tasks made in the specified date range (using filters filter[startDate] and filter[endDate]), or incremental changes (using filter[sinceId]). When implementing a permanent translation of changes to an external system it is recommended to use the approach with collecting incremental changes via filter[sinceId] transferring id of the last received history record.
For task creation records, the full set of fields is returned in the context task.
The result is returned page by page. Field pagination contains pagination information.
To paginate through history records, it is necessary to use filter[sinceId]. It is not recommended to use the page parameter.
To access the method, the following permission is required task_write.
Method allows to edit the task
If it is needed to edit the task, which was not executed and execution time was expired, it is necessary to change task execution time also.
If the value of task[complete] field is set as true, when changing the task, then there is no need to change task execution time.
If it is needed to edit the task execution date, it is necessary to transmit date in Y-m-d H:i format to the task[datetime] field.
Date should be in the future.
In the task[performerId] field it is required to pass the internal ID of the user or group to change the responsible user/group
If it is needed to relate the task with existing customer, then it is necessary to set the value of one of the following fields:
If the values of several fields are set, they will be processed in the ordering specified above. Customer search will be made within stores, which the used API-key has access to. If customer will not be found, relation will not be set.
If it is needed to relate task with existing order, then it is necessary to set the value of one of the following fields:
task[order][id] – order internal ID;
task[order][externalId] – external order ID;
task[order][number] – order number.
If the values of several fields are set, they will be processed in the ordering specified above. Order search will be made within stores, which the used API-key has access to. If order will not be found, relation will not be set.
When relating the task with existing order, task will be automatically related with customer, which the order belongs to.
When binding the task with customer/order it is necessary to specify data of order or customer.
When editing the task for recall you should specify phone number, which has to be called, in the task[phone] field.
It is desirable to specify the symbolic code of store in task[phoneSite] field for having opportunity to make recall from the certain store phone. This opportunity depends on used telephony and its settings.
To access the method, the following permission is required telephony_write.
Method fixes the call events for users with extension numbers codes and/or with userIds ID,
from phone number phone. codes field contains JSON array of extension codes, userIds field contains JSON array of users ID.
If there are both codes and userIds fields specified, the call event will be fixed for all listed users.
The field type contains the event type:
in - incoming call, out - outgoing call, hangup - call completion.
In case if type is equal to hangup, then in the field hangupStatus you can pass the status.
The field hangupStatus contains the call completion status: answered - call is received,
no answered - there were no answer for the call,
busy - the calling part gets the signal "busy",
cancel - the call is cancelled,
failed - failed to call.
By default the value is answered.
The field campaign contains an advertising campaign the call related with.Contains JSON, where with the fields: name - advertising campaign name and code - advertising campaign code. In case if this field is not empty, in the incoming call window there will be an information on advertising campaign.
Call event can be related to the store. For this purpose it is necessary to specify the symbolic code of store in site field, or external phone number of store in externalPhone field. If both fields are specified, they will be processed in the following order:
site
externalPhone
Parameters
Parameter
Type
Format
Description
event
object (CallEvent)
event[phone]
string
{length: {max: 255}}{not blank}}
Phone
event[type]
string
{not blank}[hangup|in|out]}
Event type
event[codes][]
array of strings
Manager's extension codes in telephony
event[userIds][]
array of integers
Array of user's ID
event[site]
string
Symbolic code of store related to call event
event[hangupStatus]
string
[answered|busy|cancel|failed|no answered]
Status of call end
event[externalPhone]
string
{length: {max: 255}}
External phone number
event[callExternalId]
string
{length: {max: 255}}
External Id of call related with the event
event[webAnalyticsData]
object (SerializedWebAnalyticsData)
event[webAnalyticsData][campaign]
object (SerializedCampaign)
Advertising campaign
event[webAnalyticsData][campaign][name]
string
Advertising campaign name
event[webAnalyticsData][campaign][code]
string
Advertising campaign code
event[webAnalyticsData][queryString]
string
Search query
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
notExistCodes
array
Array of extensions, which are absent in the system
POST
/api/v5/telephony/calls/upload
Calls uploading
Calls uploading
To access the method, the following permission is required telephony_write.
The method allows to save the call history. In one request you can pass up to 50 calls.
The field calls contains JSON.
The field calls[][date], contains date and time of the call in the format Y-m-d H:i:s.
The field calls[][type], may receive the following values:
in - incoming call, out - outgoing call.
The field calls[][result], may receive the following values:
failed - failed, answered - answered, busy - busy,
no answer - no answer, not allowed - not allowed, unknown - unknown
The field calls[][externalId] contains the unique call identifier in the PABX, if there will be passed the value that is already exist
the call will not be created.
The field calls[][recordUrl] contains the link to the call record, e.g. http://example.com/record.mp3.
Supported records format is .wav, .mp3
For call saving, calls[][userId] and calls[][code] fields should be filled.
calls[][userId] field contains ID of user, who processed the call.
calls[][code] field contains extension code of user, who processed the call.
Field Call durationcalls[][duration] must be more than Waiting time for the operator's answercalls[][durationWaiting].
If the calls[][duration] field is not transferred, there will be no player to listen the call recording at the order.
If both fields are specified, they will be processed in the following order:
calls[][userId]
calls[][code]
Call can be related to the store. For this purpose it is necessary to specify the symbolic code of store in calls[][site] field, or external phone number of store in calls[][externalPhone] field. If both fields are specified, they will be processed in the following order:
GET
/api/v5/telephony/manager
Getting the responsible manager
Getting the responsible manager
To access the method, the following permission is required telephony_read.
The method returns responsible manager for the customer with the phone number phone, that is actually Online in the system and is in the status Free.
If there is no responsible manager, the field manager will be absent in the answer.
If the field ignoreStatus equals to 1, there will be the field manager in the response regardless of the status of the responsible manager in the system (Online status and/or Free status).
If the field details is equal to 1, there will be the following fields links, customer in the answer. Otherwise, the fields will be absent.
If the customer is found, the fields links[newCustomerLink], links[newOrderLink] will be absent in answer.
If the customer is not found, the fields customer, links[lastOrderLink], links[customerLink] will be absent in answer.
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["telephony"]["changeUserStatusUrl"]}
Notification on status change
Notification on status change
If in the telephony settings the field changeUserStatusUrl is specified, when changing of manager status in system the GET request will be sent to the specified address.
Parameters
Parameter
Type
Format
Description
code
string
{not blank}{length: {max: 255}}}
Additional code
userId
integer
{not blank}{length: {max: 255}}}
User Id
clientId
string
{not blank}{length: {max: 255}}}
Client id
status
string
{not blank}[break|busy|dinner|free]}
User status in the system
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["telephony"]["makeCallUrl"]}
Initiation of call
Initiation of call
If in the telephony settings the field makeCallUrl is specified, when initiating of call, the GET request will be sent to the specified address. Expected return code is 200, otherwise user will receive error message.
CallbackPOST
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["telephony"]["personalAccountUrl"]}
Transition to personal account
Transition to personal account
If the personalAccountUrl field is specified, in telephony integration settings there will be "Telephony personal account" button available, by clicking which the POST request with clientId parameter will be sent to the specified address.
Parameters
Parameter
Type
Format
Description
clientId
string
{not blank}{length: {max: 255}}}
Client id
CallbackGET
{recordUrl}
Listening of the call
Listening of the call
If the field recordUrl is specified for the call, when trying to listen the call, GET-request will be sent to the specified address. Expected return code is 200, otherwise user will receive the error message.
For correct playback of record must specify the correct header Content-Type
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["mgTransport"]["actions"]["online"]}
Get customer's online status in chat
Get customer's online status in chat
This callback retrieves the online status of the customer for the provided chat.
For getting data the system initiates GET-request of method specified in integrationModule["integrations"]["mgTransport"]["actions"]["online"] configuration.
The clientId for the integration module will be provided in the X-Client-Id header.
Parameters
Parameter
Type
Format
Description
externalUserId
string
GET-parameter with chat customer's external ID
Response
Parameter
Type
Description
lastOnline
DateTime
Customer last online date
CallbackGET
{integrationModule["baseUrl"]}/{integrationModule["integrations"]["mgTransport"]["actions"]["visits"]}
Retrieve data on chat visits
Retrieve data on chat visits
This callback retrieves visits data for the provided chat.
For getting data the system initiates GET-request of method specified in integrationModule["integrations"]["mgTransport"]["actions"]["visits"] configuration.
The clientId for the integration module will be provided in the X-Client-Id header.
Parameters
Parameter
Type
Format
Description
externalChatId
string
GET-parameter with chat's external ID
Response
Parameter
Type
Description
lastVisit
object (ChatLastVisit)
Last visit date
lastVisit[source]
string
Visit source
lastVisit[createdAt]
DateTime
Visit start date and time
lastVisit[endedAt]
DateTime
Visit end date and time (current time if visit has not ended)
lastVisit[duration]
integer
Visit duration in seconds
lastVisit[pages][]
array of objects (ChatVisitedPage)
List of visited pages
lastVisit[pages][][dateTime]
DateTime
Date and time when page was visited
lastVisit[pages][][url]
string
Page URL
lastVisit[pages][][title]
string
Page Title
countVisits
custom handler result for (int)
Visits count
device
object (ChatDevice)
Information about customer's device
device[lang]
string
Device language (formatted as en_US)
device[browser]
string
Browser name and version
device[os]
string
OS type
utm
object (ChatUtm)
User's UTM-marks
utm[source]
string
Value of utm_source mark
utm[medium]
string
Value of utm_medium mark
utm[campaign]
string
Value of utm_campaign mark
country
string
Customer country name
city
string
Customer city name
Users
GET
/api/v5/user-groups
Getting the list of user groups
Getting the list of user groups
To access the method, the following permission is required user_read.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
pagination
object (PaginationResponse)
Pagination
pagination[limit]
integer
Quantity of elements in the answer
pagination[totalCount]
integer
Total quantity of found elements
pagination[currentPage]
integer
Current issuance page
pagination[totalPageCount]
integer
Total quantity of issuance pages
groups[]
array of objects (Group)
Users group
groups[][id]
integer
ID
groups[][name]
string
Name
groups[][signatureTemplate]
string
Signature template
groups[][code]
string
Symbolic code
groups[][isManager]
boolean
Group processes orders
groups[][isDeliveryMen]
boolean
Group responsible for delivery
groups[][deliveryTypes]
array
Delivery types the group responsible for
groups[][breakdownOrderTypes]
array
Types of the orders, which are being distributed to managers of this group
groups[][breakdownSites]
array
Stores, the orders of which are being distributed to managers of this group
groups[][breakdownOrderMethods]
array
Methods of the orders, which are being distributed to managers of this group
groups[][grantedOrderTypes]
array
Order types, which are available for managers of this group, if the access is restricted
groups[][grantedSites]
array
Stores, which are available for managers of this group
GET
/api/v5/users
Getting the list of users matched the specified filter
Getting the list of users matched the specified filter
To access the method, the following permission is required user_read.
Parameters
Parameter
Type
Format
Description
limit
integer
{not blank}[20|50|100]}
Quantity of elements in the answer (20 by default)
page
integer
{not blank}{range: {>=1}}}
Number of page with the results (1 by default)
filter
object (ApiUserFilter)
filter[email]
string
{length: {max: 255}}
User email
filter[status]
string
[break|busy|dinner|free]
User status in the system. When using the filter[status] filter, only those users who have the true value in the online field are included in the selection.
GET
/api/v5/users/{id}
Getting information on user
Getting information on user
To access the method, the following permission is required user_read.
Getting information on user
The field user[status] contains user status in the system, it may receive the following values:
free - free; busy - busy;dinner - at lunch; break - break.
To access the method, the following permission is required user_write.
Parameters
Parameter
Type
Format
Description
status
string
[free|busy|dinner|break]
User status in the system. When using the filter[status] filter, only those users who have the true value in the online field are included in the selection.
POST
/api/v5/verification/sms/confirm
Confirmation of verification
Confirmation of verification
To access the method, the following permission is required verification_write.
Method for confirmation of verification
Parameters
Parameter
Type
Format
Description
verification
object (SmsVerificationConfirm)
verification[code]
string
Verification code
verification[checkId]
string
Code verification ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
verification
object (SmsVerification)
SMS-verification
verification[createdAt]
DateTime
Date of creation. (Y-m-d H:i:s)
verification[expiredAt]
DateTime
Expiration date. (Y-m-d H:i:s)
verification[verifiedAt]
DateTime
Verification success date. (Y-m-d H:i:s)
verification[checkId]
string
Code verification ID
verification[actionType]
string
Type of action
GET
/api/v5/verification/sms/{checkId}/status
Checking the verification status
Checking the verification status
To access the method, the following permission is required verification_read.
The actionType field returns the type of action for which the phone is confirmed. Possible values:
verify_loyalty_account - confirmation when activating participation in the Loyalty Program;
verify_loyalty_account_phone - confirmation of the phone number of the participation in the Loyalty Program;
confirm_loyalty_charge - redeeming bonuses in the Loyalty Program;
Parameters
Parameter
Type
Format
Description
checkId
string
Code verification ID
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
verification
object (SmsVerification)
SMS-verification
verification[createdAt]
DateTime
Date of creation. (Y-m-d H:i:s)
verification[expiredAt]
DateTime
Expiration date. (Y-m-d H:i:s)
verification[verifiedAt]
DateTime
Verification success date. (Y-m-d H:i:s)
verification[checkId]
string
Code verification ID
verification[actionType]
string
Type of action
Web analytics
POST
/api/v5/web-analytics/client-ids/upload
Batch uploading of web analytics clientId
Batch uploading of web analytics clientId
To access the method, the following permission is required web_analytics_write.
The method allows uploading up to 100 tags of web analytics clientId. The clientIds field contains a JSON array.
The clientId value is transferred in the mandatory field clientIds[][value].
The tag can be linked to an order or a customer. The clientIds[][order] field is used to upload to the order. To do this, you need to set the value of one of the following fields:
clientIds[order][id] – internal ID of the order; clientIds[order][externalId] – external ID of the order; clientIds[order][number] – order number.
To upload to the customer one of the fields is used:
clientIds[customer][id] – internal ID of the customer; clientIds[customer][externalId] – external ID of the customer;
If the value of several fields is set, they will be processed in the order specified above. The search by externalId/number will be performed within the store specified in the optional parameter clientIds[][site].
When adding a clientId to an order it will also be added to the clientId list of the linked customer, if not already added. If necessary, the fields of the first and last clientId of the customer are changed.
The clientId setting date can be specified in the optional clientIds[][createdAt] field (if left blank, the current date will be used).
The value field as well as any of the order and customer fields are mandatory.
Parameters
Parameter
Type
Format
Description
clientIds[]
array of objects (ClientId)
{not blank}
Array of clientId to upload
clientIds[][value]
string
{not blank}{length: {min: 1, max: 255}}}
Value of the clientId being added
clientIds[][createdAt]
DateTime
Date the clientId was added
clientIds[][order]
object (SerializedEntityOrder)
Order
clientIds[][order][id]
integer
Order internal ID
clientIds[][order][externalId]
string
Order external ID
clientIds[][order][number]
string
Order number
clientIds[][customer]
object (SerializedEntityCustomer)
Customer
clientIds[][customer][id]
integer
Customer internal ID
clientIds[][customer][externalId]
string
Customer external ID
clientIds[][site]
string
{length: {min: 1, max: 255}}
Symbol code of the store where the order or customer is searched for
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
failedClientIds[]
array of objects (ClientId)
Array of clientId to upload
failedClientIds[][value]
string
Value of the clientId being added
failedClientIds[][createdAt]
DateTime
Date the clientId was added
failedClientIds[][order]
object (SerializedEntityOrder)
Order
failedClientIds[][order][id]
integer
Order internal ID
failedClientIds[][order][externalId]
string
Order external ID
failedClientIds[][order][number]
string
Order number
failedClientIds[][customer]
object (SerializedEntityCustomer)
Customer
failedClientIds[][customer][site]
string
Symbolic code of store
failedClientIds[][customer][id]
integer
Customer internal ID
failedClientIds[][customer][externalId]
string
Customer external ID
failedClientIds[][customer][type]
string
Customer type
failedClientIds[][site]
string
Symbol code of the store where the order or customer is searched for
Errors occurred during the uploading. Part of the clientId are not uploaded (the response also contains an "errors" array)
POST
/api/v5/web-analytics/sources/upload
Batch uploading of sources
Batch uploading of sources
To access the method, the following permission is required web_analytics_write.
The method allows uploading up to 100 web analytics sources. The sources field contains a JSON array.
Source data is transferred in the fields sources[][source], sources[][medium], sources[][campaign],
sources[][keyword], sources[][content];
at least one of the fields must be transferred.
The source can be linked to an order or a customer. The sources[][order] field is used to upload to the order. To do this, you need to set the value of one of the following fields:
source[order][id] – internal ID of the order; source[order][externalId] – external ID of the order; source[order][number] – order number.
To upload to the customer one of the fields is used:
source[customer][id] – internal ID of the customer; source[customer][externalId] – external ID of the customer;
If the customer does not have a source when writing the source to the order, it will be installed in the customer.
The sources[][clientId] field can also be transferred with the value of the web analytics clientId: if it is found in the system, the source will be linked to the customer associated with this clientId.
If the value of several fields is set, they will be processed in the order specified above. The search by externalId/number will be performed within the store specified in the optional parameter source[site].
At least one of the three fields order, customer, clientId is mandatory as well as at least one of the source fields.
Parameters
Parameter
Type
Format
Description
sources[]
array of objects (Source)
{not blank}
Array of sources to upload
sources[][source]
string
Source
sources[][medium]
string
Medium
sources[][campaign]
string
Campaign
sources[][keyword]
string
Keyword
sources[][content]
string
Ad content
sources[][clientId]
string
{length: {min: 1, max: 255}}
The clientId of web analytics to which the source will be linked
sources[][order]
object (SerializedEntityOrder)
Order
sources[][order][id]
integer
Order internal ID
sources[][order][externalId]
string
Order external ID
sources[][order][number]
string
Order number
sources[][customer]
object (SerializedEntityCustomer)
Customer
sources[][customer][id]
integer
Customer internal ID
sources[][customer][externalId]
string
Customer external ID
sources[][site]
string
{length: {min: 1, max: 255}}
Symbol code of the store where the order or customer is searched for
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
failedSources[]
array of objects (Source)
Array of sources to upload
failedSources[][source]
string
Source
failedSources[][medium]
string
Medium
failedSources[][campaign]
string
Campaign
failedSources[][keyword]
string
Keyword
failedSources[][content]
string
Ad content
failedSources[][clientId]
string
The clientId of web analytics to which the source will be linked
failedSources[][order]
object (SerializedEntityOrder)
Order
failedSources[][order][id]
integer
Order internal ID
failedSources[][order][externalId]
string
Order external ID
failedSources[][order][number]
string
Order number
failedSources[][customer]
object (SerializedEntityCustomer)
Customer
failedSources[][customer][site]
string
Symbolic code of store
failedSources[][customer][id]
integer
Customer internal ID
failedSources[][customer][externalId]
string
Customer external ID
failedSources[][customer][type]
string
Customer type
failedSources[][site]
string
Symbol code of the store where the order or customer is searched for
Errors occurred during the uploading. Part of the sources are not uploaded (the response also contains an "errors" array)
POST
/api/v5/web-analytics/visits/upload
Batch uploading of visits
Batch uploading of visits
To access the method, the following permission is required web_analytics_write.
The method allows downloading up to 50 web analytics visits. The visits field contains a JSON array.
The visit is linked to the client. One of the fields for this purpose is specified in the visit:
visit[customer][id] – internal ID of the customer;visit[customer][externalId] – external ID of the customer; visit[][clientId] – web analytics clientId value: if it is found in the system, the source will be linked to the customer associated with this clientId.
Each visit must contain a site field that points to the store associated with the visit.
Parameters
Parameter
Type
Format
Description
visits[]
array of objects (Visit)
{not blank}
Array of visits to upload
visits[][createdAt]
string
{DateTime YYYY-MM-DD HH:MM:SS}
Date and time the visit was created
visits[][visitLength]
integer
Visit duration
visits[][exitPage]
string
Page where the visit ended
visits[][landingPage]
string
Page where the visit started
visits[][pageViews]
integer
Number of pages viewed per visit
visits[][pageDepth]
integer
Page view depth per visit
visits[][customer]
object (SerializedEntityCustomer)
Customer
visits[][customer][id]
integer
Customer internal ID
visits[][customer][externalId]
string
Customer external ID
visits[][source]
object (SerializedSource)
The data about source
visits[][source][source]
string
Source
visits[][source][medium]
string
Medium
visits[][source][campaign]
string
Campaign
visits[][source][keyword]
string
Keyword
visits[][source][content]
string
Ad content
visits[][pages][]
array of objects (Page)
Array of pages to upload
visits[][pages][][url]
string
{not blank}
Page URL
visits[][pages][][title]
string
Page title
visits[][pages][][countViews]
integer
Number of page views
visits[][pages][][timeOnPage]
integer
Time spent on the page in milliseconds
visits[][clientId]
string
{length: {min: 1, max: 255}}
The clientId of web analytics to which the visit will be linked
visits[][site]
string
{length: {min: 1, max: 255}}
The symbol code of the store in which the pages or the customer are being searched
Response
Parameter
Type
Description
success
boolean
Query result (successful/unsuccessful)
failedVisits[]
array of objects (Visit)
Array of visits to upload
failedVisits[][createdAt]
string
Date and time the visit was created
failedVisits[][visitLength]
integer
Visit duration
failedVisits[][exitPage]
string
Page where the visit ended
failedVisits[][landingPage]
string
Page where the visit started
failedVisits[][pageViews]
integer
Number of pages viewed per visit
failedVisits[][pageDepth]
integer
Page view depth per visit
failedVisits[][customer]
object (SerializedEntityCustomer)
Customer
failedVisits[][customer][site]
string
Symbolic code of store
failedVisits[][customer][id]
integer
Customer internal ID
failedVisits[][customer][externalId]
string
Customer external ID
failedVisits[][customer][type]
string
Customer type
failedVisits[][source]
object (SerializedSource)
The data about source
failedVisits[][source][source]
string
Source
failedVisits[][source][medium]
string
Medium
failedVisits[][source][campaign]
string
Campaign
failedVisits[][source][keyword]
string
Keyword
failedVisits[][source][content]
string
Ad content
failedVisits[][pages][]
array of objects (Page)
Array of pages to upload
failedVisits[][pages][][url]
string
Page URL
failedVisits[][pages][][title]
string
Page title
failedVisits[][pages][][countViews]
integer
Number of page views
failedVisits[][pages][][timeOnPage]
integer
Time spent on the page in milliseconds
failedVisits[][clientId]
string
The clientId of web analytics to which the visit will be linked
failedVisits[][site]
string
The symbol code of the store in which the pages or the customer are being searched
Errors occurred during the uploading. Part of the visits are not uploaded (the response also contains an "errors" array)
Statistics
GET
/api/v5/statistic/update
Statistics updating
Statistics updating
To access the method, the following permission is required analytics_write.
Queues up the task to update key statistical indicators in the system.
Retry timeout is 60 seconds. If calls are made more frequently, a 400 error will be returned.