Skip to content

INSR-110: Add USPS tracker registration API examples - #235

Open
apeasypost wants to merge 5 commits into
masterfrom
DATA-2184-usps-tracker-registrations-docs
Open

INSR-110: Add USPS tracker registration API examples#235
apeasypost wants to merge 5 commits into
masterfrom
DATA-2184-usps-tracker-registrations-docs

Conversation

@apeasypost

@apeasypost apeasypost commented Sep 10, 2026

Copy link
Copy Markdown

Summary

  • Add canonical cURL request snippets for the USPS tracker registrations public API.
  • Add sample JSON responses for create, list, and retrieve endpoints.
  • Python and Ruby request snippets are intentionally omitted until the endpoint ships in the official client libraries (curl + responses only, per repo convention).

File changes

File Change
official/docs/curl/current/usps-tracker-registrations/create.sh Create registration cURL example
official/docs/curl/current/usps-tracker-registrations/list.sh List registrations cURL example
official/docs/curl/current/usps-tracker-registrations/retrieve.sh Retrieve registration cURL example
official/docs/responses/usps-tracker-registrations/create.json Sample create response
official/docs/responses/usps-tracker-registrations/list.json Sample list response
official/docs/responses/usps-tracker-registrations/retrieve.json Sample retrieve response

Release Test Plan

Related

Co-authored-by: Cursor <cursoragent@cursor.com>
@apeasypost
apeasypost requested review from a team as code owners September 10, 2026 05:32
@apeasypost apeasypost self-assigned this Sep 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We typically do not document non-native API requests for each language lib. When there are (not yet) supported endpoints, we've historically only added the curl snippet and response examples.

Are there plans to add support for this to the libs? I've not heard of this endpoint yet.

Client libraries do not expose this endpoint yet; document curl and
response examples only until native SDK support ships.

Co-authored-by: Cursor <cursoragent@cursor.com>
@apeasypost

Copy link
Copy Markdown
Author

Thanks Justin Hammond (@Justintime50) — agreed. I dropped the Python and Ruby request snippets and kept curl + JSON response examples only, matching the pattern used for other endpoints that are not yet in the client libraries (e.g. DELETE /trackers).

Lib support: This is a new public API (POST/GET /v2/carrier_claims/usps_tracker_registrations) shipping with DATA-2184. None of the official client libraries expose it yet. Follow-up work would add a carrier_claims service namespace in each lib:

Repo Pattern to follow
easypost-ruby Claim service for CRUD + FedexRegistration for nested carrier_claims/... paths
easypost-python ClaimService + CustomerPortalService nested URL pattern
easypost-node ClaimService in src/services/
easypost-php explicit path in service (like FedExRegistrationService)
easypost-java ClaimService
easypost-csharp ClaimService
easypost-go flat methods on Client (see claim.go)

Endpoint constant: carrier_claims/usps_tracker_registrations. Methods: create, all/list, retrieve. Collection key: tracker_registrations.

We can add native SDK examples to this repo once those lib PRs land; until then docs will show curl only.

Comment thread official/docs/curl/current/usps-tracker-registrations/retrieve.sh Outdated
@apeasypost apeasypost changed the title DATA-2184: Add USPS tracker registration API examples INSR-110: Add USPS tracker registration API examples Sep 10, 2026
Match other retrieve examples by documenting utr_... instead of a full sample id.

Co-authored-by: Cursor <cursoragent@cursor.com>

@sam-ep Sam Guyette (sam-ep) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- curl and json samples match the public api

@apeasypost

Copy link
Copy Markdown
Author

@copilot review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Rename the response fixtures to the repository convention and add the missing has_more field.

Pull request overview

Adds cURL examples and sample JSON responses for USPS tracker registration create, list, and retrieve endpoints.

Changes:

  • Added create, list, and retrieve cURL snippets.
  • Added corresponding API response examples.
  • Uses the curl-only convention pending official client-library support.
File summaries
File Summary
official/docs/responses/usps-tracker-registrations/retrieve.json Retrieve response; filename requires convention correction.
official/docs/responses/usps-tracker-registrations/list.json List response; filename and pagination flag require correction.
official/docs/responses/usps-tracker-registrations/create.json Create response; filename requires convention correction.
official/docs/curl/current/usps-tracker-registrations/retrieve.sh Retrieve request example.
official/docs/curl/current/usps-tracker-registrations/list.sh List request example.
official/docs/curl/current/usps-tracker-registrations/create.sh Create request example.
Review details

Suppressed comments (4)

official/docs/responses/usps-tracker-registrations/create.json:1

  • This response file's basename does not follow the repository's response convention: files under a resource directory are named <resource>-<action>.json (for example, official/docs/responses/refunds/refunds-create.json), and the response builder derives that name in tools/build_doc_json_responses/builder/snippets.py:99-110. As written, the docs consumer will not resolve this response alongside the new create.sh; rename it to usps-tracker-registrations-create.json.
{

official/docs/responses/usps-tracker-registrations/list.json:1

  • This response file's basename does not follow the repository's response convention: files under a resource directory are named <resource>-<action>.json (for example, official/docs/responses/refunds/refunds-list.json), and the response builder derives that name in tools/build_doc_json_responses/builder/snippets.py:99-110. As written, the docs consumer will not resolve this response alongside the new list.sh; rename it to usps-tracker-registrations-list.json.
{

official/docs/responses/usps-tracker-registrations/list.json:17

  • This list response omits the standard has_more pagination flag. The other paginated object-list fixtures include it (for example, official/docs/responses/refunds/refunds-list.json:15), and consumers need it to know whether another page is available. Add "has_more": false (or the actual value) after the array.
  ]
}

official/docs/responses/usps-tracker-registrations/retrieve.json:1

  • This response file's basename does not follow the repository's response convention: files under a resource directory are named <resource>-<action>.json (for example, official/docs/responses/refunds/refunds-retrieve.json), and the response builder derives that name in tools/build_doc_json_responses/builder/snippets.py:99-110. As written, the docs consumer will not resolve this response alongside the new retrieve.sh; rename it to usps-tracker-registrations-retrieve.json.
{
  • Files reviewed: 6/6 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Include recipient and mail_class fields in curl/response samples so docs match the API contract.

Co-authored-by: Cursor <cursoragent@cursor.com>
@apeasypost
apeasypost requested a lite review from Copilot September 11, 2026 06:25
@apeasypost

Copy link
Copy Markdown
Author

Copilot review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical response-file naming issues must be fixed before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Lite

@@ -0,0 +1,29 @@
{
@@ -0,0 +1,24 @@
{
@@ -0,0 +1,20 @@
{
Co-authored-by: apeasypost <205667805+apeasypost@users.noreply.github.com>

Copilot AI commented Sep 11, 2026

Copy link
Copy Markdown

Copilot review

Addressed in e82befb: renamed response fixtures to usps-tracker-registrations-{create,list,retrieve}.json and added has_more to the list response.

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.

5 participants