API GENERAL INFORMATION
Please find Merchant API at the following address:
.php is name of the interface file.
There is no preference for transmitting the data by GET or POST method unless it is specified. GET method is not
the most efficient technique for transmitting long stings of data, so in these cases POST method should be implied.
There are two essential variables for using interface. Please remember, certain
variables are not mentioned in each specific interface repeatedly. These are the following two variables:
- products database ID
- programming interface key for the above mentioned database which
is the code generated by our administrators
All transmittable variables should be URL-encoded (as well as its name and value). Parameters can be arrays.
In this case parameters name will contain brackets .
(URL encoded parameter: status%5B43%5D=3,
While using interface the errors can occur. Samples of possible errors are listed below.
In the case of error server usually posts the following string:
The string of four fields is separated by the symbol | (vertical line), where:
- keyword - error identification
- ID of an error arisen, integer
- error name, string
- additional data concerning arisen error; each error contains
its specific name and format. For the majority of errors (simple error) the field remains empty
since it does not require definition. Received interface answer should be checked thoroughly
not to be taken with an error. When no error the answer format is generated by specific interface,
in the most of cases by XML.
All interfaces are divided by their types: informational (only transmitting information
from existing database) and controlling (the type that updates the data on the server). The controlling type
of the interface remains the possibility of certain errors, whereas the informational type of interface
would not typically get any errors since the incorrect data being extracted from query is transformed into correct values
or used, as it is based on the possibility of such scenario.
If incorrect status of the order is entered into search engine of the database,
the search result shows no orders in the answer.
Some interfaces are defined to handle orders only. Orders by themselves have an important status attribute
which is coded as an integer. Example of the status table can be found below.
The XML description uses the following definitions:
- if parameter is set in the brackets
that this parameter is utilized by XML and appears as a nested tag.
- if the parameter name does not contain brackets and just specified as
it means that it is utilized by XML and appears as an attribute to the tag.
- if the parameter is marked as * symbol, the parameter is optional, in this case it might be absent.
Parameters are always present if they are not marked with a * symbol, however some of them
might have empty fields.
Those parameters with square brackets after the name (
) are defined as an array. It means that many of such variables can be transmitted.
Array index (in brackets) may not be essential at all the cases, therefore it could be transmitted as following: