Api Documentation / Behavior Mismatch

Hello all



since at least 06/03/2015, our API client software experiences an error trying to acces store information:



[color=“AA0000”]A JSONArray text must start with '[' at character 1 of {“stores”:[{“company_id”:“1”,“lang_code”:“en”,“email”:““,“company”:””,“timestamp”:“1269610461”,“status”:“A”,“storefront”:““,“secure_storefront”:””,“average_rating”:null,“company_thread_ids”:“1_0”}],“params”:[]}[/color]



API documentation clearly states that the response si an array: http://docs.cs-cart.com/4.2.x/api/entities/stores.html.



What is correct?

[quote name='mgolovanov' timestamp='1433915461' post='218118']

Hello all



since at least 06/03/2015, our API client software experiences an error trying to acces store information:



A JSONArray text must start with '[' at character 1 of {“stores”:[{“company_id”:“1”,“lang_code”:“en”,“email”:““,“company”:””,“timestamp”:“1269610461”,“status”:“A”,“storefront”:““,“secure_storefront”:””,“average_rating”:null,“company_thread_ids”:“1_0”}],“params”:[]}



API documentation clearly states that the response si an array: http://docs.cs-cart…es/stores.html.



What is correct?

[/quote]



Since v4.3.1 we moved to API v2 and now it is used by default.

In your case you can either:

  1. Use the old version by calling this URL [url=“http://example.com/api/v10/stores”]http://example.com/api/v10/stores[/url] instead of [url=“http://example.com/api/v10/stores”]http://example.com/api/stores[/url]
  2. Update your script to the new API version.



    We will update API docs very soon.

[quote name='mgolovanov' timestamp='1433915461' post='218118']

Hello all



since at least 06/03/2015, our API client software experiences an error trying to acces store information:



[color=AA0000]A JSONArray text must start with '[' at character 1 of {“stores”:[{“company_id”:“1”,“lang_code”:“en”,“email”:““,“company”:””,“timestamp”:“1269610461”,“status”:“A”,“storefront”:““,“secure_storefront”:””,“average_rating”:null,“company_thread_ids”:“1_0”}],“params”:[]}[/color]



API documentation clearly states that the response si an array: http://docs.cs-cart…es/stores.html.



What is correct?

[/quote]



Hi, mgolovanov.



We have updated the following API documentation: http://docs.cs-cart.com/4.3.x/api/entities/stores.html



Thank you.