open FSharp.Data.JsonExtensions
open Newtonsoft.Json.Linq
"CompletedDate":"2021-04-12T10:13:13.436Z",
"ItemId":"dd4520bb-aa0a-...",
"OrganizationId":"cac43a32-1f08-...",
"MaterialId": "cac43a32-1f08-..",
"labels" : ["A1", "A2", "A3"]
"MaterialId": "cac43333-1f08-",
"labels" : ["B1", "B2", "B3"]
"CompletedDate":"2021-04-12T10:13:14.436Z",
"ItemId":"dd4520bb-aa0a-www",
"OrganizationId":"cac43a32-1f08-www",
"MaterialId": "cad43a32-1f08-yy",
"labels" : ["A3", "A4", "A5"]
"MaterialId": "ced43333-1f08-yyy",
"labels" : ["B1", "B8", "B0"]
CompletedDate : Nullable<DateTime>
OrganizationName : string
Quantity : Nullable<decimal>
let jsonObject = JObject.Parse(apiResponse)
jsonObject.["data"].["Shipments"].["Data"].Children()
|> Seq.map (fun jtok -> jtok.ToObject<ApiTypes>())