Miss any of our Open RFC calls?Watch the recordings here! »

vtex-api

1.12.1 • 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

11

Version

1.12.1

License

MIT

Unpacked Size

220 kB

Total Files

343

Last publish

Collaborators

  • avatar