Any custom fields you have defined through document customization are automatically included in REST API definition. There is specific naming convention that is a combination of the Custom Code you created via document customisation plus the internal field name concatenated with an underscore: {customization code}_{field name}
Document customization screen showing the user-definable Customization Code:
Document customization screen showing the internal field names:
Response from a GET call to fetch a Work Order that shows custom fields: