General API

Onboarding and Authentication

The following will need to be sent to SWIMS in order to onboard a vendor. The Vendor Form below is not needed for testing the SWIMS Vendor API but it will need to be completed before a vendor is given production access.
  1. Vendor Form:
  2. Vendors
    • SWIMS will provide the following, which will be sent with each event to ensure the security of our event endpoint:
      • ClientCertificate.pfx
      • Client Certificate Password
      • Client will then need to be installed on your server.
  3. Club ID to test with: this should be a club you already have access to via the legacy API. New vendors will be given a random test club.
  4. Vendors are able to send or provide a Club Registration Link, provided by USAS and can be appended with the vendor’s chosen query parameters. This link is retrieved through the following endpoint:
    /club/generateregistrationlink

Subscription to Events.

We will provide the ability for a vendor to “subscribe” to certain events that happen in SWIMS.

  1. Vendors using events will also need to provide:
    • The URL where we will send the events
    • Optional: Vendors will create a certificate and provide to SWIMS the following, which will be sent with each event to ensure the security of our event endpoint:
      • ClientCertificate.pfx
      • Client Certificate Password

Authentication

Authentication (Creating a Root Certificate)
Authentication (Creating a Server Certificate)
Authentication (Adding Swims Certificate to the Server)

Member Events

Member Registers
Member Renewal
Member Updated
Member Upgrade
Member Merges
Member Transfer From Club
Member Transfer To Club
Member Cancels
Member Registration and Renewal Generated when a member registers in SWIMS via the OMR

Event:(example)

{
	"eventSequence": 1234,
	"eventType": "Member Registration Complete",
	"clubId": "EFD6F74613444017B0DB1884AADBC117",
	"modifiedDatetime: "2022-09-13T22:52:28.882Z",
	"eventData": {
		"vendorId": "DB1884AADBC117",
		"memberId": "string"
}
}
After receiving the above event.
  1. 1:
     GET: /swims/getMemberDetails/{clubId}/?memberId={memberId}&lastModified={lastModfied}
  1. 2: IF: new member, add member data to the roster,
  1. 3: IF: renewing member, update member data in the roster
Updated, Upgraded Generated when a member is updated within SWIMS

Event:(example)

{
	"eventSequence": 1234,
	"eventType": "Member Updated",
	"clubId": "EFD6F74613444017B0DB1884AADBC117",
	"modifiedDatetime: "2022-09-13T22:52:28.882Z",
	"eventData": {
		"memberId": "string"
}
}
After receiving the above event.
  1. 1:
     GET: /swims/getMemberDetails/{clubId}/?memberId={memberId}
  1. 2: Update member data in the roster
Member Merge Generated when two Member IDs are merged within SWIMS

Event:(example)

{
	"eventSequence": 1234,
	"eventType": "Member Merge",
	"clubId": "1500B689DCAA42BD9484618C634DDEF0",
	"modifiedDatetime: "2022-09-13T22:52:28.882Z",
	"eventData": {
		"oldClubId":"1500B689DCAA42BD9484618C634DDEF0",
		"oldMemberId":"B71E543DBAB6BE",
		"newClubId":"6C5D210FBE0549C3A9F269E07A411E95",
		"newMemberId":"7F5564C5585A97"
}
}
After receiving the above event.
  1. 1:
     GET: /swims/getMemberDetails/{clubId}/?memberId={memberId}
  1. 2: IF: Member Merge is within the same club, one event if you are the vendor of the club.
  1. 3: IF: Member Merge is across clubs and you are the vendor for the source club, one event if you are not the vendor for the destination club
  1. 4: IF: Member Merge is across clubs and you are the vendor for the destination club, one event if you are not the vendor for the source club
  1. 5: IF: Member Merge is across clubs, two events if you are the vendor for the source club and you are the vendor for the destination club. Ignore second event
Member Transfers

A special set of events happens when a member transfers clubs.

  1. In SWIMS the transfer is initiated from the Member Details Page by clicking the: Iitiate Transfer link.
  2. Then the new club is entered, as well as other transfer data that is needed.
  3. This creates 2 new events.
    • Member Transfer From Club Event This is received by the club that the member is transferring out of.
    • Member Transfer To Club Event This is received by the club that the member is transferring into.
    • Note: the Vendor Software will only receive both events if both clubs are activated for the vendor.
  4. Similar to the Member Registration Event, the Vendor Software will need to do the following.
    • The vendor will need to reconcile the member data in their system.
    • IF: the member is not found in the vendor’s system.
      • THEN: create the member in their system.
      IF: the member is already in the vendor’s system.
      • THEN: update the member in their system, and preform any club transfer procedures in the vendor’s system.
      • In both cases, the vendor will call:
      • GET: /swims/getMemberDetails/{clubId}/?memberId={memberId}
Member Cancels

The Member Cancels Events will inform the vendor that the member cancelled from the club associated with the vendor.

Member Transfers

Club Events

Club Activates Vendor
Club Deactivates Vendor
Club Activates/Deactivates a vendor in SWIMS Generated when a club selects and a approves a vendor in SWIMS

Event:(example)

