Code Monkey home page Code Monkey logo

shopify-api-library's Introduction

Shopify-api-library

alt text

A library of function's for interacting with Shopify. Based on the shopify-node-api package.

Installation

npm install shopify-api-library

Usage

const shopifyApi = require("shopify-api-library");
function auth - auth function for connecting to a Shopify store.

param {string} store - name of the store to authenticate to

param {string} apiKey - store API key

param {string} token - store access token

function createShopifyOrder - Create an order in Shopify.

POST

param {object} ordersObj - Object containing the order details to create in Shopify

function addOrderNote - Add a note to a Shopify order.

PUT

param {string} orderNote - The note to add to the order

param {*} orderId - ID of the order

function getCustomerByEmail - Retrieves a customer by their email

GET

param {string} email - email of the customer to search for

returns {Promise} returns a Promise of the macthed customers data

function createGiftCard - creates a gift card

POST

param {object} giftCardObj - object containg gift card details

returns {Promise} returns a Promise representing the gift card response data

function getCustomerOrders - Retrieves a list of orders made by a customer

GET

param {number} customerId - Id of the customer to search for orders

returns {object} data - returns customer orders data

function getSmartCollections - Retrieve a list of smart collections

GET

param {number} pageNo - The smart collection page number

returns {array} - returns a list of smart collections

function updateCollectionPositions - Updates the product positions of a collection

PUT param {array} productsArray - Array containing the variant ids in the position order required param {number} collectionId - ID of the collection returns {object} data - object contains the data of the updated collection

function getFulfilledShopifyOrder - Gets a fulfilled Shopify order

GET

param {number} orderId - The ID of the order to check its fulfillment

returns {object} - returns the fulfilled order object

function getCustomCollections - Gets an array of custom collections

GET

returns {array} - returns an array of objects containing collections data

function createCollection - creates a collection in Shopify

POST

param {object} collection - The data of the collection to be created in Shopify

returns {object} - returns an object of the created collection data

function getProductCount - Find the number of products in the store

GET

returns {Promise} Promise object represents the total number of products in the store

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.