Skip to content

Fix/eshipper canadapost invalid serviceid - #11

Merged
Dan (danh91) merged 5 commits into
mainfrom
fix/eshipper-canadapost-invalid-serviceid
Jan 8, 2026
Merged

Fix/eshipper canadapost invalid serviceid#11
Dan (danh91) merged 5 commits into
mainfrom
fix/eshipper-canadapost-invalid-serviceid

Conversation

@Ansh-Dev-Nagar

@Ansh-Dev-Nagar Ansh dev nagar (Ansh-Dev-Nagar) commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Introduce Carrier-Aware Service Resolution for eShipper

This PR introduces a carrier-aware service resolution approach in eShipper to prevent service name collisions across multiple carriers and ensure the correct service IDs are always used.

Bug

eShipper exposes services from multiple carriers (e.g. UPS, Canada Post) that share the same service names (such as “Expedited”).
Service metadata was built using the service name as the unique key, which caused collisions when multiple carriers used the same name.

Because of this:

  • One carrier’s service could overwrite another during metadata construction
  • Some services were effectively lost
  • Accessing Canada Post “Expedited” could resolve to the UPS “Expedited” service
  • This resulted in the wrong service ID being used (e.g. UPS 601 instead of Canada Post 5000026)

Solution

  • Use carrier-qualified service codes (e.g. eshipper_canadapost_expedited) as unique identifiers
  • Propagate carrier context through service lookup, rate parsing, and shipment creation
  • Ensure lookups always return the correct service for the intended carrier

Status

Completed

Jacob Shilitz (jacobshilitz) added a commit to jacobshilitz/karrio-community that referenced this pull request Jan 6, 2026
- Add carrier-specific freightcom_doc_files option to avoid conflicts with FedEx
- FedEx requires documentId (pre-uploaded) while Freightcom accepts base64 directly
- Prevents SHIPMENTS.DOCUMENTID.INVALID errors when rate shopping across carriers
- Maintains backward compatibility with doc_files fallback
- See GitLab issue karrioapi#11 for migration details
@danh91
Dan (danh91) merged commit b2351e6 into main Jan 8, 2026
2 of 3 checks passed
@danh91
Dan (danh91) deleted the fix/eshipper-canadapost-invalid-serviceid branch January 8, 2026 03:59
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 this pull request may close these issues.

2 participants