Create Shipment GraphQL - Customs Info

Hi. I am trying to find a way to attach a Dangerous Goods form to a shipment. First off, we already have NZ Couriers natively integrated so we can quickly click ‘get quotes’ and then print a label. Where in that process is the Shipment created? Anyway so I have the DG pdf created and ready to attach but I cannot find a way to get the pdf updated on the (order? shipment? label?)

From researching I can see there is a customs_info field in REST API but I cannot find anything in the GraphQL API. If I try to add customs_field into the create_shipment mutation I get an error.

But even if I did get it working,I would be creating a shipment not updating one. So how would that work? If I create a shipment for an order, can I still get quote and print a label from the app? My assumption would be update_shipment with document link, but there is no such mutation.

I have tried to add a link to the packing note(another idea I read here), which works but then I need a mouse at each pack station so the packer can copy and paste the link into a web browser (not acceptable). Ok so I got the pdf and need to know how to add it to a shipment pls :slight_smile:

Hi @TheMarket!
That is correct, once the shipment is created it’s not possible to update it.
For these orders are you using an API Carrier?
Thanks in advance!
Tom

No I am not using the generate label webhook. The courier is integrated into ShipHero so there is no need for me to go get the courier label via API and then create a shipment. But I suspect that is the ONLY way to get a document attached to a shipment? If it is, then I will need to request the label from NZ Post myself? Using their API? And then attach the doc? :frowning: Not what I was hoping for. Does that conflict with the already integrated NZ Post?

What happens if I create a shipment? Does it remove the “get quote” button from an order?

Ok I see you will give me another way to print the label. Then we can register that for you and when you go to ship the order, you will choose API as the carrier and hit Print Label to generate the call.

So I believe there will be two options. Use the native NZ Post or use API label button

Oh I see, thanks for clarifying that @TheMarket!
So those documents should be sent back from NZ Post, correct?
And as they are not being sent back you have to go into NZ Post and “manually” get those…

If that is correct I will go ahead and speak to our engineer who made the integration and ask him if we could also pull that doc, as we do for other carriers.

If so, could you also provide an order number I could use as example?

Thanks again!
Tom

Actually no, the DG (dangerous goods) form is not created by NZ Post. Its created by me using another platform called Eledo(I see someone else was using API2PDF). The idea was to attach it to an order when it gets created - using the order create webhook. But that isn’t possible - you cannot attach a document. Then after researching the community forums it looks like it is possible if you add it when you create a shipment - customs_info field. But since I have NZ Post added as a carrier already, the create shipment method is run internally and not via API.

But also - I cannot get the create shipment GraphQL to work with a customs_info field as it doesn’t seem to work with GraphQL - can you check that for me? I can only find it on the REST API docs.

Thanks for that explanation @TheMarket!
I see what you are referring to. The field is not currently available, but I have requested to be added so it can be sent as with the shipment_create Mutation. It won’t be for updating a shipment, but for creating a new shipment.
Thanks again for the patience!
Tom

Thanks Tom. Appreciate you putting that int he dev queue. What kind of time frame are we talking here? Should I complete the integration using the “soon to be deprecated” REST API? (Its pretty urgent as we are live and shipping for merchants)

Hi @TheMarket!
Unfortunately, I don’t have an ETA about this. I did raise the priority, but not sure how long will it take until this gets added.
I will update as soon as there are any updates on this
Thanks again for the patience
Tom

Thanks Tom. Appreciate the assistance. Massive headache for us atm.