EdShare API

Documentation was generated on 2026-08-21T15:50:03.259Z

Table of contents

Http endpoints

admin

archive

audit

auth

bankid

booking

bookings

comment-bank

contract

contract-status

customer

decision

decision_year

edshare-admin

huvudman

invoice

me

metadata

notification

order

organisation

organiser

planning

pubcontract

pubcontract-template

receipts

report

reporting

request

schoolyears

staff

student

student-import

user

validate

written-reports

Service endpoints

audit-service

auth-service

bank-id-service

fruster-web-bus

mail-service

ox-archive-service

ox-invoice-service

ox-notification-service

ox-order-service

ox-organisation-service

ox-planning-service

ox-report-service

ox-reporting-service

ox-request-service

ox-student-service

ox-user-service

pub

report-service

schedule-service

user-service

Http endpoints

admin


DELETE to /admin/user/:id

from ox-fruster-user-service.eaf0ecb1

Deletes a user. Response has status code 200 if successful. pub.user-service.user-deleted is published after deletion


GET to /admin/user

from ox-fruster-user-service.eaf0ecb1

Gets users. Response has status code 200 if successful. Note that any query params will be used as a mongo query.


GET to /admin/user/:id

from ox-fruster-user-service.eaf0ecb1

Gets user by id. Response has status code 200 if successful.


POST to /admin/user

from ox-fruster-user-service.eaf0ecb1

Creates a fruster user. Must include a few base fields but can contain any number of custom fields. Response has status code 201 if successful. Automatically splits data between user and profile if configured to.


PUT to /admin/user/:id

from ox-fruster-user-service.eaf0ecb1

Updates a user. Can contain any number of custom fields. Response has status code 200 if successful.

archive


GET to /archive/bookings

from ox-archive-service.ef89a66f

GET to /archive/orders

from ox-archive-service.ef89a66f

Get/search orders


GET to /archive/orders/buyers

from ox-archive-service.ef89a66f

Get buyer organisations


GET to /archive/orders/sellers

from ox-archive-service.ef89a66f

Get seller organisations

audit


GET to /audit/:userId

from ox-audit-service.cf7a6ebe

Gets audit logs for a specific user. The result is sorted on timestamp. Supports pagination.

auth


* to /auth/logout

from ox-auth-service.aa11f682

Will return a Set-Cookie to instruct browser to expire any existing cookie and delete the session of the token (from cookie or Authorization Bearer-header) from the database. Should be used by both Token and Cookie.

Note: When using the query param logoutId the id is obtained from GET to /auth/active-sessions which can only be done by the logged in user.


GET to /auth/active-sessions

from ox-auth-service.aa11f682

Gets all active sesssions for the logged in user, typically to be used to list sessions similar to something like google or facebook with the ability to logout any session:

Image should be here: please report missing image 😬

Will return all values as null (expect for id) if user hasn't been active since the session details functionality was implemented (sometime around 2020-06-11).



POST to /auth/app

from ox-auth-service.aa11f682 | Note: Use POST to /auth/token instead

POST to /auth/cookie

from ox-auth-service.aa11f682

Login for web applications. Logs in with username and password and return JWT in Set-Cookie header. Returns user data in the response body, same as user-service.get-users-by-query with expand: "profile" but for the logged in user.


POST to /auth/disable-tfa/sms

from ox-auth-service.aa11f682

Disables Two Factor Authentication via SMS for the user. Will remove the sms from the user's two factor authentication methods.


POST to /auth/enable-tfa/sms

from ox-auth-service.aa11f682

Enables Two Factor Authentication via SMS for the user. Will send a SMS to the provided phone number with a code that the user needs to input to enable TFA. The code is valid for 10 minutes.


POST to /auth/refresh

from ox-auth-service.aa11f682

Gets a fresh access token by providing a refresh token.


POST to /auth/token

from ox-auth-service.aa11f682

Login for non web devices such as native mobile apps. Returns an access token to be used as bearer authentication. Response body also contains profile which has the same data as user-service.get-users-by-query with expand: "profile" but for the logged in user.


POST to /auth/verify-tfa/sms

from ox-auth-service.aa11f682

Verifies the Two Factor Authentication code sent to the user via SMS. Will return a Set-Cookie with the new session token if the code is correct. The code is valid for 10 minutes.


POST to /auth/web

from ox-auth-service.aa11f682 | Note: Use POST to /auth/cookie instead

bankid


GET to /bankid/collect/:type/:orderRef

from ox-bankid-service.401a329c

Collects status and returns qr code. Returns status 202 while order is pending, and status 200 when complete, along with completionData


POST to /bankid/auth

from ox-bankid-service.401a329c

Initiates a BankID login. Will return details so client can either autostart bankid application or render a qr code which will be scanned from other device running BankID application.


POST to /bankid/sign

from ox-bankid-service.401a329c

Initiates a BankID sign order. Will return details so client can either autostart bankid application or render a qr code which will be scanned from other device running BankID application.

booking


DELETE to /booking/:bookingId

from ox-order-service.5b755234

Deletes a booking if it hasn't been confirmed, cancels it if it has been. Returns empty object if deleted, otherwise the booking with the new status of CANCELLED.


GET to /booking

from ox-order-service.5b755234

Gets bookings for an organisation or an order. user has to be part of either the organisation of the bookings (query organisationId) or the organisation of the order (query orderId)


GET to /booking/:bookingId

from ox-order-service.5b755234

Gets a booking by its id. Logged in user can be part of the organisation that created the order or the organisation that created the booking.


GET to /booking/organisation/:organisationId

from ox-order-service.5b755234

For getting confirmed bookings for current school year as a manager for decision making


POST to /booking/:bookingId/decline

from ox-order-service.5b755234

