shirtsio-fc

1.0.0 • Public • Published

Shirts.io Javascript Wrapper

Introduction

Shirts.io is a t-shirt printing and fulfillment platform that lets you print and ship shirts anywhere in the world on demand.

Create an Account

Creating an account is simple and quick! Create an account here.

After creating an account, you will be given a unique API key to grant you access to the Shirts.io API.

How it works

The Shirts.io API is broken up into four main components:

  • Products API
    • View our entire product selection
    • Access thousands of high-quality product images
    • View product specifications, available colors, available sizes
    • Check stock levels before placing an order
  • Quote API
    • Get an exact quote before placing an order
  • Order API
    • Place an order
    • Upload artwork and all order details
  • Status API
    • Check the current status of your order
    • Receive tracking numbers when available

You can learn more by reading the API Manual

Installation

Requirements

  • Node.js
  • npm (Node.js Package Manager)
### Dependency

npm install needle

clone source shirtsio.js

Usage

var api_key = 'abc'; // secret Shirts.io API key
var shirtsio = require('shirtsio.js')(api_key);
shirtsio.products.list_categories(
    function(err, response) {
        if (err) {
            console.log(err);
            return;
        }
        console.log(response);
        console.log(response.length);
    }
);

Detail see example.js

API Basics

Authentication

Our API uses an API key authentication system. When you create an account, you will be given a unique API key. Every call you make through the shirts.io API must include this key.

Errors

HTTP Status Code Summary
200 OK - Request successfully delivered.
400 Bad Request - Parameters invalid.
401 Unauthorized - API key was invalid or deactivated.
402 Request Failed - Request failed on server end.

Product Sizes

xxsml - 2XSmall
xsml - XSmall
sml - Small
med - Medium
lrg - Large
xlg - XLarge
xxl - 2XLarge
xxxl - 3XLarge
xxxxl - 4XLarge
xxxxxl - 5XLarge
xxxxxxl - 6XLarge

Please see https://www.shirts.io/docs/getting_started/ for the most up-to-date documentation.

API Specifics

All methods takes a callback as their last parameter. The callback is called with a Javascript Error (if any) and then the response.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Readme

Keywords

Package Sidebar

Install

npm i shirtsio-fc

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • felixcheruiyot