Skip to main content
PATCH
/
student
/
{id}
Python (SDK)
from datetime import date
from meitner import Meitner, models
import os


with Meitner(
    security=models.Security(
        client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
        client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
    ),
) as m_client:

    res = m_client.students.update(id="123e4567-e89b-12d3-a456-426614174000", identity_number="20191216-1234", first_name="Lise", last_name="Meitner", external={
        "source_id": "12345678",
    }, gender="Female", identity_temporary=True, date_of_birth=date.fromisoformat("2019-12-16"), address={
        "postal_address": "Dalvägen 14",
        "postal_code": "169 56",
        "postal_city": "Solna",
        "country_code": "SWE",
        "municipality_code": "0184",
    }, email_address1="[email protected]", email_address2="[email protected]", phone_number1="+46701234567", phone_number2="example")

    # Handle response
    print(res)
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "meta": {
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
    "updatedAt": "2024-01-15T14:45:00Z",
    "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
  },
  "external": {
    "sourceID": "12345678",
    "source": "ExternalIntegrationAPI"
  },
  "gender": "Female",
  "identityNumber": "20191216-1234",
  "identityTemporary": true,
  "firstName": "Lise",
  "lastName": "Meitner",
  "dateOfBirth": "2019-12-16",
  "address": {
    "postalAddress": "Dalvägen 14",
    "postalCode": "169 56",
    "postalCity": "Solna",
    "countryCode": "SWE",
    "municipalityCode": "0184"
  },
  "emailAddress1": "[email protected]",
  "emailAddress2": "[email protected]",
  "phoneNumber1": "+46701234567",
  "phoneNumber2": "example"
}

Authorizations

Client-ID
string
header
required
Client-Secret
string
header
required

Path Parameters

id
string<uuid>
required

The unique identifier of the Student to update

Body

application/json

Request body

identityNumber
string
required

The identity number of the student, must be unique within the organization.

firstName
string
required

The first name of the student

lastName
string
required

The last name of the student

external
object

ExternalRequest is the External-object used on Update and Create operations, since it should only be allowed to set SourceID for the student, the Source-field is not included.

Example:
{ "sourceID": "12345678" }
gender
enum<string>

The gender of the student

Available options:
Female,
Male,
Other
Example:

"Female"

identityTemporary
boolean
default:false

If the identity number is temporary for the student

dateOfBirth
string<date> | null

The date of birth of the student

address
object

The address of the student

Example:
{
"postalAddress": "Dalvägen 14",
"postalCode": "169 56",
"postalCity": "Solna",
"countryCode": "SWE",
"municipalityCode": "0184"
}
emailAddress1
string | null

The primary email address of the student, will be used for communication with the student from the system and must be unique within the organization. Can be used to login to the system if password-authentication is enabled for the organization.

emailAddress2
string | null

The secondary email address of the student, will not be used within the system, but will be displayed for contact information.

phoneNumber1
string | null

The primary phone number of the student, will be used for communication with the student from the system.

phoneNumber2
string | null

The secondary phone number of the student, will not be used within the system, but will be displayed for contact information.

Response

Response for Student Update operation - returns the updated Student

Student holds the personal information about a student, information about the school is stored in the StudentPlacement-resource.

id
string<uuid>
required

Unique identifier for the Student

identityNumber
string
required

The identity number of the student, must be unique within the organization.

firstName
string
required

The first name of the student

lastName
string
required

The last name of the student

meta
object

Metadata information for the Student

Example:
{
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
}
external
object

External is a reusable object that can be used to store external information about the student from another system, used for third-party integration tracking.

Example:
{
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
}
gender
enum<string>

The gender of the student

Available options:
Female,
Male,
Other
Example:

"Female"

identityTemporary
boolean
default:false

If the identity number is temporary for the student

dateOfBirth
string<date> | null

The date of birth of the student

address
object

The address of the student

Example:
{
"postalAddress": "Dalvägen 14",
"postalCode": "169 56",
"postalCity": "Solna",
"countryCode": "SWE",
"municipalityCode": "0184"
}
emailAddress1
string | null

The primary email address of the student, will be used for communication with the student from the system and must be unique within the organization. Can be used to login to the system if password-authentication is enabled for the organization.

emailAddress2
string | null

The secondary email address of the student, will not be used within the system, but will be displayed for contact information.

phoneNumber1
string | null

The primary phone number of the student, will be used for communication with the student from the system.

phoneNumber2
string | null

The secondary phone number of the student, will not be used within the system, but will be displayed for contact information.