{
	"eventSequence": "002",
	"eventType": "Member Updated",
	"clubId": "EFD6F74613444017B0DB1884AADBC117",
	"modifiedDatetime: "2022-09-13T22:52:28.882Z",
	"eventData": {
		"clubId": "string"
}
}
After receiving the above event.
  1. 1: Get a list of clubs for a vendor
  1. 2:
     GET: /swims/getVendorClubs/vendor
  1. 3: For all new clubs, add members to the club roster
  1. 4:
     GET: /swims/getMemberDetails/club/{clubId}
  1. 5: Populate tables with a complete club roster

SWIMS Terms

competitionCategory:
Stated as male or female for the purpose of athlete swimming eligibility, competition, selection and records. An athlete's stated competition category shall be referred to as "gender."
contactRelationship:
Denotes the relationship between the member and their primary contact.
emailAddress:
Denotes a valid email address.
isUsCitizen:
Denotes whether or not the member is a US Citizen.
memberships:
Denotes which offering instances (e.g. Coach, Official, Premium Athlete, etc.) are included in a registration.
phoneType:
Denotes which type of phone has been entered (cell, home, or work).
athleteOfferingsOptIn:
Denotes a club’s decision to use the Club Bulk Renewal tool for athlete renewals. When true, clubs handle all athlete renewals. When false, athletes handle their own renewals.
nonAthleteOfferingsOptIn:
Denotes a club’s decision to use the Club Bulk Renewal tool for non-athlete renewals. When true, clubs handle all non-athlete renewals. When false, non-athletes handle their own renewals.
memberId:
New randomly-generated 14 alphanumeric ID that will be a member’s unique identifier
oldUsasId :
Old USA Swimming 14 character ID using first name, middle initial, last name, and birthdate
firstName:
The first name of a Member as listed in SWIMS
preferredName:
The name of a Member that the member would prefer to be called as listed in SWIMS
middleName:
The middle name of a Member as listed in SWIMS
lastName:
The last name of a Member as listed in SWIMS
suffix:
The suffix will follow the member’s full name and provide additional information about the member. This information includes generational designations, such as Sr. or Jr., but will also denote education or honors, such as Esq. or Ph.D.
maidenName:
The maiden name of a Member as listed in SWIMS
birthDate:
The date of birth of a Member as listed in SWIMS
competitionCategory:
New terminology used for Gender
contactInformation / primaryContactInfo:
A Member’s primary contact (Guardian/Emergency Contact depending on age) listed in SWIMS
contactFirstName:
The first name of a Member’s primary contact (Guardian/Emergency Contact depending on age) listed in SWIMS
contactLastName:
The last name of a Member’s primary contact (Guardian/Emergency Contact depending on age) listed in SWIMS
contactEmail:
The email address of a Member’s primary contact (Guardian/Emergency Contact depending on age) listed in SWIMS
contactPhone:
The phone number of a Member’s primary contact (Guardian/Emergency Contact depending on age) listed in SWIMS
registrationDate:
The date of a member registration
expirationDate:
The date that a member’s registration expires. This date is inclusive, meaning that the member’s registration is in good standing through that date.
offeringId:
The ID of the registration type
registrationId:
This is an internal Primary Key (PK) reference to the registration
registrationType:
Descriptor for the registration type
registrationTypeId:
This is a reference to the type of registration that occurred (Coach, Premium Athlete, Flex, etc.)
transactionType:
Registration, Upgrade, or Cancel
usasFee:
USA Swimming’s membership fee. For Upgrades, this field will show the delta between original USAS Fee and the upgraded membership USAS Fee.
lscFee:
The member’s Local Swimming Committee membership fee. For Upgrades, this field will show the delta between original LSC Fee and the upgraded membership LSC Fee.
lscCode:
The alphabetic code that identifies the LSC (eg. CO, AZ, AD, etc.).
isRenewal:
Is the registration for an existing member or a new member
isAttached:
Refers to if the member is attached to a club at that moment in time, there are x days between when a member is a member of a club and when they transfer clubs.
attachedDate:
The date they attach to a club and officially become a member
memberGoodStandingExpirationDate:
The date that a member is no longer “In Good Standing”. This date is inclusive, meaning that the member is in good standing through that date.
In Good Standing:
Used to describe all member requirements by registration type are met. For example, an 18+ year old athlete must complete Athlete Protection Training to be a “Member in Good Standing”
clubId:
Alphanumeric ID that is a club’s unique identifier
clubCode:
A Globally Unique Identifier (GUID) that represents the club
clubName:
The name of the club.
vendorId:
Alphanumeric ID that is a vendor’s unique identifier
vendorRecordId:
A value that the vendors send to USAS so they can better track members registrations
Upgrade:
When a member upgrades their membership, their initial membership will expire (expiration date is set to yesterday). There will be a new registration record with a registration date of today and an expiration date of the end of the season.

Event Terms

eventSequence:
A calculated value that is distinct by vendor to define the sequence in which events occur
eventTypeId:
This is an internal Primary Key (PK) reference to the event Type
eventType:
The name of the event that occurred (ie, Member Updated, etc.)
eventData:
A stringified JSON object that contains different data depending on the event