bradtreloar / couriersplease-python-client

Python library for Couriers Please API
GNU General Public License v3.0
0 stars 0 forks source link

Reconcile Shipment API and Pickup API address fields #2

Closed bradtreloar closed 6 years ago

bradtreloar commented 6 years ago

Pickup API only allows 20 characters per line for the pickup address, while Shipment API allows much longer strings.

i.e. if I map the Domestic Shipment API pickup address fields to the Domestic Pickup API address fields, then I need to truncate the values to make them fit.

e.g.

address1: company name (maxlength: 20) corresponds to pickupCompanyName (maxlength: 50)

address2: (maxlength: 20) corresponds to pickupAddress1 (maxlength: 100)

address3: (maxlength: 20) corresponds to pickupAddress2 (maxlength: 100)

address4: contact name (maxlength: 20) corresponds to pickupFirstName (maxlength: 100) + ' ' + pickupLastName (maxlength: 100)

address5: phone number (maxlength: 20) corresponds to pickupPhone (maxlength: 20)

Need to find the best way to enter the pickup address for a batch of shipments if the pickup address from those consignments exceeds the Pickup API's character limit.

bradtreloar commented 6 years ago

This problem only exists with Pickup API V1, which has been replaced by V2