Sample Code For createOrUpdate server method?

Options

Is there any sample PHP code available for the createOrUpdate server method that could be use to help create a user registration form on a page hosted outside of Convio?

Tagged:

Comments

  • Take a look at the PHP sample code Convio has provided for the Create method:

    The create and createOrUpdate methods are almost identical in usage, the difference being that createOrUpdate provides for matching based on consID, Member Id or email, whereas Create requires primary email to create the record. Other than that, the operation is nearly identical. The response values will vary based on what operational mode is used. If you're only providing email address into the API, then the consID and memberID matching capability is irrelevent. You'll need to handle the response codes for both create and update depending on whether a record was created or modified based on the email matching result.

    However, by and large, the PHP code for the create method should get you started. Just change:

    'method' => 'create',

    to:

    'method' => 'createOrUpdate'

    everything else can stay the same... of course you'll need to change these to suit your instance:

    $site_id='customer';

    $url = "https://secure2.convio.net/$site_id/site/SRConsAPI";

  • What happened to the link to that code? The new redesigned site doesn't show a lot of the basics and the Featured Examples aren't going to reveal their PHP code to you. Are there any sample PHP pages on the site still?

  • Marc :

    What happened to the link to that code? The new redesigned site doesn't show a lot of the basics and the Featured Examples aren't going to reveal their PHP code to you. Are there any sample PHP pages on the site still?

    Links to these samples were deactivated during the site redesign, I have re-activated them. In future, examples such as these will be posted directly to this community site.

Categories