{
  "openapi": "3.0.1",
  "info": {
    "version": "1.0.0",
    "title": "S2S API",
    "description": "API provides operations to `retrieve / add' points information.",
    "termsOfService": "https://lvsc-developer.venetianlasvegas.com/terms/",
    "contact": {
      "email": "api-team@venetian.com"
    },
    "license": {
      "name": "VCR Developer 1.0",
      "url": "https://lvsc-developer.venetianlasvegas.com/licenses/LICENSE-1.0.html"
    }
  },
  "servers": [
    {
      "url": "https://vlv-proxy-api-tst.venetianlasvegasdev.com/api/v2",
      "description": "Test environment v2"
    },
    {
      "url": "https://vlv-proxy-api-dev.venetianlasvegasdev.com/api/v2",
      "description": "Dev environment v2"
    },
    {
      "url": "https://vlv-proxy-api-prd.venetianlasvegas.com/api/v2",
      "description": "Prod environment v2"
    },
    {
      "url": "https://vlv-proxy-api-mock.venetianlasvegasdev.com/api/v2",
      "description": "Mock environment v2"
    }
  ],
  "tags": [
    {
      "name": "Add Points Transaction",
      "description": "Operations for the patron to add points into the bucket."
    },
    {
      "name": "Subtract Points Transaction",
      "description": "Operations for the patron to Subtract points from the bucket."
    },
    {
      "name": "General",
      "description": "General operations for the API."
    },
    {
      "name": "Ping",
      "description": "Ping operation to test api responsiveness."
    }
  ],
  "paths": {
    "/s2s/ping": {
      "get": {
        "tags": [
          "Ping"
        ],
        "operationId": "ping",
        "summary": "Ping",
        "responses": {
          "200": {
            "description": "pings internal api",
            "content": {
              "text/html": {}
            }
          }
        }
      }
    },

    "/s2s/addpointstransaction": {
      "post": {
        "tags": [
          "Add Points Transaction"
        ],
        "operationId": "addpointstransaction",
        "summary": "Operations for the patron to add points transaction into the bucket",
        "description": "Add the number of points to the Patron's point bucket .  <br><br>Transactions are allowed only on the point buckets that are configured. Bucket names are mapped to a known name during this operation. This allows consumers to not be affected by periodic bucket name changes, and to add points transactions to only buckets that are of interest. </blockquote><br><br><b>LIST OF POSSIBLE API RESPONSES</b><br><br><table border=\"1\"><thead><tr><th style=\"text-align:center\">Scenario</th><th style=\"text-align:center\">HTTP Status Code</th><td style=\"text-align:center\">&nbsp;&nbsp;Code&nbsp;&nbsp;</th><th style=\"text-align:center\">Response Type</th><th style=\"text-align:center\">Message</th></tr></thead><tbody><tr><td>Successfully processed the transaction</td><td align=\"center\">201</td><td align=\"center\">201</td><td align=\"center\">Success</td><td>{<br>&nbsp;&nbsp;\"code\": \"201\",<br>&nbsp;&nbsp;\"responseType\": \"Success\", <br>&nbsp;&nbsp;\"message\": \"000\"<br>}</td></tr><tr><td>Invalid Request</td><td align=\"center\">400</td><td align=\"center\">400</td><td align=\"center\">Fail</td><td>Bad Request</td></tr><tr><td>Unauthorized Request</td><td align=\"center\">401</td><td align=\"center\">401</td><td align=\"center\">Fail</td><td>Unauthorized</td></tr><tr><td>Error encountered during processing</td><td align=\"center\">500</td><td align=\"center\">500</td><td align=\"center\">Fail</td><td>System Error</td></tr></tbody></table>",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/requestAddPointsTransactionQuery"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/requestAddPointsTransactionQuery"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "500": {
            "description": "Code: 404, ResponseType: Fail, Message: System Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          }
        }
      }
    },
    "/s2s/subtractpointstransaction": {
      "post": {
        "tags": [
          "Subtract Points Transaction"
        ],
        "operationId": "subtractpointstransaction",
        "summary": "Subtract Points Transaction",
        "description": "Deduct the number of points from the Patron's point bucket balance.  <br><br>Transactions are allowed only on the point buckets that are configured. Bucket names are mapped to a known name during this operation. This allows consumers to not be affected by periodic bucket name changes, and to submit transactions to only buckets that are of interest.  <br><br><b>LIST OF POSSIBLE API RESPONSES</b><br><br><table border=\"1\"><thead><tr><th style=\"text-align:center\">Scenario</th><th style=\"text-align:center\">HTTP Status Code</th><td style=\"text-align:center\">&nbsp;&nbsp;Code&nbsp;&nbsp;</th><th style=\"text-align:center\">Response Type</th><th style=\"text-align:center\">Message</th></tr></thead><tbody><tr><td>Successfully processed the transaction</td><td align=\"center\">201</td><td align=\"center\">201</td><td align=\"center\">Success</td><td>{<br>&nbsp;&nbsp;\"code\": \"201\",<br>&nbsp;&nbsp;\"responseType\": \"Success\", <br>&nbsp;&nbsp;\"message\": \"000\"<br>}</td></tr><tr><td>Invalid Request</td><td align=\"center\">400</td><td align=\"center\">400</td><td align=\"center\">Fail</td><td>Bad Request</td></tr><tr><td>Unauthorized Request</td><td align=\"center\">401</td><td align=\"center\">401</td><td align=\"center\">Fail</td><td>Unauthorized</td></tr><tr><td>Error encountered during processing</td><td align=\"center\">500</td><td align=\"center\">500</td><td align=\"center\">Fail</td><td>System Error</td></tr></tbody></table>",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/requestTransferQuery"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/requestTransferQuery"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "500": {
            "description": "Code: 404, ResponseType: Fail, Message: System Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          }
        }
      }
    },
    "/s2s/getsocialinfo": {
      "post": {
        "tags": [
          "General"
        ],
        "operationId": "getsocialinfo",
        "summary": "Operations for the patron to get social security information",
        "description": "Get the social security information of the Patron",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetSocialInfoRequest"
              }
            },
            "application/xml": {
              "schema": {
                "$ref": "#/components/schemas/GetSocialInfoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetSocialInfoResponse"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/GetSocialInfoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          },
          "500": {
            "description": "Code: 404, ResponseType: Fail, Message: System Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              },
              "application/xml": {
                "schema": {
                  "$ref": "#/components/schemas/apiResponses"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {

      "requestAddPointsTransactionQuery": {
        "xml": {
          "name": "requestAddPointsTransactionQuery"
        },
        "type": "object",
        "required": [
          "patronId"
        ],
        "properties": {
          "patronId": {
            "xml": {
              "name": "patronId"
            },
            "type": "string",
            "example": "123456789",
            "description": "Patron Casino Account Number. Max 20 characters in length"
          },
          "bucketName": {
            "xml": {
              "name": "bucketName"
            },
            "type": "string",
            "example": "GRAZIE25",
            "description": "Name of the point bucket for the number of points to be credited. for example bucket name would be GRAZIE25."
          },
          "numberOfPoints": {
            "xml": {
              "name": "numberOfPoints"
            },
            "type": "string",
            "example": "100",
            "description": "Number of points to be credited into the patron's bucket'."
          }
        }
      },

      "requestTransferQuery": {
        "xml": {
          "name": "requestTransferQuery"
        },
        "type": "object",
        "required": [
          "patronId"
        ],
        "properties": {
          "patronId": {
            "xml": {
              "name": "patronId"
            },
            "type": "string",
            "example": "123456789",
            "description": "Patron Casino Account Number. Max 20 characters in length"
          },
          "bucketName": {
            "xml": {
              "name": "bucketName"
            },
            "type": "string",
            "example": "GRAZIE25",
            "description": "Name of the point bucket for the number of points to be redeemed. for example bucket name would be GRAZIE25."
          },
          "numberOfPoints": {
            "xml": {
              "name": "numberOfPoints"
            },
            "type": "string",
            "example": "100",
            "description": "Number of points to be redeemed from the patron's bucket'."
          }
        }
      },
      "GetSocialInfoRequest": {
        "xml": {
          "name": "GetSocialInfoRequest"
        },
        "type": "object",
        "required": [
          "patronId"
        ],
        "properties": {
          "patronId": {
            "xml": {
              "name": "patronId"
            },
            "type": "string",
            "example": "123456789",
            "description": "Patron Casino Account Number."
          }
        }
      },
      "GetSocialInfoResponse": {
        "xml": {
          "name": "GetSocialInfoResponse"
        },
        "type": "object",
        "required": [
          "social"
        ],
        "properties": {
          "social": {
            "xml": {
              "name": "social"
            },
            "type": "string",
            "example": "123456789",
            "description": "Social security number"
          }
        }
      },
      "apiResponses": {
        "xml": {
          "name": "ArrayOfApiResponse",
          "wrapped": true
        },
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/apiResponse"
        }
      },
      "apiResponse": {
        "xml": {
          "name": "ApiResponse"
        },
        "type": "object",
        "properties": {
          "code": {
            "xml": {
              "name": "Code"
            },
            "type": "integer",
            "format": "int32",
            "example": 123,
            "description": "Response code."
          },
          "responseType": {
            "xml": {
              "name": "ResponseType"
            },
            "type": "string",
            "enum": [
              "Success",
              "Fail",
              "Warning"
            ],
            "example": "Fail",
            "description": "Type of response."
          },
          "message": {
            "xml": {
              "name": "Message"
            },
            "type": "string",
            "example": "Operation Response Message. Upon successful 201 response code it returns the transaction id.",
            "description": "List of Response Codes for 500 HTTP STATUS Code ",
            "message": [
              "Code: 500, ResponseType: Fail, Message: System Error",
              "Code: 500, ResponseType: Fail, Message: System Error. ErrorCode:CS09990 ErrorText:Amount Cannot Be Zeros",
              "Code: 500, ResponseType: Fail, Message: System Error. ErrorCode:CS80714 ErrorText:System does not support bucket",
              "Code: 500, ResponseType: Fail, Message: System Error. Transaction is rejected by the gaming system"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}