Teleport User Guide

A user guide to working with Teleport.

SDKs

If you would like to request an SDK in another language please get in contact with us.


Teleport

A Teleport represents a physical item being moved from point A to point B. When you create a Teleport, you will be charged $9 and a courier will be dispatched and pick-up your item from the pick-up address and the item will be taken to the delivery address.

Introduction

To start using the Teleport SDK, require and instantiate the Teleport class as shown below.

        
const Teleport = require('@ideea-inc/teleport-js')
const teleport = new Teleport('API_KEY')
        
      

To create a new API key go to the IAM page

Create

POST api/v1/teleports/create

To create a new Teleport use the create() method.

        
teleport.create({
    group_id: '55c30966-309d-4b0d-830c-7c162950c250',
    data: '',

    pickup_name: 'Anthony Budd',
    pickup_phone: '512-987-2093',
    pickup_address_line_1: '300 Bowie Street',
    pickup_address_line_2: '',
    pickup_zipcode: '78703',
    pickup_city: "Austin",

    delivery_name: 'John Smith',
    delivery_phone: '512-632-6375',
    delivery_address_line_1: '401 Brazos Street',
    delivery_address_line_2: '',
    delivery_zipcode: '78701',
}).then(function (teleport) {
    console.log(`New Teleport ID: ${teleport.id}`)
}) 
        
      

Caution, this is a billable route. You may be charged $9 for making requests to this endpoint.

Get

GET api/v1/teleports/{TELEPORT_ID}

To get a single Teleport by it's ID use the .get() method, this will return the Teleport object.

        
teleport.get('55c30966-309d-4b0d-830c-7c162950c250')
.then(function (teleport) {
    console.log(teleport)
}) 	
        
      

Get by Group ID

GET api/v1/teleports/group/{GROUP_ID}

Get all Teleports that have been created by the provided group_id

        
teleport.getByGroupID('a1c309a6-229d-4b0d-830c-7c162950c51f')
.then(function (teleports) {
    console.log(teleports)
}) 	
        
      

Get by Current User

GET api/v1/teleports

Get all Teleports that have been created by the current user.

        
teleport.getByCurrentUser()
.then(function (teleports) {
    console.log(teleports)
})