• Docs
  • Guides
  • API Status
  • Support

Docs

API Endpoint

Base API URL: https://packagehub-api.visiblescm.com/v3.1/


Authentication

Description

Before sending your first packages using the PackageHub API, you will need to register for a free PackageHub account to receive an API token used for authentication.

Authentication and identification to the PackageHub API is done by providing a JWT token received in response of Account /Token with every request. Requests made without a proper JWT token will fail.

The PackageHub API provides two types of API Key: Test and Production. You can test all PackageHub API functionality using the Test token generated from your Test key in the Sandbox environment for free immediately after signing up. Test labels created in the Sandbox environment will not be billed to your account. If a label is mistakenly created in the Production environment, a cancel shipment request can be made to avoid accidental charges.


Account

POST /Account/Token

Description

Use this POST method to retrieve your account token, for use in the header as request authorization.

Request Parameters

param in Type Comments
apiKey* Body string 90a56104388c4b15b5773d
apiSecret* Body string iLNvrse+HOAjp3NM1cmJbOdfRi7X4fxxxxxxxxxxx
userName* Body string example@domain.com
password* Body string Password123
  • Request
  • Response
{
  "apiKey": "90a56104388c4b15b5773d",
  "apiSecret": "iLNvrse+HOAjp3NM1cmJbOdfRi7X4fxxxxxxxxxxx",
  "userName": "example@domain.com",
  "password": "Password123"
}
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6Ixxxxxxx.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJCMEE4QUFBOEI4NzhFODM3OTQ4MEFBIiwiQXBwSWQiOiJBRDg3OTM5MC0zNjI0LTQ0N0MtQjY1OS1DMjY0NzVDRUNGOEYiLCJqdGkiOiI1N2Q5NDAyYi02OWIzLTQyZjQtYWE0Ni1lNDhlMzcyMTZiNjQiLCJzaWQiOiJmNTcwZTkzYi04ZjI3LTQxYmQtYjg1YS1lYTQyYjA0Njk1YTYiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3JvbGUiOiJDb21wYW55QWRtaW4iLCJBY2NvdW50VHlwZSI6IjEiLCJWaXNpYmxlQWNjb3VudE51bWJlciI6IjA3ZGYxM2NiLTc3NjAtNGYzNi05MzdmLTlmNmViZGQ4MjVhZCIsIlRva2VuQWNjZXNzVHlwZSI6IjEiLCJJc1Rlc3QiOiJUcnVlIiwiU3ViUGxhbiI6IlBybyIsImV4cCI6MTU5OTc0MjkwMSwiaXNzIjoiaHR0cHM6Ly92aXNpYmxlLXNoaXBwaW5nLXFhLWFwaS5henVyZXdlYnNpdGVzLm5ldC8iLCJhdWQiOiJodHRwczovL3BvcnRhbC1xYS5wYWNrYWdlaHViLxxxxxxx.sc5kGisxEpZMSpuWAmEnCrH78RMue2ZCBqs7xxxxxxx"
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/Account/Token \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
  "apiKey": "90a56104388c4b15b5773d",
  "apiSecret": "iLNvrse+HOAjp3NM1cmJbOdfRi7X4fxxxxxxxxxxx",
  "userName": "example@domain.com",
  "password": "Password123"
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Account/Token",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    apiKey: "90a56104388c4b15b5773d",
    apiSecret: "iLNvrse+HOAjp3NM1cmJbOdfRi7X4fxxxxxxxxxxx",
    userName: "example@domain.com",
    password: "Password123",
  })
);
req.end();

GET /Account/Postage/Balance

Description

To access information about your account and payment information, use this GET method. The response returns additional account settings such as AutoBuy settings, rate set, and account balance.

Note

Request object is empty because all required input parameters are provided in the authorization token in Header.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
{
  "level": "Customer",
  "status": "Active",
  "name": "PackageHub Customer",
  "isAutoBuy": true,
  "autoBuyAmount": 100,
  "autoBuyThreshold": 50,
  "balance": 100,
  "currency": "USD",
  "creditCardPaymentAccountResponse": {
    "cardHolderName": "John Ships",
    "lastFour": "1111",
    "expirationMonth": "08",
    "expirationYear": "2026",
    "active": true,
    "default": true
  },
  "achPaymentAccountResponse": {
    "accountHolderName": "John Ships",
    "routingNumber": "123456789",
    "lastFour": "6789",
    "active": true,
    "default": false
  },
  "firstName": "John",
  "lastName": "Ships",
  "emailAddress": "example@domain.com",
  "subscriptionPlan": "Pro",
  "subscriptionPlanChangeDate": "2020-10-21T08:43:14.137",
  "createdDate": "2019-10-21T08:43:14.631"
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Account/Postage/Balance \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Account/Postage/Balance",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

PUT /Account/Postage/Balance

Description

Use this PUT method to add funds to your shipping account. When this method is called, funds will be added to the account, using the payment method on file.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
transactionId* Header string 123456789
balance* Body number 100
  • Request
  • Response
{
  "balance": 100
}
{
  "parentAccountId": "674a65db-4318-430f-980c-0f408409b91c",
  "level": "Customer",
  "status": "Active",
  "name": "PackageHub Customer",
  "isAutoBuy": true,
  "autoBuyAmount": 100,
  "autoBuyThreshold": 50,
  "balance": 100,
  "currency": "USD",
  "users": [
    {
      "role": "AccountAdmin",
      "isEmailVerified": true,
      "firstName": "John",
      "lastName": "Ships",
      "userName": "f1f29503-639e-4c13-a40b-111110142f07",
      "email": "example@domain.com",
      "lastLoginDate": "2021-10-20T10:08:36.099Z",
      "passwordChangeDate": "2021-09-01TT00:00:00",
      "isActivated": true,
      "passwordChangeDueDate": "2022-01-01T00:00:00",
      "id": "31371645-256f-43dc-b295-e58dc1e80789",
      "createdDate": "2019-12-20T10:08:36.099Z"
    }
  ],
  "visibleAccountNumber": "8fedd4f3-f5d8-4a9d-b0c8-81bab9123456",
  "subscriptionPlan": "Pro",
  "subscriptionPlanChangeDate": "2020-08-07T17:01:43.137",
  "id": "4f9b2a7f-3b3e-4ad5-a76b-33c9c123456",
  "createdDate": "2019-12-20T10:08:36.099Z"
}

Code Samples

  • cURL
  • Node.js
curl -X PUT \
  https://packagehub-api.visiblescm.com/v3.1/Account/Postage/Balance \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'TransactionId: 721' \
  -H 'cache-control: no-cache' \
  -d '{
  "balance": 100
}'
var http = require("https");

var options = {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    TransactionId: "721",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Account/Postage/Balance",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(JSON.stringify({ balance: 100 }));
req.end();

PUT /Account/Postage/AutoBuy

Description

For accounts using a credit card to prepay for postage, use this PUT method to turn AutoBuy functionality on and off and to set recharge limits.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
isAutoBuy* Body boolean [ true, false ]
autoBuyAmount* Body number 100
autoBuyThreshold* Body number 50
  • Request
  • Response
{
  "isAutoBuy": true,
  "autoBuyAmount": 100,
  "autoBuyThreshold": 50
}
{
  "parentAccountId": "674a65db-4318-430f-980c-0f408409b91c",
  "level": "Customer",
  "status": "Active",
  "name": "PackageHub Customer",
  "isAutoBuy": true,
  "autoBuyAmount": 100,
  "autoBuyThreshold": 50,
  "balance": 100,
  "currency": "USD",
  "users": [
    {
      "role": "AccountAdmin",
      "isEmailVerified": true,
      "firstName": "John",
      "lastName": "Ships",
      "userName": "f1f29503-639e-4c13-a40b-111110142f07",
      "email": "example@domain.com",
      "lastLoginDate": "2021-10-20T10:08:36.099Z",
      "passwordChangeDate": "2021-09-01TT00:00:00",
      "isActivated": true,
      "passwordChangeDueDate": "2022-01-01T00:00:00",
      "id": "31371645-256f-43dc-b295-e58dc1e80789",
      "createdDate": "2019-12-20T10:08:36.099Z"
    }
  ],
  "visibleAccountNumber": "8fedd4f3-f5d8-4a9d-b0c8-81bab9123456",
  "subscriptionPlan": "Pro",
  "subscriptionPlanChangeDate": "2020-08-07T17:01:43.137",
  "id": "4f9b2a7f-3b3e-4ad5-a76b-33c9c123456",
  "createdDate": "2019-12-20T10:08:36.099Z"
}

Code Samples

  • cURL
  • Node.js
curl -X PUT \
  https://packagehub-api.visiblescm.com/v3.1/Account/Postage/AutoBuy \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
  "isAutoBuy": true,
  "autoBuyAmount": 100,
  "autoBuyThreshold": 50
}'
var http = require("https");

var options = {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Account/Postage/AutoBuy",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    isAutoBuy: true,
    autoBuyAmount: 100,
    autoBuyThreshold: 50,
  })
);
req.end();

GET /Account/Postage/BalanceHistory

Description

Use this GET method to retrieve the account balance history. The response will return each payment event and adjustment. Use the available parameters to filter your search.

Note

