HomeGuidesAPI ReferenceChangelogDiscussions
GuidesAPI ReferenceDiscussions


Ask a Question
Back to All

Error while creating document on a specific loan with a file and related metadata

URL: https://api.beta.blendlabs.com/documents
Error Message: {"trackingId":"76b73d32-5308-4511-b731-591ca155f3d9","error":"Invalid request. Validation error occurred at field value.","display":"Please provide a valid value. (76b73d32-5308-4511-b731-591ca155f3d9)"}

Client Code:

public bool PostDocument(string loanId, string data)
//For testing
loanId = "XXXXXXX-7071-4FFC-AFA5-E457XXXXX"; // Blend Loan GUID
data = "";//PDF base 64 data
string requestParams = $"documents";
var metaData = new metadata
loanId = loanId,
type = "other-disclosures"
var jsonRequest = JsonConvert.SerializeObject(new PostDocumentRequest
metadata = metaData,
data = data
client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "multipart/related;");
var response = client.PostAsync(requestParams,
(HttpContent)new StringContent(jsonRequest, Encoding.UTF8, "application/json"));

            HttpResponseMessage res = response.Result;

            if (!res.IsSuccessStatusCode)
                var loanResponse = res.Content.ReadAsStringAsync();

            return res.IsSuccessStatusCode;
        catch (Exception ex)

            throw ex;