NAV
cURL
  • Overview
  • Authorization
  • Shipment
  • Rate
  • Carrier
  • Tracking
  • Address
  • Warehouse
  • Files
  • Sub User
  • Common Definition
  • Error
  • Overview

    Welcome to the Ship&co API.

    Ship&co API integration has the following advantages:

    This document describes how to use our API. Before you can start using the Ship&co API, you will first need to register your Ship&co account here.

    This API Document Is Created For-

    API processing overview

    Diagram

    The Ship&co API is built around REST principles. Our API is simple and easy to use.

    1. Authorization - Insert your Ship&co token obtained from the dashboard into the HTTP header.
    2. Each API call - Access each API endpoint with the defined HTTP method and GET parameters or POST body of JSON.

    Try sample codes with Postman (You can choose each programming language by `Language`)

    Qiita Ship&Co tag provides you useful TIPS (in Japanese only)

    Disclaimer

    Authorization

    Add the following HTTP headers to all of your API calls

    curl "EACH_API_END_POINT" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    Replace `YOUR_API_TOKEN_FROM_DASHBOARD` with your obtained API token

    The Ship&co API uses API keys to authenticate requests. Adding the API token to HTTP headers enables you to be authorized to use the API.

    Please follow these steps to obtain the API token:-

    1. Login to the Ship&co dashboard
    2. Click [Settings] and copy the text in [API Settings]>[Token]

    Dashboard

    Adding the copied API token to HTTP headers as follows enables you to use the API.

    x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD

    You can use Sub User API tokens to manage data according to each user individually. See Sub User for more details.

    *Note that if you create a new token, the previous one will become invalid and its API calls will produce errors.

    Shipment

    Create Shipment

    curl -v -X POST "https://api.shipandco.com/v1/shipments" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
      "to_address": {
        "full_name": "John Doe",
        "company": "ACME",
        "address1": "Rua Maria Matos, 32",
        "country": "PT",
        "email": "john@doe.io",
        "phone": "0901231234",
        "address2": "",
        "city": "CHARNECA DA CAPARICA",
        "province": "SETUBAL",
        "zip": "2820-344"
      },
      "from_address": {
        "full_name": "テスト",
        "company": "",
        "email": "",
        "phone": "08012341234",
        "country": "JP",
        "address1": "OSAKAFU",
        "address2": "",
        "province": "OSAKA",
        "zip": "1234567",
        "city": "IBARAKI SHI"
      },
      "products": [
        {
          "name": "Basket ball",
          "quantity": "2",
          "price": "4850",
          "hs_code": "",
          "origin_country": "JP",
          "weight": 100
        },
        {
          "name": "Basket ball2",
          "quantity": "2",
          "price": "4850",
          "hs_code": "",
          "origin_country": "JP",
          "weight": 200
        },
        {
          "name": "Basket ball3",
          "quantity": "2",
          "price": "4850",
          "hs_code": "",
          "origin_country": "JP",
          "weight": 200
        },
        {
          "name": "Basket ball4",
          "quantity": "2",
          "price": "4850",
          "hs_code": "",
          "origin_country": "JP",
          "weight": 180
        },
        {
          "name": "Basket ball5",
          "quantity": "2",
          "price": "4850",
          "hs_code": "",
          "origin_country": "JP",
          "weight": 240
        }
      ],
      "parcels": [
        {
          "amount": "1",
          "width": "10",
          "height": "10",
          "depth": "10",
          "weight": 2000
        }
      ],
      "customs": {
        "duty_paid": false,
        "content_type": "MERCHANDISE",
        "ioss_number": "IM1234567890"
      },
      "setup": {
        "carrier_id": "az3crDeRgh56gFfs3",
        "service": "japanpost_ems",
        "currency": "JPY",
        "shipment_date": "2020-07-26",
        "insurance": 0,
        "ref_number": "",
        "delivery_note": "",
        "signature": false,
        "return_label": false,
        "test": false
      }
    }'
    

    The above request returns the following response.

    {
      "id": "API-QWMHHRLQS8",
      "state": "active",
      "test": true,
      "created_at": "2019-08-31T07:14:20.209Z",
      "to_address": {
        "full_name": "TEST TARO",
        "company": "",
        "address1": "京都市中京区八百屋町117",
        "address2": "",
        "city": "京都府",
        "province": "",
        "zip": "604-8072",
        "country": "JP",
        "phone": "1111111111",
        "email": ""
      },
      "from_address": {
        "full_name": "テスト",
        "company": "",
        "address1": "OSAKAFU",
        "address2": "",
        "city": "IBARAKI SHI",
        "province": "OSAKA",
        "zip": "1234567",
        "country": "JP",
        "phone": "08012341234",
        "email": ""
      },
      "products": [
        {
          "name": "Basket ball",
          "quantity": 2,
          "price": 4850,
          "hs_code": "",
          "origin_country": "JP"
        },
        {
          "name": "Basket ball2",
          "quantity": 2,
          "price": 4850,
          "hs_code": "",
          "origin_country": "JP"
        },
        {
          "name": "Basket ball3",
          "quantity": 2,
          "price": 4850,
          "hs_code": "",
          "origin_country": "JP"
        },
        {
          "name": "Basket ball4",
          "quantity": 2,
          "price": 4850,
          "hs_code": "",
          "origin_country": "JP"
        },
        {
          "name": "Basket ball5",
          "quantity": 2,
          "price": 4850,
          "hs_code": "",
          "origin_country": "JP"
        }
      ],
      "setup": {
        "currency": "JPY",
        "insurance": 0,
        "ref_number": "",
        "delivery_note": "",
        "discount": 0,
        "pack_size": "0",
        "pack_amount": 3,
        "date": "2020-07-28",
        "time": "16-18",
        "care": {
          "fragile": false,
          "side_up": false,
          "valuable_goods": false
        },
        "pick_up": false
      },
      "delivery": {
        "carrier": "sagawa",
        "method": "sagawa_regular",
        "tracking_numbers": ["514699854874"],
        "label": "https://storage.googleapis.com/dev-shipandco/labels/201908/k3wWYYwk8Q8h46NcM/voxZSt9fYeeWzFssm.pdf",
        "invoice": "JVBERi0xLjMKJf////8KNyAwIG9iago8PAovVHlwZSAvUGFnZQovUGFyZW50IDEgMCBSCi9NZWRpYUJveCBbMCAwIDU5NS4yOCA4NDEuODldCi9Db250ZW50cyA1IDAgUgovUmVzb3VyY2VzIDYgMCBSCj4+CmVuZG9iago2IDAgb2JqCjw8Ci9Qcm9jU2V0IFsvUERGIC9UZXh0IC9JbWFnZUIgL0ltYWdlQyAvSW1hZ2VJXQovRm9udCA8PAovRjEgOCAwIFIKL0YyIDkgMCBSCi9GMyAxMCAwIFIKPj4KPj4KZW5kb2JqCjUgMCBvYmoKPDwKL0xlbmd0aCAxMDQ0Ci9GaWx0ZXIgL0ZsYXRlRGVjb2RlCj4+CnN0cmVhbQp4nK1Yu67jRgzt/RX6gVU4JIecARYuAiRFugDughS+ltVtsf/f5HAk2ffa8t1IuzZGHoxkHr4fSh3h+yXhUjT1pXaXb4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qSkHUlMgEInNAa+MlDEOr10C3isg2h9+olP/B5D3fRQKZW5kc3RyZWFtCmVuZG9iagp4cmVmCjAgMTkKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAzMDA1IDAwMDAwIG4gCjAwMDAwMDMwNjIgMDAwMDAgbiAKMDAwMDAwMjk0MyAwMDAwMCBuIAowMDAwMDAyOTIyIDAwMDAwIG4gCjAwMDAwMDAyMzUgMDAwMDAgbiAKMDAwMDAwMDEyNSAwMDAwMCBuIAowMDAwMDAwMDE1IDAwMDAwIG4gCjAwMDAwMDE1MTQgMDAwMDAgbiAKMDAwMDAwMTYxMSAwMDAwMCBuIAowMDAwMDAyNzc2IDAwMDAwIG4gCjAwMDAwMDE0MzggMDAwMDAgbiAKMDAwMDAwMTM1MiAwMDAwMCBuIAowMDAwMDAxMzc3IDAwMDAwIG4gCjAwMDAwMDE0MDIgMDAwMDAgbiAKMDAwMDAwMzEwOSAwMDAwMCBuIAowMDAwMDAxNzEzIDAwMDAwIG4gCjAwMDAwMDE5NzAgMDAwMDAgbiAKMDAwMDAwMjQyMCAwMDAwMCBuIAp0cmFpbGVyCjw8Ci9TaXplIDE5Ci9Sb290IDMgMCBSCi9JbmZvIDExIDAgUgovSUQgWzw4ZTkyYTE0YjIzOGM0NjMwYzIzYzVhYTJjZmZiMDZiYz4gPDhlOTJhMTRiMjM4YzQ2MzBjMjNjNWFhMmNmZmIwNmJjPl0KPj4Kc3RhcnR4cmVmCjYwNzcKJSVFT0YK",
        "warnings": ["DUMMY_WARNING"]
      }
    }
    

    You can input shipment information including the specified shipping address, parcel, product information, carrier information, and the shipping label based on the consignee’s address.

    Test Environment: Adding `”test”: true` in `setup` enables you to create dummy labels free-of-charge. You will not need to add a credit card to your account for this, but the labels generated under test conditions are not valid and therefore cannot be used for shipment. Test labels are currently only available for UPS, DHL, DHL eCommerce Asia, Sagawa and Yamato. Sagawa and Yamato don't require carrier account registration too.

    Request

    POST https://api.shipandco.com/v1/shipments

    Item Note Mandatory Fields
    to_address Recipient’s address.
    Note that `province` needs to be set as a code, not a full name (e.g. `CA` for California in USA) if the country has its codes.
    *The maximum length of addresses varies depending on carrier and services (e.g. DHL accepts 45 characters in address1 and address2 to have 90 in total).
    full_name, phone (for some services only), country, address1, province (if applicable), city (if applicable), zip (if applicable)
    from_address Sender’s address.
    Note that `province` needs to be set as a code, not a full name (e.g. `CA` for California in USA) if the country has its codes.
    *The maximum length of addresses varies depending on carrier and services (e.g. DHL accepts 45 characters in address1 and address2 to have 90 in total).
    full_name, phone, country, address1, province (if applicable), city (if applicable), zip (if applicable)
    parcels Parcel information. *For domestic shipping, do not use this parameter and use pack size and amount in `setup` instead. Parcel size can be set as the three of `width`, `height`, and `depth` (cm) or the carrier defined size of `package`. Parcel weight can be set as `weight`(grams). `package` accepts the following values.
    FedEX:
    "fedex_envelope", "fedex_pak", "fedex_box", "fedex_10kg_box", "fedex_25kg_box", "fedex_tube"
    DHL:
    "dhl_jumbo_doc","dhl_jumbo_parcel","dhl_document","dhl_flyer", "dhl_express_doc", "dhl_express_envelope", "dhl_jumbo_box", "dhl_jumbo_junior_doc", "dhl_jumbo_junior_box", "dhl_jumbo_junior_parcel"
    amount, width, height, depth, package (`package`is the alternative to `width`, `height`, and `depth`. At least one piece of information per parcel must be inputted)
    products Product information. name, quantity, price, origin_country, weight
    customs Custom information. The following values are avaiable for `content_type`. "GIFT", "NON_COMMERCIAL_DOCS", "SAMPLE", "MERCHANDISE", "PERSONAL", "RETURN", "REPAIR", "OTHER"
    Intercoms can be specified in the following way. "duty_paid": true = "DDP", "duty_paid": false = "DDU"
    "ioss_number": IOSS Number is now available for shipments from abroad to europe up to 150€. More informations about IOSS here.
    content_type (for some services only)
    setup Setup information.
    For more details, See Carrier And Services.
    You can find the most optimized `service` with List Rates.
    *Adding `"test": true` enables you to create dummy labels free-of-charge.
    carrier or carrier_id, service, currency

    *You can check the working sample requests for each carrier with Postman.

    Response

    Item Note
    id Shipment ID. Usable for GET.
    delivery.carrier Specified carrier name.
    delivery.tracking_numbers Shipment tracking numbers. If the return label is generated, these are multiple.
    delivery.label Created label image information. If the return label is generated, this has multiple pages.
    delivery.invoice PDF commercial invoice for the shipment encoded in Base64 format
    delivery.warnings Warning message shown if the carrier has specific one. (e.g. Ineligible for DHL PLT. If you receive DHL PLT warning, refer to this page)

    List Shipments

    curl -v -X GET "https://api.shipandco.com/v1/shipments?state=active&limit=2&page=1&created_after=2018-12-01T00:00:00.000Z&created_before=2019-01-30T00:00:00.000Z&carrier=sagawa" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    {
      "shipments": [
        {
          "id": "API-SGF5LYSJAF",
          "state": "active",
          "scope": "api",
          "created_at": "2019-01-08T17:17:08.394Z",
          "to_address": {
            "full_name": "太郎山田",
            "address1": "京都市東山区",
            "country": "JP",
            "email": "yamada.taro@demo.com",
            "phone": "08012341234",
            "address2": "西海子町",
            "extra": "神宮道",
            "province": "京都府",
            "zip": "6050012"
          },
          "from_address": {
            "company": "株式会社ACME",
            "address1": "中央区",
            "country": "JP",
            "email": "yamada.hanako@acme.com",
            "phone": "08012341234",
            "address2": "日本橋堀留町",
            "extra": "タワー #1001",
            "province": "東京都",
            "zip": "1030012"
          },
          "products": [
            {
              "name": "Basket ball",
              "quantity": 2,
              "price": 4850,
              "hs_code": ""
            }
          ],
          "setup": {
            "currency": "JPY",
            "insurance": 0,
            "ref_number": "",
            "delivery_note": "",
            "discount": 0,
            "pack_size": "60",
            "pack_amount": 1,
            "date": "2019-01-10",
            "time": "16-18",
            "care": {
              "fragile": false,
              "side_up": false,
              "valuable_goods": false
            },
            "pick_up": false,
            "print_start_location": "4"
          },
          "delivery": {
            "carrier": "sagawa",
            "method": "sagawa_regular",
            "tracking_numbers": ["514699818076"],
            "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/WgnXig8zR6hEvZLWE.pdf"
          }
        },
        {
          "id": "API-RXILYS438A",
          "state": "active",
          "scope": "api",
          "created_at": "2019-01-08T17:13:19.968Z",
          "to_address": {
            "full_name": "太郎山田",
            "address1": "京都市東山区",
            "country": "JP",
            "email": "yamada.taro@demo.com",
            "phone": "08012341234",
            "address2": "西海子町",
            "extra": "神宮道",
            "province": "京都府",
            "zip": "6050012"
          },
          "from_address": {
            "company": "株式会社ACME",
            "address1": "中央区",
            "country": "JP",
            "email": "yamada.hanako@acme.com",
            "phone": "08012341234",
            "address2": "日本橋堀留町",
            "extra": "タワー #1001",
            "province": "東京都",
            "zip": "1030012"
          },
          "products": [
            {
              "name": "Basket ball",
              "quantity": 2,
              "price": 4850,
              "hs_code": ""
            }
          ],
          "setup": {
            "currency": "JPY",
            "insurance": 0,
            "ref_number": "",
            "delivery_note": "",
            "discount": 0,
            "pack_size": "60",
            "pack_amount": 1,
            "date": "2019-01-10",
            "time": "16-18",
            "care": {
              "fragile": false,
              "side_up": false,
              "valuable_goods": false
            },
            "pick_up": false,
            "print_start_location": "4"
          },
          "delivery": {
            "carrier": "sagawa",
            "method": "sagawa_regular",
            "tracking_numbers": ["514699818065"],
            "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/Fu8f5dvB5zrmBTHfh.pdf"
          }
        },
        {
          "id": "API-Y72ITP6P8G",
          "state": "active",
          "scope": "api",
          "created_at": "2019-01-08T17:05:12.663Z",
          "to_address": {
            "full_name": "太郎山田",
            "address1": "京都市東山区",
            "country": "JP",
            "email": "yamada.taro@demo.com",
            "phone": "08012341234",
            "address2": "西海子町",
            "extra": "神宮道",
            "province": "京都府",
            "zip": "6050012"
          },
          "from_address": {
            "company": "株式会社ACME",
            "address1": "中央区",
            "country": "JP",
            "email": "yamada.hanako@acme.com",
            "phone": "08012341234",
            "address2": "日本橋堀留町",
            "extra": "タワー #1001",
            "province": "東京都",
            "zip": "1030012"
          },
          "products": [
            {
              "name": "Basket ball",
              "quantity": 2,
              "price": 4850,
              "hs_code": ""
            }
          ],
          "setup": {
            "currency": "JPY",
            "insurance": 0,
            "ref_number": "",
            "delivery_note": "",
            "discount": 0,
            "pack_size": "60",
            "pack_amount": 1,
            "date": "2019-01-10",
            "time": "16-18",
            "care": {
              "fragile": false,
              "side_up": false,
              "valuable_goods": false
            },
            "pick_up": false,
            "print_start_location": "4"
          },
          "delivery": {
            "carrier": "sagawa",
            "method": "sagawa_regular",
            "tracking_numbers": ["514699818054"],
            "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/dJt72M3PhJQo9pmjE.pdf"
          }
        },
        {
          "id": "API-Q9CASGOIC9",
          "state": "active",
          "scope": "api",
          "created_at": "2019-01-08T16:56:16.944Z",
          "to_address": {
            "full_name": "太郎山田",
            "address1": "京都市東山区",
            "country": "JP",
            "email": "yamada.taro@demo.com",
            "phone": "08012341234",
            "address2": "西海子町",
            "extra": "神宮道",
            "province": "京都府",
            "zip": "6050012"
          },
          "from_address": {
            "company": "株式会社ACME",
            "address1": "中央区",
            "country": "JP",
            "email": "yamada.hanako@acme.com",
            "phone": "08012341234",
            "address2": "日本橋堀留町",
            "extra": "タワー #1001",
            "province": "東京都",
            "zip": "1030012"
          },
          "products": [
            {
              "name": "Basket ball",
              "quantity": 2,
              "price": 4850,
              "hs_code": ""
            }
          ],
          "setup": {
            "currency": "JPY",
            "insurance": 0,
            "ref_number": "",
            "delivery_note": "",
            "discount": 0,
            "pack_size": "60",
            "pack_amount": 1,
            "date": "2019-01-10",
            "time": "16-18",
            "care": {
              "fragile": false,
              "side_up": false,
              "valuable_goods": false
            },
            "pick_up": false,
            "print_start_location": "4"
          },
          "delivery": {
            "carrier": "sagawa",
            "method": "sagawa_regular",
            "tracking_numbers": ["514699818043"],
            "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/74FBe7MnjmQ3eM66b.pdf"
          }
        },
        {
          "id": "API-6E53FMVTZF",
          "state": "active",
          "scope": "api",
          "created_at": "2019-01-08T16:55:44.228Z",
          "to_address": {
            "full_name": "太郎山田",
            "address1": "京都市東山区",
            "country": "JP",
            "email": "yamada.taro@demo.com",
            "phone": "08012341234",
            "address2": "西海子町",
            "extra": "神宮道",
            "province": "京都府",
            "zip": "6050012"
          },
          "from_address": {
            "company": "株式会社ACME",
            "address1": "中央区",
            "country": "JP",
            "email": "yamada.hanako@acme.com",
            "phone": "08012341234",
            "address2": "日本橋堀留町",
            "extra": "タワー #1001",
            "province": "東京都",
            "zip": "1030012"
          },
          "products": [
            {
              "name": "Basket ball",
              "quantity": 2,
              "price": 4850,
              "hs_code": ""
            }
          ],
          "setup": {
            "currency": "JPY",
            "insurance": 0,
            "ref_number": "",
            "delivery_note": "",
            "discount": 0,
            "pack_size": "60",
            "pack_amount": 1,
            "date": "2019-01-10",
            "time": "16-18",
            "care": {
              "fragile": false,
              "side_up": false,
              "valuable_goods": false
            },
            "pick_up": false,
            "print_start_location": "4"
          },
          "delivery": {
            "carrier": "sagawa",
            "method": "sagawa_regular",
            "tracking_numbers": ["514699818032"],
            "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/2GAfFX6Yy87cCtRqo.pdf"
          }
        }
      ],
      "count": 5,
      "pages": 1,
      "current_page": 1
    }
    

    Get a list of created shipments.

    Request

    GET https://api.shipandco.com/v1/shipments

    Item Note
    state default `active`, possible values: `active, void, any`
    carrier Specify `type` of the carrier given by List Carriers
    scope Specify the scope of shipments - made using the API only, or using both API and inside the App (default: `api`, possible values: `api, all`)

    See GET Parameters for more items.

    Response

    Array of created shipments. See Create Shipment for more details.

    See GET Response for more items.

    Get Shipment

    curl -v -X GET "https://api.shipandco.com/v1/shipments/API-O8APFNW9S8" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    {
      "id": "API-O8APFNW9S8",
      "state": "active",
      "scope": "api",
      "created_at": "2019-01-07T14:15:01.151Z",
      "to_address": {
        "full_name": "John Doe",
        "company": "ACME",
        "address1": "Rua Maria Matos, 32",
        "country": "PT",
        "email": "john@doe.io",
        "phone": "0901231234",
        "address2": "",
        "city": "CHARNECA DA CAPARICA",
        "province": "SETUBAL",
        "zip": "2820-344"
      },
      "from_address": {
        "full_name": "Yamada Taro",
        "company": "World Company",
        "address1": "OSAKAFU",
        "country": "JP",
        "email": "ytaro@worldcompany.com",
        "phone": "08012341234",
        "address2": "OTECHO",
        "city": "IBARAKI SHI",
        "province": "OSAKA",
        "zip": "5670883"
      },
      "products": [
        {
          "name": "Basket ball",
          "quantity": 2,
          "price": 4850,
          "hs_code": "HS9988",
          "origin_country": "JP"
        }
      ],
      "parcels": [
        {
          "weight": 200,
          "amount": 1,
          "width": 10,
          "height": 10,
          "depth": 10
        }
      ],
      "customs": {
        "duty_paid": false,
        "content_type": "MERCHANDISE"
      },
      "setup": {
        "currency": "JPY",
        "insurance": 0,
        "ref_number": "",
        "delivery_note": "",
        "discount": 0,
        "return_label": false,
        "signature": false
      },
      "delivery": {
        "carrier": "japanpost",
        "method": "japanpost_ems",
        "tracking_numbers": ["EN027977320JP"],
        "label": "https://storage.googleapis.com/dev-shipandco/labels/201901/k3wWYYwk8Q8h46NcM/undefined.pdf"
      }
    }
    

    Retrieve a shipment by the shipment ID.

    Request

    GET https://api.shipandco.com/v1/shipments/:id

    Response

    Only one shipment is displayed. See Create Shipment for more details.

    Delete Shipment

    curl -v -X DELETE "https://api.shipandco.com/v1/shipments/API-O8APFNW9S8" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    "Shipment API-O8APFNW9S8 deleted."
    

    Delete a shipment by the shipment ID.

    Request

    DELETE https://api.shipandco.com/v1/shipments/:id

    Response

    The resulting message is displayed.

    Rate

    List Rates

    curl -v -X POST "https://api.shipandco.com/v1/rates" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
        "to_address": {
          "full_name": "John Doe",
          "company": "ACME",
          "email": "john@doe.io",
          "phone": "0901231234",
          "country": "PT",
          "address1": "Rua Maria Matos, 32",
          "address2": "",
          "province": "SETUBAL",
          "zip": "2820-344",
          "city": "CHARNECA DA CAPARICA"
        },
        "from_address": {
          "full_name": "Yamada Taro",
          "company": "World Company",
          "email": "ytaro@worldcompany.com",
          "phone": "08012341234",
          "country": "JP",
          "address1": "OSAKAFU",
          "address2": "OTECHO",
          "province": "OSAKA",
          "zip": "5670883",
          "city": "IBARAKI SHI"
        },
        "products": [
          {
            "name": "Basket ball",
            "quantity": 2,
            "price": 4850,
            "hs_code": "HS9988",
            "origin_country": "JP"
          }
        ],
        "parcels": [
          {
            "weight": 200,
            "amount": 1,
            "width": 10,
            "height": 10,
            "depth": 10
          }
        ],
        "customs": {
          "duty_paid": false,
          "content_type": "MERCHANDISE"
        },
        "setup": {
          "carrier": "japanpost",
          "currency": "JPY",
          "date": "2019-01-08",
          "insurance": 0,
          "ref_number": "",
          "delivery_note": "",
          "discount": 0,
          "signature": false
        }
    }'
    

    The above request returns the following response.

    [
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "japanpost_ems",
        "currency": "JPY",
        "price": 2200,
        "surcharges": [
          {
            "type": "frozen",
            "amount": "324"
          }
        ]
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "japanpost_registered_mail",
        "currency": "JPY",
        "price": 690,
        "surcharges": []
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "japanpost_epacket",
        "currency": "JPY",
        "price": 785,
        "surcharges": []
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "japanpost_epacket_light",
        "currency": "JPY",
        "price": 620,
        "surcharges": []
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "airparcel",
        "currency": "JPY",
        "price": 2500,
        "surcharges": []
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "salparcel",
        "currency": "JPY",
        "price": 2700,
        "surcharges": []
      },
      {
        "carrier_id": "CFjQRubN5jhhT5hTb",
        "carrier": "japanpost",
        "service": "seaparcel",
        "currency": "JPY",
        "price": 1800,
        "surcharges": []
      }
    ]
    

    Based on the entered shipping information, the rates for each specified carrier is displayed in a list. Note that the rate API is supposed to be used with the shipment API. The sole use of the rate API is possible to disable your access token.

    Request

    POST https://api.shipandco.com/v1/rates

    Rate

    The same as the shipment creation, with the “service” eliminated. For more details, see Create Shipment.

    Response

    An array of rates of each service will be displayed. For more details, see Carrier And Services.

    Carrier

    Register Carrier

    curl -v -X POST "https://api.shipandco.com/v1/carriers" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
        "type": "dhl",
        "credentials": {
          "account_number": "123456789"
        },
        "settings": {
          "label": {
            "hide_account": true,
            "extra_page":  true
          },
          "print": {
            "size": "PDF_4X8",
            "size_fallback": "PDF_A4"
          }
        }
      }'
    

    The above request returns the following response.

    {
      "id": "g3buDjYMCXaj6zNCv",
      "type": "dhl",
      "state": "active",
      "created_at": "2019-02-25T11:58:57.852Z",
      "updated_at": "2019-02-25T11:58:57.852Z",
      "credentials": {
        "account_number": "*********"
      }
    }
    

    Register a Carrier. For more details, see our site.

    Request

    POST https://api.shipandco.com/v1/carriers

    Item Note
    type Type of carrier you want to add. Possible values are: `japanpost`, `ups`, `fedex`, `dhl`, `sagawa`, `yamato`, `yuupack`, `yuupacket`, `pegasus`.
    credentials Credentials required for using carrier systems. The parameters inside this are different from each other. See the following for the details.
    settings Settings specific to each carrier. The parameters inside this are different from each other. See the following for the details.

    Credentials parameter by carrier

    DHL

    account_number: String, required site_id: String, required password: String, required

    In order to obtain your DHL Site ID and Password, our DHL support page will guide you to quickly get them from DHL.

    address.full_name: String
    address.company: String
    address.phone: String
    address.email: String
    address.address1: String
    address.address2: String
    address.zip: String, required
    address.city: String
    address.country: String, required

    UPS

    account_number: String, required

    user_name: String, required

    password: String, required

    access_key: String, required

    FedEx

    account_number: String, required

    address.full_name: String, required
    address.company: String, required
    address.phone: String, required
    address.email: String, required
    address.address1: String, required
    address.address2: String
    address.zip: String, required
    address.city: String, required
    address.country: String, required

    Japan Post International

    customer_numbers: Array, minLength: 4, maxLength: 4, required (eg: ['000000000','000000000','000000000','000000000'])

    Sagawa

    account_number: String, required

    key: String, required

    password: String, required

    In order to get the key and password from Sagawa, In order to obtain the key and password from Sagawa, a request must be submitted through the “carrier options” function on the Ship&co dashboard. After approval, Sagawa will notify Ship&co of your information for account activation, then you will receive an email for this from Ship&co. This process will take about 5 to 8 business days.

    Japan Post Domestic (Yuupack)

    user_id: String, required

    In order to obtain your user ID from Japan Post, this form must be filled and submitted to Japan Post. Japan Post will then check, approve and issue a code, and email it to you for account activation. This will take about 5 to 8 business days. PLEASE NOTE: you need to have a post-payment agreement with Japan Post in order to apply for this.

    Japan Post Domestic (Yuupacket)

    The same as above.

    Yamato

    key: String, required

    freight_number: String, (default: '01')

    Pegasus

    user_id: String, required

    password: String, required

    Settings by carrier

    DHL

    label.hide_account: Boolean. Whether to print account information on labels or not.

    label.extra_page: Boolean. Whether to create a page for archiving or not.

    print.size: String, required. Label size to use. The valid values: "PDF_4X6", "PDF_4X8", "ZPL_4X6"

    UPS

    print.size: String, required. Label size to use. The valid values: "PDF_4X6", "ZPL_4X6"

    FedEx

    print.size: String, required. Label size to use. The valid values: "PDF_4X6", "PDF_4X8", "PDF_4X9", "ZPL_4X6", "ZPL_4X8"

    Japan Post International

    print.size: String, required. Label size to use. The valid values: "PDF_A4"

    Sagawa

    print.size: String, required. Label size to use. The valid values: "PDF_A5", "PDF_4.2X8.3_BLUE", "PDF_4.2X8.3_GREEN"

    Japan Post Domestic (Yuupack)

    print.size: String, required. Label size to use. The valid values: "PDF_A5"

    Yamato

    print.size: String, required. Label size to use. The valid values: "PDF_A4", "PDF_A5", "PDF_A4_BW", "PDF_A5_BW", "PDF_4.5X7.8"

    print.size_fallback: String. Compatible fallback for "PDF_4.5X7.8". The valid values: "PDF_A4", "PDF_A5", "PDF_A4_BW", "PDF_A5_BW"

    *You can check the working sample requests for each carrier with Postman.

    Response

    Registered carrier information with its ID

    List Carriers

    curl -v -X GET "https://api.shipandco.com/v1/carriers" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    [
      {
        "id": "GZDZQNo7zyxr4sbXc",
        "type": "yuupacket",
        "state": "active",
        "created_at": "2019-01-07T14:24:13.045Z",
        "updated_at": "2019-01-07T14:24:13.045Z",
        "credentials": {
          "user_id": "***********"
        }
      },
      {
        "id": "FbqDPqcBL6AL7PwAo",
        "type": "yuupack",
        "state": "active",
        "created_at": "2019-01-07T14:24:13.042Z",
        "updated_at": "2019-01-07T14:24:13.042Z",
        "credentials": {
          "user_id": "***********"
        }
      },
      {
        "id": "7iuaQaEp8fasKCzgD",
        "type": "yamato",
        "state": "active",
        "created_at": "2019-01-07T14:06:13.197Z",
        "updated_at": "2019-01-07T14:06:13.197Z",
        "credentials": {
          "key": "*********************************************************",
          "freight_number": "**"
        }
      },
      {
        "id": "tbEuFScyfSQMx7bN8",
        "type": "sagawa",
        "state": "active",
        "created_at": "2019-01-07T14:06:39.627Z",
        "updated_at": "2019-01-07T14:08:45.817Z",
        "credentials": {
          "key": "********",
          "password": "************************",
          "account_number": "***********",
          "account_key_number": ""
        }
      },
      {
        "id": "CFjQRubN5jhhT5hTb",
        "type": "japanpost",
        "state": "active",
        "created_at": "2018-09-24T15:33:58.145Z",
        "updated_at": "2018-09-24T15:33:58.145Z",
        "credentials": {
          "customer_numbers": "****"
        }
      }
    ]
    

    Retrieves a list of registered carriers.

    Request

    GET https://api.shipandco.com/v1/carriers

    Response

    Array of registered carriers information displayed.

    Update Carrier

    curl -v -X PUT "https://api.shipandco.com/v1/carriers/g3buDjYMCXaj6zNCv" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
        "settings": {
          "print": {
            "size": "PDF_4.2X8.3_BLUE"
          }
        }
      }'
    

    The above request returns the following response.

    {
      "id": "g3buDjYMCXaj6zNCv",
      "type": "sagawa",
      "state": "active",
      "created_at": "2019-02-25T11:58:57.852Z",
      "updated_at": "2019-02-25T11:58:57.852Z",
      "credentials": {
        "account_number": "*********",
        "key": "*********",
        "password": "*********"
      }
    }
    

    Update a carrier by carrier ID.

    Request

    PUT https://api.shipandco.com/v1/carriers/:id

    Item Note
    settings Settings specific to the carrier to update. See the carrier registration for more details.

    Response

    Updated carrier information with its ID

    Delete Carrier

    curl -v -X DELETE "https://api.shipandco.com/v1/carriers/GZDZQNo7zyxr4sbXc" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    "Carrier GZDZQNo7zyxr4sbXc deleted."
    

    Delete a carrier by carrier ID.

    Request

    DELETE https://api.shipandco.com/v1/carriers/:id

    Response

    The resulting message is displayed.

    Tracking

    Get Tracking

    curl -v -X GET "https://api.shipandco.com/v1/tracking/japanpost/RN004792035JP" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    {
      "requested_at": "2019-05-22T14:52:35.155Z",
      "carrier": "japanpost",
      "tracking_number": "RN004792035JP",
      "service": "Registered Mail / Insured Mail",
      "from_address": {},
      "to_address": {},
      "current_status": {
        "date": "2019-05-20T17:30:00.000Z",
        "status": "Arrival at outward office of exchange",
        "details": "",
        "location": "OSAKA"
      },
      "history": [
        {
          "date": "2019-05-20T07:45:00.000Z",
          "status": "Posting/Collection",
          "details": "",
          "location": "OSAKA"
        },
        {
          "date": "2019-05-20T17:30:00.000Z",
          "status": "Arrival at outward office of exchange",
          "details": "",
          "location": "OSAKA"
        }
      ]
    }
    

    Obtain tracking information with a carrier and its relevant tracking number.

    Request

    GET https://api.shipandco.com/v1/tracking/:carrier/:trackingNumber

    Response

    Carrier's tracking information displayed.

    Address

    Register Address

    curl -v -X POST "https://api.shipandco.com/v1/addresses" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
       "full_name": "Ship Co",
       "company": "Ship&Co",
       "email": "shipco@shipandco.com",
       "phone": "0312345678",
       "country": "JP",
       "address1": "chukyo-ku",
       "address2": "",
       "extra": "",
       "province": "Kyoto-fu",
       "zip": "123-4567",
       "city": "Kyoto-shi"
    }'
    

    The above request returns the following response.

    {
      "id": "kr54qe8YPdc5HZSBu",
      "created_at": "2019-01-12T09:04:43.619Z",
      "updated_at": "2019-01-12T09:04:43.619Z",
      "address": {
        "full_name": "Ship Co",
        "company": "Ship&Co",
        "address1": "chukyo-ku",
        "address2": "",
        "extra": "",
        "city": "Kyoto-shi",
        "province": "Kyoto-fu",
        "zip": "123-4567",
        "country": "JP",
        "phone": "0312345678",
        "email": "shipco@shipandco.com"
      }
    }
    

    To register a new shipping address.

    Request

    POST https://api.shipandco.com/v1/addresses

    Shipping address information to register. See Create Shipment for more details.

    Response

    Registered shipping address information with its ID.

    List Addresses

    curl -v -X GET "https://api.shipandco.com/v1/addresses" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    [
      {
        "id": "dC32vpNEja8W7WNwR",
        "created_at": "2019-01-12T08:32:55.411Z",
        "updated_at": "2019-01-12T08:32:55.411Z",
        "address": {
          "full_name": "John Doe",
          "company": "ACME",
          "address1": "Rua Maria Matos, 32",
          "address2": "",
          "extra": "",
          "city": "CHARNECA DA CAPARICA",
          "province": "SETUBAL",
          "zip": "2820-344",
          "country": "PT",
          "phone": "0901231234",
          "email": "john@doe.io"
        }
      },
      {
        "id": "kr54qe8YPdc5HZSBu",
        "created_at": "2019-01-12T09:04:43.619Z",
        "updated_at": "2019-01-12T09:04:43.619Z",
        "address": {
          "full_name": "Ship Co",
          "company": "Ship&Co",
          "address1": "chukyo-ku",
          "address2": "",
          "extra": "",
          "city": "Kyoto-shi",
          "province": "Kyoto-fu",
          "zip": "123-4567",
          "country": "JP",
          "phone": "0312345678",
          "email": "shipco@shipandco.com"
        }
      }
    ]
    

    To retrieve a list of registered shipping addresses.

    Request

    GET https://api.shipandco.com/v1/addresses

    Response

    Array of registered shipping addresses information.

    Warehouse

    Register Warehouse

    curl -v -X POST "https://api.shipandco.com/v1/warehouses" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
       "full_name": "",
       "full_name_kanji": "",
       "company": "ACME",
       "company_kanji": "株式会社ACME",
       "email": "",
       "phone": "090-1234-5678",
       "country": "JP",
       "address1": "HIGASHIYAMA KU",
       "address2": "SAIKAISHICHO",
       "province": "KYOTO",
       "address1_kanji": "京都市東山区",
       "address2_kanji": "西海子町",
       "extra_kanji": "",
       "province_kanji": "京都府",
       "zip": "604-0012",
       "city": "KYOTO SHI"
    }'
    

    The above request returns the following response.

    {
      "id": "cki5wYEHddBZuEtPv",
      "created_at": "2019-01-31T07:34:25.071Z",
      "updated_at": "2019-01-31T07:34:25.071Z",
      "address": {
        "full_name": "",
        "company": "ACME",
        "address1": "HIGASHIYAMA KU",
        "address2": "SAIKAISHICHO",
        "city": "KYOTO SHI",
        "province": "KYOTO",
        "zip": "604-0012",
        "country": "JP",
        "phone": "090-1234-5678",
        "email": "",
        "full_name_kanji": "",
        "company_kanji": "株式会社ACME",
        "address1_kanji": "京都市東山区",
        "address2_kanji": "西海子町",
        "extra_kanji": "",
        "province_kanji": "京都府"
      }
    }
    

    To register a warehouse.

    Request

    POST https://api.shipandco.com/v1/warehouses

    Warehouse information to register

    Response

    Registered warehouse information with its ID

    List Warehouses

    curl -v -X GET "https://api.shipandco.com/v1/warehouses" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    [
      {
        "id": "cki5wYEHddBZuEtPv",
        "created_at": "2019-01-31T07:34:25.071Z",
        "updated_at": "2019-01-31T07:34:25.071Z",
        "address": {
          "full_name": "",
          "company": "ACME",
          "address1": "HIGASHIYAMA KU",
          "address2": "SAIKAISHICHO",
          "city": "KYOTO SHI",
          "province": "KYOTO",
          "zip": "604-0012",
          "country": "JP",
          "phone": "090-1234-5678",
          "email": "",
          "full_name_kanji": "",
          "company_kanji": "株式会社ACME",
          "address1_kanji": "京都市東山区",
          "address2_kanji": "西海子町",
          "extra_kanji": "",
          "province_kanji": "京都府"
        }
      },
      {
        "id": "phuAH6qFvoxdASoCr",
        "created_at": "2019-01-31T07:37:46.332Z",
        "updated_at": "2019-01-31T07:37:46.332Z",
        "address": {
          "full_name": "John Doe",
          "company": "ACME",
          "address1": "Rua Maria Matos, 32",
          "address2": "",
          "extra": "",
          "city": "CHARNECA DA CAPARICA",
          "province": "SETUBAL",
          "zip": "2820-344",
          "country": "PT",
          "phone": "0901231234",
          "email": "john@doe.io"
        }
      }
    ]
    

    Get a list of registered warehouse information.

    Request

    GET https://api.shipandco.com/v1/warehouses

    Response

    Array of registered warehouse information.

    Files

    Upload File

    curl -v -X POST "https://api.shipandco.com/v1/files" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
       "type": "logo",
       "file": "iVBORw0KGgoAAAANSUhEUgAAAGQAAAAoCAMAAAA/pq9xAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkF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J1iYiw9WZx1aH1f3jCI8LeZDJiuFycdrzBSIm/VcCoGxRcNK56aHiPgWu1dYTAY4x/w2PuHyCAUprVtA7fzRcZfKd2IFuSd+Up7tqTdVldoKKtRWxnvsg0d7lxiAJHkaC2DkHayxZxOhA7l4SibMnPolNxbrvdwivm5ZBEdCYBAlvDAiTjudvOnw6mhVPgyIkJDJbXvAeJ7GPUSwTRR7mH4hwsumFZfk9MtF7XOVEQT8HIRCjO+g9M0us26xUogTEnnmcoannDZHJE54K0+JmJE42UbJkM75Bh6BmgzCHXt0Zr8MecYIGiQmMAyTnpJUI5V1eXiXHD2yafNuO40nKsLnSeeN7xWIAUNSreMpGbko0mvudqHhHcnGZbQQJh75L73McK9V3dJjBvT/npzW1l5St7GizZPAWiWTLKR//2+Cvw3tfcQQSjAbc8/slVBuRTVjrk9ggNpXeBzpKnQNCbYaDa0Xk7kCcNFIQjN8uhPuQkHNqQKeFlbOyY9KQkCkw0kxEwxDTnI12+r+EnwAA0EQvTI8JTUwAAAABJRU5ErkJggg=="
    }'
    

    The above request returns the following response.

    {
      "id": "phuAH6qFvoxdASoCr",
      "type": "logo",
      "file": "iVBORw0KGgoAAAANSUhEUgAAAGQAAAAoCAMAAAA/pq9xAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDA2IDc5LjE2NDY0OCwgMjAyMS8wMS8xMi0xNTo1MjoyOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpE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w6mhVPgyIkJDJbXvAeJ7GPUSwTRR7mH4hwsumFZfk9MtF7XOVEQT8HIRCjO+g9M0us26xUogTEnnmcoannDZHJE54K0+JmJE42UbJkM75Bh6BmgzCHXt0Zr8MecYIGiQmMAyTnpJUI5V1eXiXHD2yafNuO40nKsLnSeeN7xWIAUNSreMpGbko0mvudqHhHcnGZbQQJh75L73McK9V3dJjBvT/npzW1l5St7GizZPAWiWTLKR//2+Cvw3tfcQQSjAbc8/slVBuRTVjrk9ggNpXeBzpKnQNCbYaDa0Xk7kCcNFIQjN8uhPuQkHNqQKeFlbOyY9KQkCkw0kxEwxDTnI12+r+EnwAA0EQvTI8JTUwAAAABJRU5ErkJggg=="
    }
    

    To upload a file. (It must be a Base64 incoded JPEG or PNG)

    Request

    POST https://api.shipandco.com/v1/files

    File data to upload. (Max 2mb, PNG or JPEG encoded in Base64)

    Response

    Uploaded file information with its ID

    List Files

    curl -v -X GET "https://api.shipandco.com/v1/files" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    [
      {
        "id": "cki5wYEHddBZuEtPv",
        "type": "signature",
        "file": "iVBORw0KGgoAAAANSUhEUgAAAGQAAAAoCAMAAAA/pq9xAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyVpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDYuMC1jMDA2IDc5LjE2NDY0OCwgMjAyMS8wMS8xMi0xNTo1MjoyOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtb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qHhHcnGZbQQJh75L73McK9V3dJjBvT/npzW1l5St7GizZPAWiWTLKR//2+Cvw3tfcQQSjAbc8/slVBuRTVjrk9ggNpXeBzpKnQNCbYaDa0Xk7kCcNFIQjN8uhPuQkHNqQKeFlbOyY9KQkCkw0kxEwxDTnI12+r+EnwAA0EQvTI8JTUwAAAABJRU5ErkJggg=="
      }
    ]
    

    Get a list of your uploaded files.

    Request

    GET https://api.shipandco.com/v1/files

    Response

    Array of uploaded files

    Sub User

    Sub users under a regular Ship&co account can have their own individual tokens to call APIs. Data is segmented according to each sub user account. Do note that sub user APIs can only accept regular tokens (which means sub users cannot call sub user APIs themselves).

    Diagram

    Register Sub User

    curl -v -X POST "https://api.shipandco.com/v1/sub-users" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json" \
      -d '{
        "contact": {
          "first_name": "John",
          "last_name": "Doe",
          "company": "ACME"
        },
        "email": "email@test.com",
        "api_token": true
    }'
    

    The above request returns the following response.

    {
      "id": "f1f97cfa813c828a73528989da671a81",
      "created_at": "2019-02-25T11:12:14.021Z",
      "email": "email@test.com",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYXNhZVBwNlpGWUZSZ1FzIiwiaWF0IjoxNTUxMDkzMTM0fQ.gBUpoCpFbIt26DiezI4liHWel9KP47-p-Uw-Q3Ush6k",
      "first_name": "John",
      "last_name": "Doe",
      "company": "ACME"
    }
    

    Register a Sub User.

    Request

    POST https://api.shipandco.com/v1/sub-users

    In order to register a sub user, an email address and basic information is required.

    Item Note
    email Required. Key of sub users
    contact first_name, last_name, full_name (optional), company
    api_token Request a token or not.

    *You can check the working sample requests with Postman.

    Response

    Registered sub user information with its ID and API token. Generated API token can be used for other APIs. See Authorization.

    List Sub Users

    curl -v -X GET "https://api.shipandco.com/v1/sub-users" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    [
      {
        "id": "f1f97cfa813c828a73528989da671a81",
        "created_at": "2019-02-25T11:12:14.021Z",
        "email": "email@test.com",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYXNhZVBwNlpGWUZSZ1FzIiwiaWF0IjoxNTUxMDkzMTM0fQ.gBUpoCpFbIt26DiezI4liHWel9KP47-p-Uw-Q3Ush6k",
        "first_name": "John",
        "last_name": "Doe",
        "company": "ACME"
      },
      {
        "id": "929ab359ada3fa5c7bf53bff7ffcbe58",
        "created_at": "2019-02-26T11:08:13.749Z",
        "email": "email2@test.com",
        "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjUzam9qand4ejlQdWZzRXp4IiwiaWF0IjoxNTUxMTc5MjkzfQ.RLb2jWjwo9FZwP3MSyyDYkbQZMTtmjMvTYql-dfgk1o",
        "first_name": "John 2",
        "last_name": "Doe 2",
        "company": "ACME 2"
      }
    ]
    

    Obtain a list of registered sub user information.

    Request

    GET https://api.shipandco.com/v1/sub-users

    Response

    Array of registered sub user information.

    Get Sub User

    curl -v -X GET "https://api.shipandco.com/v1/sub-users/f1f97cfa813c828a73528989da671a81" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    {
      "id": "f1f97cfa813c828a73528989da671a81",
      "created_at": "2019-02-25T11:12:14.021Z",
      "email": "email@test.com",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYXNhZVBwNlpGWUZSZ1FzIiwiaWF0IjoxNTUxMDkzMTM0fQ.gBUpoCpFbIt26DiezI4liHWel9KP47-p-Uw-Q3Ush6k",
      "first_name": "John",
      "last_name": "Doe",
      "company": "ACME"
    }
    

    Retrieve a sub user by the sub user ID.

    Request

    GET https://api.shipandco.com/v1/sub-users/:id

    Response

    Only one sub user is displayed per command.

    Refresh Sub User

    curl -v -X POST "https://api.shipandco.com/v1/sub-users/f1f97cfa813c828a73528989da671a81" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    {
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVhYXNhZVBwNlpGWUZSZ1FzIiwiaWF0IjoxNTUxMTc5OTgyfQ.sQChZ4DjIPyDbgOmJ2-jUgMe_xw9d52-TBGizg9lPjo"
    }
    

    Recreate API token of a sub user.

    Request

    POST https://api.shipandco.com/v1/sub-users/:id

    Response

    API token recreated for the requested sub user.

    Delete Sub User

    curl -v -X DELETE "https://api.shipandco.com/v1/sub-users/f1f97cfa813c828a73528989da671a81" \
      -H "x-access-token: YOUR_API_TOKEN_FROM_DASHBOARD" \
      -H "Content-Type: application/json"
    

    The above request returns the following response.

    "Child user f1f97cfa813c828a73528989da671a81:email@test.com deleted."
    

    Delete a sub user by the carrier ID.

    Request

    DELETE https://api.shipandco.com/v1/sub-users/:id

    Response

    The resulting message is displayed.

    Common Definition

    Carrier And Services

    Carrier Value Service Values Intl / Dom (JP)
    Japan Post International japanpost japanpost_ems, japanpost_ems_document, japanpost_epacket, japanpost_epacket_light, japanpost_smallpacket_registered_sal, japanpost_smallpacket_registered_air, japanpost_smallpacket_registered_sea, japanpost_smallpacket_sal, japanpost_smallpacket_air, japanpost_smallpacket_sea, japanpost_parcel_sal, japanpost_parcel_air, japanpost_parcel_sea, japanpost_printed_matter_sal, japanpost_printed_matter_air, japanpost_printed_matter_sea, japanpost_printed_matter_registered_sal, japanpost_printed_matter_registered_air, japanpost_letters_sal, japanpost_letters_air, japanpost_letters_sea, japanpost_letters_registered_sal, japanpost_letters_registered_air Intl
    Japan Post Domestic (Yuupack) yuupack yuupack_regular, yuupack_fresh, yuupack_frozen Dom (JP)
    Japan Post Domestic (Yuupacket) yuupacket yuupacket_regular Dom (JP)
    UPS ups ups_saver, ups_worldwide_express, ups_worldwide_express_plus, ups_worldwide_expedited Intl
    DHL dhl dhl_express_worldwide, dhl_express_1200, dhl_express_0900, dhl_express_jumbo Intl
    FedEx fedex fedex_international_economy, fedex_international_first, fedex_international_priority, fedex_international_priority_express, fedex_international_priority_eod,fedex_international_connect_plus Intl
    Sagawa sagawa sagawa_fresh, sagawa_frozen, sagawa_plane, sagawa_regular Dom (JP)
    Yamato yamato yamato_regular, yamato_collect, yamato_direct_mail, yamato_time, yamato_freight_on_delivery, yamato_nekopos, yamato_taqbin, yamato_taqbin_collect Dom (JP)
    Pegasus pegasus pegasus_dhl, pegasus_ups,pegasus_ems Intl
    In-house shipping (for shipments without carriers or tracking like mail delivery) custom custom_standard Dom (JP)
    Carrier Pack Size Values Delivery Time Values
    Sagawa 60, 80, 100, 140, 160 not-specified, before-noon, 12-14, 14-16, 16-18, 18-20, 19-21, 18-21
    Japan Post Domestic (Yuupack) 60, 80, 100, 120, 140, 160, 170 not-specified, before-noon, 12-14, 14-16, 16-18, 18-20, 19-21, 20-21
    Yamato not-specified, before-noon, 14-16, 16-18, 18-20, 19-21, before-ten (only available for `yamato_time` service), before-five (only available for `yamato_time` service)
    Item Note Intl / Dom (JP)
    carrier_id String. ID of carrier to use for a shipment. Possible values are the Ids of your active carriers. Usefull if you have multiple accounts for a given carrier type. Intl, Dom (JP)
    carrier String. Type of carrier to use for a shipment. Possible values are: `japanpost`, `ups`, `fedex`, `dhl`, `sagawa`, `yamato`, `yuupack`, `pegasus`. Intl, Dom (JP)
    service String. The service name for the chosen carrier. See the list of possible services by carrier above. Intl, Dom (JP)
    currency String. The shipment currency of products, we accept only ISO 4217 values. Intl, Dom (JP)
    date String. The delivery date. YYYY-MM-DD format example `2018-09-20` If omitted, the blank is set (= the earliest date give by the shipping carrier) or the earliest date. Intl, Dom (JP)
    time String. The value of delivery time depends on the carrier, this option is avaialble only for `yamato`, `sagawa` and `yuupack`, see the list above. Dom (JP)
    shipment_date String. The shipment date. YYYY-MM-DD format example `2018-09-18` If omitted, the date gets unspecified. This is mandatory for `yamato` only. Intl, Dom (JP)
    insurance Number. Amount to be insured in the same currency as the shipment. Only for `japanpost`, `dhl`, and `fedex`. *Set `0` for no insurance. Intl
    ref_number String. If you need to provide a reference number to the shipping label. Intl, Dom (JP)
    delivery_note String. If you need to provide some notes about delivery. Intl, Dom (JP)
    signature Boolean. This is a paid service on some carriers. Intl
    cool_options String. Possible values are `regular`, `fresh` and `frozen`. Dom (JP)
    care Object. `fragile`: (boolean), `side_up`: (boolean), `valuable_goods`: (boolean) Dom (JP)
    pack_size String. The value of pack size depends on the carrier. See the list above. Dom (JP)
    pack_amount Number. The value of pack amount. Dom (JP)
    cash_on_delivery Object. The toal and tax amount of cash on delivery. `amount`: (integer), `tax`: (integer) Dom (JP)
    return_label Boolean. Simultaneous publishment of returning labels. If `true` is set for supported carriers (e.g. DHL), returning labels get generated with multiple tracking numbers. Intl, Dom (JP)
    print_start_location Number. The position of the label in the A4 sheet. Only for `yuupacket_regular`, `yamato_direct_mail`, `yamato_nekopos`. Dom (JP)
    shipping_fee Number. Shipping fee to be included on the PDF commercial invoice for the shipment. Intl, Dom (JP)
    security_service Boolean. Valid for `yuupack_regular` shipments only. Possible value: `true` or `false`. Dom (JP)

    GET Parameters

    Item Note
    limit default `50`, max `250`
    page default `1`
    created_after format `2018-09-20T00:00:00.000Z`
    created_before default `today` format `2018-09-20T00:00:00.000Z`

    GET Response

    Item Note
    count Total number of data
    pages Total number of pages of responses (can be specified by GET Parameters)
    current_page The current response page (can be specified by GET Parameters)

    Rate Limit

    The number of API calls per unit time is limited. If exceeded, the error message indicating “too many requests” will be displayed. The HTTP response headers provide additional information regarding your utilization relative to the call limit.

    Item Note
    x-api-call-limit The amount available/total amount per unit time. API calls with the available amount 0 produce the error above
    x-api-call-reset The timestamp when the amount available above resets to total

    Error

    Error Code

    Ship&co API has the following error codes.'

    Returns 200 for normal responses.

    Error Code Note
    400 Validation errors due to incorrect or insufficient input
    403 The API token is not specified or is incorrect
    404 The specified data is not found
    429 Too many requests (refer to Rate Limit for the details)
    500 Internal errors

    Error Response

    {
      "debug_id": "err_8953pxowmMt3YW2XQ",
      "message": "INVALID",
      "description": "Request is not well-formed, syntactically incorrect, or violates schema.",
      "link": "https://developer.shipandco.com",
      "details": [
        {
          "field": "address1",
          "issue": "address1 is required"
        },
        {
          "field": "country",
          "issue": "country is required"
        }
      ],
    }
    

    Ship&co API returns the following error response.

    Item Note
    debug_id Unique ID for each API call to communicate with Ship&co
    message Error short message
    description Error long description
    link Link to the error contents
    details Error details with each item