Skip to content

PitneyBowes/pitneybowes-360api-shipping-java

Repository files navigation

API 360 shipping java SDK

Shipping APIs

  • API version: 1.0.0

  • Build date: 2024-09-30T12:57:37.504069+05:30[Asia/Kolkata]

  • Generator version: 7.7.0

Introduction

The Shipping APIs include a variety of operations that allow users to manage and track their shipping requests.

Some of the key API operations available in the Shipping API includes:

Shipment API

Operation Description
Get Carriers This operation fetches all onboarded carriers. Typically, user will use this service to get list of onboarded carriers and supported properties for those carriers.
Get Countries This operation fetches list of supported destination countries for a provided carrier and origin country.
Get Services This operation fetches a list of supported services for a carrier with respect to specific origin and destination country.
Get ParcelTypes This operation fetches ParcelTypes based on carrier, origin and destination country.
Get Special Services This operation fetches Special Services for a given carrier, service, origin and destination country.
Get Carrier Accounts This operation retrieves onboarded Carriers with their Carrier Account Ids which uniquely identify multiple accounts of same carrier.
Rate Shop and Get Single Rate This API contains 2 operations, rate shop and single rate. Rate shop will fetch rates for all carrier services based on the given addresses (From and To), weight, and dimension for given parcelType. Single rate will get rate for specific service and special service (if requested) based on the given addresses (From and To), weight, and dimension, parcelType and serviceId with or without specialServices. Single rate will be used mainly to a rate a shipment before creating shipment.
Create Shipment This operation creates a new Shipment or Shipment Label. This is for both Domestic and International.
Get All Shipments This operation fetches all created Shipments.
Get Shipment by Id Retrieves single shipment using Shipment Id.
Reprint Shipment This operation reprints Shipment by the shipmentId. It retrieves an existing shipping label to reprint. The API sends the shipmentId returned by the original Created Shipment request. Use this only if the shipping label in the Create Shipment response was spoilt or lost.
Cancel Shipment This operation cancels previously created shipment.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.pitneybowes.360api</groupId>
  <artifactId>shipping</artifactId>
  <version>1.0.2</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()
    maven {
        url = uri("https://maven.pkg.github.com/PitneyBowes/pitneybowes-360api-shipping-java")
        credentials {
            username = "<YOUR_GITHUB_USERNAME>"
            password = "<YOUR_GITHUB_PERSONAL_ACCESS_TOKEN}>"
        }
    }
  }

  dependencies {
      implementation "org.springframework:spring-web:5.3.33"
      implementation "com.pitneybowes.360api:shipping:1.0.2"

      testImplementation platform('org.junit:junit-bom:5.10.0')
      testImplementation 'org.junit.jupiter:junit-jupiter'
  }

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.pitneybowes.api360.ApiClient;
import com.pitneybowes.api360.api.ShipmentApi;
import com.pitneybowes.api360.model.GetCarrierAccounts200Response;
import org.springframework.web.client.RestClientResponseException;

public class ShipmentApiExample {

