Skip to main content

Order Notification Import Orders (Ethernet)

This tutorial explains how to implement a callback listener to manage the lifecycle of Ethernet orders. Unlike the request-response model used in previous tutorials, this is an asynchronous notification service where BT pushes automated updates to a pre-configured callback URL.

1. Core architecture

The Order Notification Import Orders API operates on a webhook model where your server hosts the endpoint for incoming requests.

  • HTTP method: All notifications are delivered via POST.
  • Response requirement: Your server must return an HTTP 204 No Content for every notification to acknowledge receipt and prevent unnecessary retries.
  • Processing pattern: Acknowledge the request immediately; perform data processing and database updates asynchronously to avoid connection timeouts.
  • Security: Validate incoming requests using the authentication headers and security protocols defined in Authentication guide.

 

Example: 204 No content response

Your server should return a response header with no body content:

HTTP/1.1 204 No Content
Date: Fri, 07 May 2021 12:33:40 GMT
Connection: close

 


2. Path reference table

Use the following table to build your parsing logic.

Note: the JSON structure for the BT Order ID shifts depending on whether the event is a standard order update or a cancellation request.

Event type Root JSON path to BT Order ID
productOrderCreateEvent $.event.properties.productOrder.id
productOrderStateChangeEvent $.event.properties.productOrder.id
productOrderInformationRequiredEvent $.event.properties.productOrder.id
CancelProductOrderCreateEvent $.event.cancelProductOrder.productOrder.id
CancelProductOrderStateChangeEvent $.event.cancelProductOrder.productOrder.id

 


3. Use cases

 

Use case 1: Order acceptance

This event confirms the order has been successfully imported into the BT system following the submission step in Product order tutorial.

  • Order status: The state is initially set to Pending.
  • Action: Capture the BT Order ID and map it to your internal externalId.
Example order acceptance snippet

{
 "eventType": "productOrderCreateEvent",
 "event": {
   "properties": {
     "productOrder": {
       "id": "4-44192047491",
       "state": "Pending",
       "btProductOrderMessages": [
         { "message": "Order acknowledged", "code": "510", "type": "Informational" }
       ]
     }
   }
 }
}

 

Use case 2: Actionable alerts

Sent when an order requires customer intervention to proceed, such as confirming a proposed Customer Promise Date (CPD).

Action: Call GET /orderActions/{orderId} to retrieve the pending action, including its order item ID and activity ID. To resolve the block, accept or reject the action with PATCH /orderActions/{orderId}/{orderItemId}/{activityId} and a body such as {"requestType": "Accept"}.

 

Example actionable alert snippet

{
 "eventType": "productOrderInformationRequiredEvent",
 "event": {
   "properties": {
     "productOrder": {
       "id": "4-44170112780",
       "milestone": [
         {
           "title": "MCO-Confirm CPD",
           "description": "Customer to Accept/Reject CPD",
           "status": "Pending"
         }
       ]
     }
   }
 }
}

 

Use case 3: Order cancellations (Status code 1519)

Sent to provide updates on requested order cancellations.

  • Status: Cancelled (code 1519): Indicates a successful terminal cancellation.
  • Status: Rejected: Indicates a cancellation failure due to dependencies.
Example order cancellation snippet

{
 "eventType": "CancelProductOrderStateChangeEvent",
 "event": {
   "cancelProductOrder": {
     "state": "Cancelled",
     "productOrder": { "id": "4-44207901343" }
   }
 }
}

 

Use case 4: Terminal failures

Sent when an order or specific order item has been rejected.

  • Order status: The state is set to Rejected.
  • Action: Identify the cause using the code and message fields. Correct the source data and submit a new order via the Product Order (Ethernet) API.
Example terminal failure snippet

{
"eventType": "productOrderStateChangeEvent",
"event": {
  "properties": {
    "productOrder": {
      "id": "4-44181977935",
      "state": "Rejected",
      "btProductOrderMessages": [
        { "message": "Invalid customer id 960457008", "code": "265", "type": "Error" }
      ]
    }
  }
}
}

 


4. Error code reference

The following codes are delivered in the btProductOrderMessages array.

Code Type Description
400 Error VLAN Configuration Error: Stacked VLAN Tag is incompatible with the Access segmentation type.
265 Error Identity Error: The customer ID provided is invalid or does not match BT records.
330 Error Cancellation Conflict: An in-flight connection depends on this access service.
331 Error Service Dependency: Cannot cancel while an associated Etherflow is in service.
2001 Warning Contact Mismatch: Supplied contact details do not match; default details used.
510 Info Acknowledgment: The order has been received and provisioning is starting.
616 Info Charge Notification: Lists activation and rental charges for the order item.

 


5. Best practices and key takeaways

  • Configure the callback URL by providing it to the BT Account Manager during onboarding.
  • Validate incoming POST requests using the authentication protocols.
  • Return an HTTP 204 response immediately upon receipt of any payload.
  • Map the BT id to the internal externalId using the specific JSON paths defined in the Reference Table.
  • Implement idempotent handling: Ensure your system can process the same eventId multiple times without duplicate side effects (e.g., check if an update has already been applied before updating your database). This accounts for network retries if a previous acknowledgement was not received by BT.
Back to top