Invite Codes
List Invite Codes
List the tenant's portal invite codes, newest first. A buyer types an invite code on the portal sign-up page to join with the settings it carries: a new account with preset pricing, terms, credit limit and catalogs, or an extra login on one existing customer.
Create Invite Code
Create a portal invite code. Returns 201 with the code.
Get Invite Code
Get one invite code with its settings, derived `status`, use count and sign-up link.
Update Invite Code
Replace an invite code's settings. Takes the same body as Create Invite Code (send every field you want to keep). A blank `code` keeps the current code. `max_uses` cannot be set below the uses the code already has. Changes apply to future sign-ups only: accounts already created with the code are not changed.
Delete Invite Code
Permanently delete an invite code, even one that has been used. Its use history is deleted with it; the applications, customers and logins it created are kept (the applications simply no longer reference a code). To retire a code but keep its history, use Archive Invite Code instead.
Archive Invite Code
Archive an invite code: it stops working at sign-up and is hidden from List Invite Codes unless `filter[archived]` is sent. Its code string stays reserved. Archiving an archived code changes nothing. Returns the code.
Unarchive Invite Code
Restore an archived invite code. It works again at sign-up unless it is disabled, expired or used up. Returns the code.
Bulk Update Invite Codes
Disable, enable or archive several invite codes at once.
List Invite Code Redemptions
List the times an invite code was used, newest first.