八字合婚
<p>[TOC]</p>
<h3>接口描述</h3>
<ul>
<li>八字合婚可以双方的生辰八字来以本命卦,年支同气,月令合,日干合,天干五合,合婚论吉凶,并给出相应分数,测算结果仅供参考。</li>
</ul>
<h3>请求地址</h3>
<p><code>https://api.jumdata.com//horoscope/marriage</code></p>
<h3>请求方式</h3>
<ul>
<li>POST</li>
</ul>
<h3>请求格式</h3>
<ul>
<li>x-www-form-urlencoded</li>
</ul>
<h3>请求参数</h3>
<table>
<thead>
<tr>
<th>名称</th>
<th>类型</th>
<th>必须</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>appId</td>
<td>String</td>
<td>是</td>
<td>服务商分配的唯一标识</td>
</tr>
<tr>
<td>timestamp</td>
<td>Long</td>
<td>是</td>
<td>当前时间戳(毫秒数)</td>
</tr>
<tr>
<td>sign</td>
<td>String</td>
<td>是</td>
<td>签名,详见签名算法说明</td>
</tr>
<tr>
<td>maleName</td>
<td>String</td>
<td>是</td>
<td>男方姓名</td>
</tr>
<tr>
<td>maleType</td>
<td>String</td>
<td>是</td>
<td>男方历类型 0:农历 1:公历</td>
</tr>
<tr>
<td>maleBirthDay</td>
<td>String</td>
<td>是</td>
<td>男方出生年月日时分 格式yyyyMMddHHmm 譬如202509132155 </td>
</tr>
<tr>
<td>femaleName</td>
<td>String</td>
<td>是</td>
<td>女方姓名</td>
</tr>
<tr>
<td>femaleType</td>
<td>String</td>
<td>是</td>
<td>女方历类型 0:农历 1:公历</td>
</tr>
<tr>
<td>femaleBirthDay</td>
<td>String</td>
<td>是</td>
<td>女方出生年月日时分 格式yyyyMMddHHmm 譬如202509132155</td>
</tr>
<tr>
<td>lang</td>
<td>String</td>
<td>否</td>
<td>语言:zh-cn 、en-us 默认:zh-cn </td>
</tr>
</tbody>
</table>
<h3>签名算法说明</h3>
<p><code>sign = sha256(appId + appSecret + timestamp)</code></p>
<p>用服务商分配的 appId、服务商分配的 appSecret,当前时间时间戳 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:</p>
<pre><code class="language-java">String appId = &quot;xyzxy2121zxyz&quot;;
String timestamp = &quot;1555378976238&quot;;
String appSecret = &quot;efcefcef1121cefcefc1212121&quot;;
String str = appId + appSecret + timestamp;
String sign = sha256(str);</code></pre>
<h3>成功返回样例</h3>
<pre><code class="language-json">{
&quot;code&quot;: 200,//返回码,详见返回码说明
&quot;msg&quot;: &quot;成功&quot;,//code对应的描述
&quot;taskNo&quot;: &quot;550786109195834604879031&quot;,//本次请求号
&quot;charge&quot;: true,//计费标志
&quot;data&quot;: {
&quot;yueling&quot;: { //月令合
&quot;score&quot;: &quot;0&quot;, //月令合打分
&quot;detail_description&quot;: &quot;男方月支为丑,女方月支为寅。此局为寅丑暗合。月支代表兄弟宫,此局暗合,故可能双方亲朋好友对于这门婚事虽有些摇摆不定,但是最终会同意这门婚事,男方和女方月支暗合,代表这对夫妻的婚姻也如同和睦的兄弟姐妹,彼此间有着深厚的情感和无需言语的默契。&quot;,//月令合详细批示
&quot;male_yue_zhi&quot;: &quot;丑&quot;,
&quot;female_yue_zhi&quot;: &quot;寅&quot;,
&quot;description&quot;: &quot;此项总分为5分。说明:男女生月相同者互相间也是很有缘份的。&quot;
},
&quot;minggong&quot;: { //合婚命宫
&quot;female_fengshui&quot;: &quot;西四命&quot;,
&quot;score&quot;: &quot;0&quot;, //合婚命宫打分
&quot;detail_description&quot;: &quot;男方命卦为坎,适宜住宅方位为北方。而女方命卦为兑,适宜住宅方位为西方。男方命卦方位均属于东四命,而女方命卦方位均属于西四命。说明夫妻两人,命宫不相合,需要注意性格互补,命宫虽不同,但是如果两个人性格互补,相互理解、相互支持、相互包容,那么他们的婚姻就会更加幸福美满;相反,如果两个人性格既不同,也相互排斥,更不愿意互相理解的话,就需要注意化解性格矛盾的方法。&quot;,//合婚命宫详细批示
&quot;male_fengshui&quot;: &quot;东四命&quot;,
&quot;female_minggong&quot;: &quot;兑&quot;,
&quot;description&quot;: &quot;此项总分为30分。说明:以东四命与西四命之说来合,如果相合,那么在购房时,应买与自己命宫相合的房子。&quot;,
&quot;male_minggong&quot;: &quot;坎&quot;
},
&quot;rigan&quot;: { //日干相合
&quot;score&quot;: &quot;0&quot;, //日干相合打分
&quot;detail_description&quot;: &quot;男方日干为壬。五行信息:五行属水,谓之纯阳之水;女方日干为庚。五行信息:五行属金,谓之纯阳之金。男女日干五行阴阳不和,男女结合机缘较小,这对夫妻面对着一些挑战,但也正因为这些困难,他们可以更加珍惜彼此的相遇。虽然初时机缘较小,但通过坚持和努力,他们或许会创造出一段克服困难的美丽爱情。&quot;,//日干相合详细批示
&quot;male_yue_zhi&quot;: &quot;壬&quot;,
&quot;female_yue_zhi&quot;: &quot;庚&quot;,
&quot;description&quot;: &quot;此项总分为25分。说明:何谓日干阴阳舒配得所?日干五行相同,一阴一阳的组合男女结合的机缘最大,如甲日干逢乙日干,庚日干逢辛日干之类。&quot;
},
&quot;nianqitongzhi&quot;: { //年支同气
&quot;female_nian_zhi_desc&quot;: &quot;金&quot;,
&quot;score&quot;: &quot;0&quot;, //年支同气打分
&quot;male_nian_zhi&quot;: &quot;巳&quot;,
&quot;detail_description&quot;: &quot;男方年支为巳,女方年支为申。此局为巳申合化水。年支代表父母宫,此局全六合,故可能双方父母都会同意这门婚事,且局为天赐良缘,无论两人如何相识,男方和女方都互相是彼此的贵人,两人有着良好的互动和互助关系,双方父母也能在财力人力上大力支持,这种婚姻属于上吉婚配,可白头皆老,一生幸福。&quot;,//年气同支详细批示
&quot;female_nian_zhi&quot;: &quot;申&quot;,
&quot;description&quot;: &quot;此项总分为20分。说明:如寅卯辰会东方木气,虎兔龙结合的机缘就大于其它属相;巳午未会南方火气,蛇马羊结合的机缘就大于其它属相;申酉戌会西方金气,猴鸡狗结合的机缘就大于其它属相;亥子丑会北方水气,猪鼠牛结合的机缘就大于其它属相。&quot;,
&quot;male_nian_zhi_desc&quot;: &quot;火&quot;
},
&quot;zinv&quot;: { //子女同步
&quot;score&quot;: &quot;15&quot;, //子女同步打分
&quot;detail_description&quot;: &quot;头胎可能生男,此为报恩男,他将继承家族血脉,延续传统,是对前辈的一种尊敬和感恩的象征。这个宝贝男孩将在家庭中注入新的希望和喜悦,带来家庭更多的欢乐和幸福。&quot;, //子女同步详细批示
&quot;nannv&quot;: &quot;男&quot;, //生男生女
&quot;description&quot;: &quot;此项总分为15分。说明:何谓子女同步?西方的科学家在探索男女结合的奥秘时提出了【性染色体论】,我们东方人在四柱预测中看头胎子女的性别,男女双方的八字中头胎子女的性别必须一致。&quot;
},
&quot;female_sx&quot;: &quot;猴&quot;, //女方生肖
&quot;tiangan&quot;: { //天干五合
&quot;score&quot;: &quot;0&quot;, //天干五合打分
&quot;detail_description&quot;: &quot;男方日天干为壬,女方日天干为庚。此局为平。日干代表夫妻宫,此局平,这意味着这对夫妻的婚姻关系充满平静和稳定,他们之间的生活过得宁静和谐。虽然没有过多的戏剧性,但他们在平凡的日子里寻找着幸福,注定会过得平顺而充实。&quot;, //天干五合详细批示
&quot;male_yue_zhi&quot;: &quot;壬&quot;,
&quot;female_yue_zhi&quot;: &quot;庚&quot;,
&quot;description&quot;: &quot;此项总分为5分。说明:其次是天干五合,如甲日干逢己日干,庚日干逢乙日干之类。再次则是比和或相生。&quot;
},
&quot;all_score&quot;: 15, //合婚总分
&quot;male_sx&quot;: &quot;蛇&quot;, //男方生肖
&quot;male_xz&quot;: &quot;水瓶座&quot;, //男方星座
&quot;female&quot;: {
&quot;bazi&quot;: [ //女方八字
&quot;壬申&quot;, //女方八字【年】
&quot;壬寅&quot;, //女方八字【月】
&quot;庚辰&quot;, //女方八字【日】
&quot;癸未&quot; //女方八字【时】
],
&quot;day_cs&quot;: [ //女方八字长生衰旺
&quot;临官&quot;, //女方八字长生衰旺【年】
&quot;绝&quot;, //女方八字长生衰旺【月】
&quot;养&quot;, //女方八字长生衰旺【日】
&quot;冠带&quot; //女方八字长生衰旺【时】
],
&quot;nl_hours&quot;: &quot;13&quot;, //女方农历时
&quot;gl_day&quot;: &quot;5&quot;, //女方公历日
&quot;sex&quot;: &quot;坤造&quot;, //性别
&quot;nl_day&quot;: &quot;2&quot;, //女方农历日
&quot;dz_cg_god&quot;: [ //女方地支藏干十神
&quot;比肩|食神|偏印&quot;, //女方地支藏干十神【年】
&quot;偏财|七杀|偏印&quot;, //女方地支藏干十神【月】
&quot;偏印|正财|伤官&quot;, //女方地支藏干十神【日】
&quot;正印|正官|正财&quot; //女方地支藏干十神【时】
],
&quot;na_yin&quot;: [ //女方八字纳音
&quot;剑锋金&quot;, //女方八字纳音【年】
&quot;金箔金&quot;, //女方八字纳音【月】
&quot;白蜡金&quot;, //女方八字纳音【日】
&quot;杨柳木&quot; //女方八字纳音【时】
],
&quot;gl_month&quot;: &quot;3&quot;, //女方公历月
&quot;gongli&quot;: &quot;1992年3月5日13时29分&quot;, //女方公历年月日时分
&quot;kw&quot;: &quot;申酉&quot;, //女方空亡
&quot;nl_month&quot;: &quot;2&quot;,//女方农历月
&quot;gl_hours&quot;: &quot;13&quot;,//女方公历时
&quot;nl_year&quot;: &quot;1992&quot;,//女方农历年
&quot;nongli&quot;: &quot;一九九二年二月初二日 未时&quot;, //女方农历年月日时分
&quot;gl_year&quot;: &quot;1992&quot;,//女方公历年
&quot;dz_cg&quot;: [ //女方地支藏干
&quot;庚|壬|戊&quot;, //女方地支藏干【年】
&quot;甲|丙|戊&quot;, //女方地支藏干【月】
&quot;戊|乙|癸&quot;, //女方地支藏干【日】
&quot;己|丁|乙&quot; //女方地支藏干【时】
],
&quot;name&quot;: &quot;李四&quot;, //女方姓名
&quot;tg_cg_god&quot;: [ //女方天干十神
&quot;食神&quot;, //女方天干十神【年】
&quot;食神&quot;, //女方天干十神【月】
&quot;日元&quot;, //女方天干十神【日】
&quot;伤官&quot; //女方天干十神【时】
]
},
&quot;female_xz&quot;: &quot;双鱼座&quot;, //女方星座
&quot;male&quot;: {
&quot;bazi&quot;: [ //男方八字
&quot;己巳&quot;, //男方八字【年】
&quot;丁丑&quot;, //男方八字【月】
&quot;壬辰&quot;, //男方八字【日】
&quot;丁未&quot; //男方八字【时】
],
&quot;day_cs&quot;: [ //男方八字长生衰旺
&quot;绝&quot;, //男方八字长生衰旺【年】
&quot;衰&quot;, //男方八字长生衰旺【月】
&quot;墓&quot;, //男方八字长生衰旺【日】
&quot;养&quot; //男方八字长生衰旺【时】
],
&quot;nl_hours&quot;: &quot;13&quot;,//男方农历时
&quot;gl_day&quot;: &quot;27&quot;, //男方公历日
&quot;sex&quot;: &quot;乾造&quot;, //性别
&quot;nl_day&quot;: &quot;1&quot;, //男方农历日
&quot;dz_cg_god&quot;: [ //男方地支藏干十神
&quot;偏财|偏印|七杀&quot;, //男方地支藏干十神【年】
&quot;正官|劫财|正印&quot;, //男方地支藏干十神【月】
&quot;七杀|伤官|劫财&quot;, //男方地支藏干十神【日】
&quot;正官|正财|伤官&quot; //男方地支藏干十神【时】
],
&quot;na_yin&quot;: [ //男方八字纳音
&quot;大林木&quot;, //男方八字纳音【年】
&quot;涧下水&quot;, //男方八字纳音【月】
&quot;长流水&quot;, //男方八字纳音【日】
&quot;天河水&quot; //男方八字纳音【时】
],
&quot;gl_month&quot;: &quot;1&quot;, //男方公历月
&quot;gongli&quot;: &quot;1990年1月27日13时29分&quot;, //男方公历年月日时分
&quot;kw&quot;: &quot;午未&quot;, //男方空亡
&quot;nl_month&quot;: &quot;1&quot;, //男方农历月
&quot;gl_hours&quot;: &quot;13&quot;, //男方公历时
&quot;nl_year&quot;: &quot;1990&quot;, //男方农历年
&quot;nongli&quot;: &quot;一九九〇年正月初一日 未时&quot;, //男方农历年月日时分
&quot;gl_year&quot;: &quot;1990&quot;, //男方公历年
&quot;dz_cg&quot;: [ //男方地支藏干
&quot;丙|庚|戊&quot;, //男方地支藏干【年】
&quot;己|癸|辛&quot;, //男方地支藏干【月】
&quot;戊|乙|癸&quot;, //男方地支藏干【日】
&quot;己|丁|乙&quot; //男方地支藏干【时】
],
&quot;name&quot;: &quot;张三&quot;, //男方姓名
&quot;tg_cg_god&quot;: [ //男方天干十神
&quot;正官&quot;, //男方天干十神【年】
&quot;正财&quot;, //男方天干十神【月】
&quot;日元&quot;, //男方天干十神【日】
&quot;正财&quot; //男方天干十神【时】
]
}
}
}</code></pre>
<h3>失败返回样例</h3>
<pre><code class="language-json">{
&quot;msg&quot;: &quot;男方姓名不能为空&quot;,
&quot;code&quot;: 400
}</code></pre>
<h3>返回字段说明</h3>
<table>
<thead>
<tr>
<th>字段名</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>返回码,详见返回码说明</td>
</tr>
<tr>
<td>msg</td>
<td>code对应的描述</td>
</tr>
<tr>
<td>charge</td>
<td>计费标志</td>
</tr>
<tr>
<td>taskNo</td>
<td>本次请求号</td>
</tr>
<tr>
<td>data</td>
<td>返回具体结果,详见成功返回样例</td>
</tr>
</tbody>
</table>
<h3>code返回码说明</h3>
<table>
<thead>
<tr>
<th>code</th>
<th><div style="width:400px">说明</div></th>
</tr>
</thead>
<tbody>
<tr>
<td>200</td>
<td>成功(计费)</td>
</tr>
<tr>
<td>400</td>
<td>参数错误</td>
</tr>
<tr>
<td>404</td>
<td>请求地址不正确</td>
</tr>
<tr>
<td>500</td>
<td>服务商维护,请稍候再试</td>
</tr>
<tr>
<td>601</td>
<td>接口未开通</td>
</tr>
<tr>
<td>602</td>
<td>账号停用</td>
</tr>
<tr>
<td>603</td>
<td>余额不足请充值</td>
</tr>
<tr>
<td>604</td>
<td>接口停用</td>
</tr>
<tr>
<td>606</td>
<td>调用超限,请稍候再试</td>
</tr>
<tr>
<td>607</td>
<td>ip不在白名单</td>
</tr>
<tr>
<td>609</td>
<td>请求过于频繁,请稍候再试</td>
</tr>
<tr>
<td>610</td>
<td>请求超时</td>
</tr>
<tr>
<td>999</td>
<td>其他,以实际返回为准</td>
</tr>
</tbody>
</table>