Open itzRamkumar opened 6 years ago
Hi,
In Woocommerce api call to get orders i will get 200 Success Status code but it returns invalid json. Here is my response
Invalid JSON returned for https://mysite/wc-api/v2/orders?filter%5Blimit%5D=-1&status=Processing&filter%5Bcreated_at_min%5D=2017-12-01&filter%5Bcreated_at_max%5D=2018-01-06&consumer_key=myConsumerKey&consumer_secret=MySecretKey. 200 stdClass Object ( [headers] => Array ( [0] => Accept: application/json [1] => Content-Type: application/json [2] => User-Agent: WooCommerce API Client-PHP/2.0.1 ) [method] => GET [url] => https://mysite/wc-api/v2/orders?filter%5Blimit%5D=-1&status=Processing&filter%5Bcreated_at_min%5D=2017-12-01&filter%5Bcreated_at_max%5D=2018-01-06&consumer_key=myConsumerKey&consumer_secret=MySecretKey[params] => Array ( [filter[limit]] => -1 [status] => Processing [filter[created_at_min]] => 2017-12-01 [filter[created_at_max]] => 2018-01-06 [consumer_key] => MySecretKey[consumer_secret] => MySecretKey) [data] => Array ( [filter[limit]] => -1 [status] => Processing [filter[created_at_min]] => 2017-12-01 [filter[created_atmax]] => 2018-01-06 ) [body] => [duration] => 2.19213 ) stdClass Object ( [body] => �‹��ìYmoÛ6�þ+„>�-Ëz³-i(Ö-í° m1´ÙŠn.�Z¢mÎ’¨‘Tš¶È�ß�%Ùrâ¸[Ò×Í@�TÇ#M>¼{î9é�%dƤ²â?ÞY<³bÏuüAcLʺ˜3iÅ���•JF5Ë�ªÑæ¸áÐq‡Žwêú±ãÅÞôwð©«ì€�ï OŠg›•ÜhꘕÜSljÍ?ôRšê�6fUR¤L)^.qn-%+Ó7ÿîׇÐBÓ�÷ãÙc�§Õó�)²�4™ç$ç%K¸f…Jþªi©¹†EÜnTÓsXÄéOP+^Uø«±5mì)•:Ùñì|vÍ�f\¥¢.�,×o7×.™�L¯D†§û!§šHÀ6ZÑ7�+u’1My�£ï¬Æ1Á«�D$¯Ð¯5Â�r�ö�É2®É •™Y��µ¬ÙÅÀšó�νLh–IÀ�W\p©tRÒ�§>çJ3IÄ‚<ák\:§½ÁŠ-ë·�¬xc´DÐO!�T-�ù�N¦¨]9qaÐ%O¨\3Mžk»7äÁÐcvÆrâ{¸˜AÞzÂò¹¨eÉÈo<%¾c® /�÷õôù�ð¬„Ò©ÈÌF>}øè%ÎFHesÿðÈ @ &äöŸ´,y¹ÀÓ\Ô™ [Æ�V¢Äé‘ç�ÇQ4±“Í�ýGA�#– ˆpÕJ‹‚É„WCèÙÓÀv£‰í¹a�´VàB—�|àUˆ·�6t6�Û�¹[Д—Z¨Õ7�þÂ%‚��EΉë$®Ÿx÷� Ÿ_³ùšk˜äOm�Bî®WºÈ�$‡¸"K–®Å=’®$ìe6šø¶cûž�Ùa@�]PÉ»yýM�>�Xgœ½NM%µÄ»^i]©x6š�¨”âu��ÆRZ©:g /��êÙ¨x3¤© —Ù�×�š5f£–Ͷ|°%¿0�òÛà �iOšÃÜq“ÝMÚïðC%yŠñ×¹ì2�=ORH8¤�8w›’'æ8�ÍÍyÈ�¼lÍJ“ÛRduª �DN{]×Íd �jαf˜�'¢� )!µ��‹y}Fó�72†ÿçtÎ�ÇKN�¯.�m��C{ˤ-/v–ý0ì�ç^�Z�-�c ß½ <�^’LkA~‚˜+•J�ÞêULÆ�+��>Ò]9©àœsq�GƒZ±�(ð�ô�P9Ð^�™C¸wˆu³ªW="ÁP‚KìJh�¹úĽŽO�ãcä¿KìÝ/]å2õ���ÑéV‡Gˆóþ#�w%Ê�esy�¤IC›†ìMÜãÅÓb§�á�tü€•¡Í·Ëe~:tü¡��ºQìOâŒÅùí^“Šà{“‚ƒ|ÔæÆÙa))LÁ£YÁKŒ�ª…�³)Z C˜3� Ó3¢$�x¿F²˜‰ikuØ)�U5lèyn“ÞôŒj¯p�b I˜½”ÍxË?Æ��uœyÙ‚�Ñ"ðÆî˜M�NàøA�-˜;É�ûVÝ�&w²ûEqGÞG}s,ØÿÂ}±!^×ñö©o#›®Sß^�@6�Tßà�ÆnôÑÔwRá’ú�˜únËÆ�ÕwÐîíK�ß?‹UÙ±WKv���ëÜ� \�¼þ/DgŸD!ùrE�¡Ë�KTß·‘Ú���GUý>U�aºWUO§;j²c†Ãr²£”�ªºsÙ Jìç÷ Ê«ê�S+§(�ú¢1r@»ýkUí"÷u"ñ€¬ž‚ºèN ‚äcÉjï:�¾�Y½�¾C¬'«7�È4ú¼P=R�¾1�ä�;4žö;�à�w �‚©;ô¶7;�£‡ �O��t�ûsëq].o…ÓØÁ˾¦•½5NÐål^ùt½Ô¦U�¸U§fRøæ��dê•NÍ�ɦU3âåØ©™—ËÇNíøjõ³êà‹§�ÔѼsè�'qA�~�²ùN�]˜��áû:5�Ü>Z§vüNr“ï$ßK¡W�îCÉdû¡�â¥�éOñ�ä�÷o_9.ǦîšO%��ÿÿì›1� �EOd�’I®á�l,Ricãí]Ð5@ÖÌ$&�Ç-l�,d�xüÿp�›«Jì†F_ê¸�žµlW%EE\T¦Ü¤JW%°Œ¹a·Á�dÇì…��ÀE�[Gàð%�àæ ˃0VTRª�$€‡c䆢ҫ�ñrÀ2›ª��Éܪ’�çÌ¡0ÿ[þ¾_ΦظËó·&ø[µ…l࣊¶¶?C�i±©$Oú�SɈ�¦Òs;£ñ;}q�Á]…VtpÔD§‚C�u L%�1þé +�8kèð;‹Je˜÷¹ø]&É¿áF€�šÅ#��vMÀÞ>�›Â�MCŒ1¦iwôFâ‘GÊ5HE��gGcœ3h–õµ�¦éùÖÿ\׿�d‹]�•,Â^s�g>�Í�ô~á.$4ëPDBÖE~ü�hÖûxH�¡9½1²˜˜5¨ Œ�&f‹��PXÕ‡™Ø³3^óÀýñ�‡�1Cs2&fꡬGÕèž�ㇲþ�ÙI½�ÂÄ<Ÿ˜×ðÔw^µaÒÜ_o„«ß¨ª‚”UŽžÅ>ÿÿìœÏNÂ@�‡eï^–•�ôÆ¿ƒ�1Ñè�°Q/š�x{g¦Nº•m¡�é6�#°%0‡í·Óß|±Yá�k €|� Ó&��äb˜¡»€Œè§‚&ºÊI¤ÏOgdLU(#��ÓuœUý�ÝñOä!i{ãbŒ��g ø×ÁmŸGU+�Ù •‘3=M2.™ñzûþMót�'�ÁŒ÷[|+Ÿh�£�Æ“ËBN°$Žq×ÖL¿HU³aÑ�#�(�Ͳ’#¼1¯wSüêÀ�ó0_L�ž–sþ�Aô N$£�&§Y�‘íü-ƒ&0ª§Zq�Ã’EY�ŠMÔβ2\fR³´™Üî�Æs<ÊÊÊʪ餫-dåÈ@¡ÅÞ�ÒSy�ÃÙßaÁVÆ5ý�ë'‹Ú,h—È0‹�æ7ÏúâÅsÕ/ÉŠ��¨#0�Yù>3�2¢‰o����(ƒ5“õÇêÍ#&���"Óe�!?ïVŸ~gСhÜAâly†VñjÐ3½‘µfd��¡=ª�œÊ_çq±ƒc�òð!�.��„b�W6�Ù�âá Ù=�ɲ¤-‰dpÍöŽÛÍÀOU�àa�‚>Ù3r¨;Q݉{�H•�GR¡—.Ê�ÿÿR�.Ȉ�ÿÿ�|h„|Æ\ [code] => 200 [headers] => Array ( [Date] => Thu, 04 Jan 2018 08:58:07 GMT [Server] => Apache [X-Powered-By] => PHP/5.6.32 [Link] => ; rel="last" [X-WC-Total] => 8 [X-WC-TotalPages] => 0 [Set-Cookie] => jckwds-guest-user-id=jckwds5a4deca065d75; path=/ [Upgrade] => h2 [Connection] => Upgrade [Vary] => Accept-Encoding,User-Agent [Content-Encoding] => gzip [Transfer-Encoding] => chunked [Content-Type] => application/json; charset=UTF-8 ) )
can anyone please look at this. Why i receive this error?
Hi,
In Woocommerce api call to get orders i will get 200 Success Status code but it returns invalid json. Here is my response
Invalid JSON returned for https://mysite/wc-api/v2/orders?filter%5Blimit%5D=-1&status=Processing&filter%5Bcreated_at_min%5D=2017-12-01&filter%5Bcreated_at_max%5D=2018-01-06&consumer_key=myConsumerKey&consumer_secret=MySecretKey. 200 stdClass Object ( [headers] => Array ( [0] => Accept: application/json [1] => Content-Type: application/json [2] => User-Agent: WooCommerce API Client-PHP/2.0.1 ) [method] => GET [url] => https://mysite/wc-api/v2/orders?filter%5Blimit%5D=-1&status=Processing&filter%5Bcreated_at_min%5D=2017-12-01&filter%5Bcreated_at_max%5D=2018-01-06&consumer_key=myConsumerKey&consumer_secret=MySecretKey[params] => Array ( [filter[limit]] => -1 [status] => Processing [filter[created_at_min]] => 2017-12-01 [filter[created_at_max]] => 2018-01-06 [consumer_key] => MySecretKey[consumer_secret] => MySecretKey) [data] => Array ( [filter[limit]] => -1 [status] => Processing [filter[created_at_min]] => 2017-12-01 [filter[created_atmax]] => 2018-01-06 ) [body] => [duration] => 2.19213 ) stdClass Object ( [body] => �‹��ìYmoÛ6�þ+„>�-Ëz³-i(Ö-í° m1´ÙŠn.�Z¢mÎ’¨‘Tš¶È�ß�%Ùrâ¸[Ò×Í@�TÇ#M>¼{î9é�%dƤ²â?ÞY<³bÏuüAcLʺ˜3iÅ���•JF5Ë�ªÑæ¸áÐq‡Žwêú±ãÅÞôwð©«ì€�ï OŠg›•ÜhꘕÜSljÍ?ôRšê�6fUR¤L)^.qn-%+Ó7ÿîׇÐBÓ�÷ãÙc�§Õó�)²�4™ç$ç%K¸f…Jþªi©¹†EÜnTÓsXÄéOP+^Uø«±5mì)•:Ùñì|vÍ�f\¥¢.�,×o7×.™�L¯D†§û!§šHÀ6ZÑ7�+u’1My�£ï¬Æ1Á«�D$¯Ð¯5Â�r�ö�É2®É •™Y��µ¬ÙÅÀšó�νLh–IÀ�W\p©tRÒ�§>çJ3IÄ‚<ák\:§½ÁŠ-ë·�¬xc´DÐO!�T-�ù�N¦¨]9qaÐ%O¨\3Mžk»7äÁÐcvÆrâ{¸˜AÞzÂò¹¨eÉÈo<%¾c® /�÷õôù�ð¬„Ò©ÈÌF>}øè%ÎFHesÿðÈ @ &äöŸ´,y¹ÀÓ\Ô™ [Æ�V¢Äé‘ç�ÇQ4±“Í�ýGA�#– ˆpÕJ‹‚É„WCèÙÓÀv£‰í¹a�´VàB—�|àUˆ·�6t6�Û�¹[Д—Z¨Õ7�þÂ%‚��EΉë$®Ÿx÷� Ÿ_³ùšk˜äOm�Bî®WºÈ�$‡¸"K–®Å=’®$ìe6šø¶cûž�Ùa@�]PÉ»yýM�>�Xgœ½NM%µÄ»^i]©x6š�¨”âu��ÆRZ©:g /��êÙ¨x3¤© —Ù�×�š5f£–Ͷ|°%¿0�òÛà �iOšÃÜq“ÝMÚïðC%yŠñ×¹ì2�=ORH8¤�8w›’'æ8�ÍÍyÈ�¼lÍJ“ÛRduª �DN{]×Íd �jαf˜�'¢� )!µ��‹y}Fó�72†ÿçtÎ�ÇKN�¯.�m��C{ˤ-/v–ý0ì�ç^�Z�-�c ß½ <�^’LkA~‚˜+•J�ÞêULÆ�+��>Ò]9©àœsq�GƒZ±�(ð�ô�P9Ð^�™C¸wˆu³ªW="ÁP‚KìJh�¹úĽŽO�ãcä¿KìÝ/]å2õ���ÑéV‡Gˆóþ#�w%Ê�esy�¤IC›†ìMÜãÅÓb§�á�tü€•¡Í·Ëe~:tü¡��ºQìOâŒÅùí^“Šà{“‚ƒ|ÔæÆÙa))LÁ£YÁKŒ�ª…�³)Z C˜3� Ó3¢$�x¿F²˜‰ikuØ)�U5lèyn“ÞôŒj¯p�b I˜½”ÍxË?Æ��uœyÙ‚�Ñ"ðÆî˜M�NàøA�-˜;É�ûVÝ�&w²ûEqGÞG}s,ØÿÂ}±!^×ñö©o#›®Sß^�@6�Tßà�ÆnôÑÔwRá’ú�˜únËÆ�ÕwÐîíK�ß?‹UÙ±WKv���ëÜ� \�¼þ/DgŸD!ùrE�¡Ë�KTß·‘Ú���GUý>U�aºWUO§;j²c†Ãr²£”�ªºsÙ Jìç÷ Ê«ê�S+§(�ú¢1r@»ýkUí"÷u"ñ€¬ž‚ºèN ‚äcÉjï:�¾�Y½�¾C¬'«7�È4ú¼P=R�¾1�ä�;4žö;�à�w �‚©;ô¶7;�£‡ �O��t�ûsëq].o…ÓØÁ˾¦•½5NÐål^ùt½Ô¦U�¸U§fRøæ��dê•NÍ�ɦU3âåØ©™—ËÇNíøjõ³êà‹§�ÔѼsè�'qA�~�²ùN�]˜��áû:5�Ü>Z§vüNr“ï$ßK¡W�îCÉdû¡�â¥�éOñ�ä�÷o_9.ǦîšO%��ÿÿì›1� �EOd�’I®á�l,Ricãí]Ð5@ÖÌ$&�Ç-l�,d�xüÿp�›«Jì†F_ê¸�žµlW%EE\T¦Ü¤JW%°Œ¹a·Á�dÇì…��ÀE�[Gàð%�àæ ˃0VTRª�$€‡c䆢ҫ�ñrÀ2›ª��Éܪ’�çÌ¡0ÿ[þ¾_ΦظËó·&ø[µ…l࣊¶¶?C�i±©$Oú�SɈ�¦Òs;£ñ;}q�Á]…VtpÔD§‚C�u L%�1þé +�8kèð;‹Je˜÷¹ø]&É¿áF€�šÅ#��vMÀÞ>�›Â�MCŒ1¦iwôFâ‘GÊ5HE��gGcœ3h–õµ�¦éùÖÿ\׿�d‹]�•,Â^s�g>�Í�ô~á.$4ëPDBÖE~ü�hÖûxH�¡9½1²˜˜5¨ Œ�&f‹��PXÕ‡™Ø³3^óÀýñ�‡�1Cs2&fꡬGÕèž�ㇲþ�ÙI½�ÂÄ<Ÿ˜×ðÔw^µaÒÜ_o„«ß¨ª‚”UŽžÅ>ÿÿìœÏNÂ@�‡eï^–•�ôÆ¿ƒ�1Ñè�°Q/š�x{g¦Nº•m¡�é6�#°%0‡í·Óß|±Yá�k €|� Ó&��äb˜¡»€Œè§‚&ºÊI¤ÏOgdLU(#��ÓuœUý�ÝñOä!i{ãbŒ��g ø×ÁmŸGU+�Ù •‘3=M2.™ñzûþMót�'�ÁŒ÷[|+Ÿh�£�Æ“ËBN°$Žq×ÖL¿HU³aÑ�#�(�Ͳ’#¼1¯wSüêÀ�ó0_L�ž–sþ�Aô N$£�&§Y�‘íü-ƒ&0ª§Zq�Ã’EY�ŠMÔβ2\fR³´™Üî�Æs<ÊÊÊʪ餫-dåÈ@¡ÅÞ�ÒSy�ÃÙßaÁVÆ5ý�ë'‹Ú,h—È0‹�æ7ÏúâÅsÕ/ÉŠ��¨#0�Yù>3�2¢‰o����(ƒ5“õÇêÍ#&���"Óe�!?ïVŸ~gСhÜAâly†VñjÐ3½‘µfd��¡=ª�œÊ_çq±ƒc�òð!�.��„b�W6�Ù�âá Ù=�ɲ¤-‰dpÍöŽÛÍÀOU�àa�‚>Ù3r¨;Q݉{�H•�GR¡—.Ê�ÿÿR�.Ȉ�ÿÿ�|h„|Æ\ [code] => 200 [headers] => Array ( [Date] => Thu, 04 Jan 2018 08:58:07 GMT [Server] => Apache [X-Powered-By] => PHP/5.6.32 [Link] => ; rel="last" [X-WC-Total] => 8 [X-WC-TotalPages] => 0 [Set-Cookie] => jckwds-guest-user-id=jckwds5a4deca065d75; path=/ [Upgrade] => h2 [Connection] => Upgrade [Vary] => Accept-Encoding,User-Agent [Content-Encoding] => gzip [Transfer-Encoding] => chunked [Content-Type] => application/json; charset=UTF-8 ) )
can anyone please look at this. Why i receive this error?