API Endpoints

[//]: <> (TODO: Add retrieve/list)

Update school member

Endpoint: https://yourschool.pathwright.com/api/public/member/{integration}/{external_id}/

Allowed Methods: POST, PUT, PATCH

Allows school members with an external integration specified to be updated based on external attributes.

Currently, this endpoint only allows updating of user and user profile information.

URL Parameters

  • integration: One of external, saml2. Specifies the type of integration that we should use to look up the school member to update:

    • external: Generic external integration. Look up by an external ID on the school member that has been already set via the link school member API.
    • saml2: SAML2 integrations for a user are automatically created whenever a user logs into an SAML2-enabled school. This allows the identity provider to update a school member’s attributes with Pathwright as they are changed externally. This integration uses the SAML2 “nameid” to uniquely identify a user.
  • external_id: A unique ID for the member based the integration specified.

Arguments

  • id: The user’s unique ID for their Pathwright account.
  • first_name: The user’s first name.
  • last_name: The user’s last name.
  • email: The user’s email address. Note that this cannot be updated for users that are not integrated with an SSO service, as updating this field could leave a user unable to login.
  • profile:

    • salutation: Optional. The user’s salutation. Choices: 'Mr.', 'Mrs.', 'Ms.', 'Dr.', 'Fr.', 'Professor', 'Rev.', 'Rabbi'
    • bio: Optional. A short biography about the user.
    • location: Optional. The user’s location.
    • phone_number: Optional. The user’s phone number.
  • membership:

    • membership_type: Denotes a user’s permission level in the school. Choices: admin, pathwright, student. Note that pathwright denotes a school-level course editor.
  • links: Read-only. Use the links APIs to create and remove links.

    • id: A unique ID for the user’s external link.
    • link_type: Denotes whether this is a link by external ID or another type of link. Values: external, saml2
    • external_id: The external ID identifying this relationship. For SAML2, this is the user’s NameID as provided by the identity provider.
    • lastexternalupdate: The datetime of the last update to this user based on an external link. Note that an update is made to the user on each SSO login.

Returns

Returns the updated school member.

Example Output

{
  "id": 12345,
  "first_name": "Test",
  "last_name": "Student",
  "email": "test@example.com",
  "profile": {
    "salutation": "Mr.",
    "bio": "A short biographical piece!",
    "location": "Greenville, SC",
    "phone_number": "8645550123"
  },
  "membership": {
    "membership_type": "admin"
  },
  "links": [
    {
      "id": 123,
      "link_type": "saml2",
      "external_id": "some_account@gsuite.example.com",
      "last_external_update": "2017-10-09T21:36:40.707776Z"
    }
  ]
}