Boxtech icon indicating copy to clipboard operation
Boxtech copied to clipboard

Endpoint for Owner ID

Open 1linux opened this issue 9 years ago • 5 comments

It would be nice to have an endpoint to get the cleartext name of an owners´s ID.

1linux avatar Jan 02 '17 08:01 1linux

Hi Helmut, thanks for your inpu. Would you like to elaborate by describing your preferred scenario or use case for this requirement ?

AltiusRupert avatar Jan 02 '17 15:01 AltiusRupert

#poke

BernierSFCloud avatar Dec 13 '17 11:12 BernierSFCloud

don't know if it will help you. but if you get the content as a string (like here ) you can use this code to get every values from the endpoint separated:

            //  Ask if the container is found in dataBase
            if (bicData.ReasonPhrase == "OK")
            {
                //  Get content as string
                var containerDataString = await bicData.Content.ReadAsStringAsync();

                //  Get a list of JObjects out of the content string
                IEnumerable<JObject> objs = JsonConvert.DeserializeObject<List<JObject>>(containerDataString);

                //  Select the first JObject of the list
                JObject containerDataJObject = objs.FirstOrDefault();

                //  Assign values as string
                var tareKg  = containerDataJObject["tare_kg"].Value<string>();
                var tareLb  = containerDataJObject["tare_lbs"].Value<string>();
                var netKg   = containerDataJObject["max_payload_kg"].Value<string>();
                var netLb   = containerDataJObject["max_payload_lbs"].Value<string>();
                var maxKg   = containerDataJObject["max_gross_mass_kg"].Value<string>();
                var maxLb   = containerDataJObject["max_gross_mass_lbs"].Value<string>();
                var cubicM  = containerDataJObject["cubic_capacity_cbm"].Value<string>();
                var cubicFt = containerDataJObject["cubic_capacity_cuft"].Value<string>();
                
               // And so on...
            }

You get the full list of objects in the Swagger example.

ThorstenBruegge avatar Aug 02 '18 10:08 ThorstenBruegge

Thanks Thorsten. Clearly, that's the idea and a quick way to deserialize the JSON container data.

@1linux , what is your use case to retrive the ownerId of the container ? Are you looking for information about the uploader ? The company which owns the container ? Other ?

AltiusRupert avatar Aug 06 '18 13:08 AltiusRupert

@1linux im closing this issue due to the time, but if you need help please open a new issue and we will support you with this, the data you want is in the API.

bic-boxtech avatar Jun 07 '19 09:06 bic-boxtech