Skip to content

Add X-With-Server-Date guidance for testing API with future dates#2250

Open
tashonrp wants to merge 2 commits intomainfrom
revised-how-to-test-api-guidance
Open

Add X-With-Server-Date guidance for testing API with future dates#2250
tashonrp wants to merge 2 commits intomainfrom
revised-how-to-test-api-guidance

Conversation

@tashonrp
Copy link
Contributor

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.

Added instructions for testing declaration submissions using the X-With-Server-Date header in the sandbox environment.
@tashonrp tashonrp changed the title Added X-With-Server-Date guidance for testing API with future dates Add X-With-Server-Date guidance for testing API with future dates Feb 16, 2026
@tashonrp tashonrp self-assigned this Feb 16, 2026
@tashonrp
Copy link
Contributor Author

tashonrp commented Feb 16, 2026

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.

@gen-sole
Copy link

Need the review app fixed - @ethax-ross will have a look

@github-actions
Copy link

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.
@sonarqubecloud
Copy link

@tashonrp
Copy link
Contributor Author

tashonrp commented Feb 17, 2026

Made some formatting updates and also changed the example (line 82) from X-With-Server-Date: 2025-01-10T10:42:00Z to X-With-Server-Date: 2027-01-10T10:42:00Z

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants