JSPM

walmart_marketplace

1.0.11
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q28258F
  • License ISC

Walmart Marketplace CA Generated Connector

Package Exports

  • walmart_marketplace
  • walmart_marketplace/build/walmart_connector.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (walmart_marketplace) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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

// Docs: https://developer.walmart.com/ca/ca-mp/
// https://seller.walmart.ca/items-and-inventory/feed-status/item
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)

    // // @ts-ignore
    // const response2 = await doRequest(`/v3/ca/feeds/${feedId}?includeDetails=true`, 'get')
    // const queryString = json_to_query_string({
    //     createdStartDate: '2022-01-01',
    //     createdEndDate: '2022-01-31',
    //     productInfo: true
    // })
    // const orderResponse = await doRequest(
    //     `/v3/ca/orders${queryString}`,
    //     'get',
    //     {},
    //     { accept: 'application/json' }
    // )

    // const itemResponse = await doRequest('/v3/ca/items/2298', 'get')
    // const itemsResponse = await doRequest('/v3/ca/items', 'get')

    debugger
}