public long?AddPurchaseOrder(long salesAgentId, PurchaseOrderCreateRequestContract reqContract)
        {
            var row = new Dictionary <string, Datum>();

            row.Add("11", new Datum()
            {
                Value = salesAgentId
            });
            row.Add("14", new Datum()
            {
                Value = reqContract.CustomerRecordId
            });

            var postRequest = new PostRequestModel(_dbId);

            postRequest.FieldsToReturn = new List <long>()
            {
                3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18
            };
            postRequest.Data.Add(row);

            var result = PostRequest <PostRequestModel, PostResponseModel>("/v1/records", postRequest);

            if (result.Data.Any())
            {
                return((long)result.Data.First()["3"].Value);
            }

            return(null);
        }
 public Task <PurchaseOrderContract> Create(PurchaseOrderCreateRequestContract req, string accessToken) => PostAsync <PurchaseOrderContract>(ServerEndpoint.PurchaseOrderCreate, req, null, accessToken);