Request object is empty because all required input parameters are provided in the Query Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
pageToken Query Param string NULL for first request, for further pages use pageToken as returned in response of current request
startDate Query Param Date(mm-dd-yyyy) 2019-10-18T07:28:56.864Z
endDate Query Param Date(mm-dd-yyyy) 2019-10-18T07:28:56.864Z
  • Request
  • Response
{}
{
  "results": [
    {
      "originalAmount": -16.02,
      "accountId": "4f9b2a7f-3b3e-4ad5-a76b-33c9cbd5b2ea",
      "transactionId": "5bf2f241-5f77-411b-9d70-6c03df123456",
      "eventType": "OnLabelGenerate",
      "transactionType": "Debit",
      "transactionDate": "2020-05-29T10:44:33.632Z",
      "amount": 16.02,
      "balance": 23.221,
      "currency": "USD",
      "comments": "Charge Label",
      "PaymentTypeId": "PHv2",
      "id": "987654",
      "createdDate": "2020-05-29T10:44:33.632Z"
    }
  ],
  "nextPage": "eyJDdXJyZW50IjowLCJOZXh0IjoxfQ==",
  "previousPage": "eyJDdXJyZW50IjowLCJOZXh0Ijo12345",
  "pageSize": 20,
  "totalResults": 11,
  "totalPages": 2
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Account/Postage/BalanceHistory?startDate=2019-09-01T18:29:59.999Z,2019-09-23T18%3A30%3A00.000Z&endDate=2019-09-25T18:29:59.999Z&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9 \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Account/Postage/BalanceHistory?startDate=2019-09-01T18:29:59.999Z,2019-09-23T18%3A30%3A00.000Z&endDate=2019-09-25T18:29:59.999Z&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();


User

POST /User/SignUp/Customer

Description

Use this POST method to register as a customer.

Request Parameters

param in Type Comments
email* Body string user@example.com
password* Body string Password123
companyName* Body string ABC Company
firstName* Body string John
lastName* Body string Ships
signupKey Body string 674a65db-4318-430f-980c-0f408409b91c
  • Request
  • Response
{
  "email": "user@example.com",
  "password": "Password123",
  "companyName": "ABC Company",
  "firstName": "John",
  "lastName": "Ships",
  "signupKey": "674a65db-4318-430f-980c-0f408409b91c"
}
{
  "user": {
    "account": {
      "parentAccount": {
        "level": "Partner",
        "status": "Active",
        "logo": "https://visibleshippingqastorage.blob.core.windows.net/user-dev-container/674a65db-4318-430f-980c-0f408409b91c/Logo9/7/2020%204:38:48%20AM.jpg",
        "name": "TESTINGINTEGRATOR",
        "isAutoBuy": false,
        "autoBuyAmount": 0,
        "autoBuyThreshold": 0,
        "balance": 0,
        "currency": "USD",
        "visibleAccountNumber": "2F436775-5288-4D20-AE8F-957BB94BC345",
        "subscriptionPlan": "Basic",
        "subscriptionPlanChangeDate": "2020-08-26T06:00:07.203",
        "id": "674a65db-4318-430f-980c-0f408409b91c",
        "createdDate": "2020-08-26T06:00:07.25"
      },
      "parentAccountId": "674a65db-4318-430f-980c-0f408409b91c",
      "level": "Customer",
      "status": "TnCPending",
      "name": "ABCjjj Company",
      "isAutoBuy": false,
      "autoBuyAmount": 0,
      "autoBuyThreshold": 0,
      "balance": 0,
      "currency": "USD",
      "users": [],
      "visibleAccountNumber": "97e5c789-0d54-41dd-a8a2-e5d3b83cb732",
      "subscriptionPlan": "Basic",
      "subscriptionPlanChangeDate": "2021-10-28T05:02:51.7134076Z",
      "id": "2e1345a7-a159-4b0b-aa28-d554cb626f71",
      "createdDate": "2021-10-28T05:02:53.1984492Z"
    },
    "role": "AccountAdmin",
    "isEmailVerified": false,
    "firstName": "John",
    "lastName": "Ships",
    "userName": "0e66a7fd-5fca-4720-a884-d460e310e5d2",
    "email": "user@example.com",
    "lastLoginDate": "2021-10-28T05:02:51.7233709Z",
    "passwordChangeDate": "2021-10-28T05:02:51.7233722Z",
    "isActivated": true,
    "passwordChangeDueDate": "2021-11-27T00:00:00Z",
    "id": "83ae244d-af72-4aa2-94f7-b74f4db5340b",
    "createdDate": "2021-10-28T05:02:53.1984492Z"
  },
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBcHBJZCI6IiIsImp0aSI6IjgzYWUyNDRkLWFmNzItNGFhMi05NGY3LWI3NGY0ZGI1MzQwYiIsInNpZCI6IjJlMTM0NWE3LWExNTktNGIwYi1hYTI4LWQ1NTRjYjYyNmY3MSIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcm9sZSI6IjAiLCJUb2tlbkFjY2Vzc1R5cGUiOiIwIiwiSXNUZXN0IjoiRmFsc2UiLCJTdWJQbGFuIjoiMCIsImV4cCI6MTY0NDAzNzM3MywiaXNzIjoiaHR0cHM6Ly92aXNpYmxlLXNoaXBwaW5nLXFhLWFwaS5henVyZXdlYnNpdGVzLm5ldC8iLCJhdWQiOiJodHRwczovL3BvcnRhbC1xYS5wYWNrYWdlaHViLmNvbSJ9.xHmXCaehjjxeEoYmd43KtsxpYRGvDYtjmGgu38q6Vk4",
  "refreshToken": "GUiOZLsVY9pmw2eHHF+klz41lC2mAPnVPzqsAkjGCDM=",
  "apiKey": "2F436775-5288-4D20-AE8F-957BB94BC345",
  "account": {
    "parentAccount": {
      "level": "Partner",
      "status": "Active",
      "logo": "https://visibleshippingqastorage.blob.core.windows.net/user-dev-container/674a65db-4318-430f-980c-0f408409b91c/Logo9/7/2020%204:38:48%20AM.jpg",
      "name": "TESTINGINTEGRATOR",
      "isAutoBuy": false,
      "autoBuyAmount": 0,
      "autoBuyThreshold": 0,
      "balance": 0,
      "currency": "USD",
      "visibleAccountNumber": "2F436775-5288-4D20-AE8F-957BB94BC345",
      "subscriptionPlan": "Basic",
      "subscriptionPlanChangeDate": "2020-08-26T06:00:07.203",
      "id": "674a65db-4318-430f-980c-0f408409b91c",
      "createdDate": "2020-08-26T06:00:07.25"
    },
    "parentAccountId": "674a65db-4318-430f-980c-0f408409b91c",
    "level": "Customer",
    "status": "TnCPending",
    "name": "ABCjjj Company",
    "isAutoBuy": false,
    "autoBuyAmount": 0,
    "autoBuyThreshold": 0,
    "balance": 0,
    "currency": "USD",
    "users": [
      {
        "role": "AccountAdmin",
        "isEmailVerified": false,
        "firstName": "John",
        "lastName": "Ships",
        "userName": "0e66a7fd-5fca-4720-a884-d460e310e5d2",
        "email": "user@example.com",
        "lastLoginDate": "2021-10-28T05:02:51.7233709Z",
        "passwordChangeDate": "2021-10-28T05:02:51.7233722Z",
        "isActivated": true,
        "passwordChangeDueDate": "2021-11-27T00:00:00Z",
        "id": "83ae244d-af72-4aa2-94f7-b74f4db5340b",
        "createdDate": "2021-10-28T05:02:53.1984492Z"
      }
    ],
    "visibleAccountNumber": "97e5c789-0d54-41dd-a8a2-e5d3b83cb732",
    "subscriptionPlan": "Basic",
    "subscriptionPlanChangeDate": "2021-10-28T05:02:51.7134076Z",
    "id": "2e1345a7-a159-4b0b-aa28-d554cb626f71",
    "createdDate": "2021-10-28T05:02:53.1984492Z"
  },
  "apps": [
    {
      "id": "fc72dcc7-56ac-4cef-90fc-caaaadbfa00b",
      "accountId": "2e1345a7-a159-4b0b-aa28-d554cb626f71",
      "appId": "236bee22-d666-40fd-b2d1-f1dd9d6ac236",
      "partnerAccountId": "2e1345a7-a159-4b0b-aa28-d554cb626f71",
      "partnerName": "ABCjjj Company",
      "appName": "Default App",
      "appDescription": "The Default app is added on Signup",
      "apiVersion": "v3",
      "helpUrl": "https://docs-qa.packagehub.com/userguide/",
      "dateCreated": "2021-10-28T05:02:51.7234997Z",
      "apiKey": "216deb79a019459098b1a9",
      "apiSecret": "aJESq4XvzWSDmyyzBrZBDlib4/APQXa28HAVeaQJS4o=",
      "testApiKey": "7eb30b44e706458b83d772",
      "testApiSecret": "SNHyn6Mz8s/GGcck8+MYXHbXKkTOWqxf9Hxoz7zz/fE=",
      "status": "Enabled"
    }
  ],
  "status": "TnCPending"
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/User/SignUp/Customer \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
  -d '{
  "email": "user@example.com",
  "password": "Password123",
  "companyName": "ABC Company",
  "firstName": "John",
  "lastName": "Ships",
  "signupKey": "674a65db-4318-430f-980c-0f408409b91c"
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/User/SignUp/Customer",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    email: "user@example.com",
    password: "Password123",
    companyName: "ABC Company",
    firstName: "John",
    lastName: "Ships",
    signupKey: "674a65db-4318-430f-980c-0f408409b91c",
  })
);
req.end();

POST /User/ApproveTermsAndConditions

Description

Use this POST method to approve terms and conditions for the newly created account.

Request Parameters

param in Type Comments
accountId* Body string 674a65db-4318-430f-980c-0f408409b91c
  • Request
  • Response
{
  "accountId": "674a65db-4318-430f-980c-0f408409b91c"
}
{
  "accountId": "674a65db-4318-430f-980c-0f408409b91c",
  "result": "Activated"
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/User/ApproveTermsAndConditions \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
  "accountId": "674a65db-4318-430f-980c-0f408409b91c"
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/User/TermsAndConditions",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({ accountId: "674a65db-4318-430f-980c-0f408409b91c" })
);
req.end();

Address

Address

Description

Address objects contain all necessary information for the generation of address required a shipments.

Parameters

