Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parcel documents endpoint #31

Closed
linaori opened this issue Jan 16, 2024 · 2 comments · Fixed by #32
Closed

Parcel documents endpoint #31

linaori opened this issue Jan 16, 2024 · 2 comments · Fixed by #32

Comments

@linaori
Copy link
Contributor

linaori commented Jan 16, 2024

Currently the only way of retrieving labels is through the Labels endpoint from what I can tell. I was advised by Sendcloud to use the Parcel Documents endpoint as we rely on ZPL.

Is this something that's currently in the works behind the scenes, or would this be something that I would have to make a PR for?

@villermen
Copy link
Member

@linaori There's not really anything in the works from our end right now. We use a limited subset of functionality ourselves and only extend where needed, but I'm happy to help implement and review if you get started on a PR!

https://api.sendcloud.dev/docs/sendcloud-public-api/parcel-documents%2Foperations%2Fget-a-parcel-document

I'm quite intrigued by this line:

Sendcloud will generate the correct type of document for your shipment when you Create a parcel

For labels this has always been pull-based as the shipping labels for carriers incur costs. My guess is that this label will be a plain carrierless one, but testing will confirm that.

@linaori
Copy link
Contributor Author

linaori commented Jan 18, 2024

I think it works the same as the existing PDF version, you first call createLabel($parcel, ...). I've got a working version that I've tested with, I just have to implement it in a fork so I can make PR, which I will probably do in the coming days/week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants