Skip to main content

Python API Seur carrier, Spain.

Features

  • Services

  • Test connection

  • Get cities by zip

  • Create/Send shipments to Seur

  • Get info delivery (shipment)

  • Get list deliveries (shipments) from date

Usage Examples

Example API in test.py file

Services

from seur.utils import services
services()

Test connection

with API(username, password, vat, franchise, seurid, ci, ccc, context) as seur_api:
    print seur_api.test_connection()

Create/send shipment to Seur

context['printer'] = 'ZEBRA'
context['printer_model'] = 'LP2844-Z'
context['ecb_code'] = '2C'
with Picking(username, password, vat, franchise, seurid, ci, ccc, context) as picking_api:
    reference, label, error = picking_api.create(data)

To get PDF label file pass pdf value in context:

context['pdf'] = True
with Picking(username, password, vat, franchise, seurid, ci, ccc, context) as picking_api:
    reference, label, error = picking_api.create(data)

Get Picking Info

with Picking(username_expedicion, password_expedicion, vat, franchise, seurid, ci, ccc, context) as picking_api:
    data = {}
    data['expedicion'] = 'S'
    data['public'] = 'N'
    data['reference'] = 'SEURREFERENCE'
    info = picking_api.info(data)

Get Picking List

with Picking(username_expedicion, password_expedicion, vat, franchise, seurid, ci, ccc, context) as picking_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 Label

context['pdf'] = True
with Picking(username, password, vat, franchise, seurid, ci, ccc, context) as picking_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 method
    data['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)

    with open("/tmp/seur-label.pdf","wb") as f:
        f.write(decodestring(label))
    print "Generated PDF label in /tmp/seur-label.pdf"

Get Manifiesto

with Picking(username, password, vat, franchise, seurid, ci, ccc, context) as picking_api:
    print "Get Manifiesto"

    data = {}
    manifiesto = picking_api.manifiesto(data)

    with open("/tmp/seur-manifiesto.pdf","wb") as f:
        f.write(decodestring(manifiesto))
    print "Generated PDF label in /tmp/seur-manifiesto.pdf"

Get city or zip exist from Seur API

with Picking(username, password, vat, franchise, seurid, ci, ccc, context) as picking_api:

    city = 'Granollers' # or upper
    options = 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.

Release files for seur 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for seur 0.0.17
File Size Uploaded
seur-0.0.17.tar.gz 27.1 kB Details

Release files / seur-0.0.17.tar.gz

Download URL seur-0.0.17.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0ddabe01795e48ce68dbc30940072a12ca349bb62e1efea5f940530322f0a2ff
BLAKE2b-256 checksum
How to use checksums
0823f527ab886224e92f25e382fcd39ff38207d00faa7c13df4f2420e42ed8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.17 This release

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page