-
Notifications
You must be signed in to change notification settings - Fork 1
Excise Movement Control System API Changelog
-
New endpoint added to get a specific message XML body for a movementId and messageId (GET /customs/excise/movements/{movementId}/messages/{messageId})
This allows a single XML message to be retrieved
-
Push notifications
boxId
now returned from POST /customs/excise/movementsYou can use this
boxId
to retrieve notifications via the PPNS API.
Note: If you have previously subscribed to EMCS API, you will need to unsubscribe and resubscribe to get a boxId allocated -
Updates for FS4.1
Message XSDs have been updated (schemas have updated from v3.01 to v3.13)
Example message XMLs have been updated
-
Removed the
hash
from the get messages responseThis is only used for internal purposes so has been removed from the response
-
New endpoint added to get a specific movement using the new movementId (GET /customs/excise/movements/{movementId})
This allows a single movement to be retrieved via the API
-
Changed the LRN to movementId in the API endpoints
To follow a more standard pattern for a RESTful API and to be consistent with other HMRC APIs, the following endpoints have been updated to use a
movementId
instead of anLRN
- (POST /customs/excise/movements) now returns the
movementId
following a successful submission - (GET /customs/excise/movements/{movementId}/messages)
- (POST /customs/excise/movements/{movementId}/messages)
This also alleviates the need to have an ERN filter on the get messages for movement API endpoint - (POST /customs/excise/movements) now returns the
-
We now provide more scenarios for the test messages returned from the get messages endpoint (see the testing guide)
Instead of just returning an IE801 for each of the test LRNs, we now return different messages for different scenarios for each LRN e.g. an IE801 followed by an IE818
-
The
updatedSince
query parameter on the get movements endpoint (GET /customs/excise/movements) and get messages for a movement endpoint (GET /customs/excise/movements/{movementId}/messages) are now functionalThis allows movements and messages for a movement to be filtered so that only movements/messages that have been updated since the specified timestamp are returned.
-
Multiple EMCS enrolments are supported
While it is still not possible to create a test user using the Create Test User API with multiple enrolments, we have added the capability to handle this.
-
More message types can now be received from the get messages for a movement endpoint (GET /customs/excise/movements/{movementId}/messages)
The following messages can now be retrieved:
- IE803
- IE807
- IE829
- IE839
- IE840
- IE881
- IE905
-
When simulating error responses by passing well-known values in the XML messages (SendA400, SendA500 etc.), these are now namespace agnostic.
Previously, this would only work when passed in the following format
<urn1:MessageIdentifier>SendA400</urn1:MessageIdentifier>
, but will now work with any format of the namespace e.g.<MessageIdentifier xmlns="urn:publicid:-:EC:DGTAXUD:EMCS:PHASE4:TMS:V3.01">SendA400</MessageIdentifier>
-
Error responses for API calls have all been made consistent
Previously, there were some error responses that were being returned in different formats/JSON structures, these have all been made consistent
-
Removed the
X-Message-Type
header for the submit message for movement endpoint (POST /customs/excise/movements/{movementId}/messages)There is no longer any need to include the
X-Message-Type
header when submitting further messages for a movement as this type is derived from the submitted message itself.
- Bugs
- The Submit draft movement endpoint (POST /customs/excise/movements) now handles submissions with duplicate LRNs for the same ERN correctly
- If a movement has already been submitted for an ERN with a specific LRN, that LRN cannot be submitted again for that ERN if the movement already has an Administrative Reference Code (ARC) or the Consignee Id does not match the original movement that is still awaiting an ARC. This allows the movement to be re-submitted if the IE815 has failed validation and an asynchronous IE704 message has been received.
- If a duplicate LRN is submitted for an ERN the following Bad Request (400) error response is returned:
{
"dateTime": "2023-11-24T17:44:12.264526",
"message": "Duplicate LRN error",
"debugMessage": "The local reference number LRNQA20230909022222 has already been used for another movement"
}
- API Specification
- Added example XMLs and linked to them in the Submit draft movement endpoint (POST /customs/excise/movements) and Submit a message for a movement endpoint (POST /customs/excise/movements/{lrn}/messages) examples. We tried to add the examples themselves to the API specification but for this to be supported we need to fully map out the XSD schema in the API specification file. Although this is possible, it would take some time and ideally shouldn't be a manual process. Instead we have added examples to the GitHub repository and linked to them in the API specification.
- More concise/complete examples are now available for testing purposes
- Submit a message for a movement endpoint (POST /customs/excise/movements/{lrn}/messages)
- Added support for the IE813 message.
- Added support for the IE819 message.
- Added support for the IE871 message.
- New messages can be submitted for a movement (IE813, IE819, IE871)
- API Spec
- Removed all Existing SOAP API references
- Added new
updatedSince
query parameters to the get movements and get messages for a movement endpoints (documentation only, not currently implemented) - Made
Content-Type
header mandatory for POST endpoints - Made
Accept
header mandatory for all endpoints - Added link to the testing guide
- Fixed query parameters in the get movements endpoint to be lowercase (LRN -> lrn, ERN -> ern, ARC -> arc)
- General overhaul of the API spec to ensure what is documented is what has been implemented, also based on some feedback from developers
- Submit a message for a movement endpoint (POST /customs/excise/movements/{lrn}/messages)
- Added support for the IE837 message.
- Added support for the IE810 message.
- Further messages will be delivered by the 10/11/23 (IE813, IE819, IE871)
- Clarification on polling process on movements or messages
- Tidying up of the API spec in general to align with what's been implemented so far
- New messages can be submitted for a movement (IE837, IE810)
- Submit draft movement endpoint (POST /customs/excise/movements)
- Submission of an IE815
- Get movements endpoint (GET /customs/excise/movements)
- Submit a message for a movement endpoint (POST /customs/excise/movements/{lrn}/messages)
- This currently only supports submission of an IE818.
- Further messages will be delivered by the 10/11/23 (IE837, IE810, IE813, IE819, IE871)
- Get messages for a movement endpoint (GET /customs/excise/movements/{lrn}/messages)
- Third party developers can now subscribe to the EMCS API in the Sandbox environment via their Developer hub applications
- Test users can be setup using the instructions in the testing guide
- The endpoints can be tested following the instructions in the testing guide
Changelog created