mi

Create a new MI record

Overview

Use this endpoint to send management or operational metrics relating to letter processing and print fulfilment.

When you submit a create management information request, the endpoint will respond with a 201 (Created) response code along with the created data including a unique id for the record or an unsuccessful (4xx/5xx) response.

Rate limiting applies. On excess requests, you may receive 429 Too Many Requests (example error code(s): NOTIFY_QUOTA). Back off and retry later.

Sandbox test scenarios

You can test the following scenarios in our sandbox environment.

ScenarioRequestResponse
SuccessRequest for successful MI record Creation201 (Created) with the created management information in the response
Invalid RequestInvalid Request for MI record Creation400 (Bad Request) with the error details in the body
Unknown specificationRequest for MI record Creation for unknown spec404 (Not Found) with the error details in the body
post/mi

Request

  • Base URL
    https://internal-dev-sandbox.api.service.nhs.uk/nhs-notify-supplier
  • URL
    https://internal-dev-sandbox.api.service.nhs.uk/nhs-notify-supplier/mi
  • Auth
    none required

Request body

Example request

{
  "data": {
    "attributes": {
      "lineItem": "envelope-business-standard",
      "timestamp": "2023-11-17T14:27:51.413Z",
      "quantity": 22,
      "specificationId": "da0b1495-c7cb-468c-9d81-07dee089d728",
      "groupId": "abc123",
      "stockRemaining": 20000
    }
  }
}

Response

Management Information created successfully

Example response

{
  "data": {
    "id": "2WL5eYSWGzCHlGmzNxuqVusPxDg",
    "attributes": {
      "lineItem": "envelope-business-standard",
      "timestamp": "2023-11-17T14:27:51.413Z",
      "quantity": 22,
      "specificationId": "da0b1495-c7cb-468c-9d81-07dee089d728",
      "groupId": "abc123",
      "stockRemaining": 20000
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.