Declines a booking. User has to have correct permission and be part of the organisation of the orders of the booking of the inputted id


POST to /booking/confirm

from ox-order-service.5b755234

Confirms one or more bookings. User has to have correct permission and be part of the organisation of the orders of the bookings of the inputted ids


PUT to /booking/:bookingId

from ox-order-service.5b755234

Updates a booking. Allows adding and removing students from booking. Must follow the same rules as when booking order.

bookings


GET to /bookings/organisations/organiser/:number

from ox-order-service.5b755234

Get organisations for given organisations, will return organisations only have booking for current school year and if bookings are confirmed/non studyguidance and distance learning

comment-bank


DELETE to /comment-bank/:id

from ox-reporting-service.938e5e6a

Hard-deletes a comment bank entry.


GET to /comment-bank

from ox-reporting-service.938e5e6a

Lists comment bank entries; supports optional filtering used by the admin overview.


GET to /comment-bank/for-order/:orderId

from ox-reporting-service.938e5e6a

Returns all comment bank entries compatible with the given order, each annotated with a match score. Sorted by score desc, then updatedAt desc.


POST to /comment-bank

from ox-reporting-service.938e5e6a

Creates a new comment bank entry. Internal admin only.


PUT to /comment-bank/:id

from ox-reporting-service.938e5e6a

Updates the comment text of an existing entry. Selectors cannot be modified.

contract


GET to /contract

from ox-organisation-service.d55cc5d0

Get contracts


GET to /contract/:contractId/pdf

from ox-organisation-service.d55cc5d0

Get the pdf of the contract


GET to /contract/booking/:id

from ox-organisation-service.d55cc5d0

Check whether a contract exist between buying and selling organisers for current school year

contract-status


POST to /contract-status

from ox-organisation-service.d55cc5d0

Receive contract status updates from one flow webhook

customer


GET to /customer

from ox-order-service.5b755234

Gets all customers for organisation from bookings


GET to /customer/:customerId

from ox-order-service.5b755234

Get a customer by id

decision


GET to /decision

from ox-order-service.5b755234

Get decisions for given school year grouped by organiser


GET to /decision/:id

from ox-order-service.5b755234

Gets a downloadable file for decision by id


POST to /decision/collect

from ox-order-service.5b755234

To be polled by frontend after initializing signing. Returns qr-code and status 202 while signing is not complete, status 200 when complete


POST to /decision/organisation/:id

from ox-order-service.5b755234

Creates a decision for current confirmed bookings with learning type distance learning, not study guidance. All bookings for current school year have to be included or not included (a decision has to be made), it is not permitted to omit confirmed bookings. The creation of a descicion triggers a bankId signing. Only if signed can the decision be accessed/downloaded.

decision_year


GET to /decision_year

from ox-order-service.5b755234

Get academic years for the decisions

edshare-admin


DELETE to /edshare-admin/user/deactivated

from ox-user-service.c7a1cd4f

Deletes deactivated users and students. Will hard delete students and anonymize other users.


GET to /edshare-admin/user/deactivated

from ox-user-service.c7a1cd4f

Get list of deactivates users which are up for deletion.


POST to /edshare-admin/login-as-manager/:userId

from ox-user-service.c7a1cd4f

Logs in as inputted manager user.


POST to /edshare-admin/login-as/:userId

from ox-user-service.c7a1cd4f

Logs in as inputted user.


POST to /edshare-admin/logout-as

from ox-user-service.c7a1cd4f

POST to /edshare-admin/logout-as-manager/:userId

from ox-user-service.c7a1cd4f

huvudman


GET to /huvudman

from ox-organisation-service.d55cc5d0

Lists all organisers (huvudmän) with their pub-contract template/signing status. Admin only.


GET to /huvudman/:organisationNumber

from ox-organisation-service.d55cc5d0

Returns the pub-contract templates (with signing status) for a single organiser. Admin only.

invoice


DELETE to /invoice/batch/:id

from ox-invoice-service.0f274f9e

Deletes an invoice batch. This can have serious implications!!


GET to /invoice/batch

from ox-invoice-service.0f274f9e

Gets previously invoice batches


GET to /invoice/batch/:batchId/receipt/:bookingId

from ox-invoice-service.0f274f9e

Get receipt for a booking/invoice row


GET to /invoice/batch/:id

from ox-invoice-service.0f274f9e

Gets a batch by id


GET to /invoice/batch/:id/export

from ox-invoice-service.0f274f9e

Exports invoice batch. Currently supports jeeves. Returns file as ZIP.


POST to /invoice/batch/:id/submit

from ox-invoice-service.0f274f9e

Submits and saves an invoice batch. Makes it readonly after that


POST to /invoice/generate-batch

from ox-invoice-service.0f274f9e

In progress. Generates a new batch of invoices, everything that has happened up until to is included

me


GET to /me

from ox-fruster-user-service.eaf0ecb1

Returns the logged in user's user details

notification


GET to /notification

from ox-notification-service.d42b8820

Gets description by type


POST to /notification/read

from ox-notification-service.d42b8820

Marks one or more notifications as read for the logged in user.

order


DELETE to /order/:id

from ox-order-service.5b755234

Deletes an order if it has no bookings, cancels it if it has bookings. Returns empty object if deleted, otherwise the order with the new status of CANCELLED.


GET to /order

from ox-order-service.5b755234

Gets orders. To get orders for a specific organisation the user must be logged in and have the correct permissions (order.get and order.get.teacher to get orders for a teacher). Note: Getting orders for teachers' pagination isn't working 100% at the moment (and is not currently used anyway)


GET to /order/:id

from ox-order-service.5b755234

Gets order by id. Published orders are possible to get as logged out, for any other status the user has to be logged in, have the correct permissions (order.get) and be part of the organisation of the order. Response is either OrderViewModel which is the same response as POST to /order or DraftOrderViewModel which is the same response as POST to /order/draft


GET to /order/:orderId/eligible-participants

from ox-order-service.5b755234

Returns the students eligible to appear in a report for the given order at the given moment at. A booking contributes students only if it is currently CONFIRMED and its statusUpdates contain a Confirmed entry at or before at. Per booking, the students returned are those whose studentMemberships window was open at at (half-open semantics). Caller must have the order's organisation as their currently selected organisation AND either be the order's current TEACHER, a TEACHER who was teaching the order at at (per teacherMemberships), a HEADMASTER, or a SCHOOL_ADMIN. Internal admins must impersonate one of those roles to access this endpoint.


GET to /order/attendance-participants/:lectureId

from ox-order-service.5b755234

Returns the students eligible to appear in an attendance report for the given lecture. A booking contributes students only if it is currently CONFIRMED and its statusUpdates contain a Confirmed entry at or before the lecture start time. For each eligible booking, the returned students are those whose studentMemberships window was open at the lecture start time (half-open semantics). For study-guidance orders, the booking must also have the lecture's id in its bookedDates, otherwise no students are contributed.


GET to /order/booking/:id

from ox-order-service.5b755234

