@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Handwrytten API
@base https://api.handwrytten.com/v1
@version 1.0.0
@endpoints 30
@hint download_for_search
@toc auth(5), profile(6), fonts(2), cards(5), giftCards(2), templateCategories(2), templates(6), countries(1), orders(1)

@group auth
@endpoint POST /auth/register
@desc Registers a new account
@required {body: map # New user account information}
@returns(200) successful registration
@errors {405: Invalid input}

@endpoint POST /auth/authorization
@desc Logs in to an existing account
@required {body: map # Login to account}
@returns(200) successful login
@errors {400: auth error}

@endpoint POST /auth/resetPasswordRequest
@desc resets a user's password
@required {body: map # Reset password}
@returns(200) successful reset request
@errors {405: Invalid input}

@endpoint POST /auth/changePassword
@desc changes a user's password
@required {body: map # Change password}
@returns(200) successful password change
@errors {405: Invalid input}

@endpoint POST /auth/logout
@desc logs out a session uid
@required {body: map # logout session}
@returns(200) successful logout
@errors {405: Invalid input}

@endgroup

@group profile
@endpoint POST /profile/address
@desc gets the user's return address information
@optional {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /profile/updateAddress
@desc update the user's return address information
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /profile/recipientsList
@desc list the addresses in the user's account
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /profile/profileAddRecipient
@desc add a new recipient address
@optional {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /profile/updateRecipient
@desc updates an existing new recipient address
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /profile/deleteRecipient
@desc deletes an existing recipient address
@required {body: map # additional parameters}
@returns(200) successful operation

@endgroup

@group fonts
@endpoint GET /fonts/list
@desc Lists Handwryting styles available for use
@returns(200) successful operation

@endgroup

@group cards
@endpoint POST /cards/uploadCustomLogo
@desc upload logo or cover image for card
@required {file: any # upload images for customc cards, type: any # set to cover or header, uid: any # uid of the user}
@returns(200) successful operation

@endgroup

@group fonts
@endpoint GET /fonts/listForCustomizer
@desc Lists fonts available for use with the card customizer
@returns(200) successful operation

@endgroup

@group cards
@endpoint POST /cards/createCustomCard
@desc Create a new custom card
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint GET /cards/list
@desc Lists information on cards
@returns(200) successful operation
@errors {400: Invalid status value}

@endpoint POST /cards/list
@desc Lists information on cards
@optional {body: map # additional parameters}
@returns(200) successful operation
@errors {400: Invalid status value}

@endpoint POST /cards/view
@desc Provides full information on a specific card
@optional {body: map # additional parameters}
@returns(200) successful operation

@endgroup

@group giftCards
@endpoint POST /giftCards/view
@desc Lists information on gift cards
@returns(200) successful operation

@endpoint GET /giftCards/view
@desc Lists information on gift cards
@returns(200) successful operation

@endgroup

@group templateCategories
@endpoint GET /templateCategories/list
@desc List template categories
@returns(200) successful operation

@endpoint POST /templateCategories/list
@desc List template categories
@optional {body: map # additional parameters}
@returns(200) successful operation

@endgroup

@group templates
@endpoint GET /templates/list
@desc List template categories
@returns(200) successful operation

@endpoint POST /templates/list
@desc List template categories
@optional {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /templates/view
@desc Get all info on a template
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /templates/create
@desc Creates a New Template in the User’s Account
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /templates/update
@desc Updates an Existing Template in the User’s Account
@required {body: map # additional parameters}
@returns(200) successful operation

@endpoint POST /templates/delete
@desc Deletes a users template
@required {body: map # additional parameters}
@returns(200) successful deletion

@endgroup

@group countries
@endpoint GET /countries/list
@desc Lists the countries to which Handwritten can mail, their associated country ID and any costs
@returns(200) successful operation

@endgroup

@group orders
@endpoint POST /orders/singleStepOrder
@desc sends an order in a single step.  This is much easier than using other order commands
@required {body: map # additional parameters}
@returns(200) successful order placement

@endgroup

@end
