Skip to content

v10.0.0: refresh specs to latest, migrate Buy Order to v2, prune decommissioned APIs - #216

Merged
dantio merged 28 commits into
masterfrom
next-10
Jul 29, 2026
Merged

v10.0.0: refresh specs to latest, migrate Buy Order to v2, prune decommissioned APIs#216
dantio merged 28 commits into
masterfrom
next-10

Conversation

@dantio

@dantio dantio commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Overview

This is the v10.0.0 major release. It brings the entire RESTful layer up to eBay's current published OpenAPI specs, migrates the Buy Order API to v2, removes endpoints eBay has decommissioned, adds the new operations eBay introduced, hardens the spec-fetch tooling, and fixes several binary-payload bugs.

Because eBay removed a number of operations, this release contains breaking changes and warrants the major version bump (9.x → 10.0.0).


⚠️ Breaking changes

Buy Order API migrated v1 → v2

The Order API was rebuilt on eBay's buy_order_v2 spec. eBay's v2 only exposes the guest checkout flow, so the member-checkout, proxy-guest-checkout, payment-info, initiate-payment and place-order operations no longer exist and were removed.

  • basePath changed /buy/order/v1/buy/order/v2
  • Removed methods: initiateCheckoutSession, getCheckoutSession, placeOrder, applyCoupon, removeCoupon, updatePaymentInfo, updateQuantity, updateShippingAddress, updateShippingOption, getPurchaseOrder, the entire *ProxyGuest* family, placeGuestOrder, initiateGuestPayment, updateGuestPaymentInfo
  • Kept (the 8 real v2 guest operations): initiateGuestCheckoutSession, getGuestCheckoutSession, applyGuestCoupon, removeGuestCoupon, updateGuestQuantity, updateGuestShippingAddress, updateGuestShippingOption, getGuestPurchaseOrder
  • Removed types: CreateSignInCheckoutSessionRequest, GuestPlaceOrderRequest, InitiatePaymentRequest, UpdatePaymentInformation, CheckoutSessionRequestWithoutPayment

