docs: Document Companies REST API with tags support#296
docs: Document Companies REST API with tags support#296promptless-for-oss wants to merge 2 commits intomautic:5.xfrom
Conversation
Signed-off-by: promptless-for-oss <promptless-for-oss@users.noreply.github.com>
| @@ -1,14 +1,576 @@ | |||
| Companies | |||
There was a problem hiding this comment.
Citation: Comprehensive Companies API documentation based on PR #15901 which adds tags support to companies. Key code changes: CompanyApiController.php adds tagList serializer group and modifyTags() call in preSaveEntity(). Company.php entity adds tags property with ManyToMany relationship. Test code in CompanyControllerTest.php demonstrates API usage patterns for creating/editing companies with tags.
View source
docs/rest_api/companies.rst
Outdated
| - Name of the User that last modified the Company | ||
| * - ``fields`` | ||
| - array | ||
| - Custom field values grouped by field group |
There was a problem hiding this comment.
@promptless-for-oss please use Custom Field (capitalised) as this refers to a Mautic feature.
Signed-off-by: promptless-for-oss <promptless-for-oss@users.noreply.github.com>
|
I think this one is good to review now - it'll need to be checked for technical accuracy! |
|
I've processed your request, but no documentation changes were needed. |
There was a problem hiding this comment.
Pull request overview
This PR replaces the placeholder Companies REST API documentation with comprehensive, production-ready documentation. It documents the new tags feature for companies (from PR #15901) alongside all standard CRUD operations and contact association endpoints.
Changes:
- Replaced placeholder note with complete API documentation for Companies
- Added documentation for all CRUD operations (Get, List, Create, Edit, Delete)
- Documented the new tags feature with creation, modification, and removal examples
- Added Contact association endpoints (Add/Remove Contact)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'tags' => ['-Enterprise', 'Strategic'] | ||
| ); | ||
|
|
||
| // Create new a Company if ID 42 isn't found? |
There was a problem hiding this comment.
Grammar error in comment: "Create new a Company" should be "Create a new Company". The article "a" should come before the adjective "new".
| // Create new a Company if ID 42 isn't found? | |
| // Create a new Company if ID 42 isn't found? |
Open this suggestion in Promptless to view citations and reasoning process
Replaces the placeholder Companies API page with comprehensive documentation covering all CRUD operations (Get, List, Create, Edit, Delete), Contact association endpoints (Add/Remove Contact), and the new tags feature from PR #15901. Includes PHP library code examples, JSON response samples showing the new
tagsarray, and documents the tag modification syntax (prefix tag names with minus sign to remove).Trigger Events
mautic/mautic PR #15901: Tags for companies
Promptless Research (1 GitHub PR)
Agent Response
Tip: Create additional Docs Collections to keep multiple repositories in sync 📚