Skip to content

feat: add routes-b duplicate invoice endpoint#508

Merged
davedumto merged 2 commits intodavedumto:mainfrom
floxxih:feat/routes-b-duplicate-invoice-371
Mar 31, 2026
Merged

feat: add routes-b duplicate invoice endpoint#508
davedumto merged 2 commits intodavedumto:mainfrom
floxxih:feat/routes-b-duplicate-invoice-371

Conversation

@floxxih
Copy link
Copy Markdown
Contributor

@floxxih floxxih commented Mar 31, 2026

Summary

  • add POST /api/routes-b/invoices/[id]/duplicate to create a new pending invoice from an existing one
  • enforce auth and ownership checks with 401/403/404 behavior for unauthorized, forbidden, and missing records
  • generate a fresh invoice number and payment link while omitting dueDate/paidAt/cancelledAt from the copied invoice state

Closes #371

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

@floxxih is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 31, 2026

@floxxih Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@davedumto davedumto merged commit 3fac271 into davedumto:main Mar 31, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[routes-b] POST /api/routes-b/invoices/[id]/duplicate — duplicate an invoice

2 participants