Skip to main content
Version: 8.1.0

🚦 Response codes & headers

Where the status comes from​

The HTTP status is 200 when the request got through. The real status is the code of the body. When a response has an X-Code header, the app uses that number as the status, over the HTTP one. Any status >= 400 is an error and shows the body's message (404 and 403 have fixed messages: "not found" and "forbidden action").

Codes​

CodeName in the appMeaning
200OKSuccess
210EmptyDataNothing found. Accepted as success by some updates; the student search reports "no student found"
202–First login: create the account
220–Wrong answer to the secret question
221–Identifiant already personalised
235–Identifiant already exists
250Auht2Factor2FA required
401UnauthorizedUserToken invalid or expired
403NotAuthorizedForbidden action
500–Unexpected server error
505–Labelled β€œbad confirmation password” by the app
506SMSInvalidInvalid SMS code
508 509 511 514 517 519 521 581 582–The app shows the server's message
516CompteInvalideβ€œThis site is currently closed”
518β€“β€œYour user record does not exist”
520 525–Token invalid or expired
526AccessTokenInvalidAccess token invalid
530DeniedAccessNamed in the app, no handling
535NotExportedNamed in the app, no handling
580–Error while sending the message
585NotAvailableNamed in the app, no handling
600UserTypeNotSupportedNamed in the app, no handling

517 is also used by the app itself for local failures of account switching ("no account found", "the profile change cannot be made").

Dead token​

401, 520 and 525 mean the token is dead. The app renews it (see Renew the token) and replays the failed request once.

Payment result codes​

Payment state answers with the payment outcome in code. The app does not treat these as errors:

CodeNameMeaning
200OKPaid
501CANCELCancelled by the user
500REFUSEDRefused by the bank
502KOFailed
550ERRORError

Headers​

HeaderDirectionUse
X-Tokenrequest, responseThe token. Sent on every request once logged in; replace it with the one of any response that has one
2FA-Tokenrequest, responseThe two-factor token, sent on every request once the server gave one, updated from responses
X-CoderesponseOverrides the HTTP status (see above). The upload endpoint answers its status only here
WOPI-TokenresponseToken of the online office editor (Collabora). Kept by the app when present
STREAM-TokenresponseToken to play streamed videos. Kept when present. It goes in the URL of Play a video

X-WithAuthUserInfos and X-WithCacheContext are set by the app on responses for its own bookkeeping (cache and user context); they are not part of the API.

Hosts​

HostUse
https://api.ecoledirecte.comStudent, family and tutor accounts, and every login
https://apip.ecoledirecte.comTeacher and staff accounts after login
https://controller.ecoledirecte.comWebSocket
https://libreoffice.ecoledirecte.comOnline office editor (Collabora); the app also builds REST URLs from it ({collabora}/restv3/ws) for the editor
https://api.ecoledirecte.com/mot-de-passe-oublie.awpForgotten password page (opened in a browser)

Outside production the app uses http://{host}/EDV3WEBSERVICES_WEB/FR/v3 and http://{host}/restv3/ws instead of /v3 and /restv3/ws.