Walmart Marketplace CA
Generated Connector
The library is a set of typed functions
which accept walmart inputs and return
axios parameters to make the request
You should use the output in an axios function
and don't forget to:
Rate limit
Handle errors
Time requests
Log requests
import * as walmart from './walmart_connector'
export const main = async () => {
const auth = {
walmart_channel: '***',
walmart_secret: '***',
walmart_consumer: '***'
}
const headers: any = { accept: 'application/json' }
const body = Buffer.from(JSON.stringify({
InventoryHeader: {
version: '1.4'
},
Inventory: [
{
sku: 'mysku',
quantity: {
unit: 'EACH',
amount: '12'
},
fulfillmentLagTime: 2
}
]
}))
const req = walmart.update_bulk_inventory(auth,{feedType: 'inventory'}, body, headers)
walmart.update_bulk_inventory
const feed_response = await axios(req)
let feedId = feed_response.data.feedId
console.log(feed_id)
debugger
}