Repository navigation
Add Billbee write tools and a DHL Parcel DE Shipping adapter - #1356
Merged
Merged
Conversation
Billbee gains tools to set the order state, add a tracking number, book a label through a carrier connected in Billbee, update stock, tag orders, patch orders and products, and create invoices, plus a stock-location list. Endpoints and fields follow Billbee's Swagger (app.billbee.io/swagger/docs/v1). dhl-parcel-de books DHL Paket labels on the customer's own business contract through the Parcel DE Shipping API v2: validate, create, download labels, cancel, close out and get the manifest. It authenticates with the Parcel Germany OAuth2 password grant (API key/secret + Geschaeftskundenportal user).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Cloud user asked to write to Billbee and to create labels on their DHL business account. The Billbee adapter could only read, and the catalog only had DHL tracking. This PR adds write tools to Billbee and a new adapter for DHL's Parcel DE Shipping API.
Changes
de/billbee.json, 9 new tools. Endpoints and field names come from Billbee's Swagger (app.billbee.io/swagger/docs/v1).billbee_set_order_state(PUT /orders/{id}/orderstate, with the documented state list)billbee_add_shipment_to_order(stores a tracking number)billbee_add_order_tagsbillbee_update_order(PATCH, only the fields passed)billbee_create_invoice(Billbee allows one call per order every 5 minutes)billbee_ship_order_with_labelbooks a label with a carrier connected in Billbee.billbee_update_stock(absolute quantity, by SKU)billbee_list_stocks(needed for multi-stock)billbee_update_product(PATCH)annotations. The instructions gain a "Writing" section.de/dhl-parcel-de.json, new: Parcel DE Shipping API v2 (api-eu.dhl.com/parcel/de/shipping/v2).?validate=true, books nothing, marked read-only)POST /manifests)/parcel/de/account/auth/ropc/v1/token,client_secret_post). It takes the developer.dhl.com API key and secret plus a Geschäftskundenportal user, the sameOAUTH2+grant: passwordsetup asintl/egnyte.json.dhl-api-keyheader: the sandbox answers "Use EITHER Bearer Token or (Apikey and Basic Auth)" when both are sent.catalog.ts, quoted counts 679 → 680, and regeneratedllms*.txt.Cloud vs self-hosted: catalog JSON only. Both modes behave the same. Existing Billbee installs see the new tools as a catalog update ("Apply update").
Type
Testing
Commands (from the repo root unless noted):
node scripts/validate-adapters.mjs --warn: no warnings for billbee or dhl-parcel-de (only the existing zucchetti, exact-online and moneybird warnings).node scripts/regenerate-catalog.mjs,node scripts/adapter-count.mjs --check(OK, 680),node scripts/generate-llms-txt.mjs --check(OK).packages/backend,npx jest src/adapters: 673 suites passed, 1 skipped.packages/backend,RUN_DHL_PARCEL_DE_LIVE=1 npx jest src/adapters/de/dhl-parcel-de: passed againstapi-sandbox.dhl.com.DHL_API_KEY/DHL_API_SECRET, the same test validates one shipment.Checklist
npm testis not used, see AGENTS.md)