Get Shipping Label

Name, email, and phone are necessary for a shipping label and optional if your account address has already shipped an item.
import { mkt } from './config'

const pdfLink = await mkt.ship({
  orderId: '<ORDER_ID>',
  mailingAddress: {
    name: "John Doe",
    phone: "+12024564545", // US or Canada phone number
    street1: "123 Main St",
    city: "Anytown",
    state: "CA",
    country: "USA",
    zip: "12345"
  },
  email: "[email protected]",
  weight: 10, // OZ
  size: "small-flat"
})

Add tracking code

Instead of generating shipping label automatically, a tracking code can be added directly
import { mkt } from './config'

await mkt.addTrackingCode({
  orderId: '<ORDER_ID>'
  trackingCode: '<TRACKING_CODE>'
  courier: 'USPS'
})