Skip to main content

Introduction to the Blüdhaven Pets API

The Blüdhaven Pets API (api.bludhavenpets.com) runs animal intake across channels, statutory municipal licensing, veterinary health clearances, 30-minute holds on adoption reservations, and retail point-of-sale inventory.

System architecture​

Blüdhaven Pets links three physical shelter and retail facilities with an online adoption and supplies catalog:

  • Harbor Branch (loc_harbor_04) handles intake processing, quarantine observation, surgical procedures, and post-op recovery.
  • Downtown Retail (loc_downtown_01) runs the adoption floor, retail supplies counter, nutrition center, and grooming appointments.
  • West End Shelter (loc_westend_08) manages long-term transitional care and rescue intake from partner organizations.

Available modules​

Interactive API reference​

Explore endpoints, inspect JSON schemas, and test live requests in the Scalar three-pane reference.

Domain model​

Inspect the core entity models, veterinary records, state machine lifecycles (INTAKE through ADOPTED), and invariant rules.

Holds and concurrency​

Learn how the platform manages 30-minute reservation locks and resolves HTTP 409 Conflict race conditions across store registers and web checkouts.

Fees and refunds​

Review the cost lines on an adoption application, the non-refundable reservation deposit, and the eligibility windows that govern refunds.

Compliance and licensing​

Review ISO 11784/11785 statutory microchip standards, mandatory rabies observation periods, and the fee schedules for municipal pet licensing.

Test requests​

Send live calls from the interactive reference on this site, against the sandbox gateway or the browser demo.

Authentication and scopes​

Approve the consent screen or mint a token with curl, then read the ten scopes a token can carry.

Errors and problem details​

Read one RFC 9457 shape, then branch on the nine error types the platform returns.

Pagination​

Walk GET /animals page by page and stop on has_more instead of an empty array.

Rate limits​

Read Retry-After from a 429 and back off without stampeding a window.

Versioning​

Separate the /v1 path from the dated contract version and see which changes ship inside a major.

Troubleshooting​

Match a symptom to its cause and to the fix that ends it.

Webhooks and signatures​

Verify HMAC-SHA256 signatures on outbound platform events and test deliveries with the sandbox dispatch endpoint.

API access and environments​

EnvironmentBase URLPurpose
Sandbox gatewayhttps://sandbox.bludhaven-pets.workers.devAnswers every operation with representative records, and runs the OAuth 2.0 authorization server. Clearances and payments are simulated, and an adoption hold resets when the edge recycles.
Browser demo/software/api-mockAnswers calls inside the reference page. Use it to explore the contract with no account.
Production Gatewayhttps://api.bludhavenpets.com/v1Live store POS synchronization and adoption placements. Requires contracted credentials.

The server dropdown lists the same three in that order, and the sandbox gateway leads the list. Production needs a contracted credential.

Endpoint groups​

  • animals covers intake records, adoption eligibility, and photo uploads.
  • adoptions covers 30-minute holds, hold release, application submission, and refunds.
  • applicants covers adopter accounts and session tokens.
  • retail covers supply inventory and replenishment orders.
  • veterinary covers rabies certificates, spay or neuter certification, and quarantine releases.
  • webhooks covers signed event delivery and test dispatch. The two event envelopes sit in the contract's webhooks section, and the dispatch route sits under paths so the console can send it.

Authentication​

Five routes carry no security requirement:

  • GET /animals lists intake records.
  • GET /animals/{animalId} returns one animal profile.
  • POST /applicants starts a new account.
  • POST /sessions exchanges credentials for a session token.
  • POST /webhooks/test-dispatch returns a signed sample delivery for a receiver test.

The catalog stays public because a prospective adopter browses it before signing up. Registration and sign-in open for the same reason, since an applicant has no account yet. The dispatch route stays open so a receiver test works before an integration holds a credential.

Every other request supplies one of two schemes:

  • OAuth 2.0 bearer token authorizes staff portals and partner rescue organizations. Press Connect in the reference to approve the consent screen, or mint a token with the client credentials grant. The token carries scopes that separate reads from writes and restrict veterinary clearance to licensed practitioners.
  • API Key authenticates server-to-server jobs and POS register terminals. Send it in the X-API-Key header. A key carries an assigned scope set, so a register key reaches retail stock and nothing else.

The sandbox gateway verifies both credentials. It checks a token's signature, expiry, and scope, and it looks a key up in its registry. A missing or unrecognized credential returns 401, and a credential without the scope a route requires returns 403.

To obtain test credentials or register an integration partner app, contact budbaker@bludhavenpets.com.