HOW TO UPDATE A MARKER

You can update a marker using the Cloud API, by making an HTTPS PUT request to https://ws.crs.pikkart.com/ar/reco/markers/{markerId}. The request header should include the authorization fields. The body of the request must be a JSON object that defines the properties of the targets as specified here.

JSON body elements

The JSON body elements are listed in the following table.

field name type mandatory description
base64Encode Base64 encoded data yes the based 64 encoded marker (jpg file - max 1Mb)
dbCode string [1 - 20] yes the code of the repository where you want to index your marker
name string[1 - 50] yes name of the marker
width float yes width of the marker in scene unit
customData string [1 - 8000] no custom data thet you would like to link to a marker. This could be usefull for you App implementation.
publishedFrom date yes publish GMT date of your marker. Before that date your marker will not be available for cloud recognition.
publishedTo date yes last publish GMT date of your marker. After that date your marker will not be available for cloud recognition.
updateUser string [1 - 50] no the user that is creating the marker
deviceId string [1 - 50] no the device id or website url that call the ws api
operationContextTypeCode integer yes UnKnown = 1,
WebApplication = 2,
AndroidApp = 3,
iOSApp = 4,
WindowsPhoneApp = 5

JSON body elements

        
            {
                "dbCode":"test",
                "name": "my marker name",
                "base64Encode":"...",
                "width":1.0,
                "customData":"{'myCmsRecordKey':'000', 'myCmsRecordType':'image gallery'}",
                "publishedFrom":"Fri, 2 Sep 2016 GMT",
                "publishedTo":"Fri, 9 Sep 2016 GMT",
                "updateUser":"john.doe",
                "deviceId":"www.website.com - webclient",
                "operationContextTypeCode":2
            }
        
    

Returned data

The returned operation data message contains the following information.

field name type mandatory description
id string yes the cloud identifier
dbCode string [1 - 20] yes the code of the database where you want to index your marker
name string[1 - 50] yes name of the marker
width float yes width of the marker in scene unit
customData string [1 - 8000] yes custom data thet you would like to linked to your marker
publishedFrom date yes publish GMT date of your marker. Before that date your marker will not be available for cloud recognition.
publishedTo date yes last publish GMT date of your marker. After that date your marker will not be available for cloud recognition.
status integer yes NotSet = 0,
ToProcess = 1,
Processing = 2,
Enable = 3,
Failed = 4
recognitionRating integer no rating of the marker for recognition purposes
trackingRating integer no rating of the marker for tracking purposes
views integer yes total number of online successfull recognition of this marker
updateDate date yes last marker update date
updateUser string [1 - 50] yes last marker update user
deviceId string [1 - 50] no the device id or website url that call the ws api
operationContextTypeCode integer yes UnKnown = 1,
WebApplication = 2,
AndroidApp = 3,
iOSApp = 4,
WindowsPhoneApp = 5

JSON Returned data example

        
        {
            "id":"2_405",
            "dbCode":"test",
            "name":"my marker name",
            "width":1.0,
            "customData":"{'myCmsRecordKey':'000', 'myCmsRecordType':'image gallery'}",
            "publishedFrom":"2016-09-02T00:00:00Z",
            "publishedTo":"2016-09-09T00:00:00Z",
            "status":2,
            "recognitionRating":7,
            "trackingRating":9,
            "views": 20,
            "updateUser":"john.doe",
            "updateDate":"2016-09-02T14:53:25.6731575+00:00",
            "deviceId":"www.website.com - webclient",
            "operationContextTypeCode":2
        }