Create Meal Plan Template

Use the createMealPlanTemplate mutation to create a meal plan template depending on your custom dietary requirements.

It is required to use only the Authorization: Token <api-token> to execute this query.

Meal Plan templates types

There are 3 options to create a meal plan template:

  • customOptions: Send the parameters in the same way as if the customMealPlan sends. The meal plan generated is saved in this template.

  • fromDays: Copy an existing meal plan which has a user assigned. Send a profileId and user's meal plan days required to be copied and saved in the template.

  • fromScratch: Send a complete meal plan and define the number of days of it. All the parameters such as days, recipes, etc., have to be introduced manually. All this information is later saved as a template.

How a meal plan template works:

  • Create a meal plan template according to your requirements. You can choose any of the 3 types o meal templates mentioned above.

  • List all available meal plan templates to get its id to either assign it to a user or generate a meal plan based on its id.

  • Assign a meal plan template to a user.

  • Generate a meal plan based on a meal plan template created.

Available arguments

Argument NameTypeIs Required?Description

Argument Name

Type

Is required?

Description

coach

Id

no

Unique Id of the Coach. Use this if the third party has access to the Coaching Portal

customOption

no

Object that sends the parameters as if it were using the customMealPlan

description

String

yes

Introduce the description of the meal plan template. It can be an empty string.

fromDays

no

Object that includes all the required fields to copy an existing meal plan.

fromScratch

no

Object that includes all the fields to create a meal plan from scratch.

isPublic

Boolean

no

True if a coach wants to make the template visible to other coaches. Use this field if the third party has access to the coaching portal

name

String

yes

Name of the meal plan template. It can be an empty string.

Last updated