{
  "openapi": "3.0.0",
  "info": {
    "title": "att-order-status-eapi",
    "version": "v1"
  },
  "paths": {
    "/order-apex": {
      "post": {
        "summary": "Order Handoff",
        "description": "The purpose of this API endpoint is to submit the order for Apex ADI.",
        "parameters": [
          {
            "name": "content-type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string",
              "example": "application/json"
            }
          },
          {
            "name": "accept",
            "in": "header",
            "description": "Specifies the format of the response message body. Structured text message payloads are required to support application/json.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "application/json"
            }
          },
          {
            "name": "x-trace-id",
            "in": "header",
            "description": "This field is used for passing a trace ID between API hops for end-to-end traceability.",
            "required": true,
            "schema": {
              "type": "string",
              "example": "givingXTracing123456"
            }
          },
          {
            "name": "x-transaction-id",
            "in": "header",
            "description": "This field is used for passing a traceable ID to uniquely identify the transactions.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "1234"
            }
          },
          {
            "name": "client_id",
            "in": "header",
            "description": "This field represents client id.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "client_secret",
            "in": "header",
            "description": "This field represents client secret.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "header",
            "description": "This field should identify the calling system/application.",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orderHandoffRequest"
              }
            }
          }
        },
        "x-page-slug": "order-handoff-slug",
        "responses": {
          "200": {
            "description": "200 - Okay",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orderHandoffResponse"
                }
              }
            }
          },
          "400": {
            "description": "400 - Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "401": {
            "description": "401 - Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "403": {
            "description": "403 - Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "404": {
            "description": "404 - Method Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "405": {
            "description": "405 - APIKIT:METHOD_NOT_ALLOWED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "406": {
            "description": "406 - APIKIT:NOT_ACCEPTABLE",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "415": {
            "description": "415 - Unsupported Media Type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "500": {
            "description": "470 - OAPI:INVALID_SP / 471 - OAPI:UNAUTHORIZED_SP / 500 - Internal Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "501": {
            "description": "501 - APIKIT:METHOD_NOT_IMPLEMENTED",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          },
          "503": {
            "description": "503 - Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardError"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "Contact DL-APS_API_Services@att.com to get Endpoint details "
    }
  ],
  "components": {
    "schemas": {
      "StandardError": {
        "title": "Standard Error Response Item",
        "description": "Error Response",
        "x-amf-examples": {
          "example_2": {
            "node": "Store location System API",
            "code": 405,
            "message": "METHOD_NOT_ALLOWED",
            "description": "The method received in the request-line is known by the origin server but not supported by the target resource.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "DATA ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "amf_example_1": {
            "node": "Store location System API",
            "code": 403,
            "message": "FORBIDDEN",
            "description": "The server understood the request but refuses to authorize it. The client MAY repeat the request with new or different credentials.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "SYSTEM ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "example_1": {
            "node": "Store location System API",
            "code": 401,
            "message": "NOT_AUTHORIZED",
            "description": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "DATA ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "amf_example_2": {
            "node": "Store location System API",
            "code": 404,
            "message": "RESOURCE_NOT_FOUND",
            "description": "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "DATA ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "amf_example_4": {
            "node": "Store location System API",
            "code": 500,
            "message": "INTERNAL_SERVER_ERROR",
            "description": "The server encountered an unexpected condition that prevented it from fulfilling the request.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "SYSTEM ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "example_0": {
            "node": "Store location System API",
            "code": 400,
            "message": "BAD_REQUEST",
            "description": "The server cannot or will not process the request due to something that is perceived to be a client error.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "DATA ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "amf_example_3": {
            "node": "Store location System API",
            "code": 406,
            "message": "NOT_ACCEPTABLE",
            "description": "The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "SYSTEM ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          },
          "example_3": {
            "node": "Store location System API",
            "code": 415,
            "message": "UNSUPPORTED_MEDIA_TYPE",
            "description": "The format problem might be due to the request's indicated Content-Type or Content-Encoding, or as a result of inspecting the data directly.",
            "transactionId": "803ec5202bd54576992d082da70e6338",
            "traceId": "712def66-c54a-11ea-87d0-0242ac130003",
            "error_context": {
              "time": "2021-07-29T01:51:15.000Z",
              "type": "DATA ERROR",
              "category": "Account",
              "payload": {},
              "error_identifier": "123",
              "action": "create"
            }
          }
        },
        "type": "object",
        "required": [
          "node",
          "code",
          "message",
          "description",
          "transactionId",
          "traceId"
        ],
        "properties": {
          "node": {
            "description": "API Name",
            "example": "Store location System API",
            "type": "string"
          },
          "code": {
            "description": "Status Code",
            "example": 401,
            "type": "number"
          },
          "message": {
            "description": "Error Message",
            "example": "NOT_AUTHORIZED",
            "type": "string"
          },
          "description": {
            "description": "Error Description",
            "example": "The request has not been applied because it lacks valid authentication credentials for the target resource.",
            "type": "string"
          },
          "transactionId": {
            "description": "Transaction ID",
            "example": "803ec5202bd54576992d082da70e6338",
            "type": "string"
          },
          "traceId": {
            "description": "Trace ID",
            "example": "712def66-c54a-11ea-87d0-0242ac130003",
            "type": "string"
          },
          "error_context": {
            "type": "object",
            "required": [
              "time",
              "type",
              "category",
              "payload",
              "error_identifier",
              "action"
            ],
            "properties": {
              "time": {
                "description": "",
                "type": "string"
              },
              "type": {
                "description": "",
                "enum": [
                  "DATA ERROR",
                  "SYSTEM ERROR"
                ],
                "type": "string"
              },
              "category": {
                "description": "e.g. Billing, Account, Order, Contact",
                "type": "string"
              },
              "payload": {
                "description": "payload that's being sent to the specific target system",
                "type": "object"
              },
              "error_identifier": {
                "description": "Any Identifier",
                "type": "string"
              },
              "action": {
                "description": "Target system action e.g. create, cancel, update, delete",
                "type": "string"
              }
            }
          }
        }
      },
      "orderHandoffRequest": {
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "This field represents the order id.",
            "example": "801dx00000XEaaQAAT"
          },
          "subOrderId": {
            "type": "string",
            "description": "This field represents the suborder id.",
            "example": "801dx00000XFEm2AAH"
          }
        },
        "required": [
          "orderId",
          "subOrderId"
        ]
      },
      "orderHandoffResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "This field represents the status of the order.",
            "example": "success"
          },
          "message": {
            "type": "string",
            "description": "This field represents the status message of the order.",
            "example": "order submitted and sent to serviceNow"
          }
        }
      }
    }
  }
}