Constructing the JSON payload.