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:
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
Python 3.7+
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
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
Execute pytest
to run the tests.
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)
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 |
- Address
- AddressCountStatus
- AddressSuggestRequest
- AddressSuggestRequestAddress
- AddressSuggestResponse
- AddressSuggestResponseAddress
- AddressSuggestResponseSuggestions
- AddressSuggestResponseSuggestionsAddressesInner
- AddressValidateRequest
- AddressValidateResponse
- AllDefaults
- AllDefaultsDataInner
- AllDefaultsPageInfo
- BPODDownloadRequest
- BPODDownloadResponse
- BulkShipmentResponse
- BulkShipmentResponseERR
- BulkShipmentResponseERRLabelDetails
- BulkShipmentResponseERRLabelDetailsLayout
- ByCarrierV2
- CancelShipment
- CancelShipmentV2
- CancelShipmentV2References
- CancelStampsRequestERR
- CancelStampsResponseERR
- Carriers
- CarriersCarriersInner
- CarriersCarriersInnerProperties
- CounterStatus
- CountriesInner
- CreateBatchRequest
- CreateBatchRequestERR
- CreateBulkShipmentInternational
- CreateBulkShipments
- CreateBulkShipmentsAPIERRRequest
- CreateBulkShipmentsAPIRequest
- CreateBulkShipmentsERRCoversheet
- CreateBulkShipmentsERRLabel
- CreateDefaults
- CreateDefaultsResponse
- CreateManifest200Response
- CreateManifestRequest
- CreateManifestRequestFromAddress
- CreateShipment200Response
- CreateShipmentRequest
- CreateShipmentV2Request
- Customs
- CustomsInfo
- CustomsItem
- DefaultResponse
- DocTabItem
- DomesticShipmentResponse
- DomesticShipmentResponseFromAddress
- DomesticShipmentResponseLabelLayoutInner
- DomesticShipmentResponseRate
- DomesticShipmentResponseRateSpecialServicesInner
- DomesticShipmentResponseRateSpecialServicesInnerInputParametersInner
- DomesticShipmentResponseToAddress
- DomesticShipmentResponseV2
- DomesticShipmentResponseV2LabelLayoutInner
- DomesticShipmentResponseV2PrintError
- Error
- Errors
- ErrorsErrorsInner
- FromAddress
- FromAddressV2
- FromAddressV2Response
- GetAllPickups
- GetAllPickupsDataInner
- GetAllPickupsDataInnerPickupOptions
- GetAllPickupsDataInnerPickupSummaryInner
- GetAllPickupsPageInfo
- GetAllShipments
- GetAllShipmentsDataInner
- GetAllShipmentsDataInnerFromAddress
- GetAllShipmentsDataInnerMetadataInner
- GetAllShipmentsDataInnerParcel
- GetAllShipmentsDataInnerRate
- GetAllShipmentsDataInnerRateSpecialServicesInner
- GetAllShipmentsDataInnerRateSpecialServicesInnerInputParametersInner
- GetAllShipmentsDataInnerToAddress
- GetCarrierAccounts200Response
- GetCarrierAccounts200ResponseCarrierAccountsInner
- GetDefaultsById
- GetPickupCancelledDocumentRequest
- GetPickupCancelledDocumentResponse
- GetPickupDocument
- GetRates200Response
- GetRatesRequest
- GetShipmentsForBatch
- GetShipmentsForBatchDataInner
- GetShipmentsForBatchDataInnerLabelLayout
- GetShipmentsForBatchDataInnerMetadataInner
- GetShipmentsForBatchDataInnerSpecialServicesInner
- GetShipmentsForBatchDataInnerStepStatus
- GetShipmentsForBatchPageInfo
- GetSingleShipment
- GetSingleShipmentFromAddress
- GetSingleShipmentRate
- GetSingleShipmentRateSpecialServicesInner
- GetSingleShipmentRateSpecialServicesInnerInputParametersInner
- GetSingleShipmentToAddress
- GetStatusDetailedResponse
- GetStatusDetailedResponseLabelDetails
- GetStatusDetailedResponseLabelDetailsResultsInner
- GetStatusDetailedResponseLabelDetailsResultsInnerShipmentIdentifiersInner
- ImportCountStatus
- InternationalShipmentResponse
- InternationalShipmentResponseCustoms
- InternationalShipmentResponseCustomsCustomsInfo
- InternationalShipmentResponseCustomsCustomsItemsInner
- InternationalShipmentResponseRate
- InternationalShipmentResponseRateSpecialServicesInner
- InternationalShipmentResponseRateSpecialServicesInnerInputParametersInner
- JobStatus
- JobStatusPrintStatusTransactionInner
- LabelGenerationCountStatus
- ManifestCompactResponse
- ManifestCompactResponseManifestDocumentsInner
- ManifestDetailedResponse
- ManifestDetailedResponseFromAddress
- ManifestDetailedResponseManifestDocumentsInner
- MultipieceDomesticShipmentRequest
- MultipieceDomesticShipmentRequestFromAddress
- MultipieceDomesticShipmentRequestMetadataInner
- MultipieceDomesticShipmentRequestMultiPieceParcelsInner
- MultipieceDomesticShipmentRequestMultiPieceParcelsInnerParcel
- MultipieceDomesticShipmentRequestShipmentOptions
- MultipieceDomesticShipmentRequestToAddress
- MultipieceDomesticShipmentResponse
- MultipieceDomesticShipmentResponseLabelLayoutInner
- MultipieceDomesticShipmentResponseMultiPieceRatesInner
- MultipieceDomesticShipmentResponseMultiPieceRatesInnerMultiPieceParcelsInner
- MultipieceDomesticShipmentResponseMultiPieceRatesInnerMultiPieceParcelsInnerParcel
- MultipieceDomesticShipmentResponseMultiPieceRatesInnerMultiPieceParcelsInnerParcelRate
- MultipieceDomesticShipmentResponseMultiPieceRatesInnerMultiPieceParcelsInnerParcelRateSurchargesInner
- MultipieceDomesticShipmentResponseMultiPieceRatesInnerSurchargesInner
- MultipieceInternationalShipmentRequest
- MultipieceInternationalShipmentRequestCustoms
- MultipieceInternationalShipmentRequestCustomsCustomsInfo
- MultipieceInternationalShipmentRequestMultiPieceParcelsInner
- MultipieceInternationalShipmentRequestMultiPieceParcelsInnerParcel
- MultipieceInternationalShipmentRequestToAddress
- MultipieceInternationalShipmentResponse
- MultipieceInternationalShipmentResponseCustoms
- MultipieceInternationalShipmentResponseCustomsCustomsInfo
- MultipieceRateShopRequest
- MultipieceRateShopRequestMultiPieceParcelsInner
- MultipieceRateShopRequestMultiPieceParcelsInnerParcel
- MultipieceRateShopResponse
- MultipieceRateShopResponseErrorsInner
- MultipieceRateShopResponseRatesInner
- MultipieceRateShopResponseRatesInnerMultiPieceParcelsInner
- MultipieceRateShopResponseRatesInnerMultiPieceParcelsInnerParcelRate
- MultipieceRates200Response
- MultipieceRatesRequest
- MultipieceRatesRequestFromAddress
- MultipieceRatesRequestMultiPieceParcelsInner
- MultipieceRatesRequestMultiPieceParcelsInnerParcel
- MultipieceRatesRequestToAddress
- MultipieceRatesResponse
- MultipieceRatesResponseRatesInner
- MultipieceRatesResponseRatesInnerMultiPieceParcelsInner
- MultipieceRatesResponseRatesInnerMultiPieceParcelsInnerParcel
- MultipieceRatesResponseRatesInnerMultiPieceParcelsInnerParcelRate
- MultipieceRatesResponseRatesInnerMultiPieceParcelsInnerParcelRateSurchargesInner
- MultipieceRatesResponseRatesInnerSurchargesInner
- MultipieceShipment200Response
- MultipieceShipmentRequest
- NotFoundErrors
- NotFoundErrorsErrorsInner
- Parameter
- Parcel
- ParcelTypesInner
- ParcelTypesInnerBrandedDimensions
- ParcelTypesInnerDimensionRulesInner
- ParcelTypesInnerDimensionRulesInnerMaxParcelDimensions
- ParcelTypesInnerDimensionRulesInnerMinParcelDimensions
- ParcelTypesInnerWeightRulesInner
- ParcelV2
- ParcelV2Response
- PrintDocumentRequest
- PrintDocumentRequestReference
- PrintDocumentResponse
- PrinterMappingGetResponse
- PrinterMappingRequest
- PrinterMappingResponse
- ProcessShipmentResponse
- RateResponseV2
- RateResponseV2DeliveryCommitment
- RateResponseV2SurchargesInner
- RateShop
- RateShopFromAddress
- RateShopParcel
- RateShopResponse
- RateShopResponseErrorsInner
- RateShopResponseFromAddress
- RateShopResponseParcel
- RateShopResponseRatesInner
- RateShopResponseRatesInnerDeliveryCommitment
- RateShopResponseRatesInnerSurchargesInner
- RateShopResponseToAddress
- RatingCountStatus
- RatingCountStatusERR
- ReferenceV2
- ReprintManifestRequest
- ReprintShipment
- ReprintShipmentFromAddress
- ReprintShipmentParcel
- ReprintShipmentRate
- ReprintShipmentRateSpecialServicesInner
- ReprintShipmentToAddress
- ReprintShipmentV2
- ReprintShipmentV2LabelLayoutInner
- ReturnLabel
- ReturnLabelFromAddress
- ReturnLabelResponse
- ReturnLabelResponseLabelLayoutInner
- ReturnLabelResponseRate
- ReturnLabelResponseRateSpecialServicesInner
- ReturnLabelResponseRateSpecialServicesInnerInputParametersInner
- ReturnLabelResponseRateSurchargesInner
- ReturnLabelResponseToAddress
- ReturnLabelSpecialServicesInner
- ReturnLabelSpecialServicesInnerInputParametersInner
- ReturnLabelToAddress
- SchedulePickup200Response
- SchedulePickupCancelRequest
- SchedulePickupCancelRequestOptionsInner
- SchedulePickupCancelResponse
- SchedulePickupCancelResponsePickups
- SchedulePickupCancelResponsePickupsUPS10191697701340901
- SchedulePickupDHLEXPRequest
- SchedulePickupDHLEXPRequestPickupAddress
- SchedulePickupDHLEXPRequestPickupOptions
- SchedulePickupDHLEXPRequestPickupSummaryInner
- SchedulePickupDHLEXPRequestPickupSummaryInnerPackageDetailsInner
- SchedulePickupDHLEXPResponse
- SchedulePickupDHLEXPResponsePickupAddress
- SchedulePickupDHLEXPResponsePickupOptions
- SchedulePickupDHLEXPResponsePickupSummaryInner
- SchedulePickupFedexRequest
- SchedulePickupFedexRequestPickupOptions
- SchedulePickupFedexRequestPickupSummaryInner
- SchedulePickupFedexResponse
- SchedulePickupRequest
- SchedulePickupUPSRequest
- SchedulePickupUPSRequestPickupOptions
- SchedulePickupUPSRequestPickupSummaryInner
- SchedulePickupUPSResponse
- SchedulePickupUPSResponsePickupOptions
- SchedulePickupUPSResponsePickupRate
- SchedulePickupUPSResponsePickupRateSurchargesInner
- SchedulePickupUPSResponsePickupSummaryInner
- SchedulePickupUSPSRequest
- SchedulePickupUSPSRequestPickupSummaryInner
- SchedulePickupUSPSResponse
- SchedulePickupUSPSResponsePickupSummaryInner
- SendingOptions
- SendingOptionsCarrierAccounts
- SendingOptionsResponse
- SendingOptionsResponseCarrierAccounts
- ServicesInner
- Shipment
- ShipmentBatch
- ShipmentBatchResponseERR
- ShipmentCancelV2
- ShipmentDomestic
- ShipmentDomesticByCarrier
- ShipmentDomesticByCarrierDeliveryOption
- ShipmentDomesticByCarrierDocTab
- ShipmentDomesticByCarrierMetadataInner
- ShipmentDomesticByCarrierShipmentOptions
- ShipmentDomesticByRateGroup
- ShipmentDomesticByRateGroupByRateGroup
- ShipmentDomesticByRateGroupMetadataInner
- ShipmentDomesticByRateGroupShipmentOptions
- ShipmentDomesticByRuleset
- ShipmentDomesticByRulesetByRuleSet
- ShipmentDomesticByRulesetDeliveryOption
- ShipmentDomesticByRulesetMetadataInner
- ShipmentDomesticByRulesetShipmentOptions
- ShipmentDomesticFromAddress
- ShipmentDomesticMetadataInner
- ShipmentDomesticParcel
- ShipmentDomesticToAddress
- ShipmentERR
- ShipmentERRCoversheet
- ShipmentERRCoversheetMetadataInner
- ShipmentERRMetadataInner
- ShipmentInternational
- ShipmentInternationalCustoms
- ShipmentInternationalCustomsCustomsInfo
- ShipmentInternationalCustomsCustomsItemsInner
- ShipmentInternationalFromAddress
- ShipmentInternationalMetadataInner
- ShipmentInternationalParcel
- ShipmentInternationalToAddress
- ShipmentMetadataInner
- ShipmentOptions
- ShipmentOptionsERR
- ShipmentOptionsV2
- ShipmentReprintV2
- ShipmentReprintV2References
- ShipmentToAddress
- SignatureFileResponse
- SingleRate
- SingleRateFromAddress
- SingleRateParcel
- SingleRateResponse
- SingleRateResponseFromAddress
- SingleRateResponseParcel
- SingleRateResponseRatesInner
- SingleRateResponseRatesInnerSpecialServicesInner
- SingleRateResponseToAddress
- SingleRateToAddress
- SpecialService
- SpecialServiceBatch
- SpecialServiceBatchERR
- SpecialServiceERRInner
- SpecialServices
- SpecialServicesServicesInner
- SpecialServicesServicesInnerParcelTypeRulesInner
- SpecialServicesServicesInnerParcelTypeRulesInnerSpecialServiceRulesInner
- SpecialServicesServicesInnerParcelTypeRulesInnerSpecialServiceRulesInnerInputParameterRulesInner
- SpecialServicesServicesInnerParcelTypeRulesInnerSpecialServiceRulesInnerPrerequisiteRulesInner
- ToAddress
- ToAddressV2
- ToAddressV2Response
- VoidBatchRequest
- VoidBatchResponse
- VoidCountStatus
Authentication schemes defined for the API:
- Type: HTTP basic authentication
- Type: Bearer authentication