GENERATE REPORT

This method generate a custom report. The client makes a POST request providing input parameters CompanyID and LanguageID. The output will be either in json or xml format depending on the request type.

Note

  • QueryOrder  It is order your result by defined column sequence number. If you don’t want ordered result, you can remove all of this tag from your request xml.
  • Order  It contains value of column sequence number in result like “3,1,2” or “1” or etc… If you don’t want ordered result, you can leave blank this field or
  • Type  It can only take one of both values that “asc” and “desc”. For ascending “asc”, descending “desc”
Name Value
REST-API METHOD GENERATE REPORT
HTTP METHOD POST
RESPONSE TYPE XML
URL https://api.csm.next4biz.net/services/CustomReportsService/{CompanyID}/generatereport.json/{LangID}https://api.csm.next4biz.net/services/CustomReportsService/{CompanyID}/generatereport.xml/{LangID}
REQUEST HEAD Authorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+json,application/json;q=0.9,*/*;q=0.8 Content-Type: application/jsonAuthorization: Basic {base64 encoded username:password} Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Type: application/xml
  • XML
  • JSON
ENDPOINT DEFINITION
POST
REQUEST BODY
                                    
                                        <PagedXMLQuery>
	<PageNumber>{PageNumber}</PageNumber>
	<Parameters>
		<InputParam>
			<Name>{beginDate}</Name>
			<Value>{Value}</Value>
		</InputParam>
		<InputParam>
			<Name>{endDate}</Name>
			<Value>{Value}</Value>
		</InputParam>
		<InputParam>
			<Name>{businessChannelID}</Name>
			<Value>{Value}</Value>
		</InputParam>
		<InputParam>
			<Name>{userID}</Name>
			<Value>{Value}</Value>
		</InputParam>
		<InputParam>
			<Name>{repeatingElemName}</Name>
			<Value>{Value}</Value>
		</InputParam>
	</Parameters>
	<QueryOrder>
		<Order>{{0},{1},...,{n}}</Order>
		<Type>{asc or desc}</Type>
	</QueryOrder>
	<QueryName>{QueryName}</QueryName>
</PagedXMLQuery>                                    
                                
                                                                        
                                        {
    "PageNumber": "{PageNumber}",
    "Parameters": {
        "InputParam": [
            {
                "Name": "{beginDate}",
                "Value": "{Value}"
            },
            {
                "Name": "{endDate}",
                "Value": "{Value}"
            },
            {
                "Name": "{businessChannelID}",
                "Value": "{Value}"
            },
            {
                "Name": "{userID}",
                "Value": "{Value}"
            },
            {
                "Name": "{repeatingElemName}",
                "Value": "{Value}"
            }
        ]
    },
    "QueryOrder": {
        "Order": "{{0},{1},...,{n}}",
        "Type": "{asc or desc}"
    },
    "QueryName": "{QueryName}"
}                                    
                                                                    
RESPONSE BODY
                                    
                                        <PagedXMLResult>
	<PageCount>{PageCount}</PageCount>
	<PageNumber>{PageNumber}</PageNumber>
	<XML>{EncodedXMLResponse}</XML>
	<Result>{Result}</Result>
	<ErrorMessage>{ErrorMessage}</ErrorMessage>
</PagedXMLResult>                                    
                                
                                                                        
                                        {
    "PageCount": "{PageCount}",
    "PageNumber": "{PageNumber}",
    "XML": "{EncodedXMLResponse}",
    "Result": "{Result}",
    "ErrorMessage": "{ErrorMessage}"
}