param in Type Comments
name Body string John Ships
company Body string Maersk
street1 Body string 5160 W WILEY POST WAY
street2 Body string
street3 Body string
city Body string SALT LAKE CITY
state Body string UT
zip Body string 84116-2833
country Body string US
phone Body string 8888888888
email Body string support@packagehub.com
save Body boolean true
verify Body boolean true
source Body string Shipment
verificationStatus Body string true
isResidential Body boolean false
referenceType Body [TaxCode, VATNumber, ImportExportCode] TaxCode
referenceValue Body string 123456
  • Object
{
  "name": "John Ships",
  "company": "Maersk",
  "street1": "5160 W WILEY POST WAY",
  "street2": "",
  "street3": "",
  "city": "SALT LAKE CTY",
  "state": "UT",
  "zip": "84116-2833",
  "country": "US",
  "phone": "8888888888",
  "email": "support@packagehub.com",
  "save": true,
  "verify": true,
  "source": "Shipment",
  "verificationStatus": "Success",
  "isResidential": false,
  "referenceType": "TaxCode",
  "referenceValue": "H123"
}

GET /Address/:id

Description

Use this GET method to find an existing address.

Note

Request object is empty because all required input parameters are provided in the Route Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
id* Route Param string aa5b3c5f-ebe1-468f-a099-92792ea042e7
  • Request
  • Response
{}
{
  "errors": [],
  "name": "John Ships",
  "company": "Maersk",
  "street1": "5160 W WILEY POST WAY",
  "street2": "",
  "street3": "",
  "city": "SALT LAKE CTY",
  "state": "UT",
  "zip": "84116-2833",
  "country": "US",
  "phone": "8888888888",
  "email": "support@packagehub.com",
  "save": true,
  "verify": true,
  "source": "Shipment",
  "verificationStatus": "Success",
  "isResidential": false,
  "referenceType": "TaxCode",
  "referenceValue": "H123",
  "id": "0bc5b3b5-7828-4994-8928-a38e9ce388aa",
  "createdDate": "2020-04-02T15:57:44.3116569"
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Address/aa5b3c5f-ebe1-468f-a099-92792ea042e7 \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Address/aa5b3c5f-ebe1-468f-a099-92792ea042e7",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

POST /Address

Description

Use this POST method to create an address. The id generated in address response can be used in ShipmentRate, Shipment and Manifest request address object.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
address* Body <Address>
  • Request
  • Response
{
  "name": "John Ships",
  "company": "Maersk",
  "street1": "5160 W WILEY POST WAY",
  "street2": "",
  "street3": "",
  "city": "SALT LAKE CTY",
  "state": "UT",
  "zip": "84116-2833",
  "country": "US",
  "phone": "8888888888",
  "email": "support@packagehub.com",
  "save": true,
  "verify": true,
  "source": "Shipment",
  "verificationStatus": "Success",
  "isResidential": false,
  "referenceType": "TaxCode",
  "referenceValue": "H123"
}
{
  "errors": [],
  "name": "John Ships",
  "company": "Maersk",
  "street1": "5160 W WILEY POST WAY",
  "street2": "",
  "street3": "",
  "city": "SALT LAKE CTY",
  "state": "UT",
  "zip": "84116-2833",
  "country": "US",
  "phone": "8888888888",
  "email": "support@packagehub.com",
  "save": true,
  "verify": true,
  "source": "Shipment",
  "verificationStatus": "Success",
  "isResidential": false,
  "referenceType": "TaxCode",
  "referenceValue": "H123",
  "id": "91234b72-78ed-4a94-8448-0fef1b761455",
  "createdDate": "2021-10-28T08:16:32.8064353Z"
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/Address \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
  -d '{
    "name": "John Ships",
    "company": "Maersk",
    "street1": "5160 W WILEY POST WAY",
    "street2": "",
    "street3": "",
    "city": "SALT LAKE CTY",
    "state": "UT",
    "zip": "84116-2833",
    "country": "US",
    "phone": "8888888888",
    "email": "support@packagehub.com",
    "save": true,
    "verify": true,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "referenceType": "TaxCode",
    "referenceValue": "H123"
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Address/",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);
req.write(
  JSON.stringify({
    name: "John Ships",
    company: "Maersk",
    street1: "5160 W WILEY POST WAY",
    street2: "",
    street3: "",
    city: "SALT LAKE CTY",
    state: "UT",
    zip: "84116-2833",
    country: "US",
    phone: "8888888888",
    email: "support@packagehub.com",
    save: true,
    verify: true,
    source: "Shipment",
    verificationStatus: "Success",
    isResidential: false,
    referenceType: "TaxCode",
    referenceValue: "H123",
  })
);

req.end();

POST /Address/:id/Validate

Description

Use this POST method to validate an existing address.

Note

Request object is empty because all required input parameters are provided in the Route Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
id* Route Param string aa5b3c5f-ebe1-468f-a099-92792ea042e7
  • Request
  • Response
{}
{
  "errors": [],
  "name": "John Ships",
  "company": "Maersk",
  "street1": "5160 W WILEY POST WAY",
  "street2": "",
  "street3": "",
  "city": "SALT LAKE CTY",
  "state": "UT",
  "zip": "84116-2833",
  "country": "US",
  "phone": "8888888888",
  "email": "support@packagehub.com",
  "save": true,
  "verify": true,
  "source": "Shipment",
  "verificationStatus": "Success",
  "isResidential": false,
  "referenceType": "TaxCode",
  "referenceValue": "H123",
  "id": "91234b72-78ed-4a94-8448-0fef1b761455",
  "createdDate": "2021-10-28T08:16:32.8064353"
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Address/91234b72-78ed-4a94-8448-0fef1b761455/Validate \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Address/91234b72-78ed-4a94-8448-0fef1b761455/Validate",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

Carrier

GET /Carrier

Description

Use this GET method to retrieve a list of available carriers that can be configured on the account.

Note

Request object is empty because all required input parameters are provided in the authorization token in Header.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
[
  {
    "id": "1967EA12-FF21-4EFF-BA32-047C36123456",
    "code": "USPS-ePostage",
    "name": "USPS ePostage",
    "description": "Postal solution for small and mid-sized shippers who drop off packages at retail, receive daily collection or schedule a package pickup, powered by Maersk.",
    "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    "createdDate": "2020-04-04T18:14:11.65"
  }
]

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Carrier \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Carrier",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

CarrierAccount

GET /CarrierAccount

Description

Use this GET method to retrieve a list of available carriers configured on the account.

Note

Request object is empty because all required input parameters are provided in the authorization token in Headers.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
[
  {
    "id": "0fe85d6e-6aca-4dc6-930e-de970965f585",
    "carrierCode": "USPS-eVS",
    "name": "USPS eVS",
    "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
    "configuration": {},
    "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    "status": "Enabled",
    "createdDate": "2020-06-01T10:06:18.4132765",
    "modifiedDate": "2020-06-01T10:06:18.4132765"
  }
]

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

POST /CarrierAccount

Description

Use this POST method to configure a new carrier against the account.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
Name* Body string USPS
carrierCode* Body string USPS-eVS
configuration* Body Object {}
Description Body string Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.
logo Body string https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg
Status Body [Enabled, Disabled] Enabled
  • Request
  • Response
{
  "name": "USPS",
  "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
  "carrierCode": "USPS-eVS",
  "configuration": {
    "shipFromAddressId": "5a3d6676-6568-49a8-ab7f-b7e8b7dabc80"
  },
  "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
  "status": "Enabled"
}
{
  "id": "b8cffe1f-2769-4607-a0a6-1b5200f185e1",
  "carrierCode": "USPS-eVS",
  "name": "USPS",
  "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
  "configuration": {
    "ShipFromAddressId": "5a3d6676-6568-49a8-ab7f-b7e8b7dabc80"
  },
  "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
  "status": "Enabled",
  "createdDate": "2021-10-28T08:53:23.3140162Z",
  "modifiedDate": "2021-10-28T08:53:23.3140162Z"
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
    "name": "USPS",
    "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
    "carrierCode": "USPS-eVS",
    "configuration": {
      "shipFromAddressId": "5a3d6676-6568-49a8-ab7f-b7e8b7dabc80"
    },
    "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    "status": "Enabled"
  }'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "cache-control": "no-cache",
    Authorization: "Bearer <TOKEN>",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    name: "USPS",
    description:
      "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
    carrierCode: "USPS-eVS",
    configuration: {
      "shipFromAddressId": "5a3d6676-6568-49a8-ab7f-b7e8b7dabc80"
    },
    logo: "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    status: "Enabled",
  })
);

req.end();

PUT /CarrierAccount

Description

Use this PUT method to update an already configured carrier account.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
Name* Body string USPS
carrierCode* Body string USPS-eVS
configuration* Body Object {}
Description Body string Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.
logo Body string https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg
Status Body [Enabled, Disabled] Enabled
  • Request
  • Response
{
  "name": "USPS",
  "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
  "carrierCode": "USPS-eVS",
  "configuration": {},
  "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
  "status": "Enabled"
}
{
  "id": "b8cffe1f-2769-4607-a0a6-1b5200f185e1",
  "carrierCode": "USPS-eVS",
  "name": "USPS",
  "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
  "configuration": {},
  "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
  "status": "Enabled",
  "createdDate": "2021-10-28T08:53:23.3140162Z",
  "modifiedDate": "2021-10-28T08:53:23.3140162Z"
}

Code Samples

  • cURL
  • Node.js
curl -X PUT \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "name": "USPS",
    "description": "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
    "carrierCode": "USPS-eVS",
    "configuration": {},
    "logo": "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    "status": "Enabled"
  }'
var http = require("https");

var options = {
  method: "PUT",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    name: "USPS",
    description:
      "Postal solution for large shippers that require a scheduled carrier pickup, powered by Maersk.",
    carrierCode: "USPS-eVS",
    configuration: {},
    logo: "https://visibleshippingqastorage.blob.core.windows.net/public-dev-container/logo/USPS.svg",
    status: "Enabled",
  })
);

