swagger: "2.0"
schemes:
  - https
host: www.haloapi.com
basePath: /profile
info:
  contact:
    x-twitter: halo
  description: API that provides Profile information about Players.
  title: Profile
  version: "1.0"
  x-apisguru-categories:
    - entertainment
  x-logo:
    url: https://upload.wikimedia.org/wikipedia/commons/d/d7/Halo_%28series%29_logo.svg
  x-origin:
    - format: swagger
      url: https://developer.haloapi.com/docs/services/58acdc2e21091812784ce8c2/export?DocumentFormat=Swagger
      version: "2.0"
    - format: swagger
      url: https://developer.haloapi.com/docs/services/58acdc2e21091812784ce8c2/export?DocumentFormat=Swagger
      version: "2.0"
  x-providerName: haloapi.com
  x-serviceName: profile
securityDefinitions:
  apiKeyHeader:
    in: header
    name: Ocp-Apim-Subscription-Key
    type: apiKey
  apiKeyQuery:
    in: query
    name: subscription-key
    type: apiKey
security:
  - apiKeyHeader: []
  - apiKeyQuery: []
tags: []
paths:
  "/h5/profiles/{player}/appearance":
    get:
      description: |
        <p>This Endpoint retrieves appearance information for a player.</p>
        <p>If the player is a member of a Company, the Company's ID and Name will be provided. Additional Company information is available via the Stats API.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>July 14, 2017:</strong></p>
            <ul>
                <li>Added Endpoint.</li>
            </ul>
        </div>
      operationId: Halo-5-Player-Appearance
      parameters:
        - description: The Player's Gamertag
          in: path
          name: player
          required: true
          type: string
      produces:
        - application/json
      responses:
        "200":
          description: The response body will contain the Metadata for the Player-created Game Variant.
          examples:
            application/json: |
              {
                // Gamertag of the player. The casing of this field will match the official casing for
                // the player's Gamertag and may differ than what was specified in the request.
                "Gamertag": "string",

                // The date when the player's appearance was last updated. The time component of this
                // date is always set to "00:00:00". This is expressed as an ISO 8601 combined Date and
                // Time.
                "LastModifiedUtc": {

                  "ISO8601Date": "string"
                },

                // The date when the player's appearance was first set. The time component of this date
                // is always set to "00:00:00". This is expressed as an ISO 8601 combined Date and Time.
                "FirstModifiedUtc": {

                  "ISO8601Date": "string"
                },

                // Service Tag for the player.
                "ServiceTag": "string",

                // Company membership information for the player. If the player is not a member of a
                // company, this will be null.
                "Company": {

                  // ID of the company. The company ID can be used to look up additional information
                  // about the company via the Stats API.
                  "Id": "guid",

                  // Name of the company.
                  "Name": "string"
                }
              }
        "404":
          description: Specified Player was not found.
        "500":
          description: Internal Server Error.
      summary: Halo 5 - Player Appearance
  "/h5/profiles/{player}/emblem":
    get:
      description: |
        <p>This Endpoint returns an HTTP Redirect (302 Found) response to the caller with the URL of an image of the Player's Emblem. The initial request to this API that returns the HTTP Redirect is throttled and requires a Subscription Key. However, the image itself (at hostname "image.halocdn.com") is not throttled and does not require a Subscription Key. Note that if the Player later changes their Emblem, the image itself is not refreshed and will need to be refreshed via a new request to this API.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>August 12, 2019:</strong></p>
            <ul>
                <li>Expanded documentation for the HTTP 400 response code to cover unsupported emblem component(s).</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>July 14, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Halo 5 - Emblem Image" to "Halo 5 - Player Emblem Image".</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Emblem Image" to "Halo 5 - Emblem Image".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
      operationId: Halo-5-Player-Emblem-Image
      parameters:
        - description: The Player's Gamertag.
          in: path
          name: player
          required: true
          type: string
        - description: 'An optional size (specified in pixels) of the image requested. When specified, this value must be one of the following values: 95, 128, 190, 256, 512. If a value is specified that is not in this list, the API returns HTTP 400 ("Bad Request"). If the size is empty or missing, the API will use 256.'
          in: query
          name: size
          type: number
      produces:
        - image/png
      responses:
        "302":
          description: Golden Path. The Location header should point at the corresponding Emblem image.
        "400":
          description: An unsupported value was provided for a query string parameter or the Player's Emblem contains unsupported component(s) and cannot be rendered at this time.
        "404":
          description: Specified Player was not found.
        "500":
          description: Internal Server Error.
      summary: Halo 5 - Player Emblem Image
  "/h5/profiles/{player}/spartan":
    get:
      description: |
        <p>This Endpoint returns an HTTP Redirect (302 Found) response to the caller with the URL of an image of the Player's Spartan's appearance. The initial request to this API that returns the HTTP Redirect is throttled and requires a Subscription Key. However, the image itself (at hostname "image.halocdn.com") is not throttled and does not require a Subscription Key. Note that if the Player later changes their Spartan's appearance, the image itself is not refreshed and will need to be refreshed via a new request to this API.</p>
        <br />
        <h4>Changelog</h4>
        <div class="panel-body">
            <p><strong>August 12, 2019:</strong></p>
            <ul>
                <li>Expanded documentation for the HTTP 400 response code to cover unsupported armor component(s).</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>July 14, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Halo 5 - Spartan Image" to "Halo 5 - Player Spartan Image".</li>
            </ul>
        </div>
        <div class="panel-body">
            <p><strong>February 21, 2017:</strong></p>
            <ul>
                <li>Renamed Endpoint from "Spartan Image" to "Halo 5 - Spartan Image".</li>
                <li>Removed "{title}" Request Parameter.</li>
            </ul>
        </div>
      operationId: Halo-5-Player-Spartan-Image
      parameters:
        - description: The Player's Gamertag.
          in: path
          name: player
          required: true
          type: string
        - description: 'An optional size (specified in pixels) of the image requested. When specified, this value must be one of the following values: 95, 128, 190, 256, 512. If a value is specified that is not in this list, the API returns HTTP 400 ("Bad Request"). If the size is empty or missing, the API will use 256.'
          in: query
          name: size
          type: number
        - description: An optional crop that will be used to determine what portion of the Spartan is returned in the image. The value must be either "full" or "portrait". If no value is specified "full" is used. If an unsupported value is provided, the API returns HTTP 400 ("Bad Request").
          in: query
          name: crop
          type: string
      produces:
        - image/png
      responses:
        "302":
          description: Golden Path. The Location header should point at the corresponding Spartan image.
        "400":
          description: An unsupported value was provided for a query string parameter or the Player's Spartan is equipped with unsupported component(s) and cannot be rendered at this time.
        "404":
          description: Specified Player was not found.
        "500":
          description: Internal Server Error.
      summary: Halo 5 - Player Spartan Image
