Skip to content

PitneyBowes/pitneybowes-360api-shipping-python

Repository files navigation

shipping

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.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/PitneyBowes/pitneybowes-360api-shipping-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/PitneyBowes/pitneybowes-360api-shipping-python.git)

Then import the package:

import shipping

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import shipping

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import shipping
from shipping.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api-sandbox.sendpro360.pitneybowes.com/shipping
# See configuration.py for a list of all supported configuration parameters.
configuration = shipping.Configuration(
    host = "https://api-sandbox.sendpro360.pitneybowes.com/shipping"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: bearerAuth
configuration = shipping.Configuration(
    access_token = <"BEARER_TOKEN">
)


# Enter a context with an instance of the API client
with shipping.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = shipping.AddressApi(api_client)
    address_suggest_request = shipping.AddressSuggestRequest() # AddressSuggestRequest | 

    try:
        # Address Suggest
        api_response = api_instance.address_suggest(address_suggest_request)
        print("The response of AddressApi->address_suggest:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AddressApi->address_suggest: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AddressApi address_suggest POST /api/v1/address/suggest Address Suggest
AddressApi address_validate POST /api/v1/address/verify Address Validate
BatchApi bulk_import_api POST /api/v1/shipments/importUrl Bulk Import Shipments
BatchApi bulk_import_apierr POST /api/v1/err/shipments/importUrl Bulk Import Shipments ERR
BatchApi create_bulk_shipments_api POST /api/v1/bulkShipments Create Bulk Shipments
BatchApi create_bulk_shipments_apierr POST /api/v1/err/bulkShipments Create Bulk Shipments ERR
BatchApi get_batch_status_api GET /api/v1/shipments/batch/{batchId}/status Get Batch Status
BatchApi get_shipment_details_for_batch_api GET /api/v1/shipments/batch/{batchId}/shipments Get Batch Shipment Details
BatchApi process_batch_api POST /api/v1/shipments/batch/{batchId}/process Process Batch
BatchApi void_shipping_label POST /api/v1/shipments/batch/{batchId}/void Void Batch Shipping Labels
DefaultsApi create_defaults POST /api/v1/defaults Create Defaults
DefaultsApi delete_defaults_by_id DELETE /api/v1/defaults/{defaultID} Delete Defaults by ID
DefaultsApi get_all_defaults GET /api/v1/defaults Get All Defaults
DefaultsApi get_defaults_by_id GET /api/v1/defaults/{defaultID} Get Defaults By ID
DefaultsApi put_defaults_by_id PUT /api/v1/defaults/{defaultID} Update Defaults
ManifestApi create_manifest POST /api/v1/manifests Create Manifest
ManifestApi reprint_manifest POST /api/v1/manifests/reprint Reprint manifest
MultipieceApi multipiece_rates POST /api/v1/multipiece/rates Multipiece Rateshop and Rates
MultipieceApi multipiece_shipment POST /api/v1/multipiece/shipments Multipiece Shipment
MultipieceApi multipiece_shipment_cancel PUT /api/v1/multipiece/shipments/{shipmentId}/cancel Cancel Multipiece Shipment
MultipieceApi multipiece_shipment_reprint GET /api/v1/multipiece/shipments/{shipmentId}/reprint Reprint Multipiece Shipment
PickupsApi cancel_pickups PUT /api/v1/pickups/cancel Cancel Pickups
PickupsApi cancelled_pickup_document POST /api/v1/pickups/document Cancelled Pickup Document
PickupsApi get_pickup_document GET /api/v1/pickups/{pickupId}/document Get Pickup Document
PickupsApi get_pickups GET /api/v1/pickups Get Pickups
PickupsApi schedule_pickup POST /api/v1/pickups Schedule Pickup
PrintApi delete_printer_mapping DELETE /api/v1/printer/mapping Delete Printer mapping
PrintApi get_printer_mapping GET /api/v1/printer/mapping Get Printer mapping
PrintApi job_status GET /api/v1/jobs/{jobId} Job status
PrintApi print_document POST /api/v1/document/print Print Document
PrintApi printer_mapping POST /api/v1/printer/mapping Printer mapping
ShipmentApi cancel_shipment_by_id PUT /api/v1/shipments/{shipmentId}/cancel Cancel Shipment
ShipmentApi cancel_stamps_err POST /api/v1/err/stamps/void Cancel Stamps ERR
ShipmentApi create_return_label POST /api/v1/shipments/{shipmentId}/return Create Return label shipment
ShipmentApi create_shipment POST /api/v1/shipments Create Shipment
ShipmentApi download_bpod_files POST /api/v1/err/shipments/bpod Download BPOD Files
ShipmentApi get_all_shipments GET /api/v1/shipments Get All Shipments
ShipmentApi get_carrier_accounts GET /api/v1/carrierAccounts Get Carrier Accounts
ShipmentApi get_carriers GET /api/v1/carriers Get Carriers
ShipmentApi get_countries GET /api/v1/countries Get Countries
ShipmentApi get_parcel_types GET /api/v1/parcelTypes Get Parcel Types
ShipmentApi get_rates POST /api/v1/rates Rate Shop and Get Single Rate
ShipmentApi get_services GET /api/v1/services Get Services
ShipmentApi get_signature_image_err GET /api/v1/err/shipments/{shipmentId}/signaturefile Signature Image ERR
ShipmentApi get_special_services GET /api/v1/specialServices Get Special Services
ShipmentApi reprint_shipment_by_id GET /api/v1/shipments/{shipmentId}/reprint Reprint Shipment
ShipmentApi shipment_by_id GET /api/v1/shipments/{shipmentId} Get Shipment by Id
ShipmentByRateShopApi cancel_shipment_by_id_v2 POST /api/v2/shipments/cancel Cancel Shipment
ShipmentByRateShopApi create_shipment_v2 POST /api/v2/shipments Create Shipment
ShipmentByRateShopApi reprint_shipment_by_id_v2 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: Bearer authentication

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages