Add a logo to the shipping label
With RocketShipIt you can add a logo or image to any shipping label even if the carrier's API doesn't directly support it.
Currently supported label types:
- ZPL
- EPL
- PNG
- GIF
Although, RocketShipIt allows you to place your logo anywhere on the label. Typically logos are added to an extended 4x8 shipping label. A 4x8 label is used to provide two inches of unused space at the top of the label for your logo. This helps to prevent your logo from blocking out text or important barcodes.
To add your image include the label
parameter and add a transformation
.
Transformation
A transformation
modifies the label returned by the shipping carrier. Currently only the add_image
and add_text
transformations are available.
field | type | values |
---|---|---|
type | string | add_image , add_text |
data | string | base64 encoded jpg,gif,png data |
starting_x | int | Horizontal position on label to place image |
starting_y | int | Vertical position on label to place image |
font_height | int | height of font for add_text |
font_width | int | width of font for add_text |
UPS Example:
{
"carrier": "UPS-REST",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 4
}
],
"service": "03",
"shipper": "RocketShipIt",
"ship_addr1": "201 1\/2 W 2nd St.",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"ship_country": "US",
"to_name": "John Doe",
"to_addr1": "940 Presidio Ave",
"to_addr2": "#103",
"to_state": "CA",
"to_city": "San Francisco",
"to_code": "94115",
"to_country": "US",
"image_type": "ZPL",
"label": {
"transformations": [
{
"type": "add_image",
"data": "iVBORw0KGgoAAAANSUhEUgAAADAAAAAvCAYAAAClgknJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH4gcJBREDlGsz8gAABh1JREFUaN7F2XmMnWUVBvDfzFjbYotOF2irVDSIQlUQU8SWuMWohBJc0BoTJWoUIeKCW1TAqBE3FCwREBPRqC0kaAQ1LlT+qcZgGKm2qIUWW6kEI3Zs1bZ0mfGP572db77embl35ms5yc393nu/5TnLe85zztfjCMrgBf3V5UtxDWbiPmws35vxMAaxb6J79t82OGrdcxSA9+JN+ByeWTt1L3biEW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pUrL9IUl61Sg8IhxkydZlXngF/Uiw6jmyVUG71C6MGvO088GYjfHy3lPtrZfNNb0CBmUZoyDah5WNJayL363bgKVauWH8B3laON+Ny/B7fFWbZhPQZ6Rd24H7t0/QeXIEfjgWewz1wrvS7P5fyfzuu1NyYkFCJVv7fb6QPrp9ztbSWY4KvKzALr5XG4q1CjS+WkGpSdsnsvyXrHZ4cbhbqcmA88IzeqCeKxb8n3ddySVtNv0P4nYRNS/4pHplW1j/GJ/C/Tm5WBfeg7PSDUu4/LXuiSdmKz0tyIG9sLjdCEu/GB4tSGN/6jA6h3Ub4+kUyRulUDsiroPHkL3injFHIxv22kanb/dInH6rOE4E/pEDtxKXlRp1SiEHcaqTbaifrZKp8V1nPxtulJmyTtvMDuKcb8FogK2l0pgyv3tgh+A0SEufIxq/LfunGrjR64/ZJV/fE8j1c/h/uBjyHp9EVOpt57hX3v054/so252yXEcwlNfAkVHfJW8ht8i6ga/DQU7H+XMlCyye45j7pEW6Rd7+rjW7w90lDf5VKSEwGXCdSzUIX4MXjnLtDKvIqyVinyIvrFvhhqdqr8AOVNHgkgNcVOE5G2+240V78ooBdJ4RuIb4mVXtI9sLNspkfqV58JMFXFTgfL6j9t09I1PUyx2zl7rnyom2ZZJU1+MnRBl5VYK4QuJb1dxfg3xJOtLNy/jShGw/Jhr8H/308gFcVWIEXSrOwViy6TvtSPizx/e/6H0cbeFWB06VJvlWY4YF2wEq2OlAH/3gBb8n/AQx+i2SDu9u9AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA3LTA5VDEyOjE3OjAzLTA3OjAw8Bit5wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wNy0wOVQxMjoxNzowMy0wNzowMIFFFVsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAAElFTkSuQmCC",
"starting_x": 265,
"starting_y": 25
}
]
},
"test": true
}
}
FedEx Example:
{
"carrier": "FedEx-REST",
"action": "SubmitShipment",
"params": {
"packages": [
{
"weight": 15
}
],
"shipper": "RocketShipIt",
"ship_addr1": "201 1\/2 W 2nd St.",
"ship_city": "Whitehall",
"ship_state": "MT",
"ship_code": "59759",
"ship_phone": "1231231234",
"to_name": "John Doe",
"to_addr1": "123 Main St",
"to_state": "CA",
"to_city": "Beverly Hills",
"to_code": "90210",
"to_phone": "1231231234",
"packaging_type": "YOUR_PACKAGING",
"image_type": "ZPLII",
"label_stock_type": "STOCK_4X6",
"label": {
"transformations": [
{
"type": "add_image",
"data": "iVBORw0KGgoAAAANSUhEUgAAADAAAAAvCAYAAAClgknJAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH4gcJBREDlGsz8gAABh1JREFUaN7F2XmMnWUVBvDfzFjbYotOF2irVDSIQlUQU8SWuMWohBJc0BoTJWoUIeKCW1TAqBE3FCwREBPRqC0kaAQ1LlT+qcZgGKm2qIUWW6kEI3Zs1bZ0mfGP572db77embl35ms5yc393nu/5TnLe85zztfjCMrgBf3V5UtxDWbiPmws35vxMAaxb6J79t82OGrdcxSA9+JN+ByeWTt1L3biEWzFA9hUlHoIj+I/GBpLkSccYfCzcRk+VI7rMqN8jsdpld93Y4d45sGi1APYUD7DrRMb9UAN/Im4CivFC1OVHbgUq6s/NuKBGnA4G1fjRQ3Z5l/ixTVl3TLI0JQtUwPfhwvLg5oC/w+8F9+R0OmXsDyuqkkT4J+Mz+LreFpD4B/GxbilrOfgq/hwOZ58CNXAn4Qv4PWa21d/wyX4aVnPx7V4i2zyeZNSoE28v1zi/YyGgMMWvAdry3ohrsMbynq6ZK7uQqgGfhrehe83DH4T3lEBfwK+UQFP9toiuvBADfwcfFJcPKNB8Bvxbvy2rJ+BG/DqNud2rkAN/HPwJZzXIHC4Vzw6UNYn40YJ0XayCL3d7IEevApfxvMaBn+3WP6PZX0qbsLyca5ZgBndKPA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cb8FogK2l0pgyv3tgh+A0SEufIxq/LfunGrjR64/ZJV/fE8j1c/h/uBjyHp9EVOpt57hX3v054/so252yXEcwlNfAkVHfJW8ht8i6ga/DQU7H+XMlCyye45j7pEW6Rd7+rjW7w90lDf5VKSEwGXCdSzUIX4MXjnLtDKvIqyVinyIvrFvhhqdqr8AOVNHgkgNcVOE5G2+240V78ooBdJ4RuIb4mVXtI9sLNspkfqV58JMFXFTgfL6j9t09I1PUyx2zl7rnyom2ZZJU1+MnRBl5VYK4QuJb1dxfg3xJOtLNy/jShGw/Jhr8H/308gFcVWIEXSrOwViy6TvtSPizx/e/6H0cbeFWB06VJvlWY4YF2wEq2OlAH/3gBb8n/AQx+i2SDu9u9AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE4LTA3LTA5VDEyOjE3OjAzLTA3OjAw8Bit5wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxOC0wNy0wOVQxMjoxNzowMy0wNzowMIFFFVsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAAElFTkSuQmCC",
"starting_x": 300,
"starting_y": 50
}
]
},
"test": true
}
}
What kind of image can I use?
You can use:
- gif
- jpg
- png
Because thermal printers often only support pure black and white images, all color images will automatically be converted to black and white. If you want to limit distortions caused by the conversion use a pure black and white (not color or grayscale) image.