How to edit the request for a number via API?

Post: http://www.namedoseusite.com.br/api_orders.php?action=update_orders












Parameter format description
oid json Order ID
Only Number is Required
Check the Api to Get The Order Number
Format: Bigint (11)
* Field Required
Status json

Use the Api to List The Status and Get Name and Id
Only Number is Required
Format: Int (2)
* Field Required

Comments json Text to Comment The Order Status Ordination
Format: Text
Restock json Use the on to enable restock, also change the status to Cancel or Leave Blank
format: varchar (11)
repayment json Use the True to Enable Repayment or Leave Blank
Format: Varchar (11)
reorder json Use the True to Enable Reorder or Leave Blank
Format: Varchar (11)
Signature_reactering json Use the 1 to Enable Appearance Subscription or Leave Blank
Format: int (1)
CANCEL_SINATURE_RECORING json Use the 1 to Enable Cancel Recuring Subscription or Leave Blank
Format: int (1)
confirm_fraud json Use the True to Enable Confirm Fraud or Leave Blank
Format: Varchar (11)
customer_status_account json Use the True to Enable Block Customer Account or Leave Blank
Format: Varchar (11)

php sample

 // sample edit orders

$ URL = $ tabain_url. ' /api_orders.php? Action = update_orders ' ;;

$ data = array ("oid" = & gt; "12302006081632", // order id (Only Number is Required) * Field Required
"status" = & gt; "116", // Use the Api to List the status and get name and id (Only Number Is Required) * Field Required
"Comments" = & gt; "Test", // Use the Api to List The Email Templates
// "notify" = & gt; "on", // use the on to enable notify by email, also change the status or leave blank
// "notify_comments" = & gt; "on", // use the on to enable notify comments, also change the status or leave blank
"Restock" = & gt; "", // Use the on to enable restock, also change the status to cannel or leave blank
"repayment" = & gt; "", // Use the True to Enable Repayment or Leave Blank
"reorder" = & gt; "", // Use the True to Enable Reorder or Leave Blank
"RECORRING SIGNATURE" = & GT; "", // Use the 1 to Enable Appearing Subscription or Leave Blank
"Cancel_Sinatura_reacterant" = & gt; "", // use the 1 to Enable Cancel Appearing Subscription or Leave Blank
"confirm_fraud" = & gt; "", // Use the True to Enable Confirm Fraud or Leave Blank
"customer_status_account" = & gt; "" // Use the True to Enable Block Customer Account or Leave Blank
);

$ data_string = json_encode ($ date);

$ CH = curl_init ($ URL);
Curl_Setopt ($ CH, curlopt_customrequest, "post");
Curl_Setopt ($ CH, Curlopt_postFields, $ Data_String);
Curl_Setopt ($ CH, Curlopt_Returntransfer, True);
curl_setopt ($ CH, curlopt_ssl_verifypeer, false);
Curl_Setopt ($ CH, Curlopt_httpheader, Array (
' CONTENT-TYPE: Application/JSON ',
"Cache-Control: No-Cache",
' Usuario1: ' . base64_encode ($ Usuario1),
' password1: ' . base64_encode ($ password1),
' CONTENT-LENGTH: ' . Strlen ($ data_string)))
);

$ result = curl_exec ($ CH);
Curl_Close ($ CH);

print_r ($ result);

// sample Edit Orders EOF

Return Error:

Code
Message

Return Success:

code
Oid
Message

Leave a Reply 0