DEFRA / sroc-service-team

Guides, info and issue management for the Charging Module Team
Other
0 stars 1 forks source link

Add PATCH version of bill run /send endpoint #26

Closed Cruikshanks closed 4 years ago

Cruikshanks commented 4 years ago

See Create a PATCH version of billrun send endpoint

The convention in the API is for any endpoint which is used to tell us to do something, for example, 'approve' a bill run, to expect a PATCH request. That is apart from 'send' a bill run. That's a POST.

Like nails on a blackboard, it causes us pain whenever we see it!

As agreed with the WRLS team we have added a new PATCH version of the endpoint to the API which works exactly the same as the existing endpoint. After we've shipped the next version of the API we'll remove the POST version.

Doing it this way means we won't break their existing system and allow them time to migrate to using the new PATCH version.

This change updates the Open API spec to include the new endpoint and mark the old one as deprecated.