Dear Community,
My goal is to connect my Wix Store’s Products-Database with Google Merchant using a synched feed. I am working with a 3rd Party Integration platform DataFeedWatch that can import different kind of dataset files such as json, xml, csv. Files can be either uploaded or linked to an url-exposed file.
I have successfully integrate my products using an uploaded csv file exported once from my Store/Product Database Collection. However, my goal is to connect directly an Endpoint json file using the HTTP Function API from Velo. This task was partially successfully but there are some missing fields in the Endpoint json. The most important field missing is “Collections” (see image below). With the collection field I am able to establish a mapping rule to Categorize Products. Defining Google Categories (Taxonmy) properly is essential to properly create Google Shopping campaign ads.
The exposed Endpoint url is here:
https://chicdog.cl/_functions-dev/product
In that json file the data of the field “Collections” is missing. I don’t really now why is missing and how frequently is this Endpoint data refreshed.
Below is the snippet code of the json file of the HTTP Functions.
Please help!!
- Is something missing in my code that exclude the “Collections” field?
- Is possible to define, security purposes, user and password to that Endpoint in the HTTP Functions API?
Products Database:
The code of the json backend-file is as follows (extracted from this article )
import {ok, notFound, serverError} from ‘wix-http-functions’ ;
import wixData from ‘wix-data’ ;
export function get_product(request) {
let options = {
“headers” : {
“Content-Type” : “application/json”
}
};
// query a collection to find matching items
return wixData.query( “Stores/Products” )
.find()
.then( (results) => {
// matching items were found
if (results.items.length > 0 ) {
options.body = {
“items” : results.items
};
return ok(options);
}
// no matching items found
options.body = {
“error” : not found
};
return notFound(options);
} )
// something went wrong
. catch ( (error) => {
options.body = {
“error” : error
};
return serverError(options);
} );
}
Categorize Products in DataFeedWatch:


