I used to struggle with the difference between these genres of photography, which on the surface all seem broadly the same. While it’s fair to say they are closely related, there are some subtle differences between them.
An example of a directed portrait that could be classed as documentary photography.
First, photojournalism, which is primarily about recording an event, and telling a viewer what happened via a series of pictures. Typically found in newspapers and magazines, photojournalism is highly objective, and while some images can be very beautiful, there is little scope for direction or altering lighting conditions.
Documentary photography is very close to photojournalism in that it is about recording an event or telling a viewer about something through a series of pictures. However, documentary photography needn’t be as objective as photojournalism, and the documentary photographer has more freedom to direct subjects, change the scene, modify the light, etc.
Editorial photography is about shooting for newspapers or magazines, but is not photojournalism. Typically an editorial photographer will be producing portraits, or documenting a workplace or an event of some kind for a feature in a magazine. The photographer does not need to be objective like a photojournalist, but needs to meet the brief, which is often to produce polished images that border on being commercial.
That brings me nicely onto the subject of commercial photography, a genre that is easily summed up as being one that serves commercial clients. A commercial photographer might do corporate portraits, products, or a documentary about new offices or a corporate rebranding.
There are some overlaps where documentary photography can be classed as commercial or editorial, etc. However, the above explanations should help when trying to broadly distinguish between photojournalism, documentary, editorial, and commercial photography.
I class myself more as a documentary photographer because I regularly change things around, direct portraits, modify the light, and am happy to work on editorial or commercial assignments.