{"openapi":"3.0.1","info":{"title":"3PGWOrderManagement","description":"API for creating orders with 3rd party fibre provider","contact":{"email":"KunaSai.Rama@virginmedia.co.uk"},"version":"0.0.9"},"servers":[{"url":"https://preprod.n-wsl-apigee.virginmediao2.com"}],"paths":{"/tp/v1/orders":{"post":{"summary":"Create Order","description":"Create Order Request","operationId":"createOrder","tags":["Order Management"],"parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Bearer token obtained from OAuth.","example":"Bearer nEsfz3TTC9HmgVMv3oc62HM2DDOS"},{"name":"appKey","in":"header","required":true,"schema":{"type":"string"},"description":"Application key","example":"MhIudKGk1XnIwNGlv4SpsYGBy9rlS7ItVM7L1SLqaIoG1921"},{"name":"cpId","in":"header","required":true,"schema":{"type":"string","minLength":2,"maxLength":4},"description":"Unique identification of requestor.","example":"CP01"},{"name":"transactionId","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Unique identifier of the request message.","example":"123e4567-e89b-12d3-a456-426655440000"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"},"examples":{"CreateOrderRequest":{"$ref":"#/components/examples/CreateOrderRequest"}}}}},"responses":{"200":{"description":"Request Accepted","headers":{"transactionId":{"$ref":"#/components/headers/TransactionID"},"responseDateTime":{"$ref":"#/components/headers/ResponseDateTime"},"contentLength":{"$ref":"#/components/headers/ContentLength"},"content-type":{"$ref":"#/components/headers/ContentType"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderAcceptedResponse"},"examples":{"CreateOrderRequest":{"$ref":"#/components/examples/CreateOrderResponse"}}}}},"400":{"description":"Bad Request / Rejected","headers":{"transactionId":{"$ref":"#/components/headers/TransactionID"},"responseDateTime":{"$ref":"#/components/headers/ResponseDateTime"},"contentLength":{"$ref":"#/components/headers/ContentLength"},"content-type":{"$ref":"#/components/headers/ContentType"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRejectedResponse"},"examples":{"CreateOrderRequest":{"$ref":"#/components/examples/RejectOrderResponse"}}}}},"500":{"description":"Server Error","headers":{"transactionId":{"$ref":"#/components/headers/TransactionID"},"responseDateTime":{"$ref":"#/components/headers/ResponseDateTime"},"contentLength":{"$ref":"#/components/headers/ContentLength"},"content-type":{"$ref":"#/components/headers/ContentType"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageNotFound"}}}}},"security":[{"Authorization":[]}]}}},"components":{"schemas":{"CreateOrderRequest":{"type":"object","required":["vmo2OrderId","wholesaleProvider","orderIntent","requestedOrderCompletionDate","productsAndServices"],"properties":{"vmo2OrderId":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"The unique identifier of the order assigned by VMO2 Wholesale.","example":"5ac62839-047a-4ae4-b657-a5f05291e53c"},"wholesaleProvider":{"type":"string","enum":["Openreach"],"description":"Indicate the wholesale provider to query. For Third party network Create orders, currently only \"Openreach\" is a possible value.","example":"Openreach"},"orderIntent":{"type":"string","enum":["new provide"],"description":"Describes the purpose of the order.","example":"new provide"},"premiseId":{"type":"string","minLength":1,"maxLength":75,"description":"VMO2 assigned unique identifier of a premise.","example":"OR_123456789_01_GS11AB"},"requestedOrderCompletionDate":{"type":"string","format":"date","minLength":10,"maxLength":10,"description":"The date when CP wants the requested service/s to be activated, changed or ceased.","example":"2026-06-03"},"switchOrderReference":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"Switch order reference generated from the HUB.","example":"4aa85f64-5717-4562-b3fc-2c963f66afa7"},"appointments":{"type":"array","items":{"$ref":"#/components/schemas/Appointment"}},"productsAndServices":{"$ref":"#/components/schemas/ProductsAndServices"}}},"Appointment":{"type":"object","required":["appointmentKey"],"properties":{"appointmentKey":{"type":"string","minLength":18,"maxLength":30,"description":"Unique identifier of an appointment, sent to the CP in response of a reserve appointment call.","example":"OR_0000000000001_INHO"},"title":{"type":"string","minLength":1,"maxLength":40,"description":"Preferred salutation of the end customer.","example":"Mr"},"firstName":{"type":"string","minLength":0,"maxLength":40,"description":"First Name of the end customer.","example":"Tom"},"surname":{"type":"string","minLength":0,"maxLength":40,"description":"Last Name of the end customer.","example":"Smith"},"businessName":{"type":"string","minLength":1,"maxLength":128,"description":"Name of the business the appointment is reserved for.","example":"VMO2"},"primaryContactNumber":{"type":"string","format":"string","minLength":0,"maxLength":13,"description":"Primary contact number of the end customer.","example":"+446543217890"},"secondaryContactNumber":{"type":"string","format":"string","minLength":0,"maxLength":13,"description":"Secondary contact number of the end customer.","example":"+446543217234"},"healthAndSafetyNotes":{"type":"string","minLength":0,"maxLength":250,"description":"Description of the health and safety related hazards, if any, at the customer premise. Optional if appointment type = \"pre-work\". Mandatory for other values.","example":"Dog is there in the premise"},"appointmentNotes":{"type":"string","minLength":0,"maxLength":250,"description":"Special instructions, if any, to access the customer premise. Optional for all visit types.","example":"Need council permission."}}},"ProductsAndServices":{"type":"object","properties":{"parentServiceId":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"Unique identifier assigned to a group of active services by VMO2 WS. Applicable for all order intents.","example":"c37775a8-5b64-4f83-9947-5992fdac5dcf"},"technicalProductsAndChildServices":{"type":"array","items":{"$ref":"#/components/schemas/TechnicalProduct"}}}},"TechnicalProduct":{"type":"object","properties":{"childServiceId":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"Unique identifier assigned to an individual active service by VMO2 WS. Applicable for change of service journey only.","example":"c37775b8-5b64-4f87-9947-5992fdac5dcf"},"technicalProductId":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"Unique identifier of a technical product contracted by the CP.","example":"b37775b8-5b64-4f87-9047-5992fdac5dcf"},"serviceLevel":{"type":"string","enum":["SLA-00001","SLA-00002","SLA-00006"],"description":"The indicator of the time period within which an incident, if reported on the service/s after provision, should be resolved.","example":"SLA-00002"},"remoteId":{"type":"string","format":"string","minLength":0,"maxLength":36,"description":"Unique identifier provided by the CP that determines the physical route that carries the traffic to the CP's equipment.","example":"VFV7700001"},"action":{"type":"string","enum":["add","remove","change"],"description":"Action that CP requests against an active service or a new technical product.","example":"add"},"upstreamSpeed":{"type":"integer","format":"int32","description":"Upstream Bandwidth.","example":10},"downstreamSpeed":{"type":"integer","format":"int32","description":"Downstream Bandwidth.","example":20}}},"CreateOrderAcceptedResponse":{"type":"object","required":["vmo2OrderId","externalOrderId","status","eventDateTime"],"properties":{"vmo2OrderId":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"description":"Unique identifier of the order, as assigned by VMO2 WS.","example":"5ac62839-047a-4ae4-b657-a5f05291e53c"},"externalOrderId":{"type":"string","minLength":1,"maxLength":30,"description":"Unique Identifier of the Third Party Order.","example":"1-4V2W6DF2"},"status":{"type":"string","enum":["accepted"],"description":"Status of the order. Indicative value can be \"accepted\".","example":"accepted"},"eventDateTime":{"type":"string","description":"The actual date and time when the create order request is accepted.","example":"2022-03-11T12:32:00Z"}}},"CreateOrderRejectedResponse":{"type":"object","required":["vmo2OrderId","status","eventDateTime","message"],"properties":{"vmo2OrderId":{"type":"string","format":"uuid","description":"Unique identifier of the order, as assigned by VMO2 WS.","example":"5ac62839-047a-4ae4-b657-a5f05291e53c"},"status":{"type":"string","enum":["rejected"],"description":"Unique Identifier of the Third Party Order.","example":"rejected"},"eventDateTime":{"type":"string","description":"The actual date and time when the create order request is rejected.","example":"2022-03-11T12:32:00Z"},"message":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}}},"PageNotFound":{"type":"object","required":["status","message"],"properties":{"status":{"type":"string","format":"enum","enum":["rejected"],"example":"rejected"},"message":{"type":"array","items":{"type":"object","required":["messageCode"],"properties":{"fieldName":{"type":"string","format":"string","description":"The input parameter with which the error is associated","minLength":1,"maxLength":50,"example":""},"fieldValue":{"type":"string","format":"string","description":"The value of input parameter with which the error is associated","minLength":1,"maxLength":250,"example":""},"messageCode":{"type":"string","format":"string","description":"Unique identifier of the error","minLength":9,"maxLength":9,"example":"SYS-00001"}}}}}},"ErrorMessage":{"type":"object","required":["messageCode"],"properties":{"fieldName":{"type":"string","minLength":0,"maxLength":50,"description":"Name of the field with which the error is associated.","example":"parentServiceId"},"fieldValue":{"type":"string","minLength":0,"maxLength":250,"description":"Value of the field with which the error is associated.","example":123},"messageCode":{"type":"string","minLength":9,"maxLength":9,"description":"Error code that describes the actual error that occurred.","example":"BUS-10002"},"errorCausedBy":{"type":"string","format":"enum","enum":["callingsystem","cp","3pnwapigw"],"description":"Indicates which actor caused the error .","example":"callingsystem"}}}},"examples":{"CreateOrderRequest":{"summary":"Create Order with new provide","value":{"vmo2OrderId":"5ac62839-047a-4ae4-b657-a5f05291e53c","wholesaleProvider":"Openreach","orderIntent":"new provide","premiseId":"OR_123456789_01_GS11AB","requestedOrderCompletionDate":"2026-06-03","switchOrderReference":"4aa85f64-5717-4562-b3fc-2c963f66afa7","appointments":[{"appointmentKey":"OR_0000000000001_INHO","title":"Mr","firstName":"Tom","surname":"Smith","businessName":"VMO2","primaryContactNumber":"+446543217890","secondaryContactNumber":"+446543217234","healthAndSafetyNotes":"Dog is there in the premise","appointmentNotes":"Need council permission."}],"productsAndServices":{"parentServiceId":"c37775a8-5b64-4f83-9947-5992fdac5dcf","technicalProductsAndChildServices":[{"childServiceId":"c37775b8-5b64-4f87-9947-5992fdac5dcf","technicalProductId":"b37775b8-5b64-4f87-9047-5992fdac5dcf","serviceLevel":"SLA-00002","remoteId":"VFV7700001","action":"add","upstreamSpeed":10,"downstreamSpeed":20}]}}},"CreateOrderResponse":{"summary":"Request Accepted","value":{"vmo2OrderId":"5ac62839-047a-4ae4-b657-a5f05291e53c","externalOrderId":"1-4V2W6DF2","status":"accepted","eventDateTime":" 2022-03-11T12:32:00Z"}},"RejectOrderResponse":{"summary":"Request Accepted","value":{"vmo2OrderId":"5ac62839-047a-4ae4-b657-a5f05291e53c","status":"rejected","eventDateTime":" 2022-03-11T12:32:00Z","message":[{"fieldName":"parentServiceId","fieldValue":"123","messageCode":"BUS-10002","errorCausedBy":"callingsystem"}]}}},"headers":{"TransactionID":{"description":"Unique identifier of the request message set by CP","schema":{"type":"string","format":"uuid","minLength":36,"maxLength":36,"example":"123e4567-e89b-12d3-a456-426655440000"}},"ResponseDateTime":{"description":"Date and time when the response is sent to CP in \"yyyy-MM-dd'T'HH:mm:ss\" format","schema":{"type":"string","minLength":19,"maxLength":19,"example":"2026-06-02T12:12:12"}},"ContentLength":{"description":"Length of the content measured in number of characters.","schema":{"type":"string","example":3495}},"ContentType":{"description":"Will always application/json","schema":{"type":"string","example":"application/json"}},"Transfer-Encoding":{"description":"Values as chunked to indicate end of message.","schema":{"type":"string","example":"chunked"}}},"securitySchemes":{"Authorization":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://preprod.n-wsl-apigee.virginmediao2.com/v1/oauthtoken","scopes":{"default":"for read and write operations"}}}}}}}