Official API documentation for Perkd Partner integrations.
- Node.js 18+
- Yarn (install with
npm install -g yarn)
# Install dependencies
yarn install
# Start local dev server
yarn docs:devVisit http://localhost:5173 to view the docs locally.
# Build static site
yarn docs:build
# Preview production build
yarn docs:previewperkd.github.io/
βββ docs/
β βββ .vitepress/
β β βββ config.ts # VitePress configuration
β β
β βββ getting-started/ # Getting started guides
β β βββ index.md
β β βββ setup.md
β β βββ environments.md
β β βββ authentication.md
β β
β βββ machines/ # Machine APIs
β β βββ vending/
β β βββ kiosk/
β β βββ callbacks/
β β βββ payment/
β β
β βββ schemas/ # Data schemas
β β βββ order.md
β β βββ item.md
β β βββ ...
β β
β βββ guides/ # Conceptual guides
β β βββ ...
β β
β βββ index.md # Landing page
β
βββ .github/
β βββ workflows/
β βββ deploy.yml # Auto-deploy to GitHub Pages
β
βββ package.json
yarn docs:devThe site will be available at http://localhost:5173 with hot module replacement.
All documentation is written in Markdown with VitePress extensions:
# Page Title
Regular markdown content...
::: tip
Helpful tips appear in blue boxes
:::
::: warning
Warnings appear in yellow boxes
:::
::: danger
Critical warnings appear in red boxes
:::
\`\`\`javascript
// Code blocks support syntax highlighting
const api = 'https://api.perkd.io/prod';
\`\`\`Edit navigation in docs/.vitepress/config.ts:
export default defineConfig({
themeConfig: {
nav: [...],
sidebar: {...}
}
})Simple one-command deployment:
yarn docs:deployThis will:
- Build the documentation
- Deploy to
gh-pagesbranch - Update the live site at
https://perkd.github.io
After your first deployment:
- Go to repository Settings β Pages
- Source: Deploy from a branch
- Branch:
gh-pages - Folder:
/(root) - Click Save
Your site will be live at: https://perkd.github.io
Deployment typically completes in ~30 seconds.
- Create markdown file in appropriate directory
- Add to navigation in
docs/.vitepress/config.ts - Use clear, scannable formatting
- Include code examples
- Link to related pages
- Provide working examples
- Use realistic data
- Show both request and response
- Include error handling
- Support multiple languages when relevant
## Endpoint Name
### Endpoint
\`\`\`
POST /Actions/vending
\`\`\`
### Request
**Headers:**
\`\`\`http
x-api-key: YOUR_API_KEY
\`\`\`
**Body:**
\`\`\`json
{...}
\`\`\`
### Response
\`\`\`json
{...}
\`\`\`Update in docs/.vitepress/config.ts:
export default defineConfig({
base: '/', // Change if deploying to subdirectory
// ...
})VitePress uses the default theme. Customize colors, fonts, and layout in:
docs/.vitepress/config.ts- Theme configdocs/.vitepress/theme/- Custom theme overrides (create as needed)
Local search is enabled by default:
export default defineConfig({
themeConfig: {
search: {
provider: 'local'
}
}
})- VitePress Documentation
- Markdown Guide
- Vue.js (powers VitePress)
- Create a feature branch
- Make your changes
- Test locally with
npm run docs:dev - Submit a pull request
MIT License - See LICENSE file for details
For questions or issues with the documentation:
- Open an issue on GitHub
- Contact the Perkd team
For API support: