POST api/WeChat/SendMessage
发送微信消息
Request Information
URI Parameters
None.
Body Parameters
WeChatMessageRequestName | Description | Type | Additional information |
---|---|---|---|
Touser | string |
None. |
|
Template_Id | string |
None. |
|
Url | string |
None. |
|
Miniprogram | string |
None. |
|
Data | Dictionary of string [key] and MessageContent [value] |
None. |
|
Remark | Dictionary of string [key] and MessageContent [value] |
None. |
Request Formats
application/json, text/json
Sample:
{ "Touser": "sample string 1", "Template_Id": "sample string 2", "Url": "sample string 3", "Miniprogram": "sample string 4", "Data": { "sample string 1": { "value": "sample string 1", "color": "sample string 2" }, "sample string 2": { "value": "sample string 1", "color": "sample string 2" } }, "Remark": { "sample string 1": { "value": "sample string 1", "color": "sample string 2" }, "sample string 2": { "value": "sample string 1", "color": "sample string 2" } } }
application/xml, text/xml
Sample:
<WeChatMessageRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Request"> <Data xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:Key>sample string 1</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Yidu.Model"> <d4p1:color>sample string 2</d4p1:color> <d4p1:value>sample string 1</d4p1:value> </d2p1:Value> </d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:Key>sample string 2</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Yidu.Model"> <d4p1:color>sample string 2</d4p1:color> <d4p1:value>sample string 1</d4p1:value> </d2p1:Value> </d2p1:KeyValueOfstringMessageContentVJHFtbZf> </Data> <Miniprogram>sample string 4</Miniprogram> <Remark xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:Key>sample string 1</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Yidu.Model"> <d4p1:color>sample string 2</d4p1:color> <d4p1:value>sample string 1</d4p1:value> </d2p1:Value> </d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:KeyValueOfstringMessageContentVJHFtbZf> <d2p1:Key>sample string 2</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07/Yidu.Model"> <d4p1:color>sample string 2</d4p1:color> <d4p1:value>sample string 1</d4p1:value> </d2p1:Value> </d2p1:KeyValueOfstringMessageContentVJHFtbZf> </Remark> <Template_Id>sample string 2</Template_Id> <Touser>sample string 1</Touser> <Url>sample string 3</Url> </WeChatMessageRequest>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ApiResultOfCommonResponseName | Description | Type | Additional information |
---|---|---|---|
Code | ApiCode |
None. |
|
Message | string |
None. |
|
Body | CommonResponse |
None. |
|
IsSuccess | boolean |
None. |
|
SubCode | SubCode |
None. |
|
SubMessage | string |
None. |
Response Formats
application/json, text/json
Sample:
{ "Code": 0, "Message": "sample string 1", "Body": {}, "IsSuccess": true, "SubCode": 0, "SubMessage": "sample string 2" }
application/xml, text/xml
Sample:
<ApiResultOfCommonResponserUIxL1Kj xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Yidu.Model.TO"> <Body xmlns:d2p1="http://schemas.datacontract.org/2004/07/Yidu.Model.TO.Response" /> <Code>Success</Code> <Message>sample string 1</Message> <SubCode>Success</SubCode> <SubMessage>sample string 2</SubMessage> </ApiResultOfCommonResponserUIxL1Kj>