EasyPost Knowledge Patch
Use this patch
Load this skill before implementing or reviewing EasyPost address verification,
tracking, shipment purchase, label handling, carrier-account operations, or SDK
upgrades.
Before changing an integration:
- Identify whether each resource is being created, retrieved, verified,
purchased, converted, listed, or deleted.
- Preserve presence-based request semantics: for address verification, sending
a key with
false is not the same as omitting it.
- Supply every required input before creating an immutable Address, Tracker, or
Shipment.
- Distinguish EasyPost IDs from caller references and carrier display names
from API carrier strings.
- Account for default date windows, maximum page sizes, and rate limits on
index endpoints.
- For SDK changes, identify the language, runtime, middleware hooks, HTTP
client hooks, and whether callers depend on model-class instances.
Reference index
| Reference |
Topics |
| addresses.md |
Creation-time verification, carrier verification, existing Addresses, normalization |
| trackers.md |
Tracker creation, statuses, scan data, lookup, test codes, deletion |
| shipments-labels-and-rates.md |
Shipment creation and purchase, labels, claims, rate adjustments, international and carrier rules |
| accounts-events-and-subscriptions.md |
Carrier accounts, groups, webhooks, JWT sessions, subscriptions |
| sdk-and-api.md |
Node.js SDK migration, generic requests, timestamps, index throttling |
Critical request-semantics guardrails
- On
POST /v2/addresses, the presence of verify or verify_strict triggers
delivery and ZIP verification even if its value is false. Omit both keys to
avoid verification.
verify_strict takes precedence over verify and errors for an unverified
address; a correctable address is corrected and returned.
POST /v2/shipments creates an immutable Shipment. Provide all creation and
rating inputs up front.
- Shipment
line_items are request-only: they support carrier-claim automation,
are not passed to the carrier, and are not returned in the response.
GET /v2/shipments/:id accepts an ID or caller-supplied reference, but
references are not unique. Use the generated ID for reliable retrieval.
GET /v2/trackers/:id accepts only a Tracker ID. Code-based lookup belongs on
GET /v2/trackers with the plural tracking_codes array.
- Trackers are immutable. Deleting one permanently removes it, stops future
webhook Event deliveries, and makes later retrieval return
404 Not Found.
Address verification quick reference
Choose creation-time verification behavior deliberately:
| Request shape |
Behavior |
| Neither verification key present |
Do not verify |
verify present |
Return the Address with per-check results |
verify_strict present |
Error if unverified; correct and return if correctable |
Verification key plus verify_carrier: "ups" or "fedex" |
Use that carrier's Address Verification Service |
Carrier verification reports the service used in
verifications.verify_carrier. To verify an immutable existing Address, call
GET /v2/addresses/:id/verify; the normalized replacement is wrapped in
address.
For US and Canadian addresses, verification can move a recognized trailing
unit from street1 to an empty street2 when street1 exceeds 35 characters.
Street-name abbreviation occurs only for USPS verification and only when the
validated street1 exceeds 40 characters.
See addresses.md for verification result fields and
examples.
Shipment creation and purchase quick reference
- Creating a Shipment with valid
to_address, from_address, and parcel
automatically populates rates; each value may be an existing ID or an
inline object.
- International destinations, including US territories, require
customs_info.
- If omitted,
return_address defaults to from_address.
carrier_accounts limits rating. Any invalid or disabled supplied account
causes an error.
- Buy a selected rate with
POST /v2/shipments/:id/buy and a rate.id. The
response fills tracking_code and postage_label.
- Optional purchase
insurance is a USD string. Labels default to PNG unless
options.label_format requests another format.
- When the carrier service is known, include both
service and
carrier_accounts in POST /v2/shipments for one-call purchase.
- V2 shipment validation rejects missing or zero-valued parcel details.
Label conversion through
GET /v2/shipments/:id/label?file_format=ZPL supports PDF, ZPL, and EPL2,
but requires an original PNG label. Conversion works best from a 4x6 PNG to
ZPL.
See shipments-labels-and-rates.md
for line-item requirements, list behavior, rate rules, claims, and carrier
options.
Tracker quick reference
- Omitting
carrier from POST /v2/trackers invokes auto-detection. Ambiguous
codes can match multiple carriers, and explicit carrier selection is faster.
- Some carriers require carrier-specific credentials for third-party tracking.
- Creating the same
tracking_code and carrier for the same user within three
months returns the original Tracker rather than a duplicate.
- Current status values are
unknown, pre_transit, in_transit,
out_for_delivery, delivered, available_for_pickup,
return_to_sender, failure, cancelled, and error.
- Historical scans are in
tracking_details. Their timestamps use a local zone
inferred from a sufficiently complete tracking_location; otherwise they use
UTC.
POST /v2/trackers/batch accepts up to 100 tracking codes.
Tracker lists default to one month ago through the current day's end. A single
datetime bound creates a one-month span around that bound; older matches need an
explicit start_datetime. page_size defaults to 20 and caps at 100.
The API carrier value is not always the display name. Preserve exact strings
such as ColumbusLastMile, DhlEcs, LaserShipV2, PassportGlobal,
TforceConcise, and UspsShip.
See trackers.md for status detail, carrier detail,
test-mode codes, and deletion behavior.
SDK and API migration guardrails
For the Node.js SDK:
- Use a supported runtime; Node 16 support was dropped.
- Replace
superagentMiddleware with httpMiddleware.
- Replace
fetchClient with httpClient.
- Account for the SDK using
fetch instead of superagent.
- Treat returned API resources as plain JSON-compatible objects, not model-class
instances.
The C#, Java, Node.js, PHP, and Ruby SDKs expose a generic request interface for
arbitrary endpoints, including endpoints without typed resource wrappers.
Supported API endpoints standardize timestamps as ISO 8601.
Index endpoints have request-per-second rate limiting. Integrations that
enumerate resources must tolerate throttling rather than assume unrestricted
pagination.
See sdk-and-api.md for the consolidated migration
surface.
Account, event, and subscription quick reference
- Carrier-account APIs cover registration, platform-account types and
configuration, and team-authorized status updates. Platform account
availability exposes access and setup options.
- BYOCA support extends to all users, and most carrier accounts no longer need a
separate manual registration step.
- Groups support subgroup creation, viewing, listing, and deletion, plus
sub-account assignment. Sub-account lists can include group information.
shipment.invoice.updated reports billed-shipment disputes.
payment.created and payment.failed are emitted again for bank and
credit-card charges.
- Embeddable components and customer portals can create JWT-authenticated
sessions.
- SAML invitations accept
return_to_url for the post-acceptance destination.
- Advanced Tracking subscriptions can be canceled, and their brand
customization can be synchronized.
- A subscription plan can be charged immediately when it is created.
See accounts-events-and-subscriptions.md
for the complete platform-operation details.
Integration review checklist
- Test omission separately from
false for address verification keys.
- Keep immutable-resource creation payloads complete.
- Store generated Shipment and Tracker IDs where deterministic retrieval is
required.
- Use plural
tracking_codes only on the Tracker list endpoint.
- Request older list data with explicit datetime bounds and respect page-size
caps.
- Preserve carrier API strings exactly.
- Accept ISO 8601 timestamps and the documented tracker status set.
- Handle throttling while enumerating index endpoints.
- Recheck Node.js middleware, HTTP client, runtime, and returned-object
assumptions during SDK upgrades.
- Apply carrier-specific delivery, customs, claim, and label rules before
purchase.
1---2name: easypost-knowledge-patch-23description: EasyPost4license: MIT5---678# EasyPost Knowledge Patch910## Use this patch1112Load this skill before implementing or reviewing EasyPost address verification,13tracking, shipment purchase, label handling, carrier-account operations, or SDK14upgrades.1516Before changing an integration:17181. Identify whether each resource is being created, retrieved, verified,19 purchased, converted, listed, or deleted.202. Preserve presence-based request semantics: for address verification, sending21 a key with `false` is not the same as omitting it.223. Supply every required input before creating an immutable Address, Tracker, or23 Shipment.244. Distinguish EasyPost IDs from caller references and carrier display names25 from API carrier strings.265. Account for default date windows, maximum page sizes, and rate limits on27 index endpoints.286. For SDK changes, identify the language, runtime, middleware hooks, HTTP29 client hooks, and whether callers depend on model-class instances.3031## Reference index3233| Reference | Topics |34| --- | --- |35| [addresses.md](references/addresses.md) | Creation-time verification, carrier verification, existing Addresses, normalization |36| [trackers.md](references/trackers.md) | Tracker creation, statuses, scan data, lookup, test codes, deletion |37| [shipments-labels-and-rates.md](references/shipments-labels-and-rates.md) | Shipment creation and purchase, labels, claims, rate adjustments, international and carrier rules |38| [accounts-events-and-subscriptions.md](references/accounts-events-and-subscriptions.md) | Carrier accounts, groups, webhooks, JWT sessions, subscriptions |39| [sdk-and-api.md](references/sdk-and-api.md) | Node.js SDK migration, generic requests, timestamps, index throttling |4041## Critical request-semantics guardrails4243- On `POST /v2/addresses`, the presence of `verify` or `verify_strict` triggers44 delivery and ZIP verification even if its value is `false`. Omit both keys to45 avoid verification.46- `verify_strict` takes precedence over `verify` and errors for an unverified47 address; a correctable address is corrected and returned.48- `POST /v2/shipments` creates an immutable Shipment. Provide all creation and49 rating inputs up front.50- Shipment `line_items` are request-only: they support carrier-claim automation,51 are not passed to the carrier, and are not returned in the response.52- `GET /v2/shipments/:id` accepts an ID or caller-supplied `reference`, but53 references are not unique. Use the generated ID for reliable retrieval.54- `GET /v2/trackers/:id` accepts only a Tracker ID. Code-based lookup belongs on55 `GET /v2/trackers` with the plural `tracking_codes` array.56- Trackers are immutable. Deleting one permanently removes it, stops future57 webhook Event deliveries, and makes later retrieval return `404 Not Found`.5859## Address verification quick reference6061Choose creation-time verification behavior deliberately:6263| Request shape | Behavior |64| --- | --- |65| Neither verification key present | Do not verify |66| `verify` present | Return the Address with per-check results |67| `verify_strict` present | Error if unverified; correct and return if correctable |68| Verification key plus `verify_carrier: "ups"` or `"fedex"` | Use that carrier's Address Verification Service |6970Carrier verification reports the service used in71`verifications.verify_carrier`. To verify an immutable existing Address, call72`GET /v2/addresses/:id/verify`; the normalized replacement is wrapped in73`address`.7475For US and Canadian addresses, verification can move a recognized trailing76unit from `street1` to an empty `street2` when `street1` exceeds 35 characters.77Street-name abbreviation occurs only for USPS verification and only when the78validated `street1` exceeds 40 characters.7980See [addresses.md](references/addresses.md) for verification result fields and81examples.8283## Shipment creation and purchase quick reference8485- Creating a Shipment with valid `to_address`, `from_address`, and `parcel`86 automatically populates `rates`; each value may be an existing ID or an87 inline object.88- International destinations, including US territories, require89 `customs_info`.90- If omitted, `return_address` defaults to `from_address`.91- `carrier_accounts` limits rating. Any invalid or disabled supplied account92 causes an error.93- Buy a selected rate with `POST /v2/shipments/:id/buy` and a `rate.id`. The94 response fills `tracking_code` and `postage_label`.95- Optional purchase `insurance` is a USD string. Labels default to PNG unless96 `options.label_format` requests another format.97- When the carrier service is known, include both `service` and98 `carrier_accounts` in `POST /v2/shipments` for one-call purchase.99- V2 shipment validation rejects missing or zero-valued parcel details.100101Label conversion through102`GET /v2/shipments/:id/label?file_format=ZPL` supports `PDF`, `ZPL`, and `EPL2`,103but requires an original PNG label. Conversion works best from a 4x6 PNG to104ZPL.105106See [shipments-labels-and-rates.md](references/shipments-labels-and-rates.md)107for line-item requirements, list behavior, rate rules, claims, and carrier108options.109110## Tracker quick reference111112- Omitting `carrier` from `POST /v2/trackers` invokes auto-detection. Ambiguous113 codes can match multiple carriers, and explicit carrier selection is faster.114- Some carriers require carrier-specific credentials for third-party tracking.115- Creating the same `tracking_code` and `carrier` for the same user within three116 months returns the original Tracker rather than a duplicate.117- Current status values are `unknown`, `pre_transit`, `in_transit`,118 `out_for_delivery`, `delivered`, `available_for_pickup`,119 `return_to_sender`, `failure`, `cancelled`, and `error`.120- Historical scans are in `tracking_details`. Their timestamps use a local zone121 inferred from a sufficiently complete `tracking_location`; otherwise they use122 UTC.123- `POST /v2/trackers/batch` accepts up to 100 tracking codes.124125Tracker lists default to one month ago through the current day's end. A single126datetime bound creates a one-month span around that bound; older matches need an127explicit `start_datetime`. `page_size` defaults to 20 and caps at 100.128129The API `carrier` value is not always the display name. Preserve exact strings130such as `ColumbusLastMile`, `DhlEcs`, `LaserShipV2`, `PassportGlobal`,131`TforceConcise`, and `UspsShip`.132133See [trackers.md](references/trackers.md) for status detail, carrier detail,134test-mode codes, and deletion behavior.135136## SDK and API migration guardrails137138For the Node.js SDK:139140- Use a supported runtime; Node 16 support was dropped.141- Replace `superagentMiddleware` with `httpMiddleware`.142- Replace `fetchClient` with `httpClient`.143- Account for the SDK using `fetch` instead of `superagent`.144- Treat returned API resources as plain JSON-compatible objects, not model-class145 instances.146147The C#, Java, Node.js, PHP, and Ruby SDKs expose a generic request interface for148arbitrary endpoints, including endpoints without typed resource wrappers.149Supported API endpoints standardize timestamps as ISO 8601.150151Index endpoints have request-per-second rate limiting. Integrations that152enumerate resources must tolerate throttling rather than assume unrestricted153pagination.154155See [sdk-and-api.md](references/sdk-and-api.md) for the consolidated migration156surface.157158## Account, event, and subscription quick reference159160- Carrier-account APIs cover registration, platform-account types and161 configuration, and team-authorized status updates. Platform account162 availability exposes access and setup options.163- BYOCA support extends to all users, and most carrier accounts no longer need a164 separate manual registration step.165- Groups support subgroup creation, viewing, listing, and deletion, plus166 sub-account assignment. Sub-account lists can include group information.167- `shipment.invoice.updated` reports billed-shipment disputes.168- `payment.created` and `payment.failed` are emitted again for bank and169 credit-card charges.170- Embeddable components and customer portals can create JWT-authenticated171 sessions.172- SAML invitations accept `return_to_url` for the post-acceptance destination.173- Advanced Tracking subscriptions can be canceled, and their brand174 customization can be synchronized.175- A subscription plan can be charged immediately when it is created.176177See [accounts-events-and-subscriptions.md](references/accounts-events-and-subscriptions.md)178for the complete platform-operation details.179180## Integration review checklist181182- Test omission separately from `false` for address verification keys.183- Keep immutable-resource creation payloads complete.184- Store generated Shipment and Tracker IDs where deterministic retrieval is185 required.186- Use plural `tracking_codes` only on the Tracker list endpoint.187- Request older list data with explicit datetime bounds and respect page-size188 caps.189- Preserve carrier API strings exactly.190- Accept ISO 8601 timestamps and the documented tracker status set.191- Handle throttling while enumerating index endpoints.192- Recheck Node.js middleware, HTTP client, runtime, and returned-object193 assumptions during SDK upgrades.194- Apply carrier-specific delivery, customs, claim, and label rules before195 purchase.