Synergy API doesn't always return expected data (ListContactsResponse)

Issue #2 wontfix
Archibald Thurston created an issue

For whatever reason I have some domains in the wholesale account (com.au/.net.au/.id.au) that don't appear to have the minimum required contact info attached to them. Strangely enough I can't update one of the missing fields in Synergy's web portal without it giving me errors about the other missing fields so no idea how we can have names with such missing info... I think these names may have been from transfers that we processed in "by hand" using their web interface if it matters.

SynergyWholesale\Exception\BadDataException Object
(
    [command:protected] => listContacts
    [response:protected] => stdClass Object
        (
            [status] => OK
            [errorMessage] => Domain contacts retrieved
            [registrant] => stdClass Object
                (
                    [firstname] => Jarrod
                    [lastname] => Linahan
                    [suburb] => Somewhere
                    [country] => AU
                    [email] => jarrod@example.com
                )

            [tech] => stdClass Object
                (
                    [firstname] => Jarrod
                    [lastname] => Linahan
                    [suburb] => Somewhere
                    [country] => AU
                    [email] => jarrod@example.com
                )

        )

    [message:protected] => Expected property [registrant->address1] missing from response data

Sorry to be annoying, but my git/PHP skills aren't up to par, and I've no idea how to run the PHPUnit tests 😿

https://bitbucket.org/texh/synergy-wholesale/commits/cd3816292789ca5b293b13c60b193308cf3d0382 This has gotten me past these errors, but I guess will destroy their usefulness for validating data when submitting it to the Synergy API.

At the end of the day I guess there's a few things that can be done.. I go through and fix up these names by hand using their web portal and pray contact data doesn't disappear again in the future, or relax the validation that ListContactsResponse is doing..

As .au transfers are free and I have a few nobody will notice me potentially breaking, I'd be interested in seeing if this is a transfer related bug and moving a few names out and back into Synergy after the contact info has been entered correctly and see if it disappears again.

Comments (4)

  1. Simon Hampel repo owner
    • changed status to open

    Ahh yes, this is a bug in the SynergyWholesale system for imported domains - I came across this as well.

    Will post more about this later - but in short, the best solution is to fix the data using the updateContact call, because the data being returned is actually invalid (and "illegal" for domain contact information). I'm not inclined to code around what is a system bug rather than an API bug.

    Will post more later.

  2. Archibald Thurston reporter

    Nice to see it wasn't just me going crazy.. I sent a message to their people asking if this was a result of transfer and have sent my .id.au out and waiting for it to transfer back in to see if it's actually the case.

    Happy enough to go through and fix up the data manually and try to wrap my call in something that checks for this scenario somehow.. I suppose I can just pull out what was returned with $theException->getResponse() and do something useful with that.

  3. Simon Hampel repo owner

    I struggled with this initially - but came to the conclusion that there was simply no valid way to cater for the incomplete information being returned from the Synergy Wholesale API. Indeed, it wasn't the API's fault - it is as you identified, a bug in their import process which results in missing data. Certain imported domains simply lose all the contact details.

    I transferred over 500 domains into my account and the majority of them had invalid contact details (indeed they go against all the ICANN rules), and some of them had pretty much no contact information at all.

    Given that this is against the rules for domain names, I decided not to try and code around it - the data is invalid and must be fixed.

    I ended up writing a CLI script to exercise the API which let me quickly identify domains with missing or invalid contact details and easily update them in bulk - solved the problem for me once and for all.

  4. Simon Hampel repo owner

    given that the API is returning invalid data (it should not be possible to have domains with incomplete contact details), I'm not going to work around this - the correct course of action is to fix the invalid or missing contact data.

  5. Log in to comment