@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api API v1.0.0
@base https://www.envoice.in
@version v1
@auth ApiKey x-auth-key in header | ApiKey x-auth-secret in header
@common_fields {x-auth-key: any, x-auth-secret: any}
@endpoints 61
@hint download_for_search
@toc api(61)

@endpoint GET /api/client/all
@desc Return all clients for the account
@returns(200) OK

@endpoint POST /api/client/new
@desc Create a client
@required {client: map}
@returns(200) OK

@endpoint POST /api/client/update
@desc Update an existing client
@required {client: map}
@returns(204) No Content

@endpoint GET /api/client/candelete
@desc Check if the provided client can be deleted
@required {id: any}
@returns(200) OK

@endpoint POST /api/client/delete
@desc Delete an existing client
@required {deleteModel: map}
@returns(200) OK

@endpoint GET /api/client/details
@desc Return client details. Activities and invoices included.
@required {id: any}
@returns(200) OK

@endpoint GET /api/estimation/all
@desc Return all estimation for the account
@optional {queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint POST /api/estimation/new
@desc Create an estimation
@required {estimation: map}
@returns(200) OK

@endpoint POST /api/estimation/update
@desc Update an existing estimation
@required {estimation: map}
@returns(200) OK

@endpoint POST /api/estimation/delete
@desc Delete an existing estimation
@required {deleteModel: map}
@returns(200) OK

@endpoint POST /api/estimation/changestatus
@desc Change estimation status
@required {statusModel: map}
@returns(200) OK

@endpoint GET /api/estimation/status
@desc Retrieve the status of the estimation
@required {id: any}
@returns(200) OK

@endpoint GET /api/estimation/details
@desc Return estimation data
@required {id: any}
@returns(200) OK

@endpoint GET /api/estimation/uri
@desc Return the unique url to the client's invoice
@required {id: any}
@returns(200) OK

@endpoint POST /api/estimation/convert
@desc Convert the estimation to an invoice
@required {id: int(int32)}
@returns(200) OK

@endpoint POST /api/estimation/sendtoclient
@desc Send the provided estimation to the client
@required {deliveryOptions: map}
@returns(200) OK

@endpoint GET /api/general/countries
@desc Return all of the platform supported countries
@returns(200) OK

@endpoint GET /api/general/currencies
@desc Return all of the platform supported currencies
@returns(200) OK

@endpoint GET /api/general/uilanguages
@desc Return all of the platform supported UI languages
@returns(200) OK

@endpoint GET /api/general/dateformats
@desc Return all of the platform supported Date Formats
@returns(200) OK

@endpoint GET /api/invoice/all
@desc Return all invoices for the account
@optional {queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint GET /api/invoice/allcategories
@desc Return all invoice categories for the account
@optional {query: any}
@returns(200) OK

@endpoint POST /api/invoice/new
@desc Create an invoice
@required {invoice: map}
@returns(200) OK

@endpoint POST /api/invoice/newcategory
@desc Create an invoice category
@required {invoiceCategory: map}
@returns(200) OK

@endpoint POST /api/invoice/update
@desc Update an existing invoice
@required {invoice: map}
@returns(200) OK

@endpoint POST /api/invoice/updatecategory
@desc Update an existing invoice category
@required {invoiceCateogry: map}
@returns(200) OK

@endpoint POST /api/invoice/delete
@desc Delete an existing invoice
@required {deleteModel: map}
@returns(200) OK

@endpoint POST /api/invoice/deletecategory
@desc Delete an existing invoice category
@required {deleteModel: map}
@returns(200) OK

@endpoint POST /api/invoice/sendtoclient
@desc Send the provided invoice to the client
@required {deliveryOptions: map}
@returns(200) OK

@endpoint POST /api/invoice/sendtoaccountant
@desc Send the provided invoice to the accountant
@required {invoice: map}
@returns(200) OK

@endpoint POST /api/invoice/changestatus
@desc Change invoice status
@required {statusModel: map}
@returns(200) OK

@endpoint GET /api/invoice/status
@desc Retrieve the status of the invoice
@required {id: any}
@returns(200) OK

@endpoint GET /api/invoice/details
@desc Return invoice data
@required {id: any}
@returns(200) OK

@endpoint GET /api/invoice/uri
@desc Return the unique url to the client's invoice
@required {id: any}
@returns(200) OK

@endpoint GET /api/invoice/pdf
@desc Return the PDF for the invoice
@required {id: any}
@optional {signedVersion: any}
@returns(200) OK

@endpoint GET /api/order/all
@desc Return all orders for the account
@optional {queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint POST /api/order/new
@desc Create an order
@required {order: map}
@returns(200) OK

@endpoint POST /api/order/delete
@desc Delete an existing order
@required {order: map}
@returns(200) OK

@endpoint POST /api/order/changeshippingdetails
@desc Change order shipping details
@required {orderId: any, shippingDetails: map}
@returns(204) No Content

@endpoint POST /api/order/changestatus
@desc Change order status
@required {status: map}
@returns(204) No Content

@endpoint GET /api/order/details
@desc Return order details
@required {id: any}
@returns(200) OK

@endpoint GET /api/payment/supported
@desc Return all supported payment gateways (no currencies means all are supported)
@returns(200) OK

@endpoint GET /api/paymentlink/uri
@desc Return the unique url to the client's payment link
@required {id: any}
@returns(200) OK

@endpoint GET /api/paymentlink/all
@desc Create a payment link
@optional {queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint POST /api/paymentlink/new
@desc Create a payment link
@required {paymentLink: map}
@returns(200) OK

@endpoint POST /api/paymentlink/delete
@desc Delete an existing payment link
@required {paymentLink: map}
@returns(200) OK

@endpoint GET /api/product/all
@desc Return all products for the account
@optional {queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint POST /api/product/new
@desc Create a product
@required {product: map}
@returns(200) OK

@endpoint POST /api/product/update
@desc Update an existing product
@required {product: map}
@returns(204) No Content

@endpoint POST /api/product/delete
@desc Delete an existing product
@required {product: map}
@returns(200) OK

@endpoint GET /api/product/details
@desc Return product details
@required {id: any}
@returns(200) OK

@endpoint GET /api/tax/all
@desc Return all taxes for the account
@returns(200) OK

@endpoint POST /api/tax/new
@desc Create a tax
@required {tax: map}
@returns(200) OK

@endpoint POST /api/tax/update
@desc Update an existing tax
@required {tax: map}
@returns(204) No Content

@endpoint POST /api/tax/delete
@desc Delete an existing tax
@required {deleteModel: map}
@returns(200) OK

@endpoint GET /api/worktype/all
@desc Return all work types for the account
@returns(200) OK

@endpoint GET /api/worktype/search
@desc Return all work types for the account that match the query param
@optional {queryOptions.query: any, queryOptions.orderBy: any, queryOptions.order: any, queryOptions.page: any, queryOptions.pageSize: any}
@returns(200) OK

@endpoint POST /api/worktype/new
@desc Create a work type
@required {workType: map}
@returns(200) OK

@endpoint POST /api/worktype/update
@desc Update an existing work type
@required {workType: map}
@returns(204) No Content

@endpoint POST /api/worktype/delete
@desc Delete an existing work type
@required {deleteModel: map}
@returns(200) OK

@endpoint GET /api/worktype/details
@desc Return work type details
@required {workTypeId: any}
@returns(200) OK

@end
