tdevapigists
4/27/2017 - 1:56 AM

Swagger

Swagger

{
  "swagger" : "2.0",
  "info" : {
    "description" : "The Cancel Transition Order API cancels in-flight transition order in CPQ\n",
    "version" : "1.0.0",
    "title" : "Cancel Transition Order API"
  },
  "host" : "api.telstra.com",
  "basePath" : "/application/nbn-transitions/v1",
  "schemes" : [ "https" ],
  "paths" : {
    "/transition-orders/:customerOrderReference/cancellations" : {
      "post" : {
        "tags" : [ "cancellations" ],
        "summary" : "Cancel order in CPQ",
        "description" : "Cancel order in CPQ",
        "operationId" : "Cancel order based on customer order reference",
        "consumes" : [ "application/json", "application/xml" ],
        "produces" : [ "application/json", "application/xml" ],
        "parameters" : [ {
          "in" : "body",
          "name" : "body",
          "description" : "data object that needs to be added to the store",
          "required" : true,
          "schema" : {
            "$ref" : "#/definitions/data"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "Successful request",
            "schema" : {
              "$ref" : "#/definitions/CancelOrderResponse"
            }
          },
          "201" : {
            "description" : "Cancellation accepted"
          },
          "303" : {
            "description" : "Already Cancelled"
          },
          "304" : {
            "description" : "Cancellation Already in Progress"
          },
          "400" : {
            "description" : "Invalid or missing request parameters"
          },
          "401" : {
            "description" : "Cancellation not permitted"
          },
          "403" : {
            "description" : "Authorization credentials passed and accepted but account does not have permission"
          },
          "404" : {
            "description" : "Resource not be found (but may be available in the future)",
            "schema" : {
              "$ref" : "#/definitions/CancelOrderErrorResponse"
            }
          },
          "422" : {
            "description" : "Mandatory fields missing"
          },
          "500" : {
            "description" : "An internal error occurred when processing the request"
          },
          "502" : {
            "description" : "Submit unsuccessful"
          },
          "503" : {
            "description" : "The service requested is currently unavailable"
          },
          "504" : {
            "description" : "Timeout - No response received"
          }
        }
      }
    }
  },
  "securityDefinitions" : {
    "OAuth2" : {
      "type" : "oauth2",
      "tokenUrl" : "/v1/oauth/token",
      "flow" : "application",
      "scopes" : {
        "NBNCANCELTRANSITIONORDER" : "OAuth scope for the Cancel Transition Order API"
      }
    }
  },
  "definitions" : {
    "data" : {
      "type" : "object",
      "properties" : {
        "cancellationReason" : {
          "type" : "string"
        }
      }
    },
    "SuccessData" : {
      "properties" : {
        "id" : {
          "type" : "string"
        },
        "cancellationReason" : {
          "type" : "string"
        },
        "status" : {
          "type" : "string"
        }
      },
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : { }
      }
    },
    "Error" : {
      "properties" : {
        "code" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "code"
        },
        "message" : {
          "type" : "string",
          "description" : "error message"
        }
      },
      "type" : "array",
      "items" : {
        "type" : "object",
        "properties" : { }
      }
    },
    "CancelOrderResponse" : {
      "type" : "object",
      "properties" : {
        "code" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "code"
        },
        "message" : {
          "type" : "string"
        },
        "data" : {
          "$ref" : "#/definitions/SuccessData"
        }
      }
    },
    "CancelOrderErrorResponse" : {
      "type" : "object",
      "properties" : {
        "status" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "status"
        },
        "code" : {
          "type" : "integer",
          "format" : "int32",
          "description" : "code"
        },
        "message" : {
          "type" : "string"
        },
        "error" : {
          "$ref" : "#/definitions/Error"
        }
      }
    }
  }
}