req.end();

DELETE /CarrierAccount/:carrierAccountId

Description

Use this DELETE method to remove the configured carrier account.

Note

Request object is empty because all required input parameters are provided in the Route Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
carrierAccountId* Route Param string b8cffe1f-2769-4607-a0a6-1b5200f185e1
  • Request
  • Response
{}
true

Code Samples

  • cURL
  • Node.js
curl -X DELETE \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/b8cffe1f-2769-4607-a0a6-1b5200f185e1
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "DELETE",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/b8cffe1f-2769-4607-a0a6-1b5200f185e1",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

GET /CarrierAccount/Service

Description

This GET method will provide a list of all available services for each carrier that are configured on the account.

Note

Request object is empty because all required input parameters are provided in the authorization token in Header.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
{
  "USPS-eVS": [
    {
      "code": "PriorityMail",
      "name": "Priority Mail",
      "id": "BDBE3FA8-2D98-439B-B021-C70575FC44E3",
      "createdDate": "2019-03-18T10:40:24.4433333"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/Service \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/Service",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

GET /CarrierAccount/SpecialService

Description

Use this GET method to retrieve all the special services offered by the carrier that are configured on the account.

Note

Request object is empty because all required input parameters are provided in the authorization token in Header.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
{
  "USPS-eVS": [
    {
      "code": "Insurance",
      "name": "Insurance",
      "id": "0904F324-E35E-47F6-B653-52EA81370B2D",
      "createdDate": "2019-05-18T11:46:26.2333333"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/SpecialService \
  -H 'Authorization: Bearer <TOKEN>'  \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/SpecialService",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

GET /CarrierAccount/PackageType

Description

Use this GET method to retrieve all the available package types for the carrier that are configured on the account.

Note

Request object is empty because all required input parameters are provided in the authorization token in Header.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
  • Request
  • Response
{}
{
  "USPS-eVS": [
    {
      "code": "SmallFlatRateBox",
      "name": "Small Flat Rate Box",
      "length": 5.375,
      "width": 8.625,
      "height": 1.625,
      "id": "5678D19F-EC07-4620-9EE1-D10565D0E793",
      "createdDate": "2019-04-22T15:17:42.6333333"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/PackageType \
  -H 'Authorization: Bearer <TOKEN>'  \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    Authorization: "Bearer <TOKEN>",
    "Content-Type": "application/json",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/CarrierAccount/PackageType",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

ShipmentRate

ShipmentRate is used to create the shipping rates with the provided shipment information. If no carrier or services are included in the request, rates for all carriers and services configured on the PackageHub shipping account will be included in the response.

POST /ShipmentRate

Description

Use this POST method to get shipping rates for the provided shipment information. If no carrier(s) or service type(s) are provided, rates for all carriers and/or service types configured for the PackageHub shipping account will be retrieved. It only returns error when not even a single rate is returned in rate[]. If any specific rate is not returned in rateshop then please rate with specific CarrierAccountId, Service and PackageType to find out error details.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
fromAddress* Body <Address> either address id or complete address detail can be passed in fromAddress object
toAddress* Body <Address> either address id or complete address detail can be passed in toAddress object
packages* Body <Package>
service Body string [ PriorityMail, PriorityMailExpress, ParcelSelect, PriorityMailExpressIntl, PriorityMailIntl, GlobalExpressGuaranteed, FirstClassIntl, LibraryMail, MediaMail, BoundPrintedMatter, FirstClass, Ecommerce, Express12:00DOC, Express12:00, Express9:00DOC, Express9:00, ExpressWorldwide, GlobalMailBusiness, SecondDayAir, SecondDayAirAM, ThreeDaySelect, Ground, NextDayAir, NextDayAirSaver, StandardToCanada, StandardToMexico, WorldWideExpedited, WorldWideExpress, WorldWideExpressPlus, WorldWideSaver ]
carrierAccountId Body string 000f4008-190b-419e-bd51-1048c3135a56
specialService Body string [ RestrictedDelivery, SundayDelivery, HolidayDelivery, CrematedRemains, LiveAnimals, HAZMAT, COD, RegisteredMail, Insurance, CertifiedMail, ElectronicReturnReceipt, AdultSignature, Tracking, SignatureConfirmation, Delivery1030AM ]
customsInfo Body <CustomsInfo>
specialServiceParam Body <SpecialService>
  • Request
  • Response
{
  "fromAddress": {
    "id": "0bc5b3b5-7828-4994-8928-a38e9ce388aa"
  },
  "toAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
  "packages": [
    {
      "packageType": "Parcel",
      "isRectangle": true,
      "length": 35,
      "width": 10,
      "height": 10,
      "dimensionUnit": "in",
      "weight": 5,
      "weightUnit": "lb"
    }
  ],
  "carrierAccountId": "000f4008-190b-419e-bd51-1048c3135a56",
  "specialService": ["SundayDelivery"],
  "customsInfo": {
    "customsItem": [
      {
        "weightUnit": "oz",
        "description": "Custom Description is Here",
        "quantity": 1,
        "weight": 5,
        "value": 2.2,
        "hsTariffNumber": "123456",
        "originCountry": "US"
      }
    ],
    "contentType": "DOCUMENTS",
    "nonDeliveryOption": "RETURN"
  }
}
{
  "rates": [
    {
      "carrierAccountName": "USPS",
      "carrierCode": "USPS-eVS",
      "carrierAccountId": "000f4008-190b-419e-bd51-1048c3135a56",
      "finalService": "PriorityMailExpress",
      "totalFee": 104.5000,
      "fees": [
        {
          "packageNumber": 1,
          "type": "Base",
          "fee": 62.0000,
          "ratingType": "DimensionalWeightAndZone"
        },
        {
          "packageNumber": 1,
          "type": "SundayDelivery",
          "fee": 12.50
        },
        {
          "packageNumber": 1,
          "type": "NonStandardCubicFeet",
          "fee": 15.0
        },
        {
          "packageNumber": 1,
          "type": "NonStandardDimension",
          "fee": 15.0
        }
      ],
      "currency": "USD",
      "deliveryDays": 1,
      "deliveryDate": "2022-03-23T00:00:00Z",
      "deliveryDateGuaranteed": false,
      "zone": "1",
      "createdDate": "0001-01-01T00:00:00"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/ShipmentRate \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 2428' \
  -H 'Content-Type: application/json' \
  -H 'Host: packagehub-api.visiblescm.com' \
  -H 'User-Agent: Mozilla/5.0' \
  -H 'cache-control: no-cache' \
  -d '{
  "fromAddress": {
    "id": "0bc5b3b5-7828-4994-8928-a38e9ce388aa"
  },
  "toAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
  "packages": [
    {
      "packageType": "Parcel",
      "isRectangle": true,
      "length": 5,
      "width": 3,
      "height": 2,
      "dimensionUnit": "cm",
      "weight": 5,
      "weightUnit": "lb"
    }
  ],
  "carrierAccountId": "000f4008-190b-419e-bd51-1048c3135a56",
  "specialService": ["RestrictedDelivery"],
  "customsInfo": {
    "customsItem": [
      {
        "weightUnit": "oz",
        "description": "Custom Description is Here",
        "quantity": 1,
        "weight": 5,
        "value": 2.2,
        "hsTariffNumber": "123456",
        "originCountry": "US"
      }
    ],
    "contentType": "DOCUMENTS",
    "nonDeliveryOption": "RETURN"
  }
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "User-Agent": "Mozilla/5.0",
    Accept: "*/*",
    "Cache-Control": "no-cache",
    Host: "packagehub-api.visiblescm.com",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "2428",
    Connection: "keep-alive",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/ShipmentRate",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    fromAddress: {
      id: "0bc5b3b5-7828-4994-8928-a38e9ce388aa",
    },
    toAddress: {
      name: "Jane Ships",
      company: "Maersk",
      street1: "5160 Wiley Post Way",
      street2: "",
      city: "Salt Lake City",
      state: "UT",
      zip: "84116",
      country: "US",
      phone: "4151234567",
      verify: false,
    },
    packages: [
      {
        packageType: "Parcel",
        isRectangle: true,
        length: 5,
        width: 3,
        height: 2,
        dimensionUnit: "cm",
        weight: 5,
        weightUnit: "lb",
      },
    ],
    carrierAccountId: "000f4008-190b-419e-bd51-1048c3135a56",
    specialService: ["RestrictedDelivery"],
    customsInfo: {
      customsItem: [
        {
          weightUnit: "oz",
          description: "Custom Description is Here",
          quantity: 1,
          weight: 5,
          value: 2.2,
          hsTariffNumber: "123456",
          originCountry: "US",
        },
      ],
      contentType: "DOCUMENTS",
      nonDeliveryOption: "RETURN",
    },
  })
);
req.end();

Shipment

The shipment is central to the PackageHub API. A shipment consists of a to and from address, at least a single package, a carrier, and service type. This information is used to generate a shipping label.

GET /Shipment

Description

Use this GET method to retrieve an individual shipment or a list of shipments that have been created. Use parameters to filter values to find the shipment(s) you need to view.

Note

Request object is empty because all required input parameters are provided in the Query Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
key Query Param string Id, ShipmentId, TransactionId, TrackingNumber
value Query Param string e77e7eb7-6062-4e6d-b1ab-fafb58a611cd
packageNumber Query Param number 1
pageToken Query Param string NULL for first request, for further pages use pageToken as returned in response of current request
startDate Query Param Date(yyyy-mm-dd) 2019-10-18
endDate Query Param Date(yyyy-mm-dd) 2019-10-18
  • Request
  • Response
{}
{
  "id": "e77e7eb7-6062-4e6d-b1ab-fafb58a611cd",
  "accountId": "4f9b2a7f-3b3e-4ad5-a76b-33c9cbd5b2ea",
  "appId": "ecca4f2c-e00e-4465-b768-ae74748454a8",
  "fromAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "1f4d7fd9-59ea-41fb-a8f5-7b792abae05e"
  },
  "toAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "ecef95ac-56f6-4971-9a6e-701fc88261db"
  },
  "packages": [
    {
      "id": "1a715e0c-f75f-4073-b431-9b1eebf83e61",
      "packageNumber": 1,
      "packageType": "Parcel",
      "isRectangle": true,
      "length": 12.0,
      "width": 12.0,
      "height": 12.0,
      "dimensionUnit": "in",
      "weight": 1.0,
      "weightUnit": "lb",
      "finalPackageType": "Parcel",
      "finalWeightUnit": "lb",
      "finalDimensionUnit": "in",
      "finalWeight": 1.0,
      "finalVolume": 1728.0,
      "oversized": false
    }
  ],
  "rates": [
    {
      "carrierAccountName": "USPS eVS",
      "carrierCode": "USPS-eVS",
      "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
      "finalService": "PriorityMail",
      "totalFee": 7.16,
      "fees": [
        {
          "packageNumber": 1,
          "type": "Base",
          "fee": 7.16,
          "ratingType": "WeightAndZone"
        }
      ],
      "currency": "USD",
      "deliveryDays": 2,
      "deliveryDate": "2021-10-30T00:00:00",
      "deliveryDateGuaranteed": true,
      "zone": "2",
      "id": "4ac779f2-9a88-4f7d-b9f1-b2d2f0765f6d",
      "createdDate": "2021-10-28T11:32:09.1001743"
    }
  ],
  "postageLabel": {
    "labels": [
      "https://visibleshippingqastorage.blob.core.windows.net/label-dev-container/Label-20f73d5f-9cb9-4176-981f-01a8232c278e.png"
    ],
    "labelFileType": "PNG",
    "labelSize": "4x6",
    "labelOrientation": "Portrait",
    "labelType": "Url"
  },
  "forms": [],
  "tracking": {
    "trackingBarcodeNumber": "420063719205590242327000948078",
    "trackingNumber": "9205590242327000948078",
    "status": "PreTransit",
    "subStatus": "LabelGenerated",
    "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9205590242327000948078",
    "trackingDetails": []
  },
  "specialService": [],
  "carrierAccountName": "USPS eVS",
  "carrierCode": "USPS-eVS",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "service": "PriorityMail",
  "shipDate": "2021-10-28T11:32:07.4447094",
  "createdDate": "2021-10-28T11:32:08.8176678",
  "transactionId": "3Y2erws85ekhXStXQ3Kyd53duP",
  "errors": [],
  "billTo": {
    "type": "Sender"
  }
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
   https://packagehub-api.visiblescm.com/v3.1/Shipment?key=Id&value=e77e7eb7-6062-4e6d-b1ab-fafb58a611cd&packageNumber=1&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9&startDate=2019-10-18T07:28:56.864Z&endDate=2019-10-18T07:28:56.864Z \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Shipment?key=Id&value=e77e7eb7-6062-4e6d-b1ab-fafb58a611cd&packageNumber=1&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9&startDate=2019-10-18T07:28:56.864Z&endDate=2019-10-18T07:28:56.864Z",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

POST /Shipment

Description

Use this POST method to create a new shipment. A label will be generated in the response with the defined format requested.

In case of shipping to/from same address, its preferrable to use address id instead of complete address object, however its not mandatory.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
transactionId* Header string 123456789, unique for each transaction
fromAddress* Body <Address> either address id or complete address detail can be passed in fromAddress object
toAddress* Body <Address> either address id or complete address detail can be passed in toAddress object
packages* Body <Package>
service* Body string [ PriorityMail, PriorityMailExpress, ParcelSelect, PriorityMailExpressIntl, PriorityMailIntl, GlobalExpressGuaranteed, FirstClassIntl, LibraryMail, MediaMail, BoundPrintedMatter, FirstClass, Ecommerce, Express12:00DOC, Express12:00, Express9:00DOC, Express9:00, ExpressWorldwide, GlobalMailBusiness, SecondDayAir, SecondDayAirAM, ThreeDaySelect, Ground, NextDayAir, NextDayAirSaver, StandardToCanada, StandardToMexico, WorldWideExpedited, WorldWideExpress, WorldWideExpressPlus, WorldWideSaver ]
carrierAccountId* Body string 000f4008-190b-419e-bd51-1048c3135a56
customsInfo* Body <CustomsInfo> Required in case of International Shipment Request
altReturnAddress Body <Address> either address id or complete address detail can be passed in altReturnAddress object
postageLabel Body <PostageLabel>
shipDate Body Date(yyyy-mm-dd) 2021-10-18
specialService Body string [ RestrictedDelivery, SundayDelivery, HolidayDelivery, CrematedRemains, LiveAnimals, HAZMAT, COD, RegisteredMail, Insurance, CertifiedMail, ElectronicReturnReceipt, AdultSignature, Tracking, SignatureConfirmation, Delivery1030AM ]
specialServiceParam Body <SpecialServiceParam>
  • Request
  • Response
{
  "toAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "verify": false
  },
  "fromAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
  "altReturnAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
  "packages": [
    {
      "packageType": "Parcel",
      "length": 35,
      "width": 10,
      "height": 10,
      "weight": 1
    }
  ],
  "service": "PriorityMail",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "postageLabel": {
    "labelFileType": "PNG",
    "labelType": "Url"
  }
}
{
  "id": "28ffe2ea-968c-402a-9675-52ace710a602",
  "accountId": "4f9b2a7f-3b3e-4ad5-a76b-33c9cbd5b2ea",
  "appId": "ecca4f2c-e00e-4465-b768-ae74748454a8",
  "fromAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "1f4d7fd9-59ea-41fb-a8f5-7b792abae05e",
    "createdDate": "2021-10-28T11:32:07.453127Z"
  },
  "toAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "1f4d7fd9-59ea-41fb-a8f5-7b792abae05e",
    "createdDate": "2021-10-28T11:32:07.453127Z"
  },
  "altReturnAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "a7e7a8fb-3d31-4ded-ad18-40468d88d1a3",
    "createdDate": "2021-10-28T11:32:07.4948065Z"
  },
  "packages": [
    {
      "id": "07e7adab-49c6-4728-818b-fd5ea98d4855",
      "packageNumber": 1,
      "packageType": "Parcel",
      "isRectangle": true,
      "length": 35.0,
      "width": 10.0,
      "height": 10.0,
      "dimensionUnit": "in",
      "weight": 1.0,
      "weightUnit": "lb",
      "finalPackageType": "Parcel",
      "finalWeightUnit": "lb",
      "finalDimensionUnit": "in",
      "finalWeight": 22.0,
      "finalVolume": 3500.0,
      "oversized": false
    }
  ],
  "rates": [
    {
      "carrierAccountName": "USPS eVS",
      "carrierCode": "USPS-eVS",
      "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
      "finalService": "PriorityMail",
      "totalFee": 47.3900,
      "fees": [
        {
          "packageNumber": 1,
          "type": "Base",
          "fee": 17.3900,
          "ratingType": "DimensionalWeightAndZone"
        },
        {
          "packageNumber": 1,
          "type": "NonStandardCubicFeet",
          "fee": 15.0
        },
        {
          "packageNumber": 1,
          "type": "NonStandardDimension",
          "fee": 15.0
        }
      ],
      "currency": "USD",
      "deliveryDays": 2,
      "deliveryDate": "2021-10-30T00:00:00",
      "deliveryDateGuaranteed": true,
      "zone": "2",
      "id": "41fffdf4-d0cd-4632-b2c8-db304ae16b95",
      "createdDate": "0001-01-01T00:00:00"
    }
  ],
  "postageLabel": {
    "labels": [
        "https://visibleshippingqastorage.blob.core.windows.net/label-dev-container/Label-2f87e5ab-65b7-4dd5-969c-c8c0ce8cbdd9.png"
    ],
    "labelFileType": "PNG",
    "labelSize": "4x6",
    "labelOrientation": "Portrait",
    "labelType": "Url"
  },
  "forms": [],
  "tracking": {
    "trackingBarcodeNumber": "420063719205590242327000948122",
    "trackingNumber": "9205590242327000948122",
    "status": "PreTransit",
    "subStatus": "LabelGenerated",
    "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9205590242327000948122",
    "trackingDetails": []
  },
  "specialService": [],
  "specialServiceParam": {},
  "carrierAccountName": "USPS eVS",
  "carrierCode": "USPS-eVS",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "service": "PriorityMail",
  "shipDate": "2021-10-28T11:48:10.3618025Z",
  "createdDate": "2021-10-28T11:48:11.5143818Z",
  "transactionId": "3zcTRcnMjLxuPiUR7C6Gy1Bvi6rsj",
  "errors": [],
  "billTo": {
    "type": "Sender"
  }
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/shipment \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'TransactionId: 243' \
  -H 'cache-control: no-cache' \
  -d '{
  "toAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "verify": false
  },
  "fromAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
  "altReturnAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "verify": false
  },
    "packages": [
        {
            "packageType": "Parcel",
            "length": 12,
            "width": 12,
            "height": 12,
            "weight": 1
        }
    ],
    "service": "PriorityMail",
    "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
    "postageLabel": {
        "labelFileType": "PNG",
        "labelType": "Url"
    }
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    TransactionId: "910",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/shipment",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    toAddress: {
      name: "John Ships",
      company: "Maersk",
      street1: "1545 s 4800 w",
      street2: "",
      city: "Salt Lake City",
      state: "UT",
      zip: "84104",
      country: "US",
      phone: "5708208072",
      verify: false,
    },
    fromAddress: {
      name: "Jane Ships",
      company: "Maersk",
      street1: "5160 Wiley Post Way",
      street2: "",
      city: "Salt Lake City",
      state: "UT",
      zip: "84116",
      country: "US",
      phone: "4151234567",
      verify: false,
    },
    altReturnAddress: {
      name: "Jane Ships",
      company: "Maersk",
      street1: "5160 Wiley Post Way",
      street2: "",
      city: "Salt Lake City",
      state: "UT",
      zip: "84116",
      country: "US",
      phone: "4151234567",
      verify: false,
    },
    packages: [
      {
        packageType: "Parcel",
        length: 12,
        width: 12,
        height: 12,
        weight: 1,
      },
    ],
    service: "PriorityMail",
    carrierAccountId: "0fe85d6e-6aca-4dc6-930e-de970965f585",
    postageLabel: {
      labelFileType: "PNG",
      labelType: "Url",
    },
  })
);
req.end();

