How can I use source codes with the Donation API

Options

The following question came our way from a client today and I thought I'd share it with the community.

"We're doing Donations API work for a client and they have been using source codes. In reviewing the Donations API call, I'm not seeing a field for transmitting the source information. Does source coding work with the API, and if so how is it handled?"

I'll provide the answer in reply

Tagged:

Comments

  • And here's the answer (Thanks Jeff)

    Source codes are handled exactly the same as with the Donations2 forms. The s_src and s_subsrc HTTP parameters work the same, either in the API URL or as form fields. For readability, all APIs also map "source" and "sub_source" to the same parameters (so if you pass both "s_src" and "source", "source" overrides "s_src").

  • tommy Spann:

    And here's the answer (Thanks Jeff)

    Source codes are handled exactly the same as with the Donations2 forms. The s_src and s_subsrc HTTP parameters work the same, either in the API URL or as form fields. For readability, all APIs also map "source" and "sub_source" to the same parameters (so if you pass both "s_src" and "source", "source" overrides "s_src").

    Is the "source" => "s_src" mapping true in Convio globally?

  • Michael :

    Is the "source" => "s_src" mapping true in Convio globally?

    It is true in all of the official API's, meaning everything documented on the site, but not for other Convio URL's that you might use in an API-ish way.

  • JeffMills :

    It is true in all of the official API's, meaning everything documented on the site, but not for other Convio URL's that you might use in an API-ish way.

    Ah, so it's an API-specific thing. I was thinking for a minute that I wouldn't have to worry as much duing our GetActive to Convio migration about the source coded links (we use them profusely). In GA, the convention is "source=" for both transaction and member source values (although Convio has no real coorelary to the GetActive member source yet)

  • JeffMills :

    It is true in all of the official API's, meaning everything documented on the site, but not for other Convio URL's that you might use in an API-ish way.

    I happened to be researching this a little bit and noticed that the API documents do not carry any mention of a sub-source parameter, and the source parameter is listed as "source" rather than "s_src"

    Seems to me that if "source" is an alias for the convio-preferred paramater of s_src, then the documentation should indicate s_src and s_subsrc instead, then, as a footnote mention source will work as well...

    Then depricate "source" and provide a phase out schedule for it since it's really not the best idea (aka it can be very confusing) to have two different parameters that do the same thing. Especially when everywhere else it's s_src...

    Anyway... just a suggestion.

    (this refers to the most recently released document, version 6.0)

    -mike

Categories