Skip to content

POST /contact: Make Birthday field optional #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

a-v25
Copy link
Contributor

@a-v25 a-v25 commented Jun 11, 2024

Description:
Update the endpoint to POST new contacts making a Birthday field optional.

  • Update the endpoint to RAML
  • Implemented the API in teamseasons.xml
  • Updated Postman collection: GET /teamSeasons
  • Included RAML change in Exchange (branch 4.0.1)

RAML Link:
Will be included in RAML 4.0.1 #222

RAML Specification:

/contacts: 
  post:
    displayName: Register Student
    description: Creates a new student (Contact->recordType=SCORES Student) in the America SCORES Salesforce database
    body:
      application/json:
        description: payload should be new Contact with values filled out from registration form
        type: types.Contact
    responses:
      200:
        description: Successful Registration
        body:
          application/json:
            example:
              ContactId: abc123
      400:
        body:
          application/json:
            example:
              message: Error in registration
types.Contact
Contact:
    type: object
    description: Salesforce Contact Object
    properties:
      Id:
        type: SalesforceUniqueId
        required: false
      ContactType:
        type: string
        enum: [ "SCORES Student"]
        required: false
      ContactRecordType: 
        type: string
        required: false
      FirstName:
        type: string
      MiddleName:
        type: string
        required: false
      LastName:
        type: string
      SchoolName:
        type: string
        required: false
      SchoolSiteId:
        type: SalesforceUniqueId
        required: false 
      PersonalEmail:
        type: string
        required: false
      HomePhone:
        type: string
        required: false
      Birthdate:
        type: date-only
        required: false
      Gender: 
        type: string
        required: false
      Grade:
        type: string
        required: false
      K12GradeLevel:
        type: string
        required: false
      Ethnicity: 
        type: string
        required: false
      ReducedPriceLunch:
        type: string
        required: false
      Allergies: 
        type: string
        required: false
      PermissiontoCommuteAlone:
        type: string
        required: false
      ExternalStudentId:
        type: string
        required: false
      ExternalStudentIdSource:
        type: string
        required: false
      ParentFName:
        type: string
        required: false
      ParentLName:
        type: string
        required: false
      ParentEmail:
        type: string
        required: false
      Relationship:
        type: string
        required: false
      ParentPhone1:
        type: string
        required: false
      ParentPhone2:
        type: string
        required: false
      ParentPhone3:
        type: string
        required: false
      MailingStreet:
        type: string
        required: false
      MailingCity:
        type: string
        required: false
      MailingState:
        type: string
        required: false
      MailingZip:
        type: number
        required: false
      MailingCountry:
        type: string
        required: false
      ParentEnglishFluency:
        type: string
        required: false
      ParentHomeLang:
        type: string
        required: false
      OtherLang:
        type: string
        required: false
      Volunteer:
        type: string
        required: false
      Emergency_Contact_Name:
        type: string
        required: false
      Emergency_Contact_Relationship:
        type: string
        required: false
      Emergency_Contact_Phone1:
        type: string
        required: false
      Emergency_Contact_Phone2:
        type: string
        required: false
      Emergency_Contact_Phone3:
        type: string   
        required: false 
      Emergency_Contact_Permission_to_Pickup_child:
        type: string
        required: false
      Second_Emergency_Contact_Name:
        type: string
        required: false
      Second_Emergency_Contact_Relationship:
        type: string
        required: false
      Second_Emergency_Contact_Phone1:
        type: string
        required: false
      Second_Emergency_Contact_Phone2:
        type: string
        required: false
      Second_Emergency_Contact_Phone3:
        type: string
        required: false 
      Second_Emergency_Contact_Permission_to_Pickup_child:
        type: string
        required: false
      LiabilityWaiver:
         type: boolean
         required: false
      DataReleaseWaiver:
       type: boolean
       required: false
      MediaReleaseWaiver:
       type: boolean
       required: false

Test examples:
POST {{base_url}}/contacts

{
  "FirstName": "Birthday",
  "LastName": "Test",
  "SchoolSiteId": "0015000002HvvVwAAJ"
}

OR

{
  "FirstName": "Birthday",
  "LastName": "Test",
  "Birthdate": "2024-06-11",
  "SchoolSiteId": "0015000002HvvVwAAJ"
}

Screenshots of tests:
image
image
image
image

@a-v25 a-v25 requested a review from CritiqalPete June 11, 2024 12:56
@a-v25 a-v25 linked an issue Jun 11, 2024 that may be closed by this pull request
@CritiqalPete CritiqalPete added enhancement New feature or request Critical/Blocking blocking a release or development Web-Registration-Requirement labels Jun 12, 2024
Copy link
Member

@CritiqalPete CritiqalPete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. Please merge.

@a-v25 a-v25 merged commit 23ef358 into master Jun 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical/Blocking blocking a release or development enhancement New feature or request Web-Registration-Requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

POST /contact: Make "Birthdate" optional
3 participants