Decommissioned methods removed

  • Buy Marketing: getAlsoBoughtByProduct, getAlsoViewedByProduct (+ removed the browse shopping-cart methods and AddCartItemInput/RemoveCartItemInput/UpdateCartItemInput types)
  • Sell Compliance: the entire API was removed — eBay decommissioned it and all its methods on 2026-03-30 (docs and published spec pulled). Removed the client, spec, generated types, and all factory/registry wiring; eBay.sell.compliance is gone
  • Sell Marketing: setupQuickCampaign (+ QuickSetupRequest) — the quick_setup operation was retired by eBay
  • Post-Order (29 methods): the decommissioned return/case/inquiry/cancellation operations (return-draft & shipping-label family, markReturn*, checkReturnEligibility, closeCase, issueCaseRefund, createInquiry, etc.), with the matching operations pruned from the custom specs
  • Commerce Media: InputStream type removed (dropped from eBay's spec); uploadVideo body is now any

✨ New API methods (from refreshed specs)

  • Sell Account v2: combined-shipping-rules CRUD (getCombinedShippingRules, create/update calculated & flat shipping rules, promotional shipping rule, updateCombinedPayments) and getUserPreferences / setUserPreferences
  • Sell Account v1: bulkCreateOrReplaceSalesTax
  • Sell Finances: getOrderEarnings, getOrderEarningsById, getOrderEarningsSummary, getBillingActivities
  • Sell Metadata: shipping/policy lookups (getHandlingTimes, getShippingCarriers, getShippingServices, getShippingLocations, getExcludeShippingLocations, and more)
  • Commerce Media: documents (createDocument, createDocumentFromUrl, getDocument, uploadDocument), post-order documents (uploadPostOrderDocument, downloadPostOrderDocument, removePostOrderDocument), createImageFromFile, createImageFromUrl, getImage

Infrastructure

  • Added PATCH support: Restful.patch(), plus patch on the IEBayApiRequest interface and AxiosRequest implementation (backs setUserPreferences)
  • Repointed redocly.yaml at buy_order_v2

🛠️ Spec-fetch tooling (scripts/fetch-open-api.cjs)

eBay moved the OpenAPI spec endpoints behind Akamai Bot Manager, which 403s a bare request. The fetch script now sends a browser User-Agent, keeps a cookie jar, and retries once with the issued bot-mitigation cookies. Verified 26/26 active specs return 200.

sell/account/v2 is intentionally excluded (its static contract has a dangling $ref that omits SetUserPreferencesRequest) and is maintained manually.

All RESTful specs were then refreshed to their current published versions (e.g. finances 1.17.3 → 1.19.0, metadata 1.11.1 → 1.12.1, marketing 1.22.2 → 1.23.2) and the TypeScript types regenerated.


🐛 Bug fixes (binary payloads)

Surfaced by a parallel bug-hunt review of this branch:

  • Media multipart uploadscreateImageFromFile, uploadDocument, uploadPostOrderDocument now send Content-Type: multipart/form-data (via the existing multipartHeader helper) instead of the default application/json, which eBay rejects
  • Binary PDF downloaddownloadPostOrderDocument now uses responseType: 'arraybuffer' so the application/pdf response isn't corrupted by JSON decoding
  • Finances filtergetTransactions now comma-joins a filter array instead of emitting repeated filter= params

Known follow-up


✅ Verification

  • tsc --noEmit: 0 errors
  • Test suite: 1313 passing (the OAS harness auto-tests every operation against its spec)
  • npm run build: OK
  • npm audit: 0 vulnerabilities (transitive brace-expansion / form-data / js-yaml / qs advisories resolved and merged from master)

  BREAKING CHANGE: Removed methods getAlsoBoughtByProduct, getAlsoViewedByProduct from buy marketing API and suppressViolation from sell compliance API. Removed corresponding
  types AddCartItemInput, RemoveCartItemInput, UpdateCartItemInput, SuppressViolationRequest. These operations were deprecated by eBay and no longer available in updated API
  specs.

# Conflicts:
#	specs/sell_fulfillment_v1_oas3.json
- Keep next-10 (v10.0.0-RC.0) as authoritative for API source files and generated specs
- Incorporate master's dependency updates (eslint, rollup 4, newer packages, overrides)
- Merge CHANGELOG: v10 RC entry + full v9.4.x history from master
- Merge README: v10 version table + master's developer account link
- Resolve .gitignore: keep both CLAUDE.md and .claude entries
- Keep buy_order_v1_beta_oas3.ts deleted (intentional in v10)
- Retain fetch-openapi script from next-10 alongside updated gen-openapi
BREAKING CHANGE: The Buy Order API migrated to v2, which only exposes the
guest checkout flow. Removed the member checkout session, proxy-guest checkout
session, payment-info, initiate-payment and place-order operations and their
request types (CreateSignInCheckoutSessionRequest, GuestPlaceOrderRequest,
InitiatePaymentRequest, UpdatePaymentInformation, CheckoutSessionRequestWithoutPayment).
These endpoints no longer exist in the eBay Order v2 API.
# Conflicts:
#	CHANGELOG.md
#	README.md
#	package-lock.json
#	package.json
BREAKING CHANGE: Removes the 29 methods eBay decommissioned across the
post-order return, case, inquiry and cancellation APIs, and prunes the
matching operations from the custom specs. Ported from the closed PR #214.
Adds sell account v2 combined-shipping-rules and user-preferences methods
(account v2 spec bumped to v2.2.0), sell finances order-earnings and
billing-activity methods, and sell metadata shipping lookup methods. Adds
PATCH support to the Restful base client and IEBayApiRequest to back
setUserPreferences. Ported from the closed PR #214.
eBay now serves the OpenAPI specs behind Akamai Bot Manager, so a bare
https.get 403s on every URL. Send a browser User-Agent, keep a cookie jar,
and retry once with the issued bot-mitigation cookies (bm_ss/bm_s/bm_so).
Verified 26/26 active specs return 200.

Comment out sell/account/v2 (static contract has a dangling $ref that omits
SetUserPreferencesRequest) and sell/compliance (no longer published, 302);
both APIs are kept with manually-maintained specs.
Refreshes the RESTful OpenAPI specs to eBay's current published versions
(e.g. sell finances v1.17.3->v1.19.0, metadata v1.11.1->v1.12.1, marketing
v1.22.2->v1.23.2, inventory v1.18.4->v1.18.5) and regenerates all TypeScript
types. Repoints redocly.yaml at buy_order_v2. Reconciles the client with the
refreshed specs:

- commerce media: add uploadPostOrderDocument, downloadPostOrderDocument and
  removePostOrderDocument; uploadVideo body typed as any (InputStream schema
  removed upstream)
- sell account v1: add bulkCreateOrReplaceSalesTax
- sell marketing: remove setupQuickCampaign (quick_setup operation retired)

BREAKING CHANGE: Removed sell marketing setupQuickCampaign and the
QuickSetupRequest type, and the commerce media InputStream type; all were
removed from eBay's updated specs.
- commerce media: send multipart/form-data (via multipartHeader) for
  createImageFromFile, uploadDocument and uploadPostOrderDocument; eBay
  rejects these uploads under the default application/json content type
- commerce media: download post-order documents as arraybuffer so the
  binary PDF response is not corrupted by JSON decoding
- sell finances: comma-join getTransactions filter when given an array,
  since the params serializer would otherwise emit repeated filter params
  that eBay does not interpret as combined criteria
Comment on lines +1 to +2
// Note: SuppressViolationRequest removed in updated Compliance API
// import {SuppressViolationRequest} from '../../../../types/index.js';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@dantio I can't find evidence this API still exists aside from the spec still being available. The docs have dropped it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good catch — confirmed. eBay decommissioned the Sell Compliance API and all its methods on 2026-03-30 (the developer docs and the published OpenAPI spec were both removed). I've now removed the entire Compliance API — client, spec, generated types, and all factory/registry wiring — in b4686f0. eBay.sell.compliance is gone. Thanks for flagging it!

dantio added 3 commits July 22, 2026 10:36
BREAKING CHANGE: eBay decommissioned the Sell Compliance API and all its
methods on 2026-03-30 (developer docs and the published OpenAPI spec were
removed). Removes the Compliance API client (getListingViolations,
getListingViolationsSummary), its spec JSON and generated types, and all
factory/registry wiring. eBay.sell.compliance is no longer available.
# Conflicts:
#	CHANGELOG.md
#	README.md
#	package-lock.json
#	package.json
@dantio
dantio requested a review from jostrander July 22, 2026 09:18

@jostrander jostrander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like the new sell_stores_v1 API could be added potentially as well. The spec download is a POST or I'd recommend adding it to the downloader.

Comment thread README.md Outdated
Comment on lines +62 to +63
| **Finding API** | ✔ |
| **Shopping API** | ✔ |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we drop these now since they aren't active anymore either?

Image

This would resolve #199

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes — done in e7f1625. I removed the entire traditional Finding API (client, call definitions, types, factory/registry wiring, the README examples and the example script). eBay.finding is gone. Per eBay's deprecation-status page the Finding API was taken down server-side in Feb 2025, so this resolves #199.

While I was in the README I also cleaned up the stale Compliance API rows that were still lingering in these tables (and in the package.json keywords) after b4686f0. Thanks for flagging it! 🙏

dantio added 2 commits July 23, 2026 13:07
Adds the eBay Sell Stores API (sell/stores/v1) with all 8 operations:
getStore, getStoreCategories, addStoreCategory, renameStoreCategory,
deleteStoreCategory, moveStoreCategory, getStoreTask and getStoreTasks.

Wires the spec into redocly.yaml + the fetch-openapi downloader, generates
types, and registers the client on eBay.sell.stores. Requested in PR #216
review by @jostrander.
eBay took down the traditional Finding API server-side in February 2025
(see the API deprecation-status page); requests now return errors. Removes
the Finding client, its call definitions, types, factory/registry wiring,
README examples and the example script. eBay.finding is no longer available.

Also drops the now-stale Compliance API references from the README tables
and package.json keywords (the Compliance API was removed in b4686f0).

Resolves #199. Flagged in PR #216 review by @jostrander.

BREAKING CHANGE: eBay.finding has been removed. The eBay Finding API was
decommissioned by eBay in February 2025. Migrate item search to the Buy
Browse API (eBay.buy.browse).
@dantio

dantio commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

@jostrander good call on the Stores API — added in 2a6deab.

Turns out the spec downloads fine over a plain GET (https://developer.ebay.com/api-docs/master/sell/stores/openapi/3/sell_stores_v1_oas3.json), so no POST handling was needed — I just added the URL to scripts/fetch-open-api.cjs and wired sell_stores_v1 into redocly.yaml.

The client is now exposed on eBay.sell.stores with all 8 operations (getStore, getStoreCategories, addStoreCategory, renameStoreCategory, deleteStoreCategory, moveStoreCategory, getStoreTask, getStoreTasks) and is covered by the OpenAPI conformance test. Thanks for the suggestion!

@jostrander jostrander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The breaking changes should probably be updated, but otherwise it looks good

Comment thread README.md Outdated
* `v10.0.0-RC.1` is the latest release.
* See [here](https://github.com/hendt/ebay-api/blob/master/CHANGELOG.md) for the full changelog.

## Implementation status

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this duplicated from line 46?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good eye — yes, it was. There was an entire duplicated ## Changelog + ## Implementation status block here, and the copy carried stale version numbers (e.g. Browse v1.10.0 / Order v1_beta.20.0 vs the current v1.20.2 / v2.1.2 above). Removed the duplicate and kept the up-to-date table in 9613316. Thanks!

Adds a "Migrating from v9 to v10" section documenting the breaking changes
(removed Finding and Compliance APIs, Buy Order v1->v2 migration, pruned
Buy/Sell Marketing and post-order methods, Commerce Media InputStream) with
migration guidance, plus a TOC entry.

Also removes an accidentally duplicated "## Changelog" + "## Implementation
status" block that carried stale version numbers, and bumps the surviving
changelog line to v10.0.0-RC.1. Flagged in PR #216 review by @jostrander.
@dantio

dantio commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for the approval! 🙏

Re: breaking changes — I've added a Migrating from v9 to v10 section to the README in 9613316 that documents them with migration guidance:

  • Removed: Finding API (eBay.finding → use eBay.buy.browse), Sell Compliance API
  • Changed: Buy Order migrated v1 → v2 (guest-checkout only), Buy/Sell Marketing method removals, 29 pruned post-order methods, Commerce Media InputStream
  • New: Sell Stores API

The CHANGELOG breaking-change entries themselves are captured in the feat! / BREAKING CHANGE commit footers and will be generated by standard-version when @dantio cuts the release.

@dantio
dantio requested a review from jostrander July 24, 2026 09:57
@dantio

dantio commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

@jostrander 10.0.0-RC.2 released

@jostrander

Copy link
Copy Markdown
Contributor

So far it looks good @dantio, thanks for the updates, the readme still says rc.1 just FYI

dantio added 7 commits July 29, 2026 15:15
enrichRequestConfig spread defaultApiHeaders *after* the per-request
config.headers, so the hardcoded 'Content-Type: application/json' always
won. Every endpoint that sets its own content type was silently sending
JSON instead, and eBay rejected the upload: createImageFromFile,
uploadDocument, uploadPostOrderDocument (commerce media), uploadFile
(sell feed) and uploadEvidenceFile (sell fulfillment). The multipart
headers added in 45bf087 never reached the wire.

Headers now merge least- to most-specific: library defaults, then the
marketplace/locale headers, then auth, then the app-level apiConfig
headers, then the per-request headers, and finally the signature headers
(which are derived from the final request and must win).

Fixes two endpoints that were missed when the binary content types were
first corrected:

* commerce media uploadVideo now sends 'application/octet-stream' as its
  spec requires, and takes an optional third `headers` argument so
  Content-Range/Content-Length can be supplied for resumable uploads.
* sell logistics downloadLabelFile now requests 'application/pdf' with
  responseType 'arraybuffer' instead of trying to parse a PDF as JSON.

A DELETE body lives in config.data, so it never reached the digital
signature payload and no 'content-digest' header was emitted for it.
Restful.delete now mirrors config.data onto the request. Also adds the
missing encodeURIComponent to the sell logistics path parameters.

BREAKING CHANGE: a per-request Content-Type now overrides one set
globally via apiConfig.headers. Previously the global value won.
The spec refresh in 7459bf8 removed these operations from eBay's own
published OpenAPI documents, but the client classes kept implementing
them. They pointed at endpoints eBay no longer serves, and oas.spec.ts
could not catch them because it only walked spec -> implementation.

Removed (verified operation-by-operation against the base and head
specs):

* buy browse: getShoppingCart (the /shopping_cart resource is gone; its
  addItem/removeItem/updateQuantity siblings were removed earlier)
* buy feed: getProductFeed (the /product feed is gone)
* commerce catalog: getChangeRequest, getChangeRequests,
  getProductMetadata, getProductMetadataForCategories
* commerce charity: getCharityOrgByLegacyId
* sell account v1: getInventoryLocation, getInventoryLocations,
  createInventoryLocation, updateInventoryLocation,
  deleteInventoryLocation, enableInventoryLocation,
  disableInventoryLocation and getSalesTaxJurisdictions
* sell marketing: launchCampaign
* sell metadata: getProductAdoptionPolicies

The sell account location methods were duplicates targeting
/sell/account/v1/location, a path eBay does not serve. The working
implementations of all seven live on eBay.sell.inventory and are
unaffected.

Also drops the 15 post-order request types left behind when their
methods were pruned in cb1af3f, and deletes two examples that called
removed methods.

oas.spec.ts now asserts the reverse direction too: every public method
an API class declares must correspond to an operationId in its spec.
A future spec refresh that drops an operation now fails the suite.

BREAKING CHANGE: 17 methods that eBay has decommissioned were removed,
along with the BuyerCloseCaseRequest, BuyerCloseInquiryRequest,
CheckEligibilityRequest, CheckInquiryEligibilityRequest,
CloseReturnRequest, ConfirmRefundRequest, CreateInquiryRequest,
GetEstimateRequest, MarkAsShippedRequest, MarkRefundSentRequest,
ReturnAddressRequest, SellerProvideRefundInfoRequest,
SetReturnCreationSessionRequest, UpdateTrackingRequest and
VoidLabelRequest types. Inventory location management moves to
eBay.sell.inventory.
45bf087 taught getTransactions to join an array of filter criteria, but
left the other six filter-taking methods on plain strings. Because axios
is configured with paramsSerializer {indexes: null}, passing an array to
any of them emitted the parameter repeatedly instead of once, so the
half-applied convenience was worse than none.

getPayouts, getPayoutSummary, getTransactions, getTransactionSummary,
getOrderEarnings, getOrderEarningsSummary and getBillingActivities now
all take `string | string[]` and share a toFilter helper.

BREAKING CHANGE: getOrderEarningsSummary takes an options object
({filter}) instead of a positional argument, matching its siblings, and
the limit/offset parameters of getOrderEarnings and getBillingActivities
are typed as number rather than string. All four methods were introduced
in this unreleased major, so no published API changes.
IEBayApiRequest gained a required `patch` method when sell account v2
introduced eBay's first PATCH operation, but seven in-repo stubs were
never updated. mocha's loader chain does not type-check the specs, so
the errors stayed latent until tsc was pointed at test/.
update-readme-release.cjs could not match a prerelease: the regex
required a closing backtick straight after the patch digit, so
`v10.0.0-RC.1` never matched. readVersion null-dereferenced and
writeVersion silently no-opped, which is why the README still advertises
RC.1 while package.json is at RC.2. It now matches prerelease and build
metadata and throws a message naming the missing line.

fetch-open-api.cjs wrote whatever came back on a 200 straight into
specs/. Akamai Bot Manager answers a blocked request with 200 and an
HTML challenge page, so a bad run would overwrite a good committed spec
and only surface later as a confusing gen-openapi parse error. It now
parses and sanity-checks the document before writing, decodes the body
as UTF-8 (9 of 36 specs contain multi-byte characters that a chunk
boundary could have corrupted), follows redirects, refuses a non-.json
filename, exits non-zero when any download fails, and reports the
operations a refresh drops so the matching client can be pruned.

Adds tsconfig.check.json and an `npm run typecheck` covering src, test
and examples, wired into prerelease. examples/ was previously in no
tsconfig at all, which is how an extensionless import survived in
clientAlerts.GetPublicAlerts.ts; that is fixed here.

Also adds publishConfig.tag so a release candidate cannot claim the
`latest` dist-tag (npm does not infer one from the semver suffix), drops
the readline dependency (a 2013 stub of Node 0.4's readline; the
examples resolve the builtin), pins openapi-typescript to the 7.13.0
that generated the committed types, overrides brace-expansion to clear a
high-severity advisory, points the `rc` script at the current branch
instead of a hardcoded `next`, and removes the CLAUDE.md line from
.gitignore, which did nothing because the file is tracked.
The migration guide omitted breaking changes a reader needs. It never
mentioned the buy browse cart removals (and attributed their types to
buy marketing), nor the commerce notification test() -> testSubscription()
rename, which throws "is not a function" at runtime with no compile-time
warning. The post-order entry gave a count of 29 methods without naming
any of them.

Every removal is now enumerated, grouped by API, with the replacement
where one exists. Adds sections for the renamed method, the newly
required IEBayApiRequest.patch member, and the behaviour changes in this
release (header precedence, the media and logistics content types, the
finances filter arrays).

Corrects the implementation status table against the shipped specs: ten
versions were stale, and the Commerce row had dropped the Message and
Feedback APIs, which are implemented, wired and tested. Adds sell
account v2.

Other README repairs: the digital signature list pointed five of six
post-order methods at .inquiry. when they live on return/cancellation,
and named issueCaseRefund, which was removed in cb1af3f; the OAuth2
section documented refreshAuthToken()/refreshClientToken(), which are
event names, not methods (they are refreshUserAccessToken() and
obtainApplicationAccessToken()); the docs dedup in 9613316 left an empty
h3 followed by an h2 nested inside an h3 subsection; "RESTful API"
appeared as two headings so the TOC anchor resolved to the status table
rather than the usage section; and the TOC order no longer matched the
document.

CHANGELOG: removes a verbatim duplicate of the RC.1 and RC.0 sections, a
"# Conflicts:" artifact standard-version harvested from a merge commit
body, and completes a breaking-change bullet that was truncated
mid-sentence.
Added in c9947a3 so a release candidate could not claim the `latest`
dist-tag. The next publish from this branch is the stable 10.0.0, where
it would do the opposite and leave `latest` pointing at 9.6.0.

Publish any future prerelease with an explicit `npm publish --tag next`.
@dantio
dantio merged commit eaa63b4 into master Jul 29, 2026
1 check passed
@dantio
dantio deleted the next-10 branch July 29, 2026 13:49
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