0

I'm currently fetching below API from http://localhost:3009/api/get-products/ . How do I switch between 10 categories and search using other keywords ?

    app.get("/api/get-products",async (req, res) => {
    client.execute('affiliate.product.query', {
    'app_signature':'mcc',
    'category_ids':'111,222,333',  <--- query different categories
    'keywords':'shirt',            <--- query different search keyword
    'target_currency':'USD',
    'target_language':'EN',
  }

1 Answers1

1

You should use query parameters that allow you to specify what keywords or categories you want to receive:

Look at that example: https://example.com/over/there?name=ferret.

While passing a query like that, you are able to get name from req object.

Here you can find more about the query parameters in Node.js: How to get GET (query string) variables in Express.js on Node.js?

ouflak
  • 2,458
  • 10
  • 44
  • 49
rxbsxn
  • 26
  • 2