kendallb / ShipEngineApi

A library for communicating with ShipEngine from .NET applications.
https://www.shipengine.com/
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

label_image_id #1

Open kmacmaster opened 3 years ago

kmacmaster commented 3 years ago

There is no place to specify a label_image_id when requesting a label from a rate id.

kendallb commented 3 years ago

This is something probably missing in the OpenAPI spec. Can you point me at the documentation for this on the ShipEngine side, and I can adjust the OpenXML API spec and push it back to ShipEngine, and then get it added to the C# API.

kmacmaster commented 3 years ago

This is the page in which they talk about it.

https://www.shipengine.com/docs/labels/branding/

This is a conversation I had with someone in chat. I tried to find the image_id part in the C# implementation and it looked like it was missing…

- Please type your reply above this line -

Your request (16044) has been updated. To add additional comments, reply to this email.

https://secure.gravatar.com/avatar/4f1de17ba266cf5754d7d64b39c6a359?size=40&default=https%3A%2F%2Fassets.zendesk.com%2Fimages%2F2016%2Fdefault-avatar-80.png&r=g

Paislee H. (ShipEngine)

Nov 9, 2020, 8:21 CST

Hi there,

Thanks for reaching out to ShipEngine!

You will include the label_image_id when using the v1/labels/rates/:rate_id endpoint. For example, if the rate ID you are using is se-123456789 then the endpoint will be as follows: https://api.shipengine.com/v1/labels/rates/se-123456789 and the request body would be

{ "label_format": "pdf", "label_layout": "4x6", "label_image_id": "img_Y9cnKTzC2WUnJvLQuUPH" }

As long as the carrier and service support label images, then you will see the logo on the labels created using the above steps.

Let me know if you have any additional questions!

Paislee H. API Support Specialist

https://secure.gravatar.com/avatar/c9c48e4e8c631bf3353f3ff1655ed7b9?size=40&default=https%3A%2F%2Fassets.zendesk.com%2Fimages%2F2016%2Fdefault-avatar-80.png&r=g

Ken

Nov 9, 2020, 2:34 CST

How can I create a branded label from a rate id? I did a rate shop and returned many. Where would the label_image_id go in the initial rate request? I only see it available if calling it via the label endpoint.

Sent: Monday, November 9, 2020 1:48 PM

This is something probably missing in the OpenAPI spec. Can you point me at the documentation for this on the ShipEngine side, and I can adjust the OpenXML API spec and push it back to ShipEngine, and then get it added to the C# API.

kendallb commented 3 years ago

Yeah, that was not documented at all, and it's not in the OpenAPI XML spec. I added it in and the code is pushed into Git, but I also built a new NuGet package you can use that includes this.

Let me know if it works.

kendallb commented 3 years ago

https://www.nuget.org/packages/ShipEngineApi/1.0.25