Gets order by a booking id (key "id", not "bookingId". The user must be part of the organisation of the order. Booking is included in response. Response is either OrderViewModel which is the same response as POST to /order or DraftOrderViewModel which is the same response as POST to /order/draft, however, it only includes data relevant to the booking (e.g. dates that are booked by that booking)


GET to /order/count

from ox-order-service.5b755234

Gets the total number of orders and bookings that has first lecture between two dates


GET to /order/lecture/:id

from ox-order-service.5b755234

Gets a lecture by id. Logged in user has to be in the same organisation as the order of the lecture (or admin).


GET to /order/lecture/student

from ox-order-service.5b755234

GET to /order/lecture/teacher

from ox-order-service.5b755234

GET to /order/lectures

from ox-order-service.5b755234

Gets lectures for a teacher within a certain time frame. Requires permissions order.get.teacher if used with teacherId query


POST to /order

from ox-order-service.5b755234

Creates a new order. If a draft is published, the data of that order has to be sent to this endpoint, including its id


POST to /order/:orderId/book

from ox-order-service.5b755234

Books the order of the inputted order id.

  • You cannot book an order you have created (the organisation)

  • You cannot book an you have already booked (the organisation)

  • Order has to have status PUBLISHED

  • All participants have to be in the organisation

  • All participants grade must match the grade of the order

  • The order has to have available slots

  • The booking must not have more participants than available slots

  • The booking must not have more participants than the order's maxParticipants participants

  • If order type is study guidance, the booking must not have less particpants than the order's minParticipants

  • If order type is study guidance, the booking must not include dates booked other organisations


POST to /order/draft

from ox-order-service.5b755234

Creates a new order as draft. Upserts order so it can be used with the id of a previous draft to update it. This means the whole order has to be in the request body when updating.


POST to /order/linguista/interest

from ox-order-service.5b755234

Allows a user to user to request competence from linguista, sends an email with the inputted data.


PUT to /order/:id

from ox-order-service.5b755234

Updates an order. Requires additional permission order.update.all to update everything, or order.update.lectureSpecifics to be able to update lectureSpecifics


PUT to /order/lectures/cancel

from ox-order-service.5b755234

Cancel one or more lectures by ids.


PUT to /order/lectures/revert_cancel

from ox-order-service.5b755234

Revert lecture cancelation

organisation


GET to /organisation

from ox-organisation-service.d55cc5d0

Gets organisations


GET to /organisation/:id

from ox-organisation-service.d55cc5d0

Gets organisation by id.


GET to /organisation/active-orders

from ox-organisation-service.d55cc5d0

Gets organisations with active orders


GET to /organisation/pubcontract

from ox-organisation-service.d55cc5d0

Get a signed pub-contract pdf for the user's current organisation. Pass contractId to download a specific addendum; otherwise the root contract is returned. If manager/admin, organisationId should be supplied


POST to /organisation

from ox-organisation-service.d55cc5d0

Creates an organisation


POST to /organisation/:id/set-no-planning-request

from ox-organisation-service.d55cc5d0

Set no estimated planning request needs for an organisation


POST to /organisation/:id/toggle-book-order

from ox-organisation-service.d55cc5d0

Toggles book order functionality for an organisation


POST to /organisation/:id/toggle-create-order

from ox-organisation-service.d55cc5d0

Toggles create order functionality for an organisation


POST to /organisation/:id/toggle-written-reports

from ox-organisation-service.d55cc5d0

Toggles written reports (skriftliga omdömen) opt-out for an organisation. When opting out, all existing written reports for the organisation are deleted.


PUT to /organisation/:id

from ox-organisation-service.d55cc5d0

Updates organisation by id.

organiser


GET to /organiser/details

from ox-organisation-service.d55cc5d0

Get organisations grouped by organiser for loggedin manager


GET to /organiser/details/:organisationNumber

from ox-organisation-service.d55cc5d0

Get organiser details for given organisation number

planning


DELETE to /planning/:id

from ox-planning-service.fdbdad6f

Delete a planning request as headmaster/Admin.


GET to /planning/organisation

from ox-planning-service.fdbdad6f

GET to /planning/organisation/:id

from ox-planning-service.fdbdad6f

POST to /planning

from ox-planning-service.fdbdad6f

Create a planning request as headmaster that manager can later approve.


POST to /planning/publish

from ox-planning-service.fdbdad6f

Create a new publish entry for organiser's organisations


PUT to /planning/:id

from ox-planning-service.fdbdad6f

Update a planning request as headmaster. If status is INITIAL or NOAPPROVALNEEDED, only the previouslyPerformedBy field will be updated


PUT to /planning/:id/move

from ox-planning-service.fdbdad6f

Moves a planning request to current school year. Will also reset status to INITIAL or NOAPPROVALNEEDED


PUT to /planning/draft

from ox-planning-service.fdbdad6f

Update request statuses - used by manager to save a "draft" status before publishing

pubcontract


POST to /pubcontract

from ox-organisation-service.d55cc5d0

Initiates signing of a pub-contract (root or addendum) from a template, creating and sending it to Oneflow

pubcontract-template


DELETE to /pubcontract-template/:id

from ox-organisation-service.d55cc5d0

Removes a pub-contract template. Only allowed while signing has not been initiated.


GET to /pubcontract-template/defaults

from ox-organisation-service.d55cc5d0

Returns the config default values used by the 'Fyll i standardvärden' button and as fallback for root templates


POST to /pubcontract-template

from ox-organisation-service.d55cc5d0

Creates and publishes a pub-contract template (root or addendum) for an organiser

receipts


GET to /receipts/:id

from ox-archive-service.ef89a66f

Get a pdf receipt


GET to /receipts/booking/:id

from ox-archive-service.ef89a66f

Get a list of receipts for specified booking

report


GET to /report/attendance

from ox-report-service.85ab1700

Generates an attendance report for all students within timeframe. Rows are driven by booking studentMemberships (a student appears once they have ever been assigned to a confirmed booking on the order). Lectures with no eligible student are dropped from the date columns. Cells outside a student's membership window render as 'Elev ej tilldelad detta datum'; reported dates render their attendance value; un-reported in-window dates render 'Inväntar Rapportering'.


GET to /report/cancellation

from ox-report-service.85ab1700

Generates an booking cancellation report for the selling headmaster for a given time period


GET to /report/cancellation/admin

from ox-report-service.85ab1700

Generates an booking cancellation report for the admin for a given time period


GET to /report/combined-students

from ox-report-service.85ab1700

Generates report of combined students


GET to /report/economy

from ox-report-service.85ab1700

Generates an invoice report for the bookings of orders for the logged in user's (current) organisation for a specified timeframe


GET to /report/grade

from ox-report-service.85ab1700

Generates a grade report for all students within timeframe. Rows are driven by booking studentMemberships (a student appears once they have ever been assigned to a confirmed booking on the order). Date axis comes from the order's configured reports.grade dates intersected with the timeframe (legacy boolean true falls back to order lecture dates; false/missing skips the order). One row per (eligible student × date). 'Ej rapporterad' is rendered when the student is in their membership window but no grade has been reported yet.


GET to /report/grade/admin

from ox-report-service.85ab1700

Generates a grade report for all students within timeframe


GET to /report/invoice

from ox-report-service.85ab1700

Generates an invoice report for the bookings of orders for the logged in user's (current) organisation for a specified timeframe


GET to /report/knowledge-follow-up

from ox-report-service.85ab1700

Generates a knowledge follow-up report for all students within timeframe. Rows are driven by booking studentMemberships (a student appears once they have ever been assigned to a confirmed booking on the order). Date columns come from the order's configured reports.knowledgeFollowUp dates intersected with the timeframe. Study-guidance orders are excluded — knowledge follow-up is not applicable for them. Cells outside a student's membership window render as 'Ej tilldelad'; reported dates render the knowledge-follow-up value; in-window unreported dates render 'Inväntar Rapportering'.


GET to /report/my-booking

from ox-report-service.85ab1700

Generates report containing information about booking in given organisation.


GET to /report/order-economy

from ox-report-service.85ab1700

Generates an order report for admin for all organisations for a given timeframe


GET to /report/planning

from ox-report-service.85ab1700

Generates an planning report as headmaster or manager


GET to /report/planning/admin

from ox-report-service.85ab1700

Generates a planning report as an admin


GET to /report/published-order

from ox-report-service.85ab1700

Generates report containing information about orders in given organisation.


GET to /report/remote-learning

from ox-report-service.85ab1700

Generates a report of the number of remote learning hours that are performed within the schools of an organiser (huvudman), per buying organiser


GET to /report/user

from ox-report-service.85ab1700

Generates a user report for all users within timeframe


GET to /report/written-report-status

from ox-report-service.85ab1700

Generates an Excel report of written-report status for the selling organisation (headmaster / school-admin). One row per student, written-report date and order, for the current school year up to today + WRITTENREPORTDAYS_VISIBLE days.

reporting


DELETE to /reporting/pre-registered-absence/lecture/:lectureId

from ox-reporting-service.938e5e6a

Deletes a pre registered absence for a student for a lecture


GET to /reporting

from ox-reporting-service.938e5e6a

Gets completed reports for a teacher. Is only possible to get the reports created by the logged in user atm.


GET to /reporting/:reportId

from ox-reporting-service.938e5e6a

Gets a report by id. Only current teacher on order that report is for can get it


GET to /reporting/completed-grouped

from ox-reporting-service.938e5e6a

Gets a teacher's completed reports grouped by order. Includes completed attendance, knowledge follow-up, grade reports, and written report dates where the teacher has completed all entries. Groups are sorted by most recently completed date.


GET to /reporting/pre-registered-absence/lecture/:lectureId

from ox-reporting-service.938e5e6a

Gets pre-registered absence for a lecture


GET to /reporting/sign/status/:orderRef

from ox-reporting-service.938e5e6a

Gets the status of the inputted pending signing. As long as signing (auth) is not completed, qrImage is returned in response. To be polled by the client for grade report w/ status COMPLETED, so that it knows when to do the create/update step. Returns status 200 if user has authenticated using bankid, 202 if user has not. Returns 404 BANKID_ERROR if something goes wrong during bankid authentication, pending signing is then deleted.


GET to /reporting/to-do

from ox-reporting-service.938e5e6a

Gets a teacher's reports to do (new reports to do based off current date vs reports' dates in order & incomplete reports). Item in response will include id, reportDetails etc. if it's an incomplete report


