Richemont.Booster2.PublicApi

<back to all web services

GetProductByHash

Requires Authentication
The following routes are available for this service:
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()),
});

Dart GetProductByHash DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"articleCode":"String","serialNumber":"String"}