Version: 2011.01.25

Krames StayWell External Web Service Documentation

This method has been deprecated.
Use the GetContent() method instead.

GetDocument Method

This Method will return the body and associated metadata for a single document in the UCR.

Parameter Names: XmlRequest
Expects an XML document in this format:

<Document ContentTypeId=" " ContentId=" " IsCustom="[true, false]" IncludeBlocked="[true, false]" GetOriginalDocument="[true, false]" />

Parameter Names:
ContentTypeId
ContentId
GetOriginal
IncludeBlocked

For example: http://external.ws.staywell.com/[SiteName]/Documents.svc/GetDocument?ContentTypeId=1&ContentId=12&IncludeBlocked=false&GetOriginal=false

ContentTypeId is a numeric value which matches the content type of the document that is being requested; for example: 1 for the Wellness Library.

ContentId is of course the content id for the document being requested, and is a string value.

The IsCustom attribute is marked as required in the schema, but for the purposes of the GetDocument method it will be completely ignored, so the value may either be true or false, and neither value will have any bearing on how the method executes.

IncludeBlocked is a flag which indicates whether or not to include documents that you have marked as blocked for your application. For example if you have marked a particular news article as blocked because it contains inappropriate content for your website, this flag will determine the presence of that article in the result. If you request a document that is blocked, and mark IncludeBlocked as true, then the document will be returned, but the root element will have a Blocked attribute that will have a value of “true”. If you mark IncludeBlocked as false, then the result of the GetDocument call will be a “Document Not Found” error.

GetOriginalDocument is a flag which will allow you to get either a version of a document that you have customized for your website, or the original version of the document. So if you customize an article, you will normally see only the customized version of the article in web service calls, but if you wish to see the original, then setting this flag to true will return the original document, not the customized version.

Sample Request XML

<Document ContentTypeId="1" ContentId="HeartAttack" IsCustom="false" IncludeBlocked="false" GetOriginalDocument="true" />

Sample Result XML

Results with a valid body.

<?xml version="1.0" encoding="utf-8"?>
<Document ContentTypeId="3" ContentId="EN-HeartAttack" IsCustom="0" blocked="true" xmlns="http://ws.staywell.com">
	<Language code="en">English</Language>
	<RegularTitle xmlns="http://ws.staywell.com/markup">Symptoms of a Heart Attack</RegularTitle>
	<InvertedTitle xmlns="http://ws.staywell.com/markup">Heart Attack, Symptoms</InvertedTitle>
	<Gender>All</Gender>
	<LastModifiedDate>2002-07-09T00:00:00.0000000-06:00</LastModifiedDate>
	<CreatedDate>2004-04-05T22:48:47.1570000-06:00</CreatedDate>
	<PublishedDate>2004-04-05T22:52:56.2900000-06:00</PublishedDate>
	<CopyrightDate>2004</CopyrightDate>
	<CopyrightStatement>©The StayWell Company, 1100 Grundy Lane, San Bruno, CA 94066-3030. www.krames.com 800-333-3032. 
				All rights reserved. Last reviewed</CopyrightStatement>
	<AgeGroups>
		<AgeGroup>Adult (18+)</AgeGroup>
		<AgeGroup>Senior</AgeGroup>
	</AgeGroups>
	<Authors/>
	<OnlineEditors/>
	<OnlineMedicalReviewers/>
	<PrintSources/>
	<AdditionalTitles/>
	<Servicelines/>
	<OnlineSources/>
	<RecommendedSites/>
	<Indexing>
		<MeSHList>
			<MeSH code="D003324"/>
			<MeSH code="D005823"/>
			<MeSH code="D011307"/>
			<MeSH code="D014947"/>
		</MeSHList>
		<CPTList>
			<CPT code="j1460"/>
		</CPTList>
		<ICD9List>
			<ICD9 code="414.0"/>
		</ICD9List>
	</Indexing>
	<OtherLanguages>
		<Document ContentTypeId="3" ContentId="ES-HeartAttack" IsCustom="0">
			<RegularTitle xmlns="http://ws.staywell.com/markup">Ataque al corazón: Síntomas</RegularTitle>
			<Language code="es"/>
		</Document>
	</OtherLanguages>
	<Content>
		<body>
			<h1>Symptoms of a Heart Attack</h1>
			<Section>
				<Box class="right" width="168">
					<p><b>Don't be afraid to call <Hotfield hotfieldid="6_1">911</Hotfield> .</b> If you don't know the cause of your symptoms, assume it's a heart attack. Play it safe and get medical help.</p>
				</Box>
			</Section>
		</body>
	</Content>
</Document>

Results with a NonValid Document Body

<?xml version="1.0" encoding="utf-8"?>
<Document ContentTypeId="3" ContentId="EN-HeartAttack" IsCustom="0" blocked="true" xmlns="http://ws.staywell.com">
	<Language code="en">English</Language>
	<RegularTitle xmlns="http://ws.staywell.com/markup">Symptoms of a Heart Attack</RegularTitle>
	<InvertedTitle xmlns="http://ws.staywell.com/markup">Heart Attack, Symptoms</InvertedTitle>
	<Gender>All</Gender>
	<LastModifiedDate>2002-07-09T00:00:00.0000000-06:00</LastModifiedDate>
	<CreatedDate>2004-04-05T22:48:47.1570000-06:00</CreatedDate>
	<PublishedDate>2004-04-05T22:52:56.2900000-06:00</PublishedDate>
	<CopyrightDate>2004</CopyrightDate>
	<CopyrightStatement>©The StayWell Company, 1100 Grundy Lane, San Bruno, CA 94066-3030. www.krames.com 800-333-3032. 
				All rights reserved. Last reviewed</CopyrightStatement>
	<AgeGroups>
		<AgeGroup>Adult (18+)</AgeGroup>
		<AgeGroup>Senior</AgeGroup>
	</AgeGroups>
	<Authors/>
	<OnlineEditors/>
	<OnlineMedicalReviewers/>
	<PrintSources/>
	<AdditionalTitles/>
	<Servicelines/>
	<OnlineSources/>
	<RecommendedSites/>
	<Indexing>
		<MeSHList>
			<MeSH code="D003324"/>
			<MeSH code="D005823"/>
			<MeSH code="D011307"/>
			<MeSH code="D014947"/>
		</MeSHList>
		<CPTList>
			<CPT code="j1460"/>
		</CPTList>
		<ICD9List>
			<ICD9 code="414.0"/>
		</ICD9List>
	</Indexing>
	<OtherLanguages>
		<Document ContentTypeId="3" ContentId="ES-HeartAttack" IsCustom="0">
			<RegularTitle xmlns="http://ws.staywell.com/markup">Ataque al corazón: Síntomas</RegularTitle>
			<Language code="es"/>
		</Document>
	</OtherLanguages>
	<Content>
		<NonValidBody>
			<h1>Test Document</h1>
			<p>Text goes here</p>
			<customtag>Some Text</customtag>
		</NonValidBody>
	</Content>
</Document>