Calls to the API must be for genuine use and responses from the API must not be stored for the purpose of creating an offline copy of the information stored. Failure to comply with this requirement will infringe the API License.
Transaction Log API Calls
Register Item Possession
POST /transactionlog/registerpossession
Purpose
To record the details of a transaction taking place when an item is sold to or aquired by a store.
Inputs
- storeid - The store ID.
- manufacturer - The manufacturer of the item.
- model - The model of the item.
- serials - An array containing one or more serials.
-
category - A numeric category number to identify the type of product the serial relates to.
Supported Categories - transactiondate - The date/time the transaction took place. Format: YYYY-MM-DD HH:MM:SS (e.g. 2014-01-01 10:01:02)
-
acquiredfrom - A JSON array containing the details of the person from whome the item was received.
- firstname - Firstname.
- lastname - Lastname.
- address - OPTIONAL - Address.
- postcode - OPTIONAL - Postcode.
- email - OPTIONAL - Email Address.
- telephone - OPTIONAL - Contact Telephone Number.
- additional - OPTIONAL - Any additional information you would like to store with the transaction.
All optional parameters must be valid if they are supplied.
Example Request
POST /transactionlog/registerpossession HTTP/1.1
Accept: application/json
Content-Type: application/json
{
"storeid": 1,
"manufacturer": "Samsung",
"model": "Galaxy",
"serials": ["7837492049023842"],
"category": 1,
"transactiondate": "2014-01-01 10:01:02",
"acquiredfrom": {
"firstname": "Joe",
"lastname": "Bloggs",
"address": "House 4, Street, City, Florida State, US",
"postcode": "OR3 2JS",
"email": "joe@bloggs.com",
"telephone": "325255324243"
},
"additional": "White Handset"
}
Output
A unique transaction ID and a 201 HTTP response code.
Example Response
HTTP/1.1 201 Created
Content-Type: application/json
{
"transactionid": "4234234-2-3523-3223423523-234234"
}