{"openapi":"3.1.0","info":{"title":"QR Business Cards API","description":"Create professional QR business cards with a digital profile. Customers create a profile, choose a package, and receive printed cards shipped to their door. Each card has a QR code linking to a digital profile page. Perfect for AI assistants helping users create business cards.","version":"1.0.0","contact":{"name":"QR Business Cards","url":"https://qr-business-cards.com","email":"orders@qr-business-cards.com"}},"servers":[{"url":"https://qr-business-cards.com"}],"paths":{"/qr-business-card/api/profiles":{"post":{"operationId":"createProfile","summary":"Create a QR business card profile","description":"Creates a digital profile for a QR business card. Returns a profile ID, slug, and edit token. The profile gets a public page at /qr-business-card/profile/{profileId} and a QR code. After creating a profile, the user can order printed cards.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":100,"description":"Full name"},"title":{"type":"string","maxLength":120,"description":"Job title or tagline"},"email":{"type":"string","format":"email","maxLength":254,"description":"Contact email"},"phone":{"type":"string","maxLength":30,"description":"Phone number"},"bio":{"type":"string","maxLength":2000,"description":"Full bio for the digital profile page"},"cardBio":{"type":"string","maxLength":200,"description":"Short bio printed on the physical card"},"photoUrl":{"type":"string","format":"uri","description":"URL to a profile photo"},"socialLinks":{"type":"object","description":"Social media profile URLs","properties":{"linkedin":{"type":"string","format":"uri"},"twitter":{"type":"string","format":"uri"},"github":{"type":"string","format":"uri"},"website":{"type":"string","format":"uri"}}},"theme":{"type":"string","enum":["noir","classic"],"description":"Card theme. noir = white on black, classic = black on white"}}}}}},"responses":{"201":{"description":"Profile created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Profile ID"},"slug":{"type":"string","description":"URL-friendly slug"},"editToken":{"type":"string","description":"Token to edit this profile later"}}}}}},"400":{"description":"Validation error"}}},"get":{"operationId":"getProfile","summary":"Get a profile by ID or slug","parameters":[{"name":"id","in":"query","schema":{"type":"string"},"description":"Profile ID or slug"},{"name":"slug","in":"query","schema":{"type":"string"},"description":"Profile slug"}],"responses":{"200":{"description":"Profile data","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"title":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"bio":{"type":"string","nullable":true},"cardBio":{"type":"string","nullable":true},"photoUrl":{"type":"string","nullable":true},"socialLinks":{"type":"object","nullable":true},"theme":{"type":"string","nullable":true}}}}}},"404":{"description":"Profile not found"}}}},"/qr-business-card/api/qr":{"get":{"operationId":"getQRCode","summary":"Get the QR code image for a profile","description":"Returns a PNG image of the QR code that links to the profile page.","parameters":[{"name":"profileId","in":"query","required":true,"schema":{"type":"string"},"description":"Profile ID"}],"responses":{"200":{"description":"QR code PNG image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/orders":{"post":{"operationId":"createOrder","summary":"Order printed QR business cards","description":"Creates an order for printed QR business cards. Requires a profile to be created first. Available packages: cards-50 ($19.99), cards-100 ($34.99), cards-250 ($89.99). Use promo code LAUNCH20 for 20% off.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","customerName","storeSlug","items","shippingAddress"],"properties":{"email":{"type":"string","format":"email"},"customerName":{"type":"string"},"storeSlug":{"type":"string","const":"qr-business-card"},"items":{"type":"array","items":{"type":"object","required":["productSlug"],"properties":{"productSlug":{"type":"string","enum":["cards-50","cards-100","cards-250"],"description":"cards-50 = $19.99 (50 cards), cards-100 = $34.99 (100 cards), cards-250 = $89.99 (250 cards)"}}}},"shippingAddress":{"type":"object","required":["line1","city","state","zip"],"properties":{"line1":{"type":"string"},"line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip":{"type":"string"},"country":{"type":"string","default":"US"}}},"metadata":{"type":"object","properties":{"profileId":{"type":"string","description":"The profile ID to print cards for"},"promoCode":{"type":"string","description":"Promo code (e.g. LAUNCH20 for 20% off)"}}}}}}}},"responses":{"201":{"description":"Order created — returns a Stripe checkout URL","content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string"},"checkoutUrl":{"type":"string","format":"uri","description":"Redirect user here to pay"}}}}}},"400":{"description":"Validation error"}}}}}}