Skip to content

About

Public OpenAPI 3.0 specs for the Crossly seller and buyer APIs, versioned daily with a changelog and signed releases.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Crossly OpenAPI specs

release ci latest reference license

The public OpenAPI 3.0 descriptions of the Crossly API, versioned in git. Crossly is a multi-marketplace crossposting platform for resellers: list once, sell on every marketplace, and manage inventory, orders and shipping in one place.

file API auth
openapi/seller.json · .yaml Seller: your store, inventory, listings, crossposting, orders, shipping, analytics, webhooks Personal Access Token (crossly_pat_…, Settings → Developer) or a seller OAuth token
openapi/buyer.json · .yaml Buyer: catalog search, cart, checkout, orders, wishlists, offers, cashback Buyer OAuth token (crossly_oat_…) with buyer:* scopes

Both use the server https://crossly.net/api and bearer authentication. The two tokens are not interchangeable.

Browse the reference: https://crossly-dev.github.io/crossly-openapi/

How it updates

A daily workflow fetches https://crossly.net/openapi/{seller,buyer}.json. When the sha256 of either spec's canonical JSON (keys sorted) differs from state.json, it:

  1. writes the JSON and YAML copies into openapi/,
  2. prepends a CHANGELOG entry listing the operations and models that were added, changed or removed,
  3. bumps the version (a removed operation or model is breaking: minor bump while 0.x, major after 1.0; anything else is a patch),
  4. commits, tags vX.Y.Z, and creates a GitHub Release with the four spec files and SHA256SUMS, each with signed SLSA build provenance,
  5. rebuilds the reference site.

A reordering that does not change the canonical JSON is not a release. "Changed" means anything other than the summary or description of an operation, or anything at all in a model; a changed operation can still be breaking (a new required field), so read the entry when upgrading.

Download a pinned version

# latest
curl -fsSLO https://github.com/crossly-dev/crossly-openapi/releases/latest/download/seller.json
# a specific version
curl -fsSLO https://github.com/crossly-dev/crossly-openapi/releases/download/v0.1.0/buyer.yaml
# or straight from git at a tag
curl -fsSLO https://raw.githubusercontent.com/crossly-dev/crossly-openapi/v0.1.0/openapi/seller.json

Verify that a file came from this repository's release workflow:

gh attestation verify seller.json --repo crossly-dev/crossly-openapi
sha256sum -c SHA256SUMS --ignore-missing

Generate your own client

Official SDKs already exist (TypeScript, Python, Go, Ruby, PHP, Java, Kotlin, C#, Rust, Swift, Dart, Elixir; see github.com/crossly-dev) and a CLI (npm i -g @crossly/cli). For anything else, point a generator at a pinned spec.

OpenAPI Generator (Java 11+):

npx @openapitools/openapi-generator-cli generate \
  -i https://github.com/crossly-dev/crossly-openapi/releases/download/v0.1.0/seller.json \
  -g python -o ./crossly-seller --additional-properties=packageName=crossly_seller

openapi-typescript (types only, pairs with openapi-fetch):

npx openapi-typescript https://github.com/crossly-dev/crossly-openapi/releases/latest/download/buyer.json -o crossly-buyer.d.ts

oapi-codegen (Go):

go run github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest -generate types,client -package crossly seller.json > crossly.gen.go

Notes for generators:

  • The seller spec is large (about 2,700 operations and 5,600 models, 11 MB). Most generators handle it but need memory: give Java -Xmx4g, Node NODE_OPTIONS=--max-old-space-size=6144. Generate only the tags you need where the tool supports it (OpenAPI Generator: --openapi-normalizer FILTER="tag:Inventory|Orders").
  • Every operation has an operationId, so method names are stable across releases; the CHANGELOG lists removals by operationId.
  • Error responses share one Error schema ({ error: { code, message, details? }, correlationId? }); branch on error.code, not the message, and quote correlationId when you report a problem.

Test against a mock

crossly-mock serves these specs with realistic example responses and request validation:

docker run --rm -p 4010:4010 -p 4011:4011 ghcr.io/crossly-dev/crossly-mock
curl -H 'Authorization: Bearer crossly_pat_test' http://localhost:4010/v1/me

Repository layout

path what
openapi/ the specs (generated: do not edit by hand, the next sync overwrites them)
state.json current version and the canonical sha256 of each spec
scripts/sync.mjs fetch, diff, version, CHANGELOG
scripts/lint.mjs Redocly recommended lint: new structural errors fail CI, style is reported in the job summary
lint-baseline.json structural problems the live spec already has; listed in each release's notes until fixed upstream
scripts/build-site.mjs the reference site (Scalar, vendored) for GitHub Pages

The specs are generated from the Crossly API's route schemas. Report a wrong or missing description as an issue; pull requests that edit openapi/ cannot be merged because the next sync replaces them, but they are a fine way to show the fix. Security reports: use private vulnerability reporting.

License

MIT

About

Public OpenAPI 3.0 specs for the Crossly seller and buyer APIs, versioned daily with a changelog and signed releases.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages