python-fedex-devs / python-fedex Goto Github PK
View Code? Open in Web Editor NEWA light wrapper around FedEx's SOAP API.
Home Page: http://python-fedex.readthedocs.org
License: BSD 3-Clause "New" or "Revised" License
A light wrapper around FedEx's SOAP API.
Home Page: http://python-fedex.readthedocs.org
License: BSD 3-Clause "New" or "Revised" License
tools
package is not packaged in the pypi distribution.
As a result, importing methods inside the conversion
module doesn't work.
I am trying to get the XML response for the Fedex technical support to clarify some rate differences between the API and their web calculator. However, I am not exactly sure how to capture the XML message/response. Thus, any assistance in such matter would be nice.
I work at a place that ships stuff using the Fedex Shipping Manager software. It does not seem to need a recipient phone number, but this module does. Am I doing something wrong? Should I give a number like "###-###-####" or "000-000-0000" or something?
Hi,
Do we have any plans to implement CustomsClearanceDetail?
Unable to install the package using pip3
I think the reference you want is
conversion
and the file where I noticed this is address_validation.py
Can't find an example for pickup_service.py added recently, would be a huge help.
Hello @radzhome and friends. I just wanted to check in and make sure you've got everything you need at this point. I don't want to be holding you up in any way, it looks like things are going well.
I don't know what went wrong but I got everything working last night and now I receive this weird suds build error:
An error occured while building a instance of (RequestedShipment). As a result
the object you requested could not be constructed. It is recommended
that you construct the type manually using a Suds object.
Please open a ticket with a description of this error.
Reason: Type not found: '(CommercfDutiesPaymentialInvoiceDetail, http://fedex.com/ws/rate/v16, )'
I've tried to reinstall the fedex library but still no luck.
Does anyone know how to solve this error?
It seems that ServiceType shouldn't be included when trying to get all services.
Dropping this option triggers an error.
I tried to removed all entries of such element in the relevant wdsi file but no avail.
I registered for a developer account from FedEx and plugged all of my account information in to the config. I created a virtualenv with the latest version of fedex and suds installed via pip. I'm using Python 2.7.1 32-bit on Windows 7. When running the rate request sample, I'm getting an error:
Traceback (most recent call last):
File "rate_request.py", line 20, in
rate_request = FedexRateServiceRequest(CONFIG_OBJ)
File "C:\Users\brandon\Desktop\gtaylor-python-fedex-e5a26cc\fedex\services\rate_service.py", line 36, in init
_args, *_kwargs)
File "C:\Users\brandon\Desktop\gtaylor-python-fedex-e5a26cc\fedex\base_service.py", line 84, in init
self.client = Client('file://%s' % self.wsdl_path)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\client.py", line 112, in init
self.wsdl = reader.open(url)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\reader.py", line 152, in open
d = self.fn(url, self.options)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\wsdl.py", line 136, in init
d = reader.open(url)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\reader.py", line 79, in open
d = self.download(url)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\reader.py", line 95, in download
fp = self.options.transport.open(Request(url))
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\transport\https.py", line 60, in open
return HttpTransport.open(self, request)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\transport\http.py", line 62, in open
return self.u2open(u2request)
File "C:\Users\brandon\python_virtualenvs\fedex_test\lib\site-packages\suds\transport\http.py", line 118, in u2open
return url.open(u2request, timeout=tm)
File "C:\Python27\Lib\urllib2.py", line 394, in open
response = self._open(req, data)
File "C:\Python27\Lib\urllib2.py", line 412, in _open
'_open', req)
File "C:\Python27\Lib\urllib2.py", line 372, in _call_chain
result = func(*args)
File "C:\Python27\Lib\urllib2.py", line 1302, in file_open
return self.open_local_file(req)
File "C:\Python27\Lib\urllib2.py", line 1342, in open_local_file
raise URLError(msg)
urllib2.URLError: <urlopen error [Error 3] The system cannot find the path specified: ''>
Any ideas on what could be the matter?
Thanks,
Brandon
After updating example_config.py with my sandbox credentials, running python freight_rate_request.py
returns fedex.base_service.FedexError: FreightLineItemId for Freight shipment line item 1 is missing or invalid. (Error code: 2103)
. This is on
f691dfe. The full log output (with redacted credentials) is here: https://gist.github.com/evorw/68d723a66d63713deb031fddb5ea9949
I have to download using sudo pip install -U git+https://[email protected]/gtaylor/python-fedex.git
sudo pip install fedex gives me a version where I get this error while authenticating:
./generate_label.py
INFO:fedex:Using test server.
Traceback (most recent call last):
File "./generate_label.py", line 22, in <module>
shipment = FedexProcessShipmentRequest(CONFIG_OBJ)
File "./lib/fedex/services/ship_service.py", line 37, in __init__
*args, **kwargs)
File "./lib/fedex/base_service.py", line 88, in __init__
self.client = Client('file:///%s' % self.wsdl_path.lstrip('/'))
File "./lib/suds/client.py", line 109, in __init__
options.cache = ObjectCache(days=1)
File "./lib/suds/properties.py", line 475, in __setattr__
self.__pts__.set(name, value)
File "./lib/suds/properties.py", line 284, in set
self.provider(name).__set(name, value)
File "./lib/suds/properties.py", line 424, in __set
d.validate(value)
File "./lib/suds/properties.py", line 184, in validate
raise AttributeError,msg
AttributeError: "cache" must be: (<class suds.cache.Cache at 0x7fcd48ab2a78>,)
vagrant@ubuntu-vagrant-devbox:~/projects/gwt_fedex$ vim generate_label.py
vagrant@ubuntu-vagrant-devbox:~/projects/gwt_fedex$ ./generate_label.py
Traceback (most recent call last):
File "./generate_label.py", line 14, in <module>
from fedex_settings import CONFIG_OBJ
File "/home/vagrant/projects/gwt_fedex/fedex_settings.py", line 24, in <module>
freight_account_number='X10XXX02X', use_test_server=True)
TypeError: __init__() got an unexpected keyword argument 'freight_account_number'
For some reason the "source code" link in the left-hand nav bar points to the code for some other project!
Hi.. i have been trying to test the rate service, but keep getting errors. Currently it is an authentication error, but i have also received the following error.
account number and associates address is required for service type code 988
THe latest error was obtained after changing the account numbers to my ltl account info sent when i signed up for a developer key. Any insights you can provide would be appreciated.
Rob
I just realized that when tracking a delivered package, all you get is the last event, not the full details of each event in the path. I noticed other services (as well as FedEx's website) provide this info, but I don't see how to enable it. With UPS, you have to specifically request a detailed/full result - so I suspect that's the case here as well.
Seems like IncludeDetailedScans might be it, but it doesn't seem to have any effect.
Anyone managed to do this?
I am try to changing the shipper address, Like this way,
rate_request.RequestedShipment.Shipper.Address.PostalCode = '533212'
rate_request.RequestedShipment.Shipper.Address.CountryCode = 'IN'
rate_request.RequestedShipment.Shipper.Address.City="Kakinada"
But I am getting below error,
FedexError: Airbill is not allowed for Origin Country. (Error code: 879)
What is the above. How to solve the above error ?
Thanks..
Hi,
I would like to know if its possible to download the Signature proof of document (SPOD) by sending a SPOD request.
Re: The change introduced by this commit: fde7f04
self.client = Client('file://%s' % self.wsdl_path)
self.client = Client('file:///%s' % self.wsdl_path)
This breaks things for me. I start getting a URLError ("ftp error: no host given"). For example, trying to do a rate request, the url to the wsdl file (using the default wsdl base directory) becomes "file:////absolute/path/to/fedex/wsdl/RateService_v8.wsdl" (with four slashes), and urllib2 (which suds uses to open wsdl files, even local ones) fails with that cryptic message because it no longer understands that this should be "file" protocol.
I'm not sure why adding the slash would fix the examples (as noted in that commit message), but it seems to me that maybe the examples should be fixed rather than this line in base_service.py.
I just signed up to get started, and I am quite excited about the software you put together.
But I am unable to get a successful response from FedEx. I copied & pasted examples/create_shipment.py and examples/example_config.py and filled in my own values. I then tried to run the example using my test key/password/etc and got this error message:
Traceback (most recent call last):
File "testfedex.py", line 113, in
shipment.send_validation_request()
File "/usr/local/lib/python2.6/dist-packages/fedex/services/ship_service.py", line 102, in send_validation_request
self.send_request(send_function=self._assemble_and_send_validation_request)
File "/usr/local/lib/python2.6/dist-packages/fedex/base_service.py", line 226, in send_request
self._check_response_for_request_errors()
File "/usr/local/lib/python2.6/dist-packages/fedex/base_service.py", line 188, in _check_response_for_request_errors
notification.Message)
fedex.base_service.FedexError: Authentication Failed (Error code: 1000)
sandford@Compy686:~/workspace/labels/fedex$
I thought that the problem might be related to the validation I was asking it to do (I uncommented the "validate this request" line). So I removed the validation, and was greeted with this:
Traceback (most recent call last):
File "testfedex.py", line 116, in
shipment.send_request()
File "/usr/local/lib/python2.6/dist-packages/fedex/base_service.py", line 219, in send_request
raise SchemaValidationError()
fedex.base_service.SchemaValidationError: "suds encountered an error validating your data against this service's WSDL schema. Please double-check for missing or invalid values, filling all required fields." (Error code: -1)
sandford@Compy686:~/workspace/labels/fedex$
That's not so good, since I was hoping to use the example to get started.
I went back to the previous error (authentication failed) and did a little digging. The WSDL files show the URL being something like https://gatewaybeta.fedex.com:443/web-services but in an email FedEx sent me with my test account information they list https://wsbeta.fedex.com:443/web-services. I can't help but wonder if that cased the authentication problem I first noted.
In the interests of figuring out what the problem was with the create_shipment request (sans validation) I found this on SO (http://stackoverflow.com/questions/2388046/can-you-help-me-solve-this-suds-soap-issue) and cranked logging up to DEBUG. I found this:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><ns1:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://fedex.com/ws/ship/v7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/><ns1:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://fedex.com/ws/ship/v7" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">soapenv:Faultsoapenv:ServerSchema validation failed for request.<con:fault xmlns:con="http://www.bea.com/wli/sb/context">con:errorCode5/con:errorCodecon:reasonSchema validation failed for request./con:reasoncon:details<con1:ValidationFailureDetail xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">con1:messagestring value '' is not a valid enumeration value for EdtRequestType in namespace http://fedex.com/ws/ship/v7/con1:messagecon1:xmlLocationns0:EdtRequestType//con1:xmlLocationcon1:messagestring value '' is not a valid enumeration value for PhysicalPackagingType in namespace http://fedex.com/ws/ship/v7/con1:messagecon1:xmlLocationns0:PhysicalPackaging//con1:xmlLocation/con1:ValidationFailureDetail/con:details/con:fault/soapenv:Fault/ns1:Body/soapenv:Envelope
The important bit there seems to be this:
string value '' is not a valid enumeration value for EdtRequestType in namespace http://fedex.com/ws/ship/v7
Then I go to http://www.fedex.com/ws/ship/v7 and FedEx gives me a 404 error.
I am basically out of ideas on how to debug these issues at this point. Any help you can give me would be greatly appreciated.
Thanks!
Mike
Hello,I use track service simply to get track details with tracknumber.
But in examples,I view track.response,there is no trackdetails,there is only "process success" info,but I need more detailed info(time,status and so on).Thanks for answer.
Hello, i am triying go to production, with use_test_server=False and date productions for meter number and more, but fedex create_shipment display: 'Meter number is not registered (Error code: 8001)'.
Help me please, thank you
Was trying to track a package by reference number today. Found it to be impossible.
I need to send country in this field along with the account number:
track.SelectionDetails.Destination
It should accept Address objects. It incorrectly expects a string. Adding the proper type causes a SchemaValidationError. Sending anything else to Fedex produces a failure in their system.
i wanted to validate postal code of US
and used service >> FedexValidatePostalRequest
but it seems it doesn't conside country code and check for provided country only
i am getting success results for other postal codes too!!
any suggestion related to this issue ?
after CONFIG and ShipDate details setting this two values,
Hello, we are creating international shipment labels, but it seems that the wsdl V13 is not supported in the new version of the API.
According to the docs we should be filling something like
RequestedShipment.CustomsClearanceDetail.CommercialInvoice.TermsOfSale
But in the library we have V13 and not the V15 they expect we to use, do you know how we can get the new wsdl file? Thank you for any pointer
P.D: we already sent a request to [email protected] , and did not find anything.
Solved, contact to support fedex and them activated my keys :)
Hi,
On behalf of FanXchange.com (github.com/fanxchange), I would like to propose us to be the new maintainer for your package.
Cheers, Rad
Please include this feature also in this current python library
soap_url = "https://gateway.fedex.com:443/web-services/uploaddocument"
soap_url = "https://gatewaybeta.fedex.com:443/web-services/uploaddocument"
Hi there, I'm having issues using ShipService_v13.wsdl
and I want to test the v15. I did replaced the content in these files:
fedex/wsdl/ShipService_v13.wsdl
fedex/wsdl/test_server_wsdl/ShipService_v13.wsdl
But is not taking any changes I make, how can I test a different WSDL file ?
Well friends i an using it, and facing a scenario/problem
A customer XYZ want to make purchase from my e-commerce site
his cart have 3 different item (weight of 60,70 and 70 lb lb)
Now as FedEx have some weight restriction like 150 lb is the max weight for a package
So how can i deliver him 200 lb
Now i need to use MPS
https://www.fedex.com/us/developer/WebHelp/ws/2014/dvg/WS_DVG_WebHelp/14_4_1_Multiple_Piece_Shipment_Request_Elements.htm
Please help me,
waiting for your response!
Unable to install the library using pip3.
Hi,
Is there any way to print return Label Detail in COD. As I can not find any details in create_shipment.py.
Need an example how to processTag Request..
pip install fedex installs fedex only. Since it is required to work, I'd suggest to put that req into install_requires as well.
Does the API work with tracking shipments from NA to SA? I have no trouble seeing shipments from SA to NA tracking info, but anything from NA to SA sends me back an error instead of success/
I installed with easy_install. Seemed to work but the module is empty.
$ python
Python 2.7.1 (r271:86832, Mar 4 2011, 16:49:28)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import fedex
dir(fedex)
['VERSION', 'builtins', 'doc', 'file', 'name', 'package', 'path']
I have used your api with fedex test credentails & it gives me no error while generating tracking number. But now when i am using 'Production Crerentails' it gives me error while generating tracking number 'Authentication Failed' (Error code: 1000).
and one more thing the rate which this API gives me does not match with FedEx current rate when i clarify with fedex site.
Please help me out..
Can you add another service for checking fedex service availability? This is exposed as an independent service by FedEx
Hey,
Is there anyway I can get the raw response from Fedex out of the FedexTrackRequest object after the send_request call runs successfully? I poked around but couldn't find a way how.
Thanks a lot
unicode error thrown in base_service.py when request / reply contain non-ascii characters that are valid utf-8 chars.
UnicodeEncodeError 'ascii' codec can't encode character u'\u030a' in position 8: ordinal not in range(128)
solution unicode(value, 'utf-8') ?
is unicodedata.normalize required?
Can you add Pickup Service please?
Hi,
I am trying to implement this awesome fedex wrapper in my application but I am getting this error when I am trying to make a Rate Request, this is primarily because the PurposeofShipmentType is not defined in the rate request and this is the error I am getting when I fire the rate request from the system.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 939, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 81, in runserverobj
frappe.desk.form.run_method.runserverobj(method, docs=docs, dt=dt, dn=dn, arg=arg, args=args)
File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/run_method.py", line 36, in runserverobj
r = doc.run_method(method)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1029, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1012, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/rigpl_erpnext/rigpl_erpnext/rigpl_erpnext/doctype/book_shipment/book_shipment.py", line 26, in get_rates
self.rate_service(credentials, from_address_doc, to_address_doc, from_country_doc, to_country_doc, transporter_doc)
File "/home/frappe/frappe-bench/apps/rigpl_erpnext/rigpl_erpnext/rigpl_erpnext/doctype/book_shipment/book_shipment.py", line 151, in rate_service
rate_request.send_request()
File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/fedex/base_service.py", line 331, in send_request
self._check_response_for_request_errors()
File "/home/frappe/frappe-bench/env/lib/python2.7/site-packages/fedex/base_service.py", line 265, in _check_response_for_request_errors
notification.Message)
FedexError: The PurposeOfShipmentType is null, empty or invalid. (Error code: 691)
The surprising part is that I am unable to get the error code 691 in the API documentation.
Hello,
I was using track service with right tracking_number.Request was successfully processed.But I got an error code :9040;
And the DeliveryOptionEligibilityDetails in response is like this:
(DeliveryOptionEligibilityDetail){
Option = "REDIRECT_TO_HOLD_AT_LOCATION"
Eligibility = "INELIGIBLE"
Is it mean that some problems in my CONFIG_OBJ
?
Thanks a lot
After updating example_config.py
with my credentials, running python3 rate_request.py
returns ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1051).---- During handling of the above exception, another exception occurred: ---- urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1051)>
Do I need to add any more changes to other files? I could only think that my credentials are incorrect. I did not change any other files.
The full log output here: https://gist.github.com/iguzmanl/6a5385262b036dfe906bf5642f84b1ee
Hi,
I am integrating API in OpenERP and I am using test account.
I am getting shipping quotes but not able to generate tracking no using FedexProcessShipmentRequest.
Error : "suds encountered an error validating your data against this service's WSDL schema. Please double-check for missing or invalid values, filling all required fields." (Error code: -1)"
Here's my code:
shippingfedex_ptr = self.fedex_connection(cr,uid,ids)
account_no = shippingfedex_ptr.account_number
key = shippingfedex_ptr.key
password = shippingfedex_ptr.password
meter_no = shippingfedex_ptr.meter_number
is_test = shippingfedex_ptr.is_test
CONFIG_OBJ = FedexConfig(key=key, password=password, account_number=account_no, meter_number=meter_no, use_test_server=is_test)
for rec in self.browse(cr,uid,ids):
shipping_rec = rec
merchant_rec = rec.partner_id
if (not merchant_rec.zip) or (not merchant_rec.country_id) or (not merchant_rec.city) or \
(not merchant_rec.state_id):
raise osv.except_osv(('Invalid Address!'),('Please check the Merchant address.'))
for company in self.pool.get('res.users').browse(cr,uid,[uid]):
company_rec = company.company_id
if (not company_rec.zip) or (not company_rec.country_id) or (not company_rec.city) \
or (not company_rec.state_id):
raise osv.except_osv(('Invalid Address!'),('Please check the Shipper address.'))
if company_rec.street and company_rec.street2:
shipper_address = company_rec.street + ', ' + company_rec.street2
elif company_rec.street and not company_rec.street2:
shipper_address = company_rec.street
elif company_rec.street2 and not company_rec.street:
shipper_address = company_rec.street2
else:
raise osv.except_osv(('Invalid Address'),('Please check the Shipper Address.'))
if merchant_rec.street and merchant_rec.street2:
merchant_address = merchant_rec.street + ', ' + merchant_rec.street2
elif merchant_rec.street and not merchant_rec.street2:
merchant_address = merchant_rec.street
elif merchant_rec.street2 and not merchant_rec.street:
merchant_address = merchant_rec.street2
else:
raise osv.except_osv(('Invalid Address'),('Please check the Merchant Address.'))
#GET TRACKING NO
# This is the object that will be handling our tracking request.
shipment = FedexProcessShipmentRequest(CONFIG_OBJ)
shipment.RequestedShipment.DropoffType = shipping_rec.dropoff_type_fedex
shipment.RequestedShipment.ServiceType = shipping_rec.service_type_fedex
shipment.RequestedShipment.PackagingType = shipping_rec.packaging_type_fedex
shipment.RequestedShipment.PackageDetail = shipping_rec.package_detail_fedex
shipment.RequestedShipment.RateRequestTypes = ["ACCOUNT"]
shipment.RequestedShipment.ShippingChargesPayment.PaymentType = shipping_rec.payment_type_fedex
shipment.RequestedShipment.ShippingChargesPayment.Payor.AccountNumber = CONFIG_OBJ.account_number
shipment.RequestedShipment.Shipper.Contact.PersonName = company_rec.name #'Sender Name'
shipment.RequestedShipment.Shipper.Contact.CompanyName = company_rec.name #'Some Company'
shipment.RequestedShipment.Shipper.Contact.PhoneNumber = company_rec.phone #'9012638716'
# Shipper address.
shipment.RequestedShipment.Shipper.Address.StreetLines = [shipper_address] #['Address Line 1']
shipment.RequestedShipment.Shipper.Address.City = company_rec.city #'Herndon'
shipment.RequestedShipment.Shipper.Address.StateOrProvinceCode = company_rec.state_id.code #'VA'
shipment.RequestedShipment.Shipper.Address.PostalCode = company_rec.zip #'20171'
shipment.RequestedShipment.Shipper.Address.CountryCode = company_rec.country_id.code #'US'
shipment.RequestedShipment.Shipper.Address.Residential = False
# Recipient contact info.
shipment.RequestedShipment.Recipient.Contact.PersonName = merchant_rec.name #'Recipient Name'
shipment.RequestedShipment.Recipient.Contact.CompanyName = merchant_rec.name #'Recipient Company'
shipment.RequestedShipment.Recipient.Contact.PhoneNumber = merchant_rec.phone #'9012637906'
# Recipient address
shipment.RequestedShipment.Recipient.Address.StreetLines = [merchant_address] #['Address Line 1']
shipment.RequestedShipment.Recipient.Address.City = merchant_rec.city #'Herndon'
shipment.RequestedShipment.Recipient.Address.StateOrProvinceCode = merchant_rec.state_id.code
shipment.RequestedShipment.Recipient.Address.PostalCode = merchant_rec.zip #'20171'
shipment.RequestedShipment.Recipient.Address.CountryCode = merchant_rec.country_id.code #'US'
shipment.RequestedShipment.Recipient.Address.Residential = False
shipment.RequestedShipment.ShippingChargesPayment.PaymentType = shipping_rec.payment_type_fedex
shipment.RequestedShipment.LabelSpecification.LabelFormatType = 'COMMON2D'
shipment.RequestedShipment.LabelSpecification.ImageType = 'PNG'
shipment.RequestedShipment.LabelSpecification.LabelStockType = 'PAPER_4X6'
shipment.RequestedShipment.LabelSpecification.LabelPrintingOrientation = 'BOTTOM_EDGE_OF_TEXT_FIRST'
package1_weight = shipment.create_wsdl_object_of_type('Weight')
package1_weight.Value = shipping_rec.weight_package #1.0
package1_weight.Units = "LB"
package1 = shipment.create_wsdl_object_of_type('RequestedPackageLineItem')
package1.Weight = package1_weight
shipment.add_package(package1)
print "DOCS\n",shipment.client
print"SHIPMENT REQUEST\n",shipment.RequestedShipment
shipment.send_request()
Thanks in advance.
Is it possible to set the CustomsValue attributes?
I would like to add contents value and currency to get the declared_value surcharge rate.
Hi
Is there a way with this library to find tracking numbers from our account / reference number ?
We have several places of label creation etc (some online) and would like to recover the tracking ID's to our back office system.
Is this possible ?
Thanks
Alex
Hi,
A request for pickup of shipment by a Fedex agent - no documentation is given on RTD.
Is pickup implemented in this app? Currently, here I cannot find it:
http://python-fedex.readthedocs.io/en/latest/services.html
Shipping order creation, tracking, etc are given. But pickup is not mentioned anywhere. I've also seen a PR of pickup service, but it's not mentioned anywhere on how to use it. Also, there's not example for pickups in https://github.com/python-fedex-devs/python-fedex/tree/master/examples.
But I did find a pickup service unittest:
https://github.com/python-fedex-devs/python-fedex/blob/master/tests/test_pickup_service.py
So, does the code written in above test: This is the stuff to get a Fedex agent to come and pickup the shipment package, right? If so, I can test that out and this issue can be closed. Thanks.
When I call shipment.add_package
more than once, it appears that the api is sent <ns0:PackageCount>0</ns0:PackageCount>
, and the response includes <Code>2021</Code><Message>Invalid package count or invalid package sequence number.</Message>
.
how can i post sender cod details for fedex in countries like india
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.