Pré visualização de etiquetas

Para imprimir etiquetas, o link pode ser obtido do seguinte modo:

Nota: As etiquetas devem ter sido geradas.

Endpoint POST /api/v2/me/shipment/print

Payload:

[
  "mode": "public|private", // link de impressão público ou privado
  "orders": [ // lista de etiquetas
    "6e1c864a-fe48-4ae7-baaa-d6e4888bafd1",
    "6e1c864a-fe48-4ae7-baaa-d6e4888bafd2",
    "6e1c864a-fe48-4ae7-baaa-d6e4888bafd3"
  ]
]

Exemplo com cURL:

$ curl -X POST \
  'https://www.melhorenvio.com.br/api/v2/me/shipment/print' \
  -H 'accept: application/json' \
  -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjNjYmQzNTBjYzI0YmI5NzdjMDRkNTRmYzg1NThhOTE4ZjNkZDBmMDBkMTFhYzg2ZmI0OTViMDBiNzQxODEwZDlhMWM2ZWVlNTRkMTdhZDkxIn0.eyJhdWQiOiIxIiwianRpIjoiM2NiZDM1MGNjMjRiYjk3N2MwNGQ1NGZjODU1OGE5MThmM2RkMGYwMGQxMWFjODZmYjQ5NWIwMGI3NDE4MTBkOWExYzZlZWU1NGQxN2FkOTEiLCJpYXQiOjE1MDY1MjMzODYsIm5iZiI6MTUwNjUyMzM4NiwiZXhwIjoxNTM4MDU5Mzg2LCJzdWIiOiIxNmIyMWVhNS00NmVjLTQ0Y2MtYjdmNS1hMDJmZmY3YjljMjgiLCJzY29wZXMiOlsiY2FydC1yZWFkIiwiY2FydC13cml0ZSIsImNvbXBhbmllcy1yZWFkIiwiY29tcGFuaWVzLXdyaXRlIiwiY291cG9ucy1yZWFkIiwibm90aWZpY2F0aW9ucy1yZWFkIiwiY291cG9ucy13cml0ZSIsIm9yZGVycy1yZWFkIiwicHVyY2hhc2VzLXJlYWQiLCJzaGlwcGluZy1jYWxjdWxhdGUiLCJzaGlwcGluZy1jYW5jZWwiLCJzaGlwcGluZy1jaGVja291dCIsInNoaXBwaW5nLWNvbXBhbmllcyIsInNoaXBwaW5nLWdlbmVyYXRlIiwic2hpcHBpbmctcHJldmlldyIsInNoaXBwaW5nLXByaW50Iiwic2hpcHBpbmctdHJhY2tpbmciLCJ3ZWJob29rcy1yZWFkIiwid2ViaG9va3Mtd3JpdGUiLCJ0cmFuc2FjdGlvbnMtcmVhZCIsInVzZXJzLXJlYWQiLCJ1c2Vycy13cml0ZSJdfQ.GpVYhn4ZLjvtBsNq_sLullUV5E-zb3t009IuKkeRHgDGiDlnt_Lslv7elg6ou2nD_t0u2REIv3umZsLhYxUhHak732DSek84YJ14ehF4OCwFDYY8j1qOHB91YpXIUe6BzrDSD58IC3sknmoV7Cln2oLWwsooHTmowVFceCW5BNzavoT-wawUGxfOKb-el0exgtfx9gs-ppEdfSYfRvRvvfGMDqcbqaoIZxOE1hf9LK1qIbuOjLUO0lPwXCmhIe8q-fKfb-DvGXhz9aTCZ2K4khaseDGkjXOQyB_abOqfzktcFOfqcXuInv53-UoPQNZhzfTPqu2ATe73AlVsbS9Y1w_F40cVgHfhlOujcqccpQiErM6mZvDkx7EIIcEXM7wmX4kDZzWBm5ZEf1Y4WX0lSR-zOK0jm-rOZ6MWKeko5-GcQaeqho9Q3I4o-RViVznBCBW1OnGy7K2jNlB0juL6ZL2YKgKhjxmhe-_dNSQ7BMvJpzhQsKcOkJXS70RBJvx17Dl0vHMuCbW-K1KT1HrPasMVB3psHNNE1wtPI1IeAogcd9eTtvD2Easy7hS0YUqf7KCXk7h2qJdGHpgbjwALGq4U6JvpDeyqWHmS5_d8v92dtJ5Lz4wFc-JYsueNU5tqJiz03ORnRCZCkYZu52pc5kiW7-fo-UVfxSDdizf76Fk' \
  -H 'content-type: application/json' \
  -d '[
    "orders": [
      "6e1c864a-fe48-4ae7-baaa-d6e4888bafd1",
      "6e1c864a-fe48-4ae7-baaa-d6e4888bafd2",
      "6e1c864a-fe48-4ae7-baaa-d6e4888bafd3"
    ]
  ]'

Nota: O Parâmetro pretty pode ser passado para imprimir o JSON de modo que se possa visualizar a informação na fase de desenvolvimento, não sendo recomendado para produção por aumentar o tamanho da resposta enviada ao cliente.

Resposta:

{
  "url": "https://www.melhorenvio.com.br/imprimir/XRVg0KAPS9V1"
}

results matching ""

    No results matching ""