Package: seur
Python API Seur carrier, Spain.FeaturesServicesTest connectionGet cities by zipCreate/Send shipments to SeurGet info delivery (shipment)Get list deliveries (shipments) from dateUsage ExamplesExample API in test.py fileServicesfromseur.utilsimportservicesservices()Test connectionwithAPI(username,password,vat,franchise,seurid,ci,ccc,context)asseur_api:printseur_api.test_connection()Create/send shipment to Seurcontext['printer']='ZEBRA'context['printer_model']='LP2844-Z'context['ecb_code']='2C'withPicking(username,password,vat,franchise,seurid,ci,ccc,context)aspicking_api:reference,label,error=picking_api.create(data)To get PDF label file pass pdf value in context:context['pdf']=TruewithPicking(username,password,vat,franchise,seurid,ci,ccc,context)aspicking_api:reference,label,error=picking_api.create(data)Get Picking InfowithPicking(username_expedicion,password_expedicion,vat,franchise,seurid,ci,ccc,context)aspicking_api:data={}data['expedicion']='S'data['public']='N'data['reference']='SEURREFERENCE'info=picking_api.info(data)Get Picking ListwithPicking(username_expedicion,password_expedicion,vat,franchise,seurid,ci,ccc,context)aspicking_api:data={}data['expedicion']='S'data['public']='N'data['from']='19-03-2014'data['to']='19-03-2014'shipments=picking_api.list(data)If don’t pass from or to values, get today date.Get Labelcontext['pdf']=TruewithPicking(username,password,vat,franchise,seurid,ci,ccc,context)aspicking_api:print"Get Label PDF"data={}data['servicio']='1'data['product']='2'data['total_bultos']='1'#~ data['total_kilos'] =data['observaciones']='Testing Seur API - Get Label'data['referencia_expedicion']='S/OUT/0001'data['ref_bulto']='S/OUT/0001'#~ data['clave_portes'] = '' # Add F to invoice#~ data['clave_reembolso'] = '' # Add F to invoice#~ data['valor_reembolso'] = ''data['cliente_nombre']='Zikzakmedia SL'data['cliente_direccion']='Sant Jaume, 9. Baixos 2'#~ data['cliente_tipovia'] = 'CL'#~ data['cliente_tnumvia'] = 'N'#~ data['cliente_numvia'] = '93'#~ data['cliente_escalera'] = 'A'#~ data['cliente_piso'] = '3'#~ data['cliente_puerta'] = '2'data['cliente_poblacion']='Vilafranca del Penedes'# Important city exist in Seur. Get Seur values from zip methoddata['cliente_cpostal']='08720'data['cliente_pais']='ES'data['cliente_email']='zikzak@zikzakmedia.com'data['cliente_telefono']='938902108'data['cliente_atencion']='Raimon Esteve'label=picking_api.label(data)withopen("/tmp/seur-label.pdf","wb")asf:f.write(decodestring(label))print"Generated PDF label in /tmp/seur-label.pdf"Get ManifiestowithPicking(username,password,vat,franchise,seurid,ci,ccc,context)aspicking_api:print"Get Manifiesto"data={}manifiesto=picking_api.manifiesto(data)withopen("/tmp/seur-manifiesto.pdf","wb")asf:f.write(decodestring(manifiesto))print"Generated PDF label in /tmp/seur-manifiesto.pdf"Get city or zip exist from Seur APIwithPicking(username,password,vat,franchise,seurid,ci,ccc,context)aspicking_api:city='Granollers'# or upperoptions=picking_api.city(city)zip='08720'options=picking_api.zip(zip)Return dict values from seur.
These methods are important to call when create a new/send picking because Seur
validate city value and  requires city exist in their system.