Error 1002

Error 1002

I'm trying to insert a customer but when I send the XML is always giving the following error.


  1. <Response status="0">
    <Code>1002</Code>
    <Message>ID Inválida foi passada</Message>
    </Response>



I had already done this test before and was not giving this error, can anyone help?


Sample Code


  1. <?php
    $xml = '<?xml version="1.0" encoding="iso-8859-1"?>
    <Customer>
        <Name>Sample Customer</Name>   
        <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>Need to remind him of payments</Notes>
    </Customer>';

    ?>

    <form method='post' action='https://invoice.zoho.com/api/view/customers/create'>
    <input type='text' name='apikey' value='codigonumber'>
    <input type='text' name='ticket' value='ticketnumber'>
    <input type='text' name='XMLString' value='<?=$xml?>'>
    <input type='submit' name='submit' value='submit'>
    </form>