Rep( int RepID, string Rep, int AgencyID, string Agency, int SupplierID, string Supplier, string AssignmentCode )
Get information for one Rep.
Request
Request Data:
You can identify the Rep in multiple ways:
- (int) RepID (optional) – identify the rep by ID (int) (Note: this endpoint does not work with Manager IDs, see notes at the bottom for more details).
- (string) Rep (optional) – identify the rep by the name (string), must be provided if using the AgencyID or Agency parameter.
- (int) AgencyID (optional) – identify the rep name + Agency ID
- (string) Agency (optional) – identify the rep name + Agency name
- (int) SupplierID (optional) – identify the by supplier ID + assignment code
- (string) Supplier (optional) – identify the by supplier name + assignment code
- (string) AssignmentCode (optional): used along with the Supplier or SupplierID parameters
{ "RepID": <int>, // Warning: do not use a Manager's ID as this only expect Rep IDs "Rep": <string>, "AgencyID": <int>, "Agency": <string>, "SupplierID ": <int>, "Supplier": <string>, "AssignmentCode": <string> }
Response
{ "Result": { "Added": <Date>, "Agency": <string>, "AgencyID": <int>, "AgencyArchived": <bool>, // Since RPM29 "AssignmentCodes": [ { "AssignmentCode": <string>, // ID "Supplier": <string>, "SupplierID": <int> }, <... more AssignmentCodes> ], "CommissionsHidden": <bool>, "Contact": { "ContactID": <int>, "Email": <string>, "FirstName": <string>, "LastName": <string>, "PhoneNumbers": [ { "Number": <string>, "PhoneNumberID": <int>, "Type": <enum: Business=1, Home=2, Fax=3, Other=6> }, <... more PhoneNumbers (1 for each type)> ], "Salutation": <string>, "Title": <string> }, "Fields": [ { "Field": <string>, // Field Name "Value": <string> }, ... <more custom fields> ], "Logon": <bool>, // Removed in RPM27 "Enabled": <bool>, // Added in RPM27, replaced Logon "Modified": <date>, "NotesForStaff": [], "Relationship": <string>, "Rep": <string>, "RepID": <int>, "MgrID": <int>, // Since RPM29 (if the rep is also a manager) "Type": <string>, "Username": <string>, "UserID": <int>, // Since RPM29 } }
Errors
- “Supplier not found”
- “Agency not found”
- “Rep not found”
Notes
When using RepID keep in mind that this endpoint does not work with Manager IDs. Managers (and their IDs) are returned by the Agency endpoint, in the Reps list. Using those IDs as RepIDs on this endpoint will result in errors or returning the wrong data.