Hello, I want to ask about the order API, is it possible that we can pass our own label like provide a url link which targeting back to our system where we save the our own label, this is intended for the custom ones. If possible, what fields should I push it through? I looked into the documentation but I am confused if I can possibly set it during shipment creation, or order updating through the “packing_slip” on the shipment details or I am looking at the wrong direction here. Please advise. Thank you
Hey @raymark,
Nice to hear from you again!
Thanks for reaching out, I’ll look into that and get back to you soon.
Best,
RayanP
Hey @raymark,
I’m a little confused so I wanted to ask; are you making these shipments through the API or the UI?
Thanks for hanging in there!
Best,
RayanP
Hello @Rayanp ,
No, they are manually generated from our partner carrier on our system end and not on shiphero API to create the label, is that possible? we are wanting to have our own ship label forwarded to shiphero.
Hey @raymark,
If you’re fulfilling orders through the Public API, I’d recommend using the flow here: Order Flow
When using the shipment_create
mutation you’re able to set your url through the field: paper_pdf_location
mutation {
shipment_create(
data: {
order_id: "T3JkZXI6MTQzNDE2NDY3"
warehouse_id: "V2FyZWhvdXNlOjExNzkw"
address: {
name: "John"
address1: "2543 Johnson St."
address2: "Apt. 2"
city: "Oklahoma"
state: "Oklahoma"
zip: "73008"
country: "US"
phone: "5555555555"
}
line_items: { line_item_id: "TGluZUl0ZW06NDA5MjA2ODkw", quantity: 1 }
labels: {
address: {
name: "John"
address1: "2543 Johnson St."
address2: "Apt. 2"
city: "Oklahoma"
state: "Oklahoma"
zip: "73008"
country: "US"
phone: "5555555555"
}
carrier: "UPS"
shipping_name: "UPS - Ground"
shipping_method: "Ground"
cost: "0.00"
dimensions: { weight: "12", height: "12", width: "12", length: "12" }
label: {
paper_pdf_location: " **Your URL link here** "
}
line_item_ids: "TGluZUl0ZW06NDA5MjA2ODkw"
tracking_number: "1234434242444444434"
}
notify_customer_via_shiphero: true
notify_customer_via_store: true
}
) {
request_id
complexity
}
}
If you’re fulfilling through the UI, I believe you will have to use the generate_label
webhook: Generate Label Webook.
You can set your URL under the label
field.
{
"code": "200",
"shipping_method": "Ground",
"tracking_number": "456123789",
"cost": "5.55",
"label": "**Your URL here**",
"customs_info": "",
"shipping_carrier": "ups",
"tracking_url": "https://mycarrier.com/456123789"
}
Do note that you will have to do this per shipment.
Please let me know if this was able to answer your question, or if you have any more questions or concerns!
Best,
RayanP
Just want to add related to my query, for line_item_ids field, how do I put multiple items in it if we are able to fit it?
line_item_ids: “TGluZUl0ZW06NDA5MjA2ODkw”
Hey @raymark,
I believe formatting line_item_ids
like this should work:
line_item_ids: ["TGluZUl0ZW06NzM1MzkzMTM5", "TGluZUl0ZW06NzM1MzkzMTQw"]
The main thing here is using the square brackets and then separating the specific ids by quotation marks. Please let me know if this worked for you or if you have any questions or concerns.
Best,
RayanP
Hi @Rayanp ,
I tried to post our data but it isn’t pushed though or when I try to click on “view label” I was unable to see the label. Can you help me out? I have here the request_id for the shipment_create mutation, 62d71f250d0ee6aa9e20b5e5
Hey @raymark,
Thanks for hanging in there while we investigated this matter.
Due to privacy concerns, I won’t link the mutation, but going off of the request you sent earlier could you try replacing the paper_pdf_location
to pdf_location
and use the same URL?
Please let me know if this works for you, or if you have any further questions or concerns!
Best,
RayanP