Difference between revisions of "XcelData:Terms"

From XcelData Wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
= Terms commonly used in the API =
 
= Terms commonly used in the API =
 
== api-key ==
 
'''''uuid:''' 00000000-0000-0000-0000-000000000000''
 
 
A valid API key. Store API keys can be obtained from [https://app.xceldata.com/customers app.xceldata.com/customers]
 
  
 
==adj-buy==
 
==adj-buy==
 
'''''integer or decimal:''' 0-200''
 
'''''integer or decimal:''' 0-200''
  
Adjusts the buy amount by '''n''' percent.
+
Adjusts the buy amount by ''n'' percent.
  
 
==adj-loan==
 
==adj-loan==
 
'''''integer or decimal:''' 0-200''
 
'''''integer or decimal:''' 0-200''
  
Adjusts the buy amount by '''n''' percent.
+
Adjusts the loan amount by ''n'' percent.
  
 
==adj-sell==
 
==adj-sell==
 
'''''integer or decimal:''' 0-200''
 
'''''integer or decimal:''' 0-200''
  
Adjusts the buy amount by '''n''' percent.
+
Adjusts the sell amount by ''n'' percent.
 +
 
 +
== api-key ==
 +
'''''uuid:''' 00000000-0000-0000-0000-000000000000''
  
==unit-type==
+
A valid API key. Store API keys can be obtained from [https://app.xceldata.com/customers app.xceldata.com/customers]
'''''enum:''' dwt or gr''
+
 
 +
==drivers-lic==
 +
'''''string:''' a valid drivers lic''
 +
 
 +
A valid drivers license that uniquely identifies the customer.
 +
 
 +
== http-request-method ==
 +
'''''enum:''' GET or POST''
 +
 
 +
This is used at the application layer for directing the kind of request to be made.
 +
 
 +
Currently we only have apis that consume [[wikipedia:GET_(HTTP)|GET]] and [[wikipedia:POST_(HTTP)|POST]].
 +
 
 +
'''Examples:'''
 +
<pre>
 +
//get:
 +
curl http://localhost:3000/data1/data2/data3
 +
 
 +
//post:
 +
curl -d "param1=value1&param2=value2" -X POST http://localhost:3000/data1/data2/data3
 +
 
 +
//post application/json:
 +
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:3000/data1/data2/data3
  
Specifies Pennyweight or Grams (what will be shown to tellers)
+
//post using a data file:
 +
curl -d "@data.json" -X POST http://localhost:3000/data1/data2/data3
 +
</pre>
  
 
== output-format ==
 
== output-format ==
Line 30: Line 52:
  
 
Specifies XML or JSON output.
 
Specifies XML or JSON output.
 +
 +
==service-name==
 +
'''''enum:''' superpawn or xpawn''
 +
 +
Currently used to specify the type of license check to preform.
 +
 +
==transaction-id==
 +
'''''string:''' a unique transaction id''
 +
 +
A transaction id that uniquely identifies the customer's transaction.
 +
 +
==unit-type==
 +
'''''enum:''' dwt or gr''
 +
 +
Specifies Pennyweight or Grams (what will be shown to tellers)

Latest revision as of 16:19, 1 May 2018

Terms commonly used in the API

adj-buy

integer or decimal: 0-200

Adjusts the buy amount by n percent.

adj-loan

integer or decimal: 0-200

Adjusts the loan amount by n percent.

adj-sell

integer or decimal: 0-200

Adjusts the sell amount by n percent.

api-key

uuid: 00000000-0000-0000-0000-000000000000

A valid API key. Store API keys can be obtained from app.xceldata.com/customers

drivers-lic

string: a valid drivers lic

A valid drivers license that uniquely identifies the customer.

http-request-method

enum: GET or POST

This is used at the application layer for directing the kind of request to be made.

Currently we only have apis that consume GET and POST.

Examples:

//get:
curl http://localhost:3000/data1/data2/data3

//post:
curl -d "param1=value1&param2=value2" -X POST http://localhost:3000/data1/data2/data3

//post application/json:
curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:3000/data1/data2/data3

//post using a data file:
curl -d "@data.json" -X POST http://localhost:3000/data1/data2/data3

output-format

enum: json or xml

Specifies XML or JSON output.

service-name

enum: superpawn or xpawn

Currently used to specify the type of license check to preform.

transaction-id

string: a unique transaction id

A transaction id that uniquely identifies the customer's transaction.

unit-type

enum: dwt or gr

Specifies Pennyweight or Grams (what will be shown to tellers)