GET to /reporting/to-do-grouped

from ox-reporting-service.938e5e6a

Gets a teacher's reports to do grouped by order. Each group contains all pending reports for that order (attendance, knowledge follow-up, grade, and written reports), sorted by date ascending. Groups are sorted by oldest pending report date.


GET to /reporting/visual-student-report

from ox-reporting-service.938e5e6a

Generates a report with students in the danger zone. This is based on reports done by teachers of orders the students are part of. Students only appear on this list if they have been absent from a lecture or knowledge follow up F or NO_GRADE. If a student has been absent from three lectures in a row it will be tagged with a flag indicating this. Sorts result by weighing the differnet fields returned in the data such as the tendency, absence, knowledge follow up and missed lectures warning.


POST to /reporting

from ox-reporting-service.938e5e6a

Creates a report with one or more types. Grade reports cannot be created along side other reports. The other types can be combined, e.g. ATTENDANCE and KNOWLEDGEFOLLOWUP.


POST to /reporting/pre-registered-absence/lecture/:lectureId

from ox-reporting-service.938e5e6a

Adds pre registered absence for a students for a lecture


POST to /reporting/pre-registered-absence/student/:studentId

from ox-reporting-service.938e5e6a

Adds pre registered absence for a student for a lecture


POST to /reporting/sign

from ox-reporting-service.938e5e6a

Starts signing by starting bankid login for provided personal number. Saves a pending signing in the database, returns that signing. This is needed to be able to finish the grade report creation w/ status COMPLETED. Pending signing has to be finished within 120s


PUT to /reporting/:reportId

from ox-reporting-service.938e5e6a

Updates a report

request


DELETE to /request/:id

from ox-request-service.66a875a5

deletes a request


GET to /request

from ox-request-service.66a875a5

GET to /request/counts

from ox-request-service.66a875a5

Get requests count by category


POST to /request

from ox-request-service.66a875a5

Creates a request for a specific order type


PUT to /request/:id/handling-started

from ox-request-service.66a875a5

Either sets handlingStarted, or removes it. Only users in organisation that set handlingStarted can remove it. If handlingStarted is set, it cannot be changed without being removed first

schoolyears


DELETE to /schoolyears/:schoolYear/orders

from ox-order-service.5b755234

Deletes all orders and bookings in a school year


GET to /schoolyears

from ox-archive-service.ef89a66f

Get school years

staff


GET to /staff/absence

from ox-order-service.5b755234

student


GET to /student

from ox-student-service.ea7cf389

Gets students of an organisation.


GET to /student/:id

from ox-student-service.ea7cf389

POST to /student

from ox-student-service.ea7cf389

creates a student for an organisation


POST to /student/batchUpdate

from ox-student-service.ea7cf389

Updates several students at once. Calling user must be member of all the students organisation The students returned will be in same order as those sent in


POST to /student/import

from ox-student-service.ea7cf389

Create students by importing students


PUT to /student/:id

from ox-student-service.ea7cf389

updates a student


PUT to /student/:id/deactivate

from ox-student-service.ea7cf389

deactivate a student


PUT to /student/:id/reactivate

from ox-student-service.ea7cf389

reactivate a deactivated student

student-import


POST to /student-import

from ox-student-service.ea7cf389 | Note: use POST to /student/import instead

user


GET to /user

from ox-user-service.c7a1cd4f

Gets the logged in user with its currently selected organisation as user.currentOrganisation


GET to /user/headmaster

from ox-user-service.c7a1cd4f

Gets list of headmasters as edshare admin. Sorted by headmasters' name


GET to /user/headmaster/:id

from ox-user-service.c7a1cd4f

Gets headmaster by id as Edshare admin


GET to /user/headmaster/status/:orderRef

from ox-user-service.c7a1cd4f

Gets the stauts of the current pending registration. To be polled by the client so that it knows when to do the finish step. Returns status 200 if user has authenticated using bankid, 202 if user has not. Returns 404 BANKID_ERROR if something goes wrong during bankid authentication, pending registration is then deleted.


GET to /user/manager

from ox-user-service.c7a1cd4f

Gets list of managers as edshare admin. Sorted by managers' name


GET to /user/manager/:id

from ox-user-service.c7a1cd4f

Gets manager by id as Edshare admin


GET to /user/staff

from ox-user-service.c7a1cd4f

Gets staff members for the inputted organisation


GET to /user/staff/:id

from ox-user-service.c7a1cd4f

Gets staff member by id


POST to /user/:userId/login-as

from ox-user-service.c7a1cd4f

Logs in as inputted teacher user, in the current organisation


POST to /user/:userId/logout-as

from ox-user-service.c7a1cd4f

POST to /user/batch-update

from ox-user-service.c7a1cd4f

Update batch users.


POST to /user/headmaster

from ox-user-service.c7a1cd4f

Finishes a headmaster account. Must have been started by the http.post.user.start endpoint and authenticated by the user via bankid before it can be called. Requires the request body to include the details from the pending registration initiated by that endpoint. Returns a Set-Cookie header for the new account.


POST to /user/manager

from ox-user-service.c7a1cd4f

Finishes a manager account. Must have been started by the http.post.user.start endpoint and authenticated by the user via bankid before it can be called. Requires the request body to include the details from the pending registration initiated by that endpoint. Returns a Set-Cookie header for the new account.


