Every API is different and not every API may be suitable for use with our WooCommerce Import plugin. Please ensure that your API meets these requirements before using the WooCommerce Import plugin.
REST API’s
WPGetAPI and the WooCommerce Import plugin will only work with REST API’s (sometimes called RESTful API). Reading your API’s documentation will tell you whether or not it is a REST API.
JSON Format
The plugin currently only supports returning data in JSON format. If you require using XML format, please contact us and it will give us the hurry-up to implement this feature.
Array Items
The array of items that the API returns should be either on the first level or second level of data.
An example of items being on the first level looks like this:
[
{
"make" : "Volkswagon",
"model" : "Polo",
"price" : 20,000,
},
{
"make" : "Ford",
"model" : "Ranger",
"price" : 30,000,
},
{
"make" : "BMW",
"model" : "X5",
"price" : 40,000,
}
]
An example of items being on the second level looks like the below. In this case we can use the Array Key field and add ‘data’ to fetch the items.
{
"count" : 3,
"pages" : 1,
"data" : [
{
"make" : "Volkswagon",
"model" : "Polo",
"price" : 20,000,
},
{
"make" : "Ford",
"model" : "Ranger",
"price" : 30,000,
},
{
"make" : "BMW",
"model" : "X5",
"price" : 40,000,
}
]
}
Authorisation
To authorise your API you can use standard techniques such as API key in headers or in query string, base64 encoding as well as username:password combo in POST fields. If you are wondering whether or not your API is suitable please contact us and we can advise if it will work, and if it doesn’t then we will make it work!