Creates a transaction header.
You must be logged in to use this method. Basic Authentication is supported.
Group: transaction
This parameter is Optional
List: linedetail
This parameter is Optional
List: ErrorQueue
Group: result
List: transaction_create_errors
The following is a sample HTTP POST request and response. The placeholders shown need to be replaced with actual values.
Example Request
POST /transaction_create HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json Content-Type: application/json Content-Length: length { "transaction" : { "localtransactionid" : "value ", "localcustomerid" : "value ", "customerid" : value , "localshippingaddressid" : "value ", "addressid" : value , "transactiontype" : "value ", "created_at" : "value ", "updated_at" : "value ", "deliverydate" : "value ", "deliverymethod" : "value ", "purchaseordernumber" : "value ", "taxamount" : "value ", "total" : value , "note" : "value " }, "linedetail" : [ { "local_line_id" : "value ", "localproductid" : "value ", "productid" : "value ", "sku" : "value ", "description" : "value ", "quantity" : "value ", "price" : "value ", "taxamount" : "value ", "discountpercent" : "value ", "linetotal" : "value ", "note" : "value ", "status" : "value " } ] }
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "order_create_response" : { "result" : { "status" : "value ", "localtransactionid" : "value ", "transactionid" : value }, "transaction_create_errors" : [ { "local_line_id" : "value ", "localproductid" : "value ", "productid" : "value ", "sku" : "value ", "description" : "value ", "quantity" : "value ", "price" : "value ", "taxamount" : "value ", "discountpercent" : "value ", "linetotal" : "value ", "note" : "value ", "status" : "value " } ] } }
Example Code - JavaScript
function transaction_create_jsonpost(host,jsondata,username,password,result){ fetch(host + "/transaction_create", { method: "POST", credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Content-Type": "application/json", "Accept": "application/json;", }, body: jsondata }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply textToTextarea(text,result) }) } var host = "https://localhost:2293"
Example Code - CURL
CURL --user Username :Password --header "Content-Type: application/json" --header "Accept: application/json" --data-binary @jsonDataFile.json https://localhost:2293 /transaction_create
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.ContentType = 'application/json' net.SetAccept('application/json') net.Post('https://localhost:2293 /transaction_create',jsonData)
Try It - Live
jsondata
Try it : POST result
The following is a sample JSON GET request and response. The
placeholders shown need to be replaced with actual values.
Example Request
GET /transaction_create?transaction-localtransactionid=value &transaction-localcustomerid=value &transaction-customerid=value &transaction-localshippingaddressid=value &transaction-addressid=value &transaction-transactiontype=value &transaction-created_at=value &transaction-updated_at=value &transaction-deliverydate=value &transaction-deliverymethod=value &transaction-purchaseordernumber=value &transaction-taxamount=value &transaction-total=value &transaction-note=value HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "order_create_response" : { "result" : { "status" : "value ", "localtransactionid" : "value ", "transactionid" : value }, "transaction_create_errors" : [ { "local_line_id" : "value ", "localproductid" : "value ", "productid" : "value ", "sku" : "value ", "description" : "value ", "quantity" : "value ", "price" : "value ", "taxamount" : "value ", "discountpercent" : "value ", "linetotal" : "value ", "note" : "value ", "status" : "value " } ] } }
Example Code - JavaScript
function transaction_create_getjson(host,urldata,username,password,result){ fetch(host + "/transaction_create" +"?" + urldata, { credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Accept": "application/json;", } }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply }) } var host = "https://localhost:2293"
Example Code - CURL
CURL --user Username :Password --header "Accept: application/json" --get --data "transaction-localtransactionid=value &transaction-localcustomerid=value &transaction-customerid=value &transaction-localshippingaddressid=value &transaction-addressid=value &transaction-transactiontype=value &transaction-created_at=value &transaction-updated_at=value &transaction-deliverydate=value &transaction-deliverymethod=value &transaction-purchaseordernumber=value &transaction-taxamount=value &transaction-total=value &transaction-note=value " https://localhost:2293 /transaction_create
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.SetAccept('application/json') net.Get('https://localhost:2293 /transaction_create?transaction-localtransactionid=value &transaction-localcustomerid=value &transaction-customerid=value &transaction-localshippingaddressid=value &transaction-addressid=value &transaction-transactiontype=value &transaction-created_at=value &transaction-updated_at=value &transaction-deliverydate=value &transaction-deliverymethod=value &transaction-purchaseordernumber=value &transaction-taxamount=value &transaction-total=value &transaction-note=value ')
Try It - Live
The following is a sample REST request and response. The
placeholders shown need to be replaced with actual values.
Example Request
GET /api/transaction_create? HTTP/1.1 Authorization: Basic ZGVtbzpkZW1v Host: localhost:2293 Accept: application/json
Example Response
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 Content-Length: length { "order_create_response" : { "result" : { "status" : "value ", "localtransactionid" : "value ", "transactionid" : value }, "transaction_create_errors" : [ { "local_line_id" : "value ", "localproductid" : "value ", "productid" : "value ", "sku" : "value ", "description" : "value ", "quantity" : "value ", "price" : "value ", "taxamount" : "value ", "discountpercent" : "value ", "linetotal" : "value ", "note" : "value ", "status" : "value " } ] } }
Example Code - JavaScript
function transaction_create_restjson(host,id,username,password,result){ fetch(host + "/api/transaction_create/" + id, { credentials: "include", headers: { "Authorization": "Basic " + btoa(username + ":" + password), "Accept": "application/json;", } }).then(function(response){ // get the text out of the reply return response.text() }).then( function(text){ // do something with the text reply }) } var host = "https://localhost:2293"
Example Code - CURL
CURL --user Username :Password --header "Accept: application/json" https://localhost:2293 /api/transaction_create/5
Example Code - Clarion with NetTalk
net NetWebClient net.Authorization = net.CreateAuthorizationString (Username , Password , Net:WebBasicAuthentication,Net:NoWrap) net.SetAccept('application/json') net.Get('https://localhost:2293 /api/transaction_create/5 ')
Try It - Live