POST to /user/resend-verification/:email

from ox-fruster-user-service.eaf0ecb1

Generates a new email verification token and resends email w/ token to the provided user. Response has status code 200 if successful.


POST to /user/staff

from ox-user-service.c7a1cd4f

Creates a staff member (teacher/school admin). Sets status to INVITED. Sends invitation mail to the added member.


POST to /user/staff-import

from ox-user-service.c7a1cd4f

Imports a list of staff members as teachers. Sets status to INVITED. Sends invitation mail to the added member.


POST to /user/staff/activate

from ox-user-service.c7a1cd4f

Activate a teacher. Logged in user can only active itself


POST to /user/start

from ox-user-service.c7a1cd4f

Starts registration by starting bankid login for provided personal number. Saves a pending registration in the database, returns that registration. This is needed to be able to finish the account creation. Pending registration has to be finished within 120s


POST to /user/verify/:tokenId

from ox-fruster-user-service.eaf0ecb1

Verifies a user's email address by providing a token sent to the user by email. Response has status code 200 if successful.


PUT to /user

from ox-user-service.c7a1cd4f

Updates the logged in user. The output is the the updated user, it may vary depending on its role


PUT to /user/:userId/activate

from ox-user-service.c7a1cd4f

Activate a user


PUT to /user/current-organisation

from ox-user-service.c7a1cd4f

Updates the user's current organisation value


PUT to /user/current-role

from ox-user-service.c7a1cd4f

Updates the user's current role value


PUT to /user/organisations

from ox-user-service.c7a1cd4f

Used to add or remove existing organisations to an existing headmaster or manager.


PUT to /user/staff

from ox-user-service.c7a1cd4f

Updates teacher's profile.


PUT to /user/update-password

from ox-fruster-user-service.eaf0ecb1

Updates password of auth user's account. Requires to validation of old password before new can be set. Response has status code 202 if successful.

validate


GET to /validate/:organisationCode

from ox-organisation-service.d55cc5d0

Check if the given organisation is already has a account in edshare

written-reports


GET to /written-reports

from ox-reporting-service.938e5e6a

Gets written report dates with summary counts for the logged-in user


GET to /written-reports/:dateId

from ox-reporting-service.938e5e6a

Gets written reports for a specific date and order, merged with all students from confirmed bookings


GET to /written-reports/pdf

from ox-reporting-service.938e5e6a

