Skip to content

Conversation

@OfficialJhimmy
Copy link

No description provided.

Copy link
Contributor

@shinde-rahul shinde-rahul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@OfficialJhimmy, A minor touch-up and we are good to go.

  • Fix double periods in parameter descriptions.

Please check the vale errors too.

@adiati98 adiati98 requested a review from a team as a code owner January 9, 2026 19:44
@adiati98 adiati98 requested review from adiati98 and favour-chibueze and removed request for a team January 9, 2026 19:45
Copy link
Contributor

@adiati98 adiati98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mautic/core-team I have a couple of questions here and left comments of things that I've changed. Basically, I'm trying to make this clearer and readable. Other than these, I changed all active to passive voices.

Once you review the content in this PR, and if you all agree with the changes, I'll apply them to all API sections in this docs.


Here's the live preview link: https://mautic-developer--253.org.readthedocs.build/en/253/rest_api/stages.html

And here's the original version as comparison: https://github.com/mautic/developer-documentation/blob/main/source/includes/_api_endpoint_stages.md

TIA! ✨

- Stage ID
* - ``isPublished``
- boolean
- Stage publication status
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

questions:

  • The isPublished type here is boolean. However, in the JSON code example taken from this page, it's 1, which is integer (or number?). Which one is correct?

  • Do we want to say int or spell it integer?

   {
     "stage": {
       "id": 47,
       "isPublished": 1,
       "dateAdded": "2015-07-21T12:27:12-05:00",
       "createdBy": 1,
       "createdByUser": "Joe Smith",
       "dateModified": "2015-07-21T14:12:03-05:00",
       "modifiedBy": 1,
       "modifiedByUser": "Joe Smith",
       "name": "Stage A",
       "category": null,
       "description": "This is my first stage created via API.",
       "weight": 0,
       "publishUp": "2015-07-21T14:12:03-05:00",
       "publishDown": "2015-07-21T14:12:03-05:00"
     }
   }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change it to "isPublished": true as well. PHP doesn't mind. I wouldn't call it int because then someone can put 34534 in there. PHP will retype it to true but I think that everyone understands that 1=true and 0=false.

Comment on lines +49 to +68
.. code-block:: json

{
"stage": {
"id": 47,
"isPublished": 1,
"dateAdded": "2015-07-21T12:27:12-05:00",
"createdBy": 1,
"createdByUser": "Joe Smith",
"dateModified": "2015-07-21T14:12:03-05:00",
"modifiedBy": 1,
"modifiedByUser": "Joe Smith",
"name": "Stage A",
"category": null,
"description": "This is my first stage created via API.",
"weight": 0,
"publishUp": "2015-07-21T14:12:03-05:00",
"publishDown": "2015-07-21T14:12:03-05:00"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've moved the JSON code example to the Response subsection for better navigation. That way, folks don't have to scroll up and down when they see "See JSON code example."

Comment on lines +353 to +356
Edit a Stage. This operation supports ``PUT`` or ``PATCH`` depending on the desired behavior:

* ``PUT``: creates a Stage when the ID doesn't exist. If the ID exists, the request clears the Stage data and adds the request values.
* ``PATCH``: updates field values for an existing Stage using the request data. The request fails when the ID doesn't exist.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The descriptions are moved from after code-block to right after title for clarity.

Comment on lines +409 to +413
Response
========

* ``PUT``: returns ``200`` when the request successfully edits a Stage or ``201`` when the request creates a Stage.
* ``PATCH``: returns ``200`` when the request successfully edits a Stage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added list to all responses and reword them for clarity. Please let me know if we'd like to roll back to the orginal version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants