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

shipwire-api

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shipwire-api

Promise based NodeJS client library for the Shipwire API

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Shipwire API

Version npm

Promise Based Shipwire API Bindings.

Forked from sanderpick/shipwire-node. README format was adapted from MONEI/Shopify-api-node (very clean and helpful).

Installation:

$ npm install --save shipwire-api

API

This module exports a constructor function which takes an options object.

Shipwire(options)

Creates a new Shipwire instance.

Arguments
  • options - Required - A plain JavaScript object that contains the configuration options.
Options
  • username - Required - A string that specifies the login username.
  • password - Required - A string that specifies the login password.
  • host - Optional - A string that specifies the host to make requests to. Defaults to "api.beta.shipwire.com"
Return value

A Shipwire instance.

Exceptions

Throws an Error exception if the required options are missing.

Example
const Shipwire = require('shipwire-api');

const shipwire = new Shipwire({
  host: "api.shipwire.com",
  username: "<USERNAME>",
  password: "<PASSWORD>"
});

Resources

Every resource is accessed via your shipwire instance:

const shipwire = new Shipwire({
  host: "api.shipwire.com",
  username: "<USERNAME>",
  password: "<PASSWORD>"
});

// shipwire.<resouce_name>.<method_name>

Each method returns a Promise that resolves with the result:

shipwire.orders.get()
  .then(orders => console.log(orders))
  .catch(err => console.error(err));

Available resources and methods

  • orders
    • get()
    • create()
    • update()
    • cancel()
    • getHolds()
    • getItems()
    • getReturns()
    • getTrackings()
  • stock
    • get()
  • rate
    • get()
  • receivings
    • get()
    • create()
    • update()
    • cancel()
    • cancelLabels()
    • getHolds()
    • getInstructionsRecipients()
    • getItems()
    • getShipments()
    • getTrackings()
  • returns
    • get()
    • create()
    • cancel()
    • getHolds()
    • getItems()
    • getTrackings()
    • getLabels()
  • products
    • get()
    • create()
    • update()
    • retire()
  • webhooks
    • get()
    • create()
    • update()
    • delete()
  • secret
    • get()
    • create()
    • delete()

where params is a plain JavaScript object. See https://www.shipwire.com/w/developers/ for parameters details.

Shipwire Resources:

FAQs

Package last updated on 23 Oct 2017

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