Generates a PDF of PUBLISHED written reports for the current school year. For buying headmasters/admins this is every report addressed to the requesting organisation (with intro page). For teachers it is the reports on their own orders in the currently selected selling organisation (no intro page, student's organisation shown). Returns the PDF binary; the gateway streams it to the browser as application/pdf.


PUT to /written-reports/:dateId/student/:studentId

from ox-reporting-service.938e5e6a

Creates or updates a written report draft for a student on a specific date


PUT to /written-reports/:dateId/student/:studentId/review

from ox-reporting-service.938e5e6a

Reviews a written report (publish, ignore, send back to draft, or un-ignore)


PUT to /written-reports/:dateId/student/:studentId/send-for-review

from ox-reporting-service.938e5e6a

Sends a written report draft for review by the principal

Ws endpoints

out


ws.out.:userId.>

from ox-api-gateway.395ed887

Sends a message to a client (user) via websocket, if such connection exists. The message is sent to a userId with a label (in place of the >). If sent to ws.out.e3bcf884-8b49-46ae-8546-8dcc65b56932.new-notification (The label being new-notification) the user will receive the message in the handler registered to new-notification. Can be used to send a global message to all connected users by providing a * as userId. To specify a list of users to send to * is used as userId and req.to is set to an array of userIds.

public


ws.out.public.>

from ox-api-gateway.395ed887

Sends a message to all connected users. Public and non public connections. The > is the label for the message being sent. E.g. ws.out.public.psa (Where the label is psa). This endpoint will make it possible for the public clients to subscribe to the endpoint without knowing their assigned uuid.

Service endpoints

audit-service

|

audit-service.audit-log

from ox-audit-service.cf7a6ebe

Creates an audit log entry for a user.


audit-service.delete-audit-logs-by-query

from ox-audit-service.cf7a6ebe

Deletes audit logs by query. Used for GDPR cleanup and user data removal. Supports dryRun mode to preview deletions.


audit-service.get-audit-log-by-query

from ox-audit-service.cf7a6ebe

Gets audit logs by query. The result is sorted on timestamp. Supports pagination.

auth-service

|

auth-service.decode-token

from ox-auth-service.aa11f682

Decodes a jwt token.



auth-service.generate-jwt-token-for-user.cookie

from ox-auth-service.aa11f682

Generates a web JWT token for a user matching the inputted Mongo query. Used for external logins.


auth-service.generate-jwt-token-for-user.token

from ox-auth-service.aa11f682

Generates a web JWT token for a user matching the inputted Mongo query. Used for external logins.



auth-service.get-session-details-by-user-id

from ox-auth-service.aa11f682

Gets session details for a user. Will return all values as null if user hasn't been active since the session details functionality was implemented (sometime around 2020-06-11).


auth-service.logout-users-by-id

from ox-auth-service.aa11f682

Logs out a list of users. Does not matter if user is logged in via cookie or token.


auth-service.refresh-token

from ox-auth-service.aa11f682

Gets a fresh access token by providing a refresh token.

bank-id-service

|

bank-id-service.auth

from ox-bankid-service.401a329c

Internal service endpoint used to initiate a BankID login. Note that since 1st May 2024 BankID requires autostart token or qr instead of personal number.


bank-id-service.collect

from ox-bankid-service.401a329c

Collects status and returns qr code. Returns status 202 while order is pending, and status 200 when complete, along with completionData


bank-id-service.sign

from ox-bankid-service.401a329c

Internal service endpoint used to initiate a BankID login. Note that since 1st May 2024 BankID requires autostart token or qr instead of personal number.

fruster-web-bus

|

fruster-web-bus.unregister-client

from ox-api-gateway.395ed887

Request to (forcefully) unregister (a) websocket client. Can be done by either providing the jwt-token to unregister one connection or the id of the user to unregister all connections for user.

mail-service

|

mail-service.send

from ox-mail-service.62cdfc61 | Note: Use mail-service.send-mail instead

mail-service.send-mail

from ox-mail-service.62cdfc61

Sends a mail to one or more mails (emails) addresses

ox-archive-service

|

ox-archive-service.archive-school-year

from ox-archive-service.ef89a66f

Set school year as archived.


ox-archive-service.generate-booking-receipt

from ox-archive-service.ef89a66f

Generates a pdf receipt for booking, and saves it in database


ox-archive-service.get-bookings-by-query

from ox-archive-service.ef89a66f

Gets bookings by query


ox-archive-service.get-orders-by-query

from ox-archive-service.ef89a66f

Gets orders by query


ox-archive-service.render-pdf

from ox-archive-service.ef89a66f

Renders the supplied HTML to a PDF (A4) and returns it as a base64-encoded string.

ox-invoice-service

|

ox-invoice-service.delete-participants

from ox-invoice-service.0f274f9e

Removes participants by id from all bookings. Is primarily used when cleaning up after deletion of deactivated students.

ox-notification-service

|

ox-notification-service.create-notification

from ox-notification-service.d42b8820

Creates a notification for either order, booking or request


ox-notification-service.delete-notifications

from ox-notification-service.d42b8820

Deletes notifications by query. E.g. to be used when removing orders, bookings and requests (where unread notifications can still be fetched)

ox-order-service

|

ox-order-service.delete-participants

from ox-order-service.5b755234

Removes participants by id from all bookings. Is primarily used when cleaning up after deletion of deactivated students.


ox-order-service.find-bookings-by-query

from ox-order-service.5b755234

Gets bookings by query


ox-order-service.find-orders-by-query

from ox-order-service.5b755234

Gets orders by query


ox-order-service.generate-booking-receipts

from ox-order-service.5b755234

Generate receipts for all bookings


ox-order-service.get-bookings-by-query

from ox-order-service.5b755234 | Note: User ox-order-service.find-bookings-by-query for getting bookings without expanded data and without pagination

Gets bookings query. Supports standard query params in request body.


ox-order-service.get-orders-by-query

from ox-order-service.5b755234 | Note: User ox-order-service.find-orders-by-query for getting orders without expanded data and without pagination

Gets orders by query



ox-order-service.remove-participant

from ox-order-service.5b755234

Removes a participant from all bookings and adds them to removedParticipants


ox-order-service.revert-delete-orders-and-bookings

from ox-order-service.5b755234

Can be used to revert a gallring, in case issues occur


ox-order-service.set-orders-hidden

from ox-order-service.5b755234

Sets the orders' of an organisation's hidden value to the inputted value. Ultimately hiding them from the marketplace.

ox-organisation-service

|

ox-organisation-service.create-contract

from ox-organisation-service.d55cc5d0

Creates a contract between two organisers and sends it to oneflow for signing.


ox-organisation-service.create-organisation

from ox-organisation-service.d55cc5d0

Creates an organisation


ox-organisation-service.get-contract-by-bookingids

from ox-organisation-service.d55cc5d0

Send contract status between buying and selling organisers for current school year


ox-organisation-service.get-organisation-by-id

from ox-organisation-service.d55cc5d0

Gets organisation by id.


ox-organisation-service.get-organisations-by-query

from ox-organisation-service.d55cc5d0

Gets organisations by query


ox-organisation-service.get-organisations-within-organiser

from ox-organisation-service.d55cc5d0

Gets a list of organisations within the same organiser. Either by providing an organiser or an organisation id

ox-planning-service

|

ox-planning-service.get-planning-by-query

from ox-planning-service.fdbdad6f

Gets planning requests by query

ox-report-service

|

ox-report-service.delete-temporary-report

from ox-report-service.85ab1700

ox-reporting-service

|

ox-reporting-service.delete-report-for-order

from ox-reporting-service.938e5e6a

Delete reports for an order.


ox-reporting-service.delete-written-reports-for-organisation

from ox-reporting-service.938e5e6a

Service-to-service: permanently deletes all written reports for a buying organisation (all statuses, all school years). Used when an organisation opts out of written reports.


ox-reporting-service.delete-written-reports-for-school-year

from ox-reporting-service.938e5e6a

Service-to-service: deletes all written reports whose report date falls within the given school year. Used by the ox-order-service gallring (school year cleanup). If dryRun is true, only counts matching written reports without deleting (used for the preview).


ox-reporting-service.delete-written-reports-for-students

from ox-reporting-service.938e5e6a

Service-to-service: permanently deletes all written reports for the given students. Used by the ox-student-service cleanup when deactivated students are hard-deleted.


ox-reporting-service.get-pre-registered-absence-by-query

from ox-reporting-service.938e5e6a

Gets pre registered absence for a student within a provided time frame


ox-reporting-service.get-reports-by-query

from ox-reporting-service.938e5e6a

Gets completed reports by query


ox-reporting-service.get-reports-for-lecture

from ox-reporting-service.938e5e6a

Gets report types for a specific lecture. Returns report id if report already exists for that lecture. Returns ATTENDANCE and KNOWLEDGEFOLLOWUP reports.


ox-reporting-service.get-written-reports-by-query

from ox-reporting-service.938e5e6a

Service-to-service: gets written report entries by query. Used by ox-report-service to build the written-report status export for the selling organisation.

ox-request-service

|

ox-request-service.check-matched-requests

from ox-request-service.66a875a5

Checks if any current request matches the inputted order details, and if so it sends an email about it to the headmasters of the organisations of the requests. Primarily to be used by order service when a new order is published.


ox-request-service.get-requests-by-query

from ox-request-service.66a875a5

ox-request-service.send-mail-about-deleted-request

from ox-request-service.66a875a5

Scheduled job that sends email to headmaster when a request has been deleted (stops showing up). This happens one month after the request was created.

ox-student-service

|

ox-student-service.delete-guardians

from ox-student-service.ea7cf389

Legal guardians to students that turn 18 to be deleted from database


ox-student-service.delete-student-deactivated

from ox-student-service.ea7cf389

Used to delete deactivated students


ox-student-service.get-students-by-query

from ox-student-service.ea7cf389

Gets students by query

ox-user-service

|

ox-user-service.get-logged-in-user

from ox-user-service.c7a1cd4f

Gets the logged in user by jwt token with its currently selected organisation as user.currentOrganisation (prepared to use profile.currentOrganisationId as id to get but falls back on first organisation id in profile.organisations)



ox-user-service.update-staff-organisation

from ox-user-service.c7a1cd4f

Used to add existing organisations to an existing headmaster.

pub

|

pub.bank-id-service.order-status

from ox-user-service.c7a1cd4f

Handling bankid order status for when headmasters registers an account

report-service

|

report-service.create-report

from ox-fruster-report-service.349bd260

A service that accepts JSON (in) and outputs reports in different formats.

schedule-service

|

schedule-service.create-job

from ox-schedule-service.daad85c1

Creates or updates (upserts) a new job that runs on a given interval or time. Read more about fruster-schedule-service.


schedule-service.remove-job

from ox-schedule-service.daad85c1

Removes a previously scheduled job.

user-service

|

user-service.add-roles

from ox-fruster-user-service.eaf0ecb1

Adds inputted roles to specified user. Can only add roles existing in configuration. Response has status code 202 if successful.


user-service.create-user

from ox-fruster-user-service.eaf0ecb1

Creates a fruster user. Must include a few base fields but can contain any number of custom fields. Response has status code 201 if successful. Automatically splits data between user and profile if configured to.


user-service.delete-user

from ox-fruster-user-service.eaf0ecb1

Deletes a user. Response has status code 200 if successful. pub.user-service.user-deleted is published after deletion


user-service.delete-users-by-query

from ox-fruster-user-service.eaf0ecb1

Deletes users by a query. Response has status code 200 if successful. pub.user-service.user-deleted is published after deletion. Request body is the query to delete with. Cannot use empty query.


user-service.get-by-aggregate

from ox-fruster-user-service.eaf0ecb1

Gets user records by aggregate without process aggregate result


user-service.get-profiles-by-query

from ox-fruster-user-service.eaf0ecb1

Gets profiles by query. Note: Return data may vary depending on the configuration. Configured profile fields: ALL (Everything except the fields configured for user)


user-service.get-scopes

from ox-fruster-user-service.eaf0ecb1

Gets all scopes for specified roles in a flat array. E.g. input ['admin', 'user', 'super-admin'] would return ['', 'admin.', 'profile.get']. Response has status code 200 if successful.


user-service.get-user

from ox-fruster-user-service.eaf0ecb1 | Note: Use user-service.get-users-by-query instead.

Gets users by query. Response has status code 200 if successful.


user-service.get-users-by-aggregate

from ox-fruster-user-service.eaf0ecb1

Gets users by aggregate. The result process with view model


user-service.get-users-by-query

from ox-fruster-user-service.eaf0ecb1

Gets users by query. Note: Return data may vary depending on the configuration. Configured user fields: personalNumber,firstName,lastName,name,deactivated,active,metadata.activated,metadata.deactivated,deleted (Will always return id,email,password,roles,scopes)

Can be expanded to return both user and profile data using expand: "profile" if configured to split the data. If expand is used; the query can be used to query profile fields as well: { "profile.firstName": "Bob" }. With expand; the data is returned {...userData, profile: {...profileData}}. Can fetch only user count without users, using count: true. if count is used returns totalCount with empty users array


user-service.remove-roles

from ox-fruster-user-service.eaf0ecb1

Removes inputted roles from specified user. Cannot remove the last role. Response has status code 202 if successful.


user-service.resend-verification

from ox-fruster-user-service.eaf0ecb1

Generates a new email verification token and resends email w/ token to the provided user. Response has status code 200 if successful.


user-service.set-password

from ox-fruster-user-service.eaf0ecb1

Sets password of a user. Used by password reset service. Note: Updating a user's password should be done w/ the update-password endpoint. Response has status code 202 if successful.


user-service.update-password

from ox-fruster-user-service.eaf0ecb1

Updates password of an account. Requires to validation of old password before new can be set. Response has status code 202 if successful.


user-service.update-profile

from ox-fruster-user-service.eaf0ecb1

Updates a user. Can contain any number of custom fields. Response has status code 200 if successful.


user-service.update-user

from ox-fruster-user-service.eaf0ecb1

Updates a user. Can contain any number of custom fields. Response has status code 200 if successful.


user-service.validate-password

from ox-fruster-user-service.eaf0ecb1

Validates that inputted password becomes the same hash as for an account. Typically used by auth service for login. Response has status code 200 if successful. Validation can be done on email


user-service.verify-email

from ox-fruster-user-service.eaf0ecb1

Verifies a user's email address by providing a token sent to the user by email. Response has status code 200 if successful.