Invoice API: The server encountered an unexpected condition which prevented it from fulfilling the request.
Hi,
I am trying to create a customer in zoho invoice using the API. I am calling the posturl function from zoho creator.
I am using the same example as given in the API documentation
my call is as follows:
ResponseMapVariable = postUrl("http://invoice.zoho.com/api/customers/create/apikey=[APIKEY]&ticket=" + Ticket, MapVariable,false);
I get the following error:
RESPONSE CODE: 500 RESPONSE TEXT: The server encountered an unexpected condition which prevented it from fulfilling the request.
Please help ASAP.
the XMLString has the same XML data as given in the API documentation:
<Customer> <Name>Sample Customer</Name> <!-- Mandatory --> <PaymentsDue>0</PaymentsDue> <CurrencyCode>CNY</CurrencyCode> <BillingAddress>B-1104, 11F, Horizon International Tower, No. 6, ZhiChun Road, HaiDian District,</BillingAddress> <BillingCity>Beijing</BillingCity> <BillingZip>100088</BillingZip> <BillingCountry>China</BillingCountry> <BillingFax>+86-10-82637827</BillingFax> <ShippingAddress>4900 Hopyard Rd, Suit 310</ShippingAddress> <ShippingCity>Pleasanton</ShippingCity> <ShippingState>CA</ShippingState> <ShippingZip>94588</ShippingZip> <ShippingCountry>USA</ShippingCountry> <ShippingFax>+1-925-924-9600</ShippingFax> <Contacts> <Contact> <Salutation>Mr.</Salutation> <FirstName>John</FirstName> <LastName>Smith</LastName> <EMail>johnsmith@flaster.com</EMail> <Phone>+1-925-921-9201</Phone> <Mobile>+1-4054439562</Mobile> </Contact> <Contact> <Salutation>Ms.</Salutation> <FirstName>Shawla</FirstName> <LastName>Malkonni</LastName> <EMail>shawla@flaster.com</EMail> <Phone>+1-925-921-9111</Phone> <Mobile>+1-4054528653</Mobile> </Contact> </Contacts> <CustomFields> <CustomFieldLabel1>VAT ID</CustomFieldLabel1> <CustomFieldValue1>756399371</CustomFieldValue1> <CustomFieldLabel2>Reg.ID</CustomFieldLabel2> <CustomFieldValue2>673856</CustomFieldValue2> <CustomFieldLabel3>Website</CustomFieldLabel3> <CustomFieldValue3>www.zoho.com</CustomFieldValue3> </CustomFields> <Notes>Customer Notes</Notes>
</Customer> I get the same error if I try to create an invoice using posturl as well.
Thanks a lot