Skip to main content

shedcloud-partner-api

Official Python client for the ShedCloud Partner API (/partner/v1/*).

Use this package from Python 3.10+ to call company-scoped Partner API endpoints with an API key (sc_live_…) or OAuth2 client credentials.

Install

pip install shedcloud-partner-api

For local development:

pip install -e ".[dev]"

Hosts

Environment Host
production (default) https://go.shedcloud.com
sandbox https://api.shedcloudtest.com

Pass environment="sandbox" for test, or base_url= for a custom/local override.

Quick start

API key (production)

from shedcloud_partner_api import ShedCloudPartnerClient

client = ShedCloudPartnerClient(
    auth={"type": "api_key", "api_key": "sc_live_..."},
)

stock = client.lot_stock.list({"limit": 50, "purchase_type": "Lot Stock"})
print(stock["total"], stock["data"][0]["title"])

Sandbox

client = ShedCloudPartnerClient(
    environment="sandbox",
    auth={"type": "api_key", "api_key": "sc_live_..."},
)

OAuth2 client credentials

client = ShedCloudPartnerClient(
    auth={
        "type": "oauth",
        "client_id": "...",
        "client_secret": "...",
    },
)

orders = client.orders.list({"status": "Unprocessed", "limit": 25})

Create credentials in the ShedCloud portal under Settings → Developer API.

Resources

Each attribute maps to a section of the hosted reference.

Client attribute Endpoints
client.lot_stock GET /partner/v1/lot-stock
client.stock_templates GET /partner/v1/stock-templates
client.leads leads CRUD + status
client.quotes quotes CRUD, convert, line items
client.orders orders CRUD, contract, payments, line items
client.work_orders work orders CRUD + status
client.locations locations CRUD
client.customers customers CRUD + merge
client.domains storefront domains (read-only)
client.agreements B2B agreements + state legal (read-only)
client.products catalog products + sizes
client.users users CRUD + roles
client.payments payments (read-only)
client.documents documents + download links
client.events event feed, iterator, redeliver, webhook deliveries
client.site_events visitor behavioral tracking: batch ingest (snake_case body) + read-back iterator
client.configurator_sessions 3D configurator launch sessions

Idempotency and optimistic concurrency

client.quotes.create(body, idempotency_key="uuid-here")
client.orders.update(order_id, body, if_match=record["version"])

Event feed iterator

for event in client.events.iterate({"types": ["order.created"]}):
    handle(event)

Site events (visitor tracking)

Server-side batch ingest from a partner marketing site. The ingest body stays snake_case on the wire — do not camelCase it.

from shedcloud_partner_api import PartnerScopes

client.site_events.track(
    {
        "session_id": "sess-abc",
        "visitor_id": "vis-xyz",
        "site_host": "www.example-sheds.com",
        "events": [
            {"event_type": "page.view", "page": "/buildings"},
            {"event_type": "cta.click", "product_id": "prod-1"},
        ],
    }
)

for event in client.site_events.iterate({"session_id": "sess-abc", "limit": 100}):
    print(event["eventType"], event.get("source"))

Scopes: PartnerScopes.SITE_EVENTS_WRITE (ingest), PartnerScopes.SITE_EVENTS_READ (read-back).

Webhook verification

from shedcloud_partner_api import verify_webhook_signature, WEBHOOK_SIGNATURE_HEADER

verify_webhook_signature(
    request.body,
    request.headers[WEBHOOK_SIGNATURE_HEADER],
    webhook_secret,
)

Python field names

Request params and bodies use snake_case in Python (e.g. location_id, default_for_store). The client serializes them to camelCase JSON automatically.

Scopes

See shedcloud_partner_api.PartnerScopes — kept in sync with the API's scope catalog.

Related SDKs

Publishing (maintainers)

Automated via .github/workflows/publish.yml:

Trigger Index Version Install
Push to main TestPyPI 0.5.1.dev42 pip install --index-url https://test.pypi.org/simple/ --pre shedcloud-partner-api
Tag v0.5.1 or GitHub Release PyPI 0.5.1 pip install shedcloud-partner-api

Every main commit publishes a unique dev build to TestPyPI only — production PyPI stays clean for stable tags.

One-time TestPyPI trusted publisher: test.pypi.orgPublishing → pending publisher → Owner Corland-Partners-LLC, repo shedcloud-pypi, workflow publish.yml, environment testpypi. Create matching GitHub environment testpypi.

Stable release:

  1. Bump version in pyproject.toml and src/shedcloud_partner_api/__init__.py
  2. Update CHANGELOG.md, commit to main (TestPyPI dev build)
  3. Tag: git tag v0.5.1 && git push origin v0.5.1 (production PyPI)

License

MIT

Release files for shedcloud-partner-api 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shedcloud-partner-api 0.6.0
File Size Uploaded
shedcloud_partner_api-0.6.0.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shedcloud-partner-api 0.6.0
File Interpreter ABI Platform
shedcloud_partner_api-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.9 kB

Release files / shedcloud_partner_api-0.6.0.tar.gz

Download URL shedcloud_partner_api-0.6.0.tar.gz
Size 19.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7b70e84f4f44bf35c1acf6ca0e6ad2b35ea1b07d15d990ff08d8346c3bc1bf0d
BLAKE2b-256 checksum
How to use checksums
6848f061816be8b2358a12b206f576ff22ae7d5d31e2301e7099e50d72819db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release files / shedcloud_partner_api-0.6.0-py3-none-any.whl

Download URL shedcloud_partner_api-0.6.0-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
598342993256603c729c68f27365ad5c2e5b18ab8b0cfa582fe3646bdf731de0
BLAKE2b-256 checksum
How to use checksums
ee12f4e46a3ee8617f5e9342ff996f80e4af99531141bb5e73f530213f588c44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

This release

0.6.0 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page