How To Use Api

Wasn’t sure where to ask this question.



Can anyone point me to the right place to learn how to use and implement cs-cart APIs from a beginner’s stand-point?



I know nothing about APIs, but I’d love to learn and use it. From what I gather, I can display admin information (such as sales) on my own personal website using CS-Cart APIs. Is this correct?



I would love to get any website/documentation.



Thanks!

Hello,



Have you already read this instruction API — CS-Cart 4.1.x documentation ?

Please check it and ask questions.

We will try to explain you the unclear moments.



Best regards, Alt-team.

[quote name='SwimShady' timestamp='1424999175' post='206571']

From what I gather, I can display admin information (such as sales) on my own personal website using CS-Cart APIs. Is this correct?

[/quote]



Yes, you can get common information for the list of orders and get detailed information about specific order. And get info about many other objects such as:


  • Categories
  • Orders
  • Payment Methods
  • Product Features
  • Products
  • Settings
  • Shipments
  • Shipping Methods
  • Statuses
  • Stores
  • Taxes
  • Users

Hello,



any one Could help me ,.



How can i update the Order details withe the help of 'PUT' Method,

This is my HTTP Request Code ;

-----------------------------------------------

string uri = “http://http://localhost:1234/cscart_store/api/orders/99”;

WebRequest request = WebRequest.Create(uri);

request.Method = “PUT”;

string Email = “gatewaycscart@gmail.com”;

string ApiKey = “49W25R28wI813W3A38Z6v4IuE958InI4”;

string credentials = Email + “:” + ApiKey;

request.Headers[“Authorization”] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(credentials));

//request.ContentType = “application/json”;

string data = “{'status':'P','shipping_cost':'1000'}”;

var Object = JsonConvert.SerializeObject(data);



byte[] bytes = Encoding.UTF8.GetBytes(Object);

Stream reqstr = request.GetRequestStream();

reqstr.Write(bytes, 0, bytes.Length);

reqstr.Close();



WebResponse response = request.GetResponse();

Stream dataStream = response.GetResponseStream();

StreamReader reader = new StreamReader(dataStream);

string serverResponse = reader.ReadToEnd();

--------------------------------------------------------------------------



finally i am getting response with passing order id like ({'order_id':'99'}).



but in my admin store the details are not updating and the Order moving to incomplete mode how can i resole this issue can any one suggest me ?



And i followed the Documentation from this url also :API — CS-Cart 4.2.x documentation



any one can help me



I am looking for your prompt actions



Thanks,

Kumar