Hi both, sorry for the late reply.
The easiest way to find the parameter storage type / what parameter to set would be to use the Revit Lookup addin:
We can see that the material of a system type has a built in parameter name of MATERIAL_ID_PARAM, and the storage type is ElementId.
We can get this by, modifying what Jal has done above:
BIP = BuiltInParameter.MATERIAL_ID_PARAM
All we need to do then is get the material, filtered element collector would be the easiest way programmatically, get the Id of the material, then set the parameter using:
pipeMat = the id of the material you want to set