Sales Reps [API]
Sales Reps are persons in the company that manage specific customers. A sales rep can login on behalf of a customer and place orders and view order details only for the customers assigned to him/her. Currently, only one sales rep per customer is allowed. Sales reps must login through the https://
Description | List Sales Reps |
Action | GET |
URL | <your URL here>/api/sales_reps |
Sample request parameters | {"name_eq":"Sales Rep"} or {"email_eq":"test@b2bwave.com"} |
Sample Successful Response | [{"id":1,"email":"test@b2bwave.com","name":"George Sellerman","commission":"0.0","created_at":"2016-04-11T15:49:13.000Z","updated_at":"2016-04-11T15:49:13.000Z", "is_manager": true, "sales_rep_id": null, "allow_pdf_catalog": false, "is_active": true, "can_edit_order_discount": true, "can_edit_order_status": true, "phone": "", "html_section": "", "hide_dashboard_orders": false, "can_edit_customer": true, "role": [], "can_view_customer_payments": false, "can_view_products": true, "can_impersonate_customer": true, "receive_email_notifications": true}] |
Available parameters | name_eq, name_cont, email_eq, email_cont |
Description | Create Sales Rep |
Action | POST |
URL | <your URL here>/api/sales_reps |
Sample request parameters | {"sales_rep":{"email":"test@b2bwave.com", "name":"John Jones"}} |
Sample Successful Response | {"id": 4, "email": "test@b2bwave.com", "name": "John Jones","commission": "0.0", "created_at": "2019-07-23T12:54:47.244-04:00", "updated_at": "2019-07-23T12:54:47.244-04:00", "is_manager": false, "sales_rep_id": null, "allow_pdf_catalog": false, "is_active": true, "can_edit_order_discount": false, "can_edit_order_status": true, "phone": null, "html_section": null, "hide_dashboard_orders": false, "can_edit_customer": true, "role": [], "can_view_customer_payments": false, "can_view_products": false, "can_impersonate_customer": true, "receive_email_notifications": true}<br> |
Required fields | name, email |
Description | Update Sales Rep |
Action | PATCH |
URL | <your URL here>/api/sales_reps/<sales rep id> |
Sample request parameters | {"sales_rep":{"email":"test@b2bwave.com", "name":"John Jones Jr"}} |
Sample Successful Response | Same as create |
Field descriptions for Sales Reps
Name | Type | Description | Required |
id | integer | Sales Rep ID | no - used only in response |
string | Sales Rep Email | yes | |
name | string | Name of Sales Rep | yes |
commission | integer | Amount of Commission | no |
created_at | datetime | Create time | auto-calculated |
updated_at | datetime | Update time | auto-calculated |
is_manager | boolean | Is this sales rep a manager? | no - used only in response |
sales_rep_id | boolean | -not used | no - used only in response |
allow_pdf_catalog | boolean | -not used | no - used only in response |
is_active | boolean | Is this sales rep active? | no |
can_edit_order_discount | boolean | Can this sales rep edit discounts? | no - used only in response |
can_edit_order_status | boolean | Can this sales rep edit order statuses? | no - used only in response |
phone | string | Sales rep phone number | no - used only in response |
html_section | string | -not used | no - used only in response |
hide_dashboard_orders | boolean | -not used | no - used only in response |
can_edit_customer | boolean | Can this sales rep edit customer information? | no - used only in response |
role | string | -not used | no - used only in response |
can_view_customer_payments | boolean | Can this sales rep view customer payments? | no - used only in response |
can_view_products |
boolean | Can this sales rep view products? | no - used only in response |
can_impersonate_customer | boolean | Can this sales rep act as a customer? | no - used only in response |
receive_email_notifications | boolean | Can this sales rep receive email notifications? | no |