FORMAT: 1A
Auth routes
-
Request (application/json)
-
Body
{ "email": "admin@crm.com", "password": "bar" }
-
-
Response 200 (application/json)
-
Body
{ "token": "token", "user": { "id": 4, "first_name": "Admin", "last_name": "Doe", "email": "admin@crm.com", "phone_number": "465465415", "user_id": "1", "user_avatar": "image.jpg", "permissions": "{sales_team.read:true,sales_team.write:true,sales_team.delete:true,leads.read:true,leads.write:true,leads.delete:true,opportunities.read:true,opportunities.write:true,opportunities.delete:true,logged_calls.read:true,logged_calls.write:true,logged_calls.delete:true,meetings.read:true,meetings.write:true,meetings.delete:true,products.read:true,products.write:true,products.delete:true,quotations.read:true,quotations.write:true,quotations.delete:true,sales_orders.read:true,sales_orders.write:true,sales_orders.delete:true,invoices.read:true,invoices.write:true,invoices.delete:true,pricelists.read:true,pricelists.write:true,pricelists.delete:true,contracts.read:true,contracts.write:true,contracts.delete:true,staff.read:true,staff.write:true,staff.delete:true}" }, "role": "user", "date_format": "2017-10-10", "time_format": "10:15", "date_time_format": "2017-10-10 10:15" }
-
-
Response 401 (application/json)
-
Body
{ "error": "invalid_credentials" }
-
-
Response 500 (application/json)
-
Body
{ "error": "could_not_create_token" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "first_name": "First", "last_name": "Last", "phone_number": "+356421544", "email": "email@email.com", "password": "password", "password_confirmation": "password", "avatar": "base64_encoded_image" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "first_name": "First", "last_name": "Last", "phone_number": "+356421544", "password": "password", "code": "invite_code" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "code": "foo", "id": 1, "password": "password" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "emails": [ { "get_emails": [ { "id": 14, "assign_customer_id": 0, "to": "1", "from": "1", "subject": "dfgdfg", "message": "dfgfdg", "read": 0, "delete_sender": 0, "delete_receiver": 0, "created_at": "2017-06-23 11:05:46", "updated_at": "2017-06-23 11:05:46", "deleted_at": null, "sender": { "id": 1, "email": "admin@crm.com", "last_login": "2017-06-23 14:02:43", "first_name": "Admin", "last_name": "Admin", "phone_number": null, "user_avatar": null, "user_id": 1, "created_at": "2017-03-02 16:09:12", "updated_at": "2017-06-23 14:02:43", "deleted_at": null, "full_name": "Admin Admin", "avatar": "http://localhost:81/lcrm54/public/uploads/avatar/user.png" } } ], "sent_emails": [ { "id": 14, "assign_customer_id": 0, "to": "1", "from": "1", "subject": "dfgdfg", "message": "dfgfdg", "read": 0, "delete_sender": 0, "delete_receiver": 0, "created_at": "2017-06-23 11:05:46", "updated_at": "2017-06-23 11:05:46", "deleted_at": null, "receiver": { "id": 1, "email": "admin@crm.com", "last_login": "2017-06-23 14:02:43", "first_name": "Admin", "last_name": "Admin", "phone_number": null, "user_avatar": null, "user_id": 1, "created_at": "2017-03-02 16:09:12", "updated_at": "2017-06-23 14:02:43", "deleted_at": null, "full_name": "Admin Admin", "avatar": "http://localhost:81/lcrm54/public/uploads/avatar/user.png" } } ] } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "email_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "email": { "id": 1, "assign_customer_id": 0, "to": "1", "from": "1", "subject": "dfgdfg", "message": "dfgfdg", "read": 1, "delete_sender": 0, "delete_receiver": 0, "created_at": "2017-06-23 11:05:46", "updated_at": "2017-06-23 14:34:56", "deleted_at": null, "sender": { "id": 1, "email": "admin@crm.com", "last_login": "2017-06-23 14:02:43", "first_name": "Admin", "last_name": "Admin", "phone_number": null, "user_avatar": null, "user_id": 1, "created_at": "2017-03-02 16:09:12", "updated_at": "2017-06-23 14:02:43", "deleted_at": null, "full_name": "Admin Admin", "avatar": "http://localhost:81/lcrm54/public/uploads/avatar/user.png" } } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "message": "This is message", "recipients": [ 1, 2, 3 ], "subject": "Email subject" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "email_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "message": "This is message", "email_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "email": "admin@sms.com" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 201 (application/json)
-
Body
{ "error": "user_dont_exists" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
User and staff endpoints, can be accessed only with role "user" or "staff"
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "salesteam": [ { "id": 1, "title": "Name of team", "start_date": "2016-12-12", "end_date": "2016-12-12", "all_day": true, "type": "quotation" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "settings": { "site_name": "lcrm", "site_logo": "591d9416b9e91.jpg", "site_email": "admin@crm.com", "allowed_extensions": "gif,jpg,jpeg,png,pdf,txt", "backup_type": "local", "email_driver": "mail", "minimum_characters": "", "date_format": "m/d/Y", "time_format": "g:i A", "currency": "USD", "email_host": "", "email_port": "", "email_username": "", "email_password": "", "address1": "", "address2": "", "phone": "", "fax": "", "currency_position": "right", "max_upload_file_size": "1000", "sales_tax": "0", "payment_term1": "1", "payment_term2": "2", "payment_term3": "3", "opportunities_reminder_days": "10", "contract_renewal_days": "10", "invoice_reminder_days": "123", "quotation_prefix": "q_", "quotation_start_number": "1", "quotation_template": "quotation_red_green", "sales_prefix": "s_", "sales_start_number": "2", "saleorder_template": "saleorder_red_green", "invoice_prefix": "i", "invoice_start_number": "3", "invoice_template": "invoice_red_green", "invoice_payment_prefix": "", "invoice_payment_start_number": "", "pusher_app_id": "", "pusher_key": "", "pusher_secret": "", "paypal_username": "", "paypal_password": "", "paypal_signature": "", "stripe_secret": "", "stripe_publishable": "", "pdf_logo": "logo_1492175789.png", "jquery_date": "MM/DD/GGGG", "jquery_date_time": "MM/DD/GGGG h:mm A" }, "logo": "http://lcrm.com/image.jpg", "pdf_logo": "http://lcrm.com/image.jpg", "max_upload_file_size": { "1000": "1MB", "2000": "2MB", "3000": "3MB", "4000": "4MB", "5000": "5MB", "6000": "6MB", "7000": "7MB", "8000": "8MB", "9000": "9MB", "10000": "10MB" }, "currency": { "USD": "USD", "EUR": "EUR" }, "backup_type": [ { "text": "Local", "id": "local" }, { "text": "Dropbox", "id": "dropbox" }, { "text": "Amazon S3", "id": "s3" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "logo": "base64:image", "pdf_logo": "base64:image", "date_format_custom": "d-m-Y", "time_format_custom": "H:m", "site_name": "LCRM", "address1": "Address1", "address2": "Address2", "site_email": "email@email.com", "currency": "USD" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "calls": [ { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "company": "Company", "user": "User" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "call": { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "duration": "30", "company": "Company", "resp_staff": "User", "user_id": 1, "created_at": "2015-12-22 20:17:20", "updated_at": "2015-12-22 20:19:11", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "date": "2015-10-11", "call_summary": "call summary", "duration": "30", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1", "date": "2015-10-11", "call_summary": "call summary", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "category": [ { "id": 1, "name": "Category name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "category_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "category": { "id": 1, "name": "Category", "user_id": 1, "created_at": "2015-12-23 16:58:25", "updated_at": "2015-12-23 16:58:25", "deleted_at": null } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "name": "category name" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "category_id": "1", "name": "category name" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "companies": [ { "id": 1, "name": "Name", "customer": "customer name", "phone": "634654165456" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "company_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "company": { "id": 2, "name": "dg dfg", "email": "user@crm.com", "password": "", "lostpw": "", "address": "fdgdfg", "website": "gfdgfdg", "phone": "45454", "mobile": "45", "fax": "4545", "title": "", "company_avatar": "", "company_attachment": "", "main_contact_person": 3, "sales_team_id": 1, "country_id": 1, "state_id": 43, "city_id": 5914, "longitude": "63.30929400000002", "latitude": "35.6403478", "user_id": 1, "created_at": "2015-12-26 07:10:25", "updated_at": "2015-12-26 07:10:25", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "name": "Company name", "email": "email@email.com", "address": "first street,NY", "sales_team_id": "1", "main_contact_person": "1", "phone": "123132214", "avatar": "base64_encoded_image" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "company_id": "1", "name": "Company name", "email": "email@email.com", "avatar": "base64_encoded_image" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "company_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "company": [ { "id": 1, "start_date": "2015-11-12", "description": "Description", "name": "Company name", "user": "User name" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "contract_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "contract": { "id": 1, "start_date": "21.12.2015.", "end_date": "23.12.2015.", "description": "ffdgfdg", "company_id": 1, "resp_staff_id": 2, "real_signed_contract": "", "user_id": 1, "created_at": "2015-12-22 20:27:37", "updated_at": "2015-12-22 20:27:37", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "start_date": "2015-11-11", "end_date": "2015-11-11", "description": "Description", "company_id": "1", "resp_staff_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "company_id": "1", "name": "Company name", "email": "email@email.com" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "company_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "customers": [ { "user_id": 1, "customer_id": 2, "full_name": "full name", "email": "email@email.com", "created_at": "2015--11-11", "avatar": "http://avatar.com/avatar.jpg" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "contract": { "id": 1, "user_id": 3, "belong_user_id": 2, "address": "", "website": "", "job_position": "", "mobile": "5456", "fax": "", "title": "", "company_id": 0, "sales_team_id": 0, "created_at": "2015-12-22 19:26:19", "avatar": "http://avatar.com/avatar.jpg" } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "first_name": "first name", "last_name": "last name", "email": "email@email.com", "password": "password", "password_confirmation": "password", "phone_number": "+54212425", "sales_team_id": 1, "company_id": 1, "address": "address", "job_position": "developer", "mobile": " +545231", "fax": "+2314521", "title": "mr" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "1", "first_name": "first name", "last_name": "last name", "email": "email@email.com", "sales_team_id": 1, "company_id": 1, "address": "address", "phone_number": "+54212425", "0": "address", "job_position": "developer", "mobile": " +545231", "fax": "+2314521", "title": "mr" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "invoices": [ { "id": 1, "invoice_number": "1465456", "invoice_date": "2015-11-11", "customer": "Customer Name", "unpaid_amount": "15.2", "status": "Status", "due_date": "2015-11-11" } ], "month_overdue": 1, "month_paid": 5, "month_open": 3 }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "invoice": { "id": 1, "order_id": 0, "customer_id": 3, "sales_person_id": "2", "sales_team_id": 1, "invoice_number": "I0001", "invoice_date": "08.12.2015. 00:00", "due_date": "24.12.2015. 00:00", "payment_term": "10", "status": "Open Invoice", "total": 1221, "tax_amount": 195.36, "grand_total": 1416.36, "discount": 10, "final_price": 1216.36, "unpaid_amount": 1173.06, "user_id": 1, "created_at": "2015-12-23 18:05:35", "updated_at": "2015-12-28 19:21:48", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "5", "invoice_date": "2015-11-11", "sales_person_id": "2", "status": "status", "total": "10.00", "tax_amount": "01.10", "grand_total": "11.10", "discount": 1.2, "final_price": 9.85, "invoice_prefix": "I00", "invoice_start_number": "0" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": "1", "customer_id": "5", "invoice_date": "2015-11-11", "sales_person_id": "2", "status": "status", "total": "10.00", "tax_total": "01.10", "grand_total": "11.10", "discount": "0.10", "final_price": "9.10" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "invoice_payments": [ { "id": 1, "payment_number": "P002", "payment_received": "1525.26", "payment_method": "Paypal", "payment_date": "2015-11-11", "customer": "Customer Name", "person": "Person Name" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "invoice_payment": [ { "id": 1, "payment_number": "P002", "payment_received": "1525.26", "payment_method": "Paypal", "payment_date": "2015-11-11", "customer": "Customer Name", "person": "Person Name" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": "5", "payment_date": "2015-11-11", "payment_method": "2", "payment_received": "555" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "leads": [ { "id": 1, "register_time": "2015-12-22", "opportunity": "1.2", "contact_name": "Contact name", "email": "dsad@asd.com", "phone": "456469465", "salesteam": "Test team" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "invoice": { "id": 1, "opportunity": "Lead", "company_name": "sdfsdf sdf", "customer_id": 1, "address": "sd fsdfd", "country_id": 1, "state_id": 43, "city_id": 5914, "sales_person_id": 1, "sales_team_id": 1, "contact_name": "sdfsdf sdf sdf ", "title": "Doctor", "email": "user@crm.com", "function": "asdasd sad asd ", "phone": "1545", "mobile": "545", "fax": "1545", "tags": "2,4", "priority": "Low", "internal_notes": "asd asd asd ", "assigned_partner_id": 0, "user_id": 1, "created_at": "2015-12-22 19:56:54", "updated_at": "2015-12-22 19:56:54", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity": "125.5", "email": "test@test.com", "customer_id": "12", "sales_team_id": "1", "tags": "Softwae", "country_id": "15", "sales_person_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": 1, "opportunity": "125.5", "email": "test@test.com", "customer_id": "12", "sales_team_id": "1", "tags": "Softwae", "country_id": "15" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "calls": [ { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "company": "Company", "responsible": "User" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "calls": [ { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "company": "Company", "responsible": "User" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "lead_id": "1", "date": "2015-10-11", "call_summary": "call summary", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1", "lead_id": "1", "date": "2015-10-11", "call_summary": "call summary", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "meetings": [ { "id": 1, "meeting_subject": "meeting subject", "starting_date": "2015-12-22", "ending_date": "2015-12-22", "responsible": "User name" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "meeting": { "id": 2, "meeting_subject": "Meeting", "attendees": "1", "responsible_id": 2, "starting_date": "29.12.2015. 00:00", "ending_date": "08.01.2016. 00:00", "all_day": 0, "location": "sdfsdf", "meeting_description": "ftyf hgfhgfh", "privacy": "Everyone", "show_time_as": "Free", "duration": "", "user_id": 0, "created_at": "2015-12-22 20:19:42", "updated_at": "2015-12-26 15:03:37", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_subject": "Subject", "starting_date": "2015-11-11", "ending_date": "2015-11-11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_id": 1, "meeting_subject": "Subject", "starting_date": "2015-11-11", "ending_date": "2015-11-11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "calls": [ { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "company": "Company", "responsible": "User" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "calls": { "id": 1, "date": "2015-10-15", "call_summary": "Call summary", "company": "Company", "responsible": "User" } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1", "date": "2015-10-11", "call_summary": "call summary", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1", "lead_id": "1", "date": "2015-10-11", "call_summary": "call summary", "company_id": "1", "resp_staff_id": "12" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "call_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "opportunities": [ { "id": 1, "opportunity": "Opportunity", "company": "Company", "next_action": "2015-12-22", "stages": "Stages", "expected_revenue": "Expected revenue", "probability": "probability", "salesteam": "salesteam", "calls": "5", "meetings": "5" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "opportunity": { "id": 1, "opportunity": "r dfgfdg dfg", "stages": "New", "customer_id": 1, "expected_revenue": "sad asd ", "probability": "0", "email": "admin@gmail.com", "phone": 787889, "sales_person_id": 2, "sales_team_id": 1, "next_action": "21.12.2015.", "next_action_title": "454545", "expected_closing": "29.12.2015.", "priority": "Low", "tags": "1,3", "lost_reason": "Too expensive", "internal_notes": "ghkhjkhjk", "assigned_partner_id": 1, "user_id": 1, "created_at": "2015-12-22 20:17:20", "updated_at": "2015-12-22 20:19:11", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity": "Opportunity", "stages": "New", "email": "email@email.com", "customer": "1", "sales_team_id": "1", "next_action": "2015-11-11", "expected_closing": "2015-11-11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": 1, "stages": "New", "opportunity": "Opportunity", "email": "email@email.com", "customer": "1", "sales_team_id": "1", "next_action": "2015-11-11", "expected_closing": "2015-11-11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "salesteam": [ { "id": 1, "meeting_subject": "meeting subject", "starting_date": "2015-12-22", "ending_date": "2015-12-22", "responsible": "User name" }, { "id": 1, "meeting_subject": "meeting subject", "starting_date": "2015-12-22", "ending_date": "2015-12-22", "responsible": "User name" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": "1", "meeting_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "meetings": { "id": 1, "meeting_subject": "meeting subject", "starting_date": "2015-12-22", "ending_date": "2015-12-22", "responsible": "User name" } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": 1, "meeting_subject": "Subject", "starting_date": "2015-11-11 10:15AM", "ending_date": "2015-11-11 10:30AM", "responsible_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_id": 1, "opportunity_id": 1, "meeting_subject": "Subject", "starting_date": "2015-11-11 10:15AM", "ending_date": "2015-11-11 10:30AM", "responsible_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "meeting_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "products": [ { "id": 1, "product_name": "product name", "name": "category", "product_type": "Type", "status": "1", "quantity_on_hand": "12", "quantity_available": "52" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "product_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "product": { "id": 1, "product_name": "product", "product_image": "", "category_id": 1, "product_type": "Consumable", "status": "In Development", "quantity_on_hand": 12, "quantity_available": 22, "sale_price": 1, "description": "sdfdsfsdf", "description_for_quotations": "sdfsdfsdfsdf", "user_id": 1, "created_at": "2015-12-23 16:58:51", "updated_at": "2015-12-26 07:24:51", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "product_name": "product name", "sale_price": "15.2", "description": "sadsadsd", "quantity_on_hand": "12", "quantity_available": "11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "product_id": "1", "product_name": "product name", "sale_price": "15.2", "description": "sadsadsd", "quantity_on_hand": "12", "quantity_available": "11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "product_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "qtemplates": [ { "id": 1, "quotation_template": "product name", "quotation_duration": "10" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "qtemplate_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "qtemplate": { "id": 1, "quotation_template": "testaa", "quotation_duration": 19, "immediate_payment": 0, "terms_and_conditions": "sd f sdf 22", "total": 2553, "tax_amount": 408.48, "grand_total": 2961.48, "user_id": 1, "created_at": "2015-12-23 18:45:58", "updated_at": "2015-12-23 18:46:21", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "product_name": "product name", "sale_price": "15.2", "description": "sadsadsd", "quantity_on_hand": "12", "quantity_available": "11", "total": "10.00", "tax_amount": "1.11", "grand_total": "11.11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "qtemplate_id": "1", "product_name": "product name", "sale_price": "15.2", "description": "sadsadsd", "quantity_on_hand": "12", "quantity_available": "11", "total": "10.00", "tax_amount": "1.11", "grand_total": "11.11" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "qtemplate_id": "1" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "quotations": [ { "id": 1, "quotations_number": "4545", "date": "2015-11-11", "customer": "customer name", "person": "person name", "final_price": "12", "status": "1" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "quotation": { "id": 1, "quotations_number": "Q0001", "customer_id": 3, "qtemplate_id": 0, "date": "08.12.2015. 00:00", "exp_date": "30.12.2015.", "payment_term": "10", "sales_person_id": 2, "sales_team_id": 1, "terms_and_conditions": "dff dfg dfg", "status": "Draft Quotation", "total": 333, "tax_amount": 53.28, "grand_total": 386.28, "discount": 11.28, "final_price": 289.28, "user_id": 1, "created_at": "2015-12-23 18:39:12", "updated_at": "2015-12-23 18:39:12", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "1", "date": "2015-11-11", "qtemplate_id": "1", "payment_term": "term", "sales_person_id": "1", "sales_team_id": "1", "grand_total": "12.5", "discount": "10.2", "final_price": "10.25", "quotation_prefix": "Q00", "quotation_start_number": "0" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": "1", "customer_id": "1", "date": "2015-11-11", "qtemplate_id": "1", "payment_term": "term", "sales_person": "1", "sales_team_id": "1", "grand_total": "12.5", "discount": "10.2", "final_price": "10.25" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "salesorders": [ { "id": 1, "quotations_number": "product name", "date": "2015-11-11", "customer": "customer name", "person": "sales person name", "final_price": "12.53", "status": "1" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesorder_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "salesorder": { "id": 1, "sale_number": "S0001", "customer_id": 3, "qtemplate_id": 0, "date": "15.12.2015.", "exp_date": "15.12.2015.", "payment_term": "15", "sales_person_id": 2, "sales_team_id": 1, "terms_and_conditions": "drtret", "status": "Draft sales order", "total": 1221, "tax_amount": 195.36, "grand_total": 1416.36, "discount": 11.28, "final_price": 289.28, "user_id": 1, "created_at": "2015-12-23 17:12:39", "updated_at": "2015-12-23 17:12:39", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "customer_id": "1", "date": "2015-11-11", "qtemplate_id": "1", "payment_term": "term", "sales_person_id": "1", "sales_team_id": "1", "grand_total": "12.5", "discount": "10.2", "final_price": "10.25", "sales_prefix": "S00", "sales_start_number": "0", "status": "Draft sales order" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "sales_order_id": "1", "customer_id": "1", "date": "2015-11-11", "qtemplate_id": "1", "payment_term": "term", "sales_person_id": "1", "sales_team_id": "1", "grand_total": "12.5", "discount": "10.2", "final_price": "10.25", "status": "Draft sales order" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "sales_order_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "salesteam": [ { "id": 1, "salesteam": "Name of team", "target": "111", "invoice_forecast": "1125", "actual_invoice": "205" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesteam_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "salesteam": { "id": 1, "salesteam": "testera tim 1", "team_leader": 2, "quotations": false, "leads": false, "opportunities": false, "invoice_target": 15, "invoice_forecast": 22, "actual_invoice": 0, "notes": "dfg fdg dfg", "user_id": 1, "created_at": "2015-12-22 19:47:18", "updated_at": "2015-12-22 19:47:29", "deleted_at": null } }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesteam": "Title", "invoice_target": "8", "invoice_forecast": "1", "team_leader": "12", "team_members": "1,2,5" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesteam_id": "1", "salesteam": "Title", "invoice_target": "8", "invoice_forecast": "1", "team_leader": "12", "team_members": "1,2,5" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesteam_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "staffs": [ { "id": 1, "full_name": "product name", "email": "email@email.com", "created_at": "2015-11-11" } ] }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "staff_id": "33" }
-
-
Response 200 (application/json)
-
Body
{ "staff": [ { "id": 1, "full_name": "full name", "first_name": "name", "last_name": "last name", "phone_number": "+564514368765", "email": "email@email.com", "created_at": "2015-11-11", "permissions": { "sales_team.read": true, "sales_team.write": true, "leads.read": true, "leads.write": true, "opportunities.read": true, "opportunities.write": true, "logged_calls.read": true, "logged_calls.write": true } } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "first_name": "first name", "last_name": "last name", "email": "email@email.com", "password": "1password", "permissions": { "sales_team.read": true, "sales_team.write": true, "avatar": "base64_encoded_image" } }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "staff_id": "1", "first_name": "first name", "last_name": "last name", "password": "1password", "permissions": { "sales_team.read": true, "sales_team.write": true, "avatar": "base64_encoded_image" } }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "staff_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "tasks": [ { "id": 1, "task_from": "full_name", "finished": "0", "task_deadline": "2015-11-11", "task_description": "asasd" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "task_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "task": { "id": 1, "task_from": "full_name", "finished": "0", "task_deadline": "2017-11-11", "task_description": "Lorem ipsum" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "user_id": "1", "task_description": "asasas", "task_deadline": "2016-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "task_id": "1", "user_id": "1", "task_description": "asasas", "task_deadline": "2016-10-10" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "task_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "customers": 20, "contracts": 12, "opportunities": 17, "products": 8, "opportunity_leads": [ { "month": "Feb", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Mar", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Apr", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "May", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Jun", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Jul", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Aug", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Sep", "year": "2016", "opportunity": 1, "leads": 0 }, { "month": "Oct", "year": "2016", "opportunity": 0, "leads": 3 }, { "month": "Nov", "year": "2016", "opportunity": 0, "leads": 0 }, { "month": "Dec", "year": "2016", "opportunity": 13, "leads": 3 }, { "month": "Jan", "year": "2017", "opportunity": 3, "leads": 1 } ], "stages_chart": [ { "title": "New", "value": "New", "color": "#4fc1e9", "opprotunities": 0 }, { "title": "Qualification", "value": "Qualification", "color": "#a0d468", "opprotunities": 0 } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "permissions": { "id": 1, "task_from": "full_name", "finished": "0", "task_deadline": "2017-11-11", "task_description": "Lorem ipsum" } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "email_templates": [ { "id": 1, "title": "Title", "text": "Email text" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "email_template_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "email_template": { "id": 1, "title": "Title", "text": "Email text", "user_id": 1, "created_at": "2017-06-20 08:57:01", "updated_at": "2017-06-20 08:57:01", "deleted_at": null } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "title": "Title", "text": "Email text" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "email_template_id": "1", "title": "Title", "text": "Email text" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "email_template_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "emails": "email@mail.com,email2@mail.com" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "opportunity_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "sale_order_id": 1 }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": 1, "subject": "subject", "recipients": [ 1, 2, 3 ], "body": "body" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "sale_order_id": 1, "subject": "subject", "recipients": [ 1, 2, 3 ], "body": "body" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": 1, "subject": "subject", "recipients": [ 1, 2, 3 ], "body": "body" }
-
-
Response 200 (application/json)
-
Body
{ "success": "success" }
-
-
Response 403 (application/json)
-
Body
{ "error": "no_permissions" }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
Customer endpoints, can be accessed only with role "customer"
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "company": [ { "id": 1, "start_date": "2015-11-12", "end_date": "2015-11-15", "description": "Description", "company": "Company name", "user": "User name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "invoices": [ { "id": 1, "invoice_number": "I0056", "invoice_date": "2015-11-11", "customer": "Customer Name", "due_date": "2015-11-12", "grand_total": "15.2", "unpaid_amount": "15.2", "status": "Status" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "invoice_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "invoice": { "id": 1, "order_id": 0, "customer_id": 3, "sales_person_id": "2", "sales_team_id": 1, "invoice_number": "I0001", "invoice_date": "08.12.2015. 00:00", "due_date": "24.12.2015. 00:00", "payment_term": "10", "status": "Open Invoice", "total": 1221, "tax_amount": 195.36, "grand_total": 1416.36, "discount": 10, "final_price": 1216.36, "unpaid_amount": 1173.06, "user_id": 1, "created_at": "2015-12-23 18:05:35", "updated_at": "2015-12-28 19:21:48", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "quotations": [ { "id": 1, "quotations_number": "Q002", "date": "2015-11-11", "customer": "customer name", "person": "person name", "grand_total": "12", "status": "Draft quotation" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "quotation_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "quotation": { "id": 1, "quotations_number": "Q0001", "customer_id": 3, "qtemplate_id": 0, "date": "08.12.2015. 00:00", "exp_date": "30.12.2015.", "payment_term": "10", "sales_person_id": 2, "sales_team_id": 1, "terms_and_conditions": "dff dfg dfg", "status": "Draft Quotation", "total": 333, "tax_amount": 53.28, "grand_total": 386.28, "discount": 11.28, "final_price": 289.28, "user_id": 1, "created_at": "2015-12-23 18:39:12", "updated_at": "2015-12-23 18:39:12", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "salesorder": [ { "id": 1, "sale_number": "S002", "date": "2015-11-11", "customer": "customer name", "person": "sales person name", "grand_total": "12.53", "status": "Draft sales order" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo", "salesorder_id": "1" }
-
-
Response 200 (application/json)
-
Body
{ "salesorder": { "id": 1, "sale_number": "S0001", "customer_id": 3, "qtemplate_id": 0, "date": "15.12.2015.", "exp_date": "15.12.2015.", "payment_term": "15", "sales_person_id": 2, "sales_team_id": 1, "terms_and_conditions": "drtret", "status": "Draft sales order", "total": 1221, "tax_amount": 195.36, "grand_total": 1416.36, "discount": 11.28, "final_price": 289.28, "user_id": 1, "created_at": "2015-12-23 17:12:39", "updated_at": "2015-12-23 17:12:39", "deleted_at": null }, "products": { "product": "product", "description": "description", "quantity": 3, "unit_price": 1.95, "taxes": 1.55, "subtotal": 195.36 } }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
[ { "invoices_by_month": [ { "month": "Feb", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Mar", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Apr", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "May", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Jun", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Jul", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Aug", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Sep", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Oct", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Nov", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Dec", "year": "2016", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 }, { "month": "Jan", "year": "2017", "invoices": null, "contracts": 0, "opportunity": 0, "leads": 0 } ] } ]
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-
-
Request (application/json)
-
Body
{ "token": "foo" }
-
-
Response 200 (application/json)
-
Body
{ "staffs": [ { "id": 1, "full_name": "product name" } ] }
-
-
Response 500 (application/json)
-
Body
{ "error": "not_valid_data" }
-