POST /Shipment/Refund

Description

POST to this method to request a refund for a shipment. Processing time for label refunds are dependent on the carrier and may take up to 2-4 weeks to process.

Refund Status

Status Description
Initiated Refund initiated but request is not yet processed.
Approved Refund approved by carrier but refund amount has not been processed yet.
Rejected Refund rejected by carrier.
Refunded Refund approved and refund amount has been processed.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
transactionId* Header string 12345665, unique for each transaction
key* Body string Id, ShipmentId, TrackingNumber
value* Body string fe09ea71-7329-4757-afe5-f7a7cf057e3e
  • Request
  • Response
{
  "key": "ShipmentId",
  "value": "fe09ea71-7329-4757-afe5-f7a7cf057e3e"
}
{
  "id": "fe09ea71-7329-4757-afe5-f7a7cf057e3e",
  "accountId": "4f9b2a7f-3b3e-4ad5-a76b-33c9cbd5b2ea",
  "appId": "ecca4f2c-e00e-4465-b768-ae74748454a8",
  "fromAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "1f4d7fd9-59ea-41fb-a8f5-7b792abae05e",
    "createdDate": "2021-10-28T11:32:07.453127Z"
  },
  "toAddress": {
    "name": "Jane Ships",
    "company": "Maersk",
    "street1": "5160 Wiley Post Way",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84116",
    "country": "US",
    "phone": "4151234567",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "ecef95ac-56f6-4971-9a6e-701fc88261db",
    "createdDate": "2021-10-28T11:32:07.4766718Z"
  },
  "altReturnAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Shipment",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "a7e7a8fb-3d31-4ded-ad18-40468d88d1a3",
    "createdDate": "2021-10-28T11:32:07.4948065Z"
  },
  "packages": [
    {
      "id": "907d0666-b8be-4905-80df-37bc3de15e2f",
      "packageNumber": 1,
      "packageType": "Parcel",
      "isRectangle": true,
      "length": 12.0,
      "width": 12.0,
      "height": 12.0,
      "dimensionUnit": "in",
      "weight": 1.0,
      "weightUnit": "lb",
      "finalPackageType": "Parcel",
      "finalWeightUnit": "lb",
      "finalDimensionUnit": "in",
      "finalWeight": 1.0,
      "finalVolume": 1728.0,
      "oversized": false
    }
  ],
  "rates": [
    {
      "carrierAccountName": "USPS eVS",
      "carrierCode": "USPS-eVS",
      "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
      "finalService": "PriorityMail",
      "totalFee": 7.16,
      "fees": [
        {
          "packageNumber": 1,
          "type": "Base",
          "fee": 7.16,
          "ratingType": "WeightAndZone"
        }
      ],
      "currency": "USD",
      "deliveryDays": 2,
      "deliveryDate": "2021-10-30T00:00:00",
      "deliveryDateGuaranteed": true,
      "zone": "2",
      "id": "627a5655-a43a-4a56-bd76-853c44b0d312",
      "createdDate": "2021-10-28T17:23:31.9991757"
    }
  ],
  "postageLabel": {
    "labels": [
      "https://visibleshippingqastorage.blob.core.windows.net/label-dev-container/Label-1266e580-9ca1-49f0-84e9-f906bfa1b34a.png"
    ],
    "labelFileType": "PNG",
    "labelSize": "4x6",
    "labelOrientation": "Portrait",
    "labelType": "Url"
  },
  "forms": [],
  "tracking": {
    "trackingBarcodeNumber": "420063719205590242327000948856",
    "trackingNumber": "9205590242327000948856",
    "status": "PreTransit",
    "subStatus": "LabelGenerated",
    "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9205590242327000948856",
    "trackingDetails": []
  },
  "specialService": [],
  "refundStatus": "Refunded",
  "carrierAccountName": "USPS eVS",
  "carrierCode": "USPS-eVS",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "service": "PriorityMail",
  "shipDate": "2021-10-28T17:23:30.5676265",
  "createdDate": "2021-10-28T17:23:31.8572514",
  "transactionId": "1YTxYJyw8wnS5FoW6W4wRZqocuzdYRma",
  "errors": [],
  "billTo": {
    "type": "Sender"
  }
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/Shipment/Refund \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'TransactionId: 35345' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 41' \
  -H 'Content-Type: application/json' \
  -H 'Host: packagehub-api.visiblescm.com' \
  -H 'User-Agent: Mozilla/5.0' \
  -H 'cache-control: no-cache' \
  -d '{
  "key": "ShipmentId",
  "value": "fe09ea71-7329-4757-afe5-f7a7cf057e3e"
}'
var http = require("https");