    public static void main(String[] args) {

      try {
            ApiClient defaultClient = new ApiClient();
            defaultClient.setBasePath("https://api-sandbox.sendpro360.pitneybowes.com/shipping"); // PROD: https://api.sendpro360.pitneybowes.com/shipping
            defaultClient.configureBearerAuth("<API360_CLIENT_ID>", "<API360_CLIENT_SECRET>");

            ShipmentApi apiInstance = new ShipmentApi(defaultClient);
            GetCarrierAccounts200Response carrierAccounts = apiInstance.getCarrierAccounts(null);

            System.out.println(carrierAccounts);
        } catch (RestClientResponseException e) {
            System.err.println("Exception when calling ShipmentApi#getCarrierAccounts");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api-sandbox.sendpro360.pitneybowes.com/shipping

Class Method HTTP request Description
AddressApi addressSuggest POST /api/v1/address/suggest Address Suggest
AddressApi addressValidate POST /api/v1/address/verify Address Validate
BatchApi bulkImportAPI POST /api/v1/shipments/importUrl Bulk Import Shipments
BatchApi bulkImportAPIERR POST /api/v1/err/shipments/importUrl Bulk Import Shipments ERR
BatchApi createBulkShipmentsAPI POST /api/v1/bulkShipments Create Bulk Shipments
BatchApi createBulkShipmentsAPIERR POST /api/v1/err/bulkShipments Create Bulk Shipments ERR
BatchApi getBatchStatusAPI GET /api/v1/shipments/batch/{batchId}/status Get Batch Status
BatchApi getShipmentDetailsForBatchAPI GET /api/v1/shipments/batch/{batchId}/shipments Get Batch Shipment Details
BatchApi processBatchAPI POST /api/v1/shipments/batch/{batchId}/process Process Batch
BatchApi voidShippingLabel POST /api/v1/shipments/batch/{batchId}/void Void Batch Shipping Labels
DefaultsApi createDefaults POST /api/v1/defaults Create Defaults
DefaultsApi deleteDefaultsById DELETE /api/v1/defaults/{defaultID} Delete Defaults by ID
DefaultsApi getAllDefaults GET /api/v1/defaults Get All Defaults
DefaultsApi getDefaultsById GET /api/v1/defaults/{defaultID} Get Defaults By ID
DefaultsApi putDefaultsById PUT /api/v1/defaults/{defaultID} Update Defaults
ManifestApi createManifest POST /api/v1/manifests Create Manifest
ManifestApi reprintManifest POST /api/v1/manifests/reprint Reprint manifest
MultipieceApi multipieceRates POST /api/v1/multipiece/rates Multipiece Rateshop and Rates
MultipieceApi multipieceShipment POST /api/v1/multipiece/shipments Multipiece Shipment
MultipieceApi multipieceShipmentCancel PUT /api/v1/multipiece/shipments/{shipmentId}/cancel Cancel Multipiece Shipment
MultipieceApi multipieceShipmentReprint GET /api/v1/multipiece/shipments/{shipmentId}/reprint Reprint Multipiece Shipment
PickupsApi cancelPickups PUT /api/v1/pickups/cancel Cancel Pickups
PickupsApi cancelledPickupDocument POST /api/v1/pickups/document Cancelled Pickup Document
PickupsApi getPickupDocument GET /api/v1/pickups/{pickupId}/document Get Pickup Document
PickupsApi getPickups GET /api/v1/pickups Get Pickups
PickupsApi schedulePickup POST /api/v1/pickups Schedule Pickup
PrintApi deletePrinterMapping DELETE /api/v1/printer/mapping Delete Printer mapping
PrintApi getPrinterMapping GET /api/v1/printer/mapping Get Printer mapping
PrintApi jobStatus GET /api/v1/jobs/{jobId} Job status
PrintApi printDocument POST /api/v1/document/print Print Document
PrintApi printerMapping POST /api/v1/printer/mapping Printer mapping
ShipmentApi cancelShipmentById PUT /api/v1/shipments/{shipmentId}/cancel Cancel Shipment
ShipmentApi cancelStampsERR POST /api/v1/err/stamps/void Cancel Stamps ERR
ShipmentApi createReturnLabel POST /api/v1/shipments/{shipmentId}/return Create Return label shipment
ShipmentApi createShipment POST /api/v1/shipments Create Shipment
ShipmentApi downloadBpodFiles POST /api/v1/err/shipments/bpod Download BPOD Files
ShipmentApi getAllShipments GET /api/v1/shipments Get All Shipments
ShipmentApi getCarrierAccounts GET /api/v1/carrierAccounts Get Carrier Accounts
ShipmentApi getCarriers GET /api/v1/carriers Get Carriers
ShipmentApi getCountries GET /api/v1/countries Get Countries
ShipmentApi getParcelTypes GET /api/v1/parcelTypes Get Parcel Types
ShipmentApi getRates POST /api/v1/rates Rate Shop and Get Single Rate
ShipmentApi getServices GET /api/v1/services Get Services
ShipmentApi getSignatureImageERR GET /api/v1/err/shipments/{shipmentId}/signaturefile Signature Image ERR
ShipmentApi getSpecialServices GET /api/v1/specialServices Get Special Services
ShipmentApi reprintShipmentById GET /api/v1/shipments/{shipmentId}/reprint Reprint Shipment
ShipmentApi shipmentById GET /api/v1/shipments/{shipmentId} Get Shipment by Id
ShipmentByRateShopApi cancelShipmentByIdV2 POST /api/v2/shipments/cancel Cancel Shipment
ShipmentByRateShopApi createShipmentV2 POST /api/v2/shipments Create Shipment
ShipmentByRateShopApi reprintShipmentByIdV2 POST /api/v2/shipments/reprint Reprint Shipment

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

bearerAuth

  • Type: HTTP Bearer Token authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

Pitney Bowes

About

PitneyBowes API 360 shipping SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages