Endpoints 41
- Field roles (Marketing, Sales, Installation) with their people and settingsGET
/api/field-sales/field-roles - Save one field role's settings and replace its peoplePUT
/api/field-sales/field-roles/{key} - Stores, event booths and canvass areas with their shifts (next 14 days) and the people on eachGET
/api/field-sales/locations - Create a locationPOST
/api/field-sales/locations - Edit a location (any field; a pin or a changed address re-places the fence; status archived hides it)PATCH
/api/field-sales/locations/{id} - Add a dated shift (starts_at, ends_at ≤ 24 h, slots, note, user_ids of client team members)POST
/api/field-sales/locations/{id}/shifts - Replace who works a shift (user_ids)PUT
/api/field-sales/shifts/{id}/assignments - Delete a shift (its assignments and check-ins go with it)DEL
/api/field-sales/shifts/{id} - The signed-in person's shifts (12 h ago to 7 days ahead) with each location's fence and their open check-inGET
/api/field-sales/rep/shifts - Check in at a shift (assigned, shift window from 60 min before start to the end, exact place, inside its fence)POST
/api/field-sales/rep/shifts/{id}/checkin - A location reading for the caller's open shift check-in (every ~2 min); 2 outside in a row ends itPOST
/api/field-sales/rep/site-sessions/{id}/readings - Check out of the caller's shift (idempotent)POST
/api/field-sales/rep/site-sessions/{id}/checkout - The consent wording a rep shows a customer before a sign-up (the newest version), or null when none is setGET
/api/field-sales/rep/disclosure - Record a sign-up at the rep's shift with the customer's signed consent (retry-safe on client_capture_id)POST
/api/field-sales/rep/lead-captures - Field sign-ups signed in [from, to) with their consent evidence, newest first (managers)GET
/api/field-sales/compliance/captures - One sign-up with the full consent wording the customer signed (managers)GET
/api/field-sales/compliance/captures/{id} - The consent wording in use and its version history (managers)GET
/api/field-sales/compliance/disclosure - Publish new consent wording as the next version (owners and admins). Earlier versions and every signed consent stay as they are.POST
/api/field-sales/compliance/disclosure - The consent certificate for one sign-up as a PDF (managers). Generated on demand from the evidence rows, so it includes the latest YES / STOP reply.GET
/api/field-sales/compliance/captures/{id}/certificate.pdf - Every sign-up in [from, to) with its consent evidence as CSV (managers). from/to ISO, at most 93 days and 5,000 rows.GET
/api/field-sales/compliance/export.csv - Every Sales Coach field touch for one contact, newest first (owners, admins, managers who can see the contact)GET
/api/field-sales/contacts/{id}/field-journey - Required credentials, every team member's credentials and the team with their field roles (managers). include_archived=1 adds archived credentials.GET
/api/field-sales/credentials - Add a required credential. Body { name, role_key (marketing|sales|installation|null = everyone), remind_days (1-365, default 60) }. 409 duplicate name.POST
/api/field-sales/credentials/types - Rename, change the role or remind days, or archive (status) a required credential.PATCH
/api/field-sales/credentials/types/{id} - Record or update one person's credential. Body { user_id, type_id, number, issued_on, expires_on (YYYY-MM-DD; none = does not expire), note }. 409 not_eligible / archived.PUT
/api/field-sales/credentials/people - Remove one person's credential.DEL
/api/field-sales/credentials/people/{id} - Whether a confirmation text ("Reply YES") goes to each new sign-up, and its wording (managers). Off by default.GET
/api/field-sales/compliance/optin-settings - Turn the confirmation text on or off and set its wording (owners and admins). Body { enabled, message_template }; {company}, {place}, {first_name}; must mention STOP.PUT
/api/field-sales/compliance/optin-settings - The appointment's testimonial link for a customer (any workspace member who can see the contact). Creates the first one, reopens the open one, renews an expired one; replaces_link_id replaces it or starts a new request after a submission (a retry returns the same successor).POST
/api/field-sales/appointments/{id}/testimonial-link - What the customer's testimonial page shows (Authorization: Bearer <link code>). Stamps the first open.POST
/api/field-sales/public/testimonial-links/view - Send a written testimonial with consent (Authorization: Bearer <link code>). One per link; a repeat returns the first.POST
/api/field-sales/public/testimonial-links/submit - Start (or restart) a video upload for this link's video consent (Authorization: Bearer <link code>). Returns a 2-hour signed resumable-upload token for a new, never-reused path.POST
/api/field-sales/public/testimonial-links/video-upload - The upload finished: the stored video is checked and accepted, then prepared for review (Authorization: Bearer <link code>). Safe to repeat.POST
/api/field-sales/public/testimonial-links/video-complete - Testimonials for review and sharing, newest first, 50 per page (managers). Optional status, offset.GET
/api/field-sales/testimonials - Totals per status for the tiles (managers)GET
/api/field-sales/testimonials/counts - One testimonial with its text or a 15-minute video URL, consent evidence and share link (managers)GET
/api/field-sales/testimonials/{id} - Approve, reject or restore (back to review) a testimonial (managers). Body: { action }POST
/api/field-sales/testimonials/{id}/review - Share an approved testimonial; returns its public link (managers). 409 when consent was withdrawn.POST
/api/field-sales/testimonials/{id}/share - Stop sharing; every link handed out stops working (managers)POST
/api/field-sales/testimonials/{id}/unshare - The customer withdrew consent. Unshares, clears a written review's text or deletes a video's files, and keeps the consent record (managers)POST
/api/field-sales/testimonials/{id}/withdraw-consent - Public link of a shared testimonial on the company API domain; a written review or a video player renders as a page (video URLs signed for 15 minutes); 404 once unshared or withdrawnGET
/api/field-sales/public/testimonials/{token}
