vtex-api
    TypeScript icon, indicating that this package has built-in type declarations

    1.14.3 • Public • Published

    VTEX API

    NPM Build Status Codecov Bundle Size David Known Vulnerabilities CodeFactor Total alerts MIT License

    An isomorphic and depency free collection of VTEX APIs methods


    Table of Contents

    Install

    # Yarn
    yarn add vtex-api
    
    # NPM
    npm install --save vtex-api

    Usage

    Imports

    You can import each method individually

    import searchDocument from 'vtex-api/lib/searchDocument';

    or use ES6 named import (tree shaking recommended)

    import { searchDocument } from 'vtex-api';

    Old Browsers support

    If you need coverage old browsers, you need use an fetch polyfill, like whatwg-fetch or unfetch.

    Node

    For NodeJS usage, you will need some Isomorphic Fetch lib, like isomorphic-fetch (and isomorphic-form-data if you will use uploadFile() method)

    For authentication, each method has keys for this purpose:

    const response = await searchDocument({
      ...
      auth: { appKey: '123', appToken: 'abc' }, // Your private keys (use it ONLY on backend)
      accountName: 'storename', // Account name (will build full URL request)
    })

    API

    Masterdata

    Name Description Docs
    searchDocument() Query a collection of documents 📝

    Product

    Helpers

    Contributing

    Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

    License

    This project is licensed under the MIT License - see the LICENSE.md file for details

    Keywords

    Install

    npm i vtex-api

    DownloadsWeekly Downloads

    8

    Version

    1.14.3

    License

    MIT

    Unpacked Size

    231 kB

    Total Files

    353

    Last publish

    Collaborators

    • zeindelf