I've created an issue MDL-67306 in regards to the gradebook. There is currently no api available for grade categories to be created or exported.
Please vote for this to be integrated in Moodle core
Here is the text of the tracker:
We would like to automatically create courses with grade categories.
The information we would like to pass along via api is the grade category name and the weighting, the rest can be left as site defaults.
The grade categories are shells which will be filled with activities by lecturers throughout the semester.Example:
At the end of the semester, we need to export the grade totals of the categories to our Student Management System.