While Iam posting the records to sales Order throw API iam facing an issue with address like "{"Please ensure that the billing_address has less than 100 characters."
but our Project customer is having the address with 100 + characters . So May i know any alternate solution to this.
var newsalesorderinfo = new Salesorder()
{
customer_id = contactInfo.contact_id, // got the details from Contact API
line_items = item.Item_id, //ot the details from Item API
reference_number = shopperOrder.PaymentTransactionNumberDisplay,
date = order.CreatedDate.ToString("yyyy-MM-dd"),
adjustment = 10.00,
notes = shopperOrder.Order.OrderNote,
//shipment_date = order.ModifiedDate == null ? null : order.ModifiedDate.ToString("yyyy-MM-dd"),
discount_amount = shopperOrder.DiscountAmount,
shipping_charge = shopperOrder.Order.ShippingAmount,
total = shopperOrder.TotalAmount,
sub_total = shopperOrder.SubTotalAmount,
is_discount_before_tax = true,
discount_type = "entity_level",
billing_address = unitOfWork.CommerceContext.OrderAddressBooks.Where(x => x.Id == shopperOrder.Order.ShippingAddressID)
.Select(sa => new SellersCommerce.ViewModels.ZOHO.Address
{
address = sa.AddressName,
ContactPerson = !string.IsNullOrEmpty(sa.ContactPerson) ? sa.ContactPerson : "",
phone = sa.PhoneNumber,
fax = !string.IsNullOrEmpty(sa.FaxNumber) ? sa.FaxNumber : "",
email = sa.Email,
street_address1 = sa.AddressLine1,
street_address2 = !string.IsNullOrEmpty(sa.AddressLine2) ? sa.AddressLine2 : "",
zip = sa.ZipCode,
city = sa.City,
state = sa.StateCode,
country = sa.CountryCode
}).FirstOrDefault(),
}
Iam hitting the API of POST Sales order . Can you help me out from this.