MercadoLivre Envios - MeliDevConf 2013 - SP

3,981 views

Published on

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,981
On SlideShare
0
From Embeds
0
Number of Embeds
1,732
Actions
Shares
0
Downloads
19
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

MercadoLivre Envios - MeliDevConf 2013 - SP

  1. 1. MercadoLivre Developers Conference MercadoLivre Envios
  2. 2. Bruno Elia Software Engineer @brunoelia
  3. 3. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  4. 4. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  5. 5. MercadoLivre Developers Conference MercadoLivre Envios
  6. 6. Calculador de custos Custos de envio direto no MercadoPago Direção de envio completa ao pagar MercadoLivre Developers Conference MercadoLivre Envios
  7. 7. MercadoLivre Developers Conference MercadoLivre Envios
  8. 8. MercadoLivre Developers Conference MercadoLivre Envios
  9. 9. MercadoLivre Developers Conference MercadoLivre Envios
  10. 10. MercadoLivre Developers Conference MercadoLivre Envios
  11. 11. ME 2 MercadoLivre Developers Conference MercadoLivre Envios
  12. 12. != ME1 ME2 MercadoLivre Developers Conference MercadoLivre Envios
  13. 13. MercadoLivre Developers Conference MercadoLivre Envios
  14. 14. MercadoLivre Developers Conference MercadoLivre Envios
  15. 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. 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. 17. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  18. 18. { "destination": { "city": {...}, "country": {...}, "extended_attributes": { "address": "Rua dos bobos, 0", "city_name": "São 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. 19. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  20. 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: <strong>teste</strong>" , "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. 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: <strong>teste</strong>" , "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. 22. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  23. 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. 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. 25. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  26. 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. 27. MercadoLivre Developers Conference MercadoLivre Envios
  28. 28. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  29. 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": "São 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. 30. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  31. 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: <strong>teste</strong>" , "pictures":[ { "source":"http://mercadolivre.com/Ray_Ban_Original_Wayfarer.jpg" } ], "shipping":{ "local_pick_up":false, "dimensions":"10x10x20,700" } }
  32. 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: <strong>teste</strong>" , "pictures":[...], "shipping":{ "local_pick_up" :false, "methods": [{ "id": 100009, "free": "country", } ] } }
  33. 33. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  34. 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 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
  35. 35. { "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": "89473632" }, "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
  36. 36. MercadoLivre Developers Conference Overview ME1 Cálculo de custo de envio Como publicar? Capturar dados de entrega Código de rastreamento ME2 Cálculo de custo de envio Como publicar? Capturar dados de entrega Etiquetas MercadoLivre Envios
  37. 37. GET https://api.mercadolibre.com/shipment_labels? shipment_ids=20178600648&savePdf=Y&access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios
  38. 38. GET https://api.mercadolibre.com/shipment_labels? shipment_ids=20178600648&savePdf=Y&access_token=$ACCESS_TOKEN MercadoLivre Developers Conference MercadoLivre Envios
  39. 39. MercadoLivre Developers Conference MercadoLivre Envios
  40. 40. Perguntas? Bruno Elia @brunoelia

×