Add X-With-Server-Date guidance for testing API with future dates#2250
Add X-With-Server-Date guidance for testing API with future dates#2250
Conversation
Added instructions for testing declaration submissions using the X-With-Server-Date header in the sandbox environment.
|
Content moved over to agreed new home. Just needs a check to make sure it fits where I've put it. Also, the review app failed, so this hasn't been checked in there yet. |
|
Need the review app fixed - @ethax-ross will have a look |
|
Review app deployed to https://cpd-ec2-review-2250-web.test.teacherservices.cloud |
Updated the instructions for using the X-With-Server-Date header to match existing structure, and used a 2027 example date as the existing version had a 2025 date. We're telling them to use this to test declarations with a future date, so it didn't make sense to me to have a date in the past.
|
|
Made some formatting updates and also changed the example (line 82) from The guidance talks about using a future date to test declaration submissions, so it didn't make sense to me that we use a date in the past for the example - please tell me if I've misunderstood the point here and I'll revert it. @andycrawshaw added you as a reviewer as we discussed this with Claire on our Monday call. |
|
|
||
| ### Response | ||
|
|
||
| Successful requests will return a response body including updates to the declaration state, which will become: |
There was a problem hiding this comment.
I'm a bit confused by the guidance here because what if they're just posting a declaration? I think it needs to be clearer the state changes happen when voiding a declaration (so PUT /api/v3/participant-declarations/{id}/void
I actually wonder if this section is relevant at all - this is less about how to test it and more just how the declaration endpoint works. The state transition should be in the declaration guidance I reckon



Context
The 'Submit, view and void declarations' guidance is being revised for RECT. Out of the review, it was identified that the "test declaration ability with X-With-Server-Date header" guidance should now live here.
Changes proposed in this pull request
Added instructions for testing declaration submissions using the X-With-Server-Date header in the sandbox environment, taken from: https://manage-training-for-early-career-teachers.education.gov.uk/api-reference/ecf/guidance.html#submit-view-and-void-declarations
Guidance to review
I reviewed it with Claire and Andy, but it hasn't been reviewed by an SME to ensure it fits the context of its new home.