processRegistrationRequest Additional Question Date Format

Options
Just in case anybody else gets to do this, I'm posting this solution I found.


I was writing an API app to submit TeamRaiser registrations. The client wanted an additional question for the one participation type for an "event date" for each participant. The results of getRegistrationDocument offers no clues about date formats and I couldn't find an example anywhere. When submitting CRTeamraiserAPI?method=processRegistration, it is vital to format the XML registration_document properly.


I experimented a bit and found that for Additional Questions associated with a participation type which questions are of type Date Value, the API will accept a four digit year, upadded month, and unpadded day. A functional result for February 3, 2021 looked like this:

<question>
<id>16848</id>
<type>PARTICIPATION_TYPE</type>
<response>2021-2-3</response>
</question>

Tagged:

Categories