var options = {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    TransactionId: "35345",
    "User-Agent": "Mozilla/5.0",
    Accept: "*/*",
    "Cache-Control": "no-cache",
    Host: "packagehub-api.visiblescm.com",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "41",
    Connection: "keep-alive",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Shipment/Refund",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.write(
  JSON.stringify({
    key: "ShipmentId",
    value: "fe09ea71-7329-4757-afe5-f7a7cf057e3e",
  })
);
req.end();

GET /Shipment/:id/Label

Description

Use this GET method to print a label for an existing shipment. Warehouses are complicated spaces and oftentimes labels will get lost or damaged. Utilize this API call to print a label in such situations.

Note

Request object is empty because all required input parameters are provided in the Route and Query Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
id* Route Param string fe09ea71-7329-4757-afe5-f7a7cf057e3e
packageNumber Query Param number 1
  • Request
  • Response
{}
{
  "labelFileType": "PNG",
  "labelSize": "4x6",
  "labelOrientation": "Portrait",
  "labels": [
    "https://visibleshippingqastorage.blob.core.windows.net/label-dev-container/Label-1266e580-9ca1-49f0-84e9-f906bfa1b34a.png"
  ],
  "labelType": "Url"
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Shipment/{id}/Label \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Host: packagehub-api.visiblescm.com' \
  -H 'User-Agent: Mozilla/5.0' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "User-Agent": "Mozilla/5.0",
    Accept: "*/*",
    "Cache-Control": "no-cache",
    Host: "packagehub-api.visiblescm.com",
    "Accept-Encoding": "gzip, deflate",
    Connection: "keep-alive",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Shipment/{id}/Label",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

Manifest

The Manifest, also referred to as SCAN Form or end-of-day form, alerts the carrier(s) to shipments entering their network and provides couriers with a way to accept packages in bulk.

POST /Manifest

Description

Use this POST method to create a Manifest for shipments to notify carrier(s) of the packages that will be put in their network.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
fromAddress* Body <Address> either address id or complete address detail can be passed in fromAddress object
carrierAccountId* Body string 0fe85d6e-6aca-4dc6-930e-de970965f585
key* Body string Id, ShipmentId, TrackingNumber, TransactionId
value* Body string 1bd82048-19e6-4d98-9bf7-6dd0bf4d643f
shipDate Body Date(yyyy-mm-dd) 2021-10-30
async Body Boolean true/false (Default value is false but it has been deprecated so always set to true)
  • Request
  • Response
{
  "fromAddress": {
    "id": "6bc099e7-53b9-4051-bc14-354cd924018a"
  },
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "key": "ShipmentId",
  "value": ["ef01bffa-f0b7-47b2-9eed-56a01b786dfd"],
  "async": true
}
{
  "id": "f179a731-fd01-4997-986c-c494c71106e8",
  "appId": "ecca4f2c-e00e-4465-b768-ae74748454a8",
  "shipmentIds": ["ef01bffa-f0b7-47b2-9eed-56a01b786dfd"],
  "trackingNumbers": [],
  "transactionIds": [],
  "carrierAccountName": "USPS eVS",
  "carrierCode": "USPS-eVS",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "fromAddress": {
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Manifest",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "6bc099e7-53b9-4051-bc14-354cd924018a"
  },
  "transactionDate": "2023-02-23T10:13:09.5553896Z",
  "shipDate": "2023-02-23T10:13:08.4895412Z",
  "message": "Manifest is currently queued",
  "messageCode": "MANIFEST_QUEUED",
  "messages": [
    {
      "code": "MANIFEST_QUEUED",
      "description": "Manifest is currently queued"
    },
    {
      "code": "PHV3.FIELD_DEPRECATED",
      "description": "Use Messages[].code and Messages[].description instead of MessageCode and Message"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X POST \
  https://packagehub-api.visiblescm.com/v3.1/Manifest \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
    "fromAddress": {
        "id": "6bc099e7-53b9-4051-bc14-354cd924018a"
    },
    "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
    "key": "ShipmentId",
    "value": [
        "ef01bffa-f0b7-47b2-9eed-56a01b786dfd"
    ],
    "async": true
}'
var http = require("https");
var options = {
 "method": "POST",
 "headers": {
  "Content-Type": "application/json",
  "Authorization": "Bearer <TOKEN>",
  "cache-control": "no-cache",
 }
};

var req = http.request('https://packagehub-api.visiblescm.com/v3.1/Manifest', options, function (res) {
 var chunks = [];

 res.on("data", funcion (chunk) {
  chunks.push(chunk);
 });

 res.on("end", function () {
  var body = Buffer.concat(chunks);
  console.log(body.toString());
 });
});

req.write(JSON.stringify({
    fromAddress: {
        id: "6bc099e7-53b9-4051-bc14-354cd924018a"
    },
    carrierAccountId: "0fe85d6e-6aca-4dc6-930e-de970965f585",
    key: "ShipmentId",
    value: [
        "ef01bffa-f0b7-47b2-9eed-56a01b786dfd"
    ],
    async: true
}));
req.end();

GET /Manifest

Description

Use this GET method to retrieve a Manifest you have submitted. You may also request a list of some or all of the Manifests that have been submitted.

Note

Request object is empty because all required input parameters are provided in the Query Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
key* Query Param string Id
value* Query Param string 000f4008-190b-419e-bd51-1048c3135a56
pageToken Query Param string NULL for first request, for further pages use pageToken as returned in response of current request
startDate Query Param Date(yyyy-mm-dd) 2021-10-18
endDate Query Param Date(yyyy-mm-dd) 2021-10-18
  • Request
  • Response
{}
{
  "id": "f179a731-fd01-4997-986c-c494c71106e8",
  "appId": "ecca4f2c-e00e-4465-b768-ae74748454a8",
  "shipmentIds": ["ef01bffa-f0b7-47b2-9eed-56a01b786dfd"],
  "trackingNumbers": [],
  "transactionIds": [],
  "carrierAccountName": "USPS eVS",
  "carrierCode": "USPS-eVS",
  "carrierAccountId": "0fe85d6e-6aca-4dc6-930e-de970965f585",
  "fromAddress": {
    "errors": [],
    "name": "John Ships",
    "company": "Maersk",
    "street1": "1545 s 4800 w",
    "street2": "",
    "city": "Salt Lake City",
    "state": "UT",
    "zip": "84104",
    "country": "US",
    "phone": "5708208072",
    "save": true,
    "verify": false,
    "source": "Manifest",
    "verificationStatus": "Success",
    "isResidential": false,
    "id": "6bc099e7-53b9-4051-bc14-354cd924018a",
    "createdDate": "2023-02-16T08:00:31.6825002"
  },
  "transactionDate": "2023-02-23T10:13:09.5553896Z",
  "shipDate": "2023-02-23T10:13:08.4895412Z",
  "formNumber": "9275090242324301415203",
  "formUrl": "https://visibleshippingqastorage.blob.core.windows.net/manifest-dev-container/Manifest-b3f048f8-1fe8-4a4b-bad8-9d4ff5b20769.pdf",
  "message": "Scanform generated for all 1 shipment(s)",
  "messageCode": "MANIFEST_GENERATED",
  "messages": [
    {
      "code": "MANIFEST_GENERATED",
      "description": "Scanform generated for all 1 shipment(s)"
    },
    {
      "code": "PHV3.FIELD_DEPRECATED",
      "description": "Use Messages[].code and Messages[].description instead of MessageCode and Message"
    }
  ]
}

Code Samples

  • cURL
  • Node.js
curl -X GET \
   https://packagehub-api.visiblescm.com/v3.1/Manifest?Key=Id&Value=f179a731-fd01-4997-986c-c494c71106e8&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9&startDate=2019-10-18T07:28:56.864Z&endDate=2019-10-18T07:28:56.864Z \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Manifest?Key=Id&Value=f179a731-fd01-4997-986c-c494c71106e8&pageToken=ewoiY3VycmVudFBhZ2UiOiAiMSIsCiJuZXh0UGFnZSI6ICIyIgp9&startDate=2019-10-18T07:28:56.864Z&endDate=2019-10-18T07:28:56.864Z",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

Tracking

Tracking is used to retrieve shipment tracking information. The trackingNumber is generated after a successful shipment is created. The status is updated as the package moves from the origin to destination. The carrier provides the PackageHub API with updated tracking status data as package statuses and destinations change.

Different Tracking Status

Status Description Possible SubStatus
PreTransit Label has been printed but carrier has not yet picked up the package LabelGenerated, ShippingInfoSentToCarrier, ReadyForPickup
InTransit Package is traveling to its destination. OriginScan, DepartureScan, Arrival, DestinationScan, Damaged, PickupScan, ReceivedByLocalPostOffice, TransferredToLocalPostOffice, ImportScan, ExportScan, CarrierChangedDelivery, ArrivedAtCarrierFacility, DepartedCarrierFacility
Delayed Package has been delayed but still in transit. PickupDelayed, WeatherDelay, BadDeliveryAddress
OutForDelivery Package has reached the delivery area and is in process of being delivered. DeliveryAttempted
DeliveryFailed Delivery of the package has failed and it will either be discarded or start moving to original shipper. Refused, CanNotDeliverToPOBox, Undeliverable, Returning
Delivered Package has been delivered Returned
Cancelled Shipment has been cancelled by the shipper. SenderStopped, VoidInfoReceived
Other Less common or exception statuses Unknown, Pending, Failure, LostPackage, HoldForFutureDelivery, PickupAtCarrierFacility

GET /Tracking

Description

Use this GET method to retrieve a specific shipment tracking detail via ShipmentId or TrackingNumber

Note

Request object is empty because all required input parameters are provided in the Query Param.

Request Parameters

param in Type Comments
authorization* Header string <Account /Token>
key* Query Param string Id, ShipmentId, TrackingNumber
value* Query Param string 9200190242327032670326
  • Request
  • Response
{}
{
  "trackingBarcodeNumber": "420026599200190242327032670326",
  "trackingNumber": "9200190242327032670326",
  "status": "PreTransit",
  "subStatus": "Pre- Shipment Info Sent to USPS, USPS Awaiting Item",
  "trackingUrl": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=9200190242327032670326",
  "trackingDetails": [
    {
      "city": "Albertmouth",
      "state": "Vermont",
      "zip": "76773-2896",
      "dateTime": "2021-10-28T00:00:00",
      "status": "PreTransit",
      "subStatus": "Pre- Shipment Info Sent to USPS, USPS Awaiting Item",
      "country": "US"
    }
  ]

Code Samples

  • cURL
  • Node.js
curl -X GET \
  https://packagehub-api.visiblescm.com/v3.1/Tracking?Key={Id/ShipmentId/TrackingNumber/TransactionId}&Value={String} \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: application/json' \
  -H 'Host: packagehub-api.visiblescm.com' \
  -H 'User-Agent: Mozilla/5.0' \
  -H 'cache-control: no-cache'
var http = require("https");

var options = {
  method: "GET",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <TOKEN>",
    "User-Agent": "Mozilla/5.0",
    Accept: "*/*",
    "Cache-Control": "no-cache",
    Host: "packagehub-api.visiblescm.com",
    "Accept-Encoding": "gzip, deflate",
    Connection: "keep-alive",
    "cache-control": "no-cache",
  },
};

var req = http.request(
  "https://packagehub-api.visiblescm.com/v3.1/Tracking?Key={Id/ShipmentId/TrackingNumber/TransactionId}&Value={String}",
  options,
  function (res) {
    var chunks = [];

    res.on("data", function (chunk) {
      chunks.push(chunk);
    });

    res.on("end", function () {
      var body = Buffer.concat(chunks);
      console.log(body.toString());
    });
  }
);

req.end();

Errors

Description

When a client or the server encounters an error, a subsequent response will be returned with information on why the call was not successful, which will enable you to identify fixes quickly and easily.

An easy-to-understand JSON message will be returned with a standard 4xx or 5xx code and with an accompanying body description explaining the issue.

Every response will contain a header X-Correlation-ID which correlates HTTP requests between your client and our server.

Response Body

attribute type specification
StatusCode HttpStatusCode Http status code denoting the cause of failure
TimeStamp String Date and time at the moment of failure
Path String Request URL where failure occured
Source String Indicates the subsystem or external provider where actual error is generated
Errors Array of Error objects Breakdown of the failure

Error Object

attribute type specification
Code String Machine readable description of the failure
Message String Human readable description of the failure
AdditionalInfo Object It contains error code and message as returned by external providers when name of provider is not PHv3

Error Codes

Error Codes mapping with HttpsStatusCodes
HttpStatusCode Package Hub Error Code
400 (Bad Request) [Module.[SubModule]].BAD_REQUEST
401 (Unauthorized) [Module.[SubModule]].AUTHENTICATION_FAILED
404 (Not Found) [Module.[SubModule]].NOT_FOUND
422 (Unprocessable Entity) [Module.[SubModule]].VALIDATION_FAILED
[Module.[SubModule]].NOT_SUPPORTED
[Module.[SubModule]].NOT_ACTIVE
[Module.[SubModule]].PAYMENT_FAILED
500 (Internal Server Errror) PH.INTERNAL_SERVER_ERROR
Error Codes with some example description(s)
Package Hub Error Code Error Codes with some example description(s)
ACCOUNT.NOT_ACTIVE
  • You must approve the Terms and Conditions before using this account
  • This account has been closed
ACCOUNT.NOT_FOUND
  • Provided account id doesn't exist
ACCOUNT.PAYMENT_FAILED
  • Failed to {Debit/Credit} ${amount} from customer's CreditCard/ACH
ACCOUNT.VALIDATION_FAILED
  • Start date must be less than end date
  • Message is required
  • Account can only be closed when there are no active customer associated to your account
  • Account creation failed due to insufficiant MID(s). Contact Support
  • Account Creation Failed. Contact Support
  • The Terms & Conditions have already been accepted for this account
  • Please add your support email in company profile section
  • AccountType is not supported
  • Provided email address already exist
  • Incorrect credentials
  • Account already exists either for the provided email or company name
ACCOUNT.APP.AUTHENTICATION_FAILED
  • Server failed to authenticate the request. Make sure the value of the Authorization header is formed correctly
  • Invalid Api key or Api Secret
  • Token is not valid
ACCOUNT.APP.VALIDATION_FAILED
  • Test token not supported for carrier {Carrier}. It is supported only for USPS-eVS and USPS-ePostage carriers
ACCOUNT.BALANCE.VALIDATION_FAILED
  • Insufficient Fund
  • {Amount} must be greater than or equals to $1
ACCOUNT.PARENT.NOT_FOUND
  • Either ParentAccountId or PartnerAppId is empty or invalid
  • PartnerAppId is either empty, invalid or is not associated with parent
ACCOUNT.PARENT.VALIDATION_FAILED
  • You can register more apps only via your current partner {Partner}. Please contact customer support for more info
ADDRESS.VALIDATION_FAILED
  • Either save, verify or both should be set to true
  • Country Code {CountryCode} is not valid
  • Requested address is invalid
CARRIER.NOT_ACTIVE
  • {Carrier} is temporarily disabled by admin for all users
CARRIER.NOT_SUPPORTED
  • Provided carrier {Carrier} is not supported
CARRIERACCOUNT.NOT_ACTIVE
  • Provided CarrierAccount {CarrierAccount} is in requested status and waiting for approval
  • Provided CarrierAccount {CarrierAccount} has been disabled by the admin. Please contact support
CARRIERACCOUNT.NOT_FOUND
  • No CarrierAccount exists for the provided CarrierAccountId
  • No carrier accounts are associated with your app
  • Requested resource doesn't exist
  • The value of {carrierCode} is not valid
CARRIERACCOUNT.VALIDATION_FAILED
  • Invalid AppID
  • Carrier account already exist for the provided name
MANIFEST.NOT_FOUND
  • Requested Id doesn't exist
MANIFEST.NOT_SUPPORTED
  • Manifest is not supported for carrier {Carrier}
MANIFEST.VALIDATION_FAILED
  • Start date must be less than end date
  • {Key} with {Value} is not supported
  • Shipment(s) with invalid ship date should be removed from manifest request: {transaction_id}
PACKAGETYPE.NOT_ACTIVE
  • {packageType} is temporarily disabled by admin for all users
  • {Carrier} is temporarily disabled by admin for all users
PACKAGETYPE.NOT_FOUND
  • Requested resource doesn't exist
PACKAGETYPE.NOT_SUPPORTED
  • Package not found for carrier
  • {Carrier} does not support packagetype {packageType}
PACKAGETYPE.VALIDATION_FAILED
  • Dimension is required
  • Maximum weight should be {MaxWeight} lbs for {service}
  • Maximum Length+Grith should be {lengthPlusGirth} Inch for {service}
SERVICE.NOT_ACTIVE
  • {Service} is temporarily disabled by admin for all users
SERVICE.NOT_SUPPORTED
  • {Service} not supported by {Carrier}
SHIPMENT.BAD_REQUEST
  • {Module}: The {Module} field is required
SHIPMENT.NOT_FOUND
  • Shipment not found
  • OrderNotFound
SHIPMENT.VALIDATION_FAILED
  • Transaction Id already exists
  • Return label is only supported for domestic shipment
  • Customs Info and Customs Item are required
  • ShipDate must be set to today or a future day time
SHIPMENT.LABEL.VALIDATION_FAILED
  • The element 'eVSPriorityMailIntlRequest' has invalid child element 'Agreement'. List of possible elements expected: 'ContentType'
  • CustomText1 and CustomText2 are not allowed for International shipments
SHIPMENT.REFUND.NOT_SUPPORTED
  • Refund is not supported for carrier {Carrier}
SHIPMENT.REFUND.VALIDATION_FAILED
  • Refund not allowed as manifest has been already generated for this shipment
  • You have already initiated refund for this shipment
  • You cannot request a refund after 30 days of creating shipment
SHIPMENT.TRACKING.NOT_SUPPORTED
  • Tracking is not supported for carrier {Carrier}
SHIPMENTRATE.NOT_FOUND
  • Cannot retrieve data
  • Could not find rates for requested shipment
SHIPMENTRATE.VALIDATION_FAILED
  • Customs Info and Customs Item are required
  • {package} and {service} is not supported for {country} by {carrierType}
  • The combination of Service and Package Type is not suppported for the provided carrier
SPECIALSERVICE.NOT_SUPPORTED
  • Carrier {Carrier} does not support special service(s) {1}
SPECIALSERVICE.VALIDATION_FAILED
  • Invalid selection of special services
USER.NOT_FOUND
  • Provided email address doesn't exist
USER.VALIDATION_FAILED
  • Provided email address already exist, try signing in
  • Incorrect credentials
  • Security code expired
  • Please provide your username instead of email

Extras

BillTo

Description

Use BillTo object to bill the correct account for the shipment. This object is optional and it works for DHL, UPS and FedEx only.

Parameters

param in Type Comments
type Body string Supported values are: Sender, Recipient, ThirdParty. Defaults to Sender.
account Body string Setting account number. Required for Recipient and ThirdParty.
zip Body string Setting zip code that the account is based in. Only applicable to UPS. Required for Recipient and ThirdParty.
countryCode Body string Setting country code that the account is based in. Only applicable to UPS. Required for ThirdParty.
  • Object
{
  "type": "Recipient",
  "account": "168974560",
  "zip": "87226",
  "countryCode": "US"  
}

CustomsInfo

Description

CustomsInfo objects contain CustomsItem objects and all necessary information for the generation of customs form required for international shipments.

Parameters

param in Type Comments
customsItem Body <CustomsItem>
id Body string
contentType Body string [ Documents, Gift, Merchandise, ReturnedGoods, Sample, Other, Humanitarian, DangerousGoods ]
contentsExplanation Body string
customsCertify Body boolean
customsSigner Body string
currency Body string
nonDeliveryOption Body string [ Return, Abandon ]
restrictionType Body string [ Quarantine, SanitaryInspection, Phytosanitary, Inspection, Other ]
restrictionComments Body string
eelpfc Body string [ NOEEI3037a, NOEEI3036, NOEEI3037h, NOEEI3037y, AES_ITN ]
aesitn Body string
  • Object
{
  "customsItem": [
    {
      "weightUnit": "oz",
      "customsInfoId": "string",
      "description": "string",
      "quantity": 0,
      "weight": 0,
      "value": 0,
      "hsTariffNumber": "string",
      "originCountry": "string",
      "itemCode": "string",
      "id": "string",
      "packageNumber": 0,
      "createdDate": "2020-10-08T19:32:18.764Z"
    }
  ],
  "id": "string",
  "contentType": "Documents",
  "contentsExplanation": "string",
  "customsCertify": true,
  "customsSigner": "string",
  "currency": "string",
  "nonDeliveryOption": "Return",
  "restrictionType": "Quarantine",
  "restrictionComments": "string",
  "eelpfc": "NOEEI3037a",
  "aesitn": "string"
}

CustomsItem

Description

CustomsItem object describes goods for international shipment and should be included in a CustomsInfo object.

Parameters

param in Type Comments
weightUnit Body string [ oz, lb, g, kg ]
customsInfoId Body string
description Body string
quantity Body number
weight Body number
value Body number
hsTariffNumber Body string
originCountry Body string
itemCode Body string
id Body string
packageNumber Body number
createdDate Body string
  • Object
{
  "weightUnit": "oz",
  "customsInfoId": "string",
  "description": "string",
  "quantity": 0,
  "weight": 0,
  "value": 0,
  "hsTariffNumber": "string",
  "originCountry": "string",
  "itemCode": "string",
  "id": "string",
  "packageNumber": 0,
  "createdDate": "2020-10-08T19:32:18.764Z"
}

Packages

Description

Packages object specifies the type of package being used for shipment and its corresponding properties.

Parameters

param in Type Comments
id Body string
packageType Body string [ Parcel, FlatRateEnvelope, SmallFlatRateBox, PaddedFlatRateEnvelope, LargeFlatRateBox, LegalFlatRateEnvelope, SoftPack, MediumFlatRateBox1, MediumFlatRateBox2, RegionalRateBoxB1, RegionalRateBoxB2, RegionalRateBoxA1, RegionalRateBoxA2 ]
isRectangle Body boolean
length Body number
width Body number
height Body number
dimensionUnit Body string [ cm, mm, m, in, ft, yd ]
weight Body number
weightUnit Body string [ oz, lb, g, kg ]
  • Object
{
  "id": "string",
  "packageType": "Parcel",
  "isRectangle": true,
  "length": 0,
  "width": 0,
  "height": 0,
  "dimensionUnit": "cm",
  "weight": 0,
  "weightUnit": "oz"
}

PostageLabel

Description

Postage label object describes label type, label file type and custom text.

Parameters

param in Type Comments
labelType Body string [ Base64, Url ]
labelFileType Body string [ PDF, TIF, ZPL, PNG, ZPL2, JPEG ]
LabelSize Body string [ 4x6, 6x4, 4x8, 7x3, Letter ]
LabelOrientation Body string [ Portrait, Landscape ]
customText1 Body string
customText2 Body string
customText3 Body string
  • Object
{
  "labelType": "Base64",
  "labelFileType": "PDF",
  "labelSize": "4x6",
  "labelOrientation": "Portrait",
  "customText1": "Custom Text 1",
  "customText2": "Custom Text 2",
  "customText3": "Custom Text 3"
}

SpecialServiceParam

Description

Use these parameter when specifying any special services.

Parameters

param in Type Comments
hazmatDescription Body string
hazmatPhone Body string
codAmount Body number
registeredMailAmount Body number
insuranceAmount Body number
liveAnimalsType Body string [ Bees, DayOldPoultry, AdultBirds, Other ]
  • Object
{
  "hazmatDescription": "string",
  "hazmatPhone": "string",
  "codAmount": 0,
  "registeredMailAmount": 0,
  "insuranceAmount": 0,
  "liveAnimalsType": "Bees"
}

Change logs

You can preview all of the changes logs and breaking changes here

You can find out what changed in the public API from the v3 to v3.1 here

Back to top © A.P. Moller - Maersk