{"path":"/relation","session":"Required. Send session and brand. Brand must match the session. Module CRM plus CRUD.","actions":{"create":"person_id, company_id. Writes one relation row and a relation_history INSERT.","update":"id, and person_id and/or company_id. Archives the old row, then updates.","delete":"id. Archives the row, then deletes it.","read":"id, or person_id, or company_id. Returns relation rows for this brand."},"note":"Person and company CRUD is /crm, not /relation.","examples":{"create":"const res = await fetch('/relation/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'create', session: 'SESSION_ID', brand: 'BRANDCODE', person_id: 'PERSON_ID', company_id: 'COMPANY_ID' }) }).then(r => r.json());","update":"const res = await fetch('/relation/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'update', session: 'SESSION_ID', brand: 'BRANDCODE', id: 'RELATION_ID', company_id: 'COMPANY_ID' }) }).then(r => r.json());","delete":"const res = await fetch('/relation/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'delete', session: 'SESSION_ID', brand: 'BRANDCODE', id: 'RELATION_ID' }) }).then(r => r.json());","read":"const res = await fetch('/relation/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'read', session: 'SESSION_ID', brand: 'BRANDCODE', person_id: 'PERSON_ID' }) }).then(r => r.json());"}}