Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

walmart_marketplace

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

walmart_marketplace

Walmart Marketplace CA Generated Connector

  • 1.0.11
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-62.5%
Maintainers
1
Weekly downloads
 
Created
Source

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
}

Keywords

FAQs

Package last updated on 16 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc