| GET | /hashlookup/{hash} | Get a serial number + referenceId based on the hash provided |
|---|
import 'package:servicestack/servicestack.dart';
class GetProductByHashResponse implements IConvertible
{
/**
* Article Code, which is more of Reference Id
*/
// @ApiMember(Description="Article Code, which is more of Reference Id ", IsRequired=true)
String? articleCode;
/**
* Serial Number
*/
// @ApiMember(Description="Serial Number", IsRequired=true)
String? serialNumber;
GetProductByHashResponse({this.articleCode,this.serialNumber});
GetProductByHashResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
articleCode = json['articleCode'];
serialNumber = json['serialNumber'];
return this;
}
Map<String, dynamic> toJson() => {
'articleCode': articleCode,
'serialNumber': serialNumber
};
getTypeName() => "GetProductByHashResponse";
TypeContext? context = _ctx;
}
class GetProductByHash implements IConvertible
{
/**
* Hash String
*/
// @ApiMember(Description="Hash String", IsRequired=true)
String? hash;
GetProductByHash({this.hash});
GetProductByHash.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
hash = json['hash'];
return this;
}
Map<String, dynamic> toJson() => {
'hash': hash
};
getTypeName() => "GetProductByHash";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'GetProductByHashResponse': TypeInfo(TypeOf.Class, create:() => GetProductByHashResponse()),
'GetProductByHash': TypeInfo(TypeOf.Class, create:() => GetProductByHash()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /hashlookup/{hash} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"articleCode":"String","serialNumber":"String"}