MercadoLivre Envios - MeliDevConf 2013 - SP

Click here to load reader

  • date post

    13-Jan-2015
  • Category

    Documents

  • view

    2.203
  • download

    22

Embed Size (px)

description

 

Transcript of MercadoLivre Envios - MeliDevConf 2013 - SP

  • 1. MercadoLivre Developers Conference MercadoLivre Envios

2. Bruno Elia Software Engineer @brunoelia 3. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 4. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 5. MercadoLivre Developers Conference MercadoLivre Envios 6. Calculador de custos Custos de envio direto no MercadoPago Direo de envio completa ao pagar MercadoLivre Developers Conference MercadoLivre Envios 7. MercadoLivre Developers Conference MercadoLivre Envios 8. MercadoLivre Developers Conference MercadoLivre Envios 9. MercadoLivre Developers Conference MercadoLivre Envios 10. MercadoLivre Developers Conference MercadoLivre Envios 11. ME 2 MercadoLivre Developers Conference MercadoLivre Envios 12. != ME1 ME2 MercadoLivre Developers Conference MercadoLivre Envios 13. MercadoLivre Developers Conference MercadoLivre Envios 14. MercadoLivre Developers Conference MercadoLivre Envios 15. { "id": 1234567, "nickname": "MLB_DEVCONF", "registration_date": "2009-01-06T16:52:14.000-04:00", "first_name": "Developer", "last_name": "Conference", ... "shipping_modes":[ "custom", "not_specified", "me2" ] ... } GET https://api.mercadolibre.com/users/me?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios 16. [ { "free_options" : [ "country" ], "id": 100009, "name": "Normal", "site_id": "MLB", "status": "active" }, { "free_options" : [ "country" ], "id": 182, "name": "Expresso", "site_id": "MLB", "status": "active" } ] GET https://api.mercadolibre.com/sites/MLB/shipping_methods MercadoLivre Developers Conference MercadoLivre Envios 17. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 18. { "destination": { "city": {...}, "country": {...}, "extended_attributes": { "address": "Rua dos bobos, 0", "city_name": "So Paulo", "city_type": "CP", "owner_name": null, "version": 7, "zip_code_type": {...} }, "state": {...}, "zip_code": "00000000" }, "options": [ { "cost": 17.91, "currency_id": "BRL", "display": "recommended", "id": 27568886, "list_cost": 17.91, "name": "Expresso", "speed": { "handling": 24, "shipping": 24 }, "tracks_shipments_status": "not_verified" }, ... GET https://api.mercadolibre.com/users/{user_id}/shipping_options?category_id={category_id} &dimensions=16x16x16,3000&zip_code={cep} ... { "cost": 14.94, "currency_id": "BRL", "display": "always", "id": 27568887, "list_cost": 14.94, "name": "Normal", "speed": { "handling": 24, "shipping": 96 }, "tracks_shipments_status": "not_verified" } ] } MercadoLivre Developers Conference MercadoLivre Envios 19. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 20. { "title":"Item de teste" , "category_id":"MLB74723", "price":10, "currency_id":"BRL", "available_quantity" :10, "buying_mode":"buy_it_now", "listing_type_id" :"bronze", "condition":"new", "description":"Item: teste" , "pictures":[ { "source":"http://mercadolivre.com/Ray_Ban_Original_Wayfarer.jpg" } ], "shipping":{ "local_pick_up":false, "dimensions":"10x10x20,700" } } POST https://api.mercadolibre.com/items?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios 21. { "title":"Item de teste" , "category_id":"MLB74723", "price":10, "currency_id":"BRL", "available_quantity" :10, "buying_mode":"buy_it_now", "listing_type_id" :"bronze", "condition":"new", "description":"Item: teste" , "pictures":[...], "shipping":{ "local_pick_up" :false, "dimensions":"10x10x20,700" , "methods": [ { "id": 100009, "free": "country", } ] } } POST https://api.mercadolibre.com/items?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios 22. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 23. { "buyer": {...}, "currency_id": "BRL", "date_closed": "2013-03-20T18:02: 52.000-04:00", "date_created": "2013-03-20T17:57: 54.000-04:00", "feedback": {...}, "id": XXXXXXXX, "order_items": [...], "seller": {...}, "shipping": {...}, "status": "paid", "status_detail": null, "tags": [...], "total_amount": 799 } GET https://api.mercadolibre.com/orders/{order_id}?access_token=$ACCESS_TOKEN ... "shipping": { "cost": 0, "currency_id": "BRL", "date_created": "2013-03-20T17:59:55.000- 00", "date_first_printed": null, "id": XXXXXXXXXX, "receiver_address": {...}, "service_id": 11, "shipment_type": "shipping", "shipping_mode": "me1", "status": "shipped" }, ... MercadoLivre Developers Conference MercadoLivre Envios 24. { "comments": null, "created_by": "receiver", "date_created": "2013-03-20T17:59:55.000-04:00", "date_first_printed": null, "id": 20671088339, "last_updated": "2013-06-27T14:27:27.000-04:00", "mode": "me1", "order_id": 757199078, "receiver_address": { "address_line": "Rua dos bobos, 0", "city": {...}, "comment": "Prox a padaria", "country": {...}, "id": 99976550, "neighborhood": {...}, "state": {...}, "types": [ "default_buying_address" ], "zip_code": "00001001" }, "receiver_id": 20362027, ... GET https://api.mercadolibre.com/shipments/{shipping_id}?access_token=$ACCESS_TOKEN ... "sender_address": {...}, "sender_id": 20703080, "service_id": 11, "shipping_items": [ { "description": "Description", "dimensions": "11.0x16.0x16.0,300.0", "id": "MLB471264432", "quantity": 1 } ], "shipping_option": { "cost": 0, "currency_id": "BRL", "id": 18307474, "list_cost": 11.07, "name": "Normal", "speed": { "handling": 24, "shipping": 144 } }, "site_id": "MLB", "status": "shipped", "status_history": {...}, "tracking_method": "Otros", "tracking_number": "0" } MercadoLivre Developers Conference MercadoLivre Envios 25. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 26. [ { "description": "PAC", "id": 1, "name": "PAC", "shipping_company": {...}, ... "tracks_shipments": true }, ... ] GET https://api.mercadolibre.com/sites/MLB/shipping_services { "tracking_number" : "TR1234567891" , "service_id": 1 } POST https://api.mercadolibre.com/shipments/{shipping_id}?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios 27. MercadoLivre Developers Conference MercadoLivre Envios 28. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 29. GET https://api.mercadolibre.com/items/{item_id}/shipping_options?zip_code={cep} MercadoLivre Developers Conference MercadoLivre Envios { "destination": { "city": {...}, "country": {...}, "extended_attributes": { "address": "Rua dos bobos, 0", "city_name": "So Paulo", "city_type": "CP", "owner_name": null, "version": 7, "zip_code_type": {...} }, "state": {...}, "zip_code": "00000000" }, "options": [ { "cost": 17.91, "currency_id": "BRL", "display": "recommended", "id": 27568886, "list_cost": 17.91, "name": "Expresso", "speed": { "handling": 24, "shipping": 24 }, "tracks_shipments_status": "not_verified" }, ... ... { "cost": 14.94, "currency_id": "BRL", "display": "always", "id": 27568887, "list_cost": 14.94, "name": "Normal", "speed": { "handling": 24, "shipping": 96 }, "tracks_shipments_status": "not_verified" } ] } 30. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 31. POST https://api.mercadolibre.com/items?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios { "title":"Item de teste" , "category_id":"MLB74723", "price":10, "currency_id":"BRL", "available_quantity" :10, "buying_mode":"buy_it_now", "listing_type_id" :"bronze", "condition":"new", "description":"Item: teste" , "pictures":[ { "source":"http://mercadolivre.com/Ray_Ban_Original_Wayfarer.jpg" } ], "shipping":{ "local_pick_up":false, "dimensions":"10x10x20,700" } } 32. POST https://api.mercadolibre.com/items?access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios { "title":"Item de teste" , "category_id":"MLB74723", "price":10, "currency_id":"BRL", "available_quantity" :10, "buying_mode":"buy_it_now", "listing_type_id" :"bronze", "condition":"new", "description":"Item: teste" , "pictures":[...], "shipping":{ "local_pick_up" :false, "methods": [{ "id": 100009, "free": "country", } ] } } 33. MercadoLivre Developers Conference Overview ME1 Clculo de custo de envio Como publicar? Capturar dados de entrega Cdigo de rastreamento ME2 Clculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios 34. { "buyer": {...}, "currency_id": "BRL", "date_closed": "2013-03-20T18:02: 52.000-04:00", "date_created": "2013-03-20T17:57: 54.000-04:00", "feedback": {...}, "id": XXXXXXXX, "order_items": [...], "seller": {...}, "shipping": {...}, "status": "paid", "status_detail": null, "tags": [...], "total_amount": 799 } GET h