0

The google-api-nodejs-client doesn't have any documentation so I''m just referring to the raw api docs. While trying to use the client

client.datafeedstatuses.custombatch({
     entries: [
       {merchantId: "myId", datafeedId: "myId", method: 'get', batchId: 1},
     ]
    })
    .then((res) => {
       console.log(res.data);
       return res.data;
    })

// returns 200 { "kind": "content#datafeedstatusesCustomBatchResponse" }

How do I use the customBatch to get the data?

1 Answers1

2

The entries field needs to be wrapped in a requestBody object:

client.datafeedstatuses.custombatch({
  requestBody: {
    entries: [
      {
        merchantId: "myId", datafeedId: "myId", method: 'get', batchId: 1
      }
    ]
  } 
})
.then((res) => {
   console.log(res.data);
   return res.data;
})

Hope this helps!

Justin Beckwith
  • 7,686
  • 1
  • 33
  • 55