docs: Document Batch add Contacts to Companies REST API endpoint#593
docs: Document Batch add Contacts to Companies REST API endpoint#593promptless-for-oss wants to merge 5 commits into
Conversation
Add reference for POST /companies/batch/addcontacts (mautic/mautic PR #16512), covering the assignments request body, per-pair results, summary object, status values, batch size limit, and change-log behavior.
| HTTP request | ||
| ============ | ||
|
|
||
| .. vale on |
There was a problem hiding this comment.
Documented the new POST /companies/batch/addcontacts endpoint and its purpose from this PR. The route is defined in app/bundles/LeadBundle/Config/config.php (mautic_api_companybatchaddcontacts, POST only) and handled by CompanyApiController::batchAddContactsAction, which reads the assignments array from the request body.
Source: mautic/mautic#16512
| - object | ||
| - Overall counts for the batch | ||
|
|
||
| Each entry in ``results`` contains the following properties. |
There was a problem hiding this comment.
The per-pair status/message values and the summary counts (total, succeeded, failed) come from BatchCompanyContactAssignmentModel in this PR (hard-coded message constants; succeeded counts status-200 pairs, failed counts all others). Overall 200 on processed batches, 400/403 request-level errors, and the 500 returned when the batch exceeds api_batch_max_limit (default 200) via the inherited validateBatchPayload() are all verified against the PR's functional tests.
Source: mautic/mautic#16512
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
|
Thanks @adiati98! Addressed all three points:
Vale now runs clean on all changed lines. (There's one pre-existing Vale suggestion on line 441 about |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
| - string | ||
| - Human-readable outcome for the pair | ||
|
|
||
| The ``summary`` object contains the following properties. |
There was a problem hiding this comment.
| The ``summary`` object contains the following properties. | |
| The ``summary`` object properties | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
Thanks @adiati98! These property tables describe the |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
Convert the plain-sentence 'Per-pair ``status`` values:' intro into a proper h5 (~) heading 'Per-pair ``status`` values', a peer of the existing 'The ``results`` entry properties' and 'The ``summary`` object properties' subsections under the h4 'Properties' section. Addresses @adiati98's review on PR mautic#593.
|
Thanks @adiati98! Addressed the remaining comment. The plain-sentence To clarify the question in your comment: that table describes the |
adiati98
left a comment
There was a problem hiding this comment.
@promptless-for-oss please address the suggestions.
| The ``results`` entry properties | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
Remove the excess ~ here.
| The ``results`` entry properties | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| The ``results`` entry properties | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| The ``summary`` object properties | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
| The ``summary`` object properties | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| The ``summary`` object properties | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| Per-pair ``status`` values | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
There was a problem hiding this comment.
| Per-pair ``status`` values | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| Per-pair ``status`` values | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Address @adiati98's review on PR mautic#593: trim excess tildes on the three property-table h5 headings so each underline matches its heading text length.
|
@adiati98 Thanks for the review — done. I shortened the three heading underlines to match the reviewer suggestions exactly:
The changes are pushed to this branch. Vale is clean on the changed lines. |
Open this suggestion in Promptless to view citations and reasoning process
Adds a "Batch add Contacts to Companies" section to the Companies REST API reference for the new POST /companies/batch/addcontacts endpoint (mautic/mautic PR #16512). Covers the assignments request body, per-pair results, summary object, per-pair status values, the batch size limit, and change-log behavior. Targets the 7.2 docs branch per branch-targeting rules (source base 7.x).
Trigger Events
Tip: Enable auto-create PR in your Configuration to review suggestions directly in GitHub 🤖