openapi: 3.0.0
servers:
  - url: https://test.api.amadeus.com/v1
info:
  description: |-
    Before using this API, we recommend you read our **[Authorization Guide](https://developers.amadeus.com/self-service/apis-docs/guides/authorization-262)** for more information on how to generate an access token. 
      
    Please also be aware that our test environment is based on a subset of the production, this API in test only returns a few selected cities. You can find the list in our **[data collection](https://github.com/amadeus4dev/data-collection)**.
  title: Location Score
  version: 1.0.2
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_amadeus.com_images_en_technology_mobile-tablet_mobile-woman-office-city.jpg.transform_medium_img.jpg
  x-origin:
    - format: openapi
      url: https://raw.githubusercontent.com/amadeus4dev/amadeus-open-api-specification/main/spec/json/LocationScore_v1_swagger_specification.json
      version: "3.0"
  x-providerName: amadeus.com
  x-serviceName: amadeus-location-score
paths:
  /location/analytics/category-rated-areas:
    get:
      description: ""
      operationId: get-category-rated-areas
      parameters:
        - description: Latitude in decimal coordinates
          example: 41.397158
          in: query
          name: latitude
          required: true
          schema:
            type: number
        - description: Longitude in decimal coordinates
          example: 2.160873
          in: query
          name: longitude
          required: true
          schema:
            type: number
      responses:
        "200":
          content:
            application/vnd.amadeus+json:
              examples:
                Successful Reply:
                  value:
                    data:
                      - categoryScores:
                          nightLife:
                            overall: 93
                          restaurant:
                            overall: 99
                            vegetarian: 82
                          shopping:
                            luxury: 97
                            overall: 99
                          sight:
                            beachAndPark: 0
                            historical: 86
                            overall: 90
                        geoCode:
                          latitude: 2.160873
                          longitude: 41.397158
                        radius: 200
                        type: category-rated-area
                      - categoryScores:
                          nightLife:
                            overall: 96
                          restaurant:
                            overall: 99
                            vegetarian: 92
                          shopping:
                            luxury: 99
                            overall: 99
                          sight:
                            beachAndPark: 0
                            historical: 89
                            overall: 99
                        geoCode:
                          latitude: 2.160873
                          longitude: 41.397158
                        radius: 500
                        type: category-rated-area
                      - categoryScores:
                          nightLife:
                            overall: 99
                          restaurant:
                            overall: 99
                            vegetarian: 99
                          shopping:
                            luxury: 99
                            overall: 99
                          sight:
                            beachAndPark: 58
                            historical: 99
                            overall: 99
                        geoCode:
                          latitude: 2.160873
                          longitude: 41.397158
                        radius: 1500
                        type: category-rated-area
                    meta:
                      count: 3
                      links:
                        self: https://test.api.amadeus.com/v1/location/analytics/category-rated-areas?latitude=41.397158&longitude=2.160873
              schema:
                properties:
                  data:
                    items:
                      $ref: "#/components/schemas/category-rated-areas"
                    type: array
                  meta:
                    $ref: "#/components/schemas/Meta"
                  warnings:
                    items:
                      $ref: "#/components/schemas/Warning"
                    type: array
                type: object
          description: Successful Reply
        "400":
          content:
            application/vnd.amadeus+json:
              examples:
                example:
                  value:
                    errors:
                      - code: 477
                        detail: invalid query parameter format
                        source:
                          example: "41.397158"
                          parameter: latitude
                        status: 400
                        title: INVALID FORMAT
              schema:
                $ref: "#/components/schemas/Error_400"
          description: |-
            code    | title                                 
            ------- | ------------------------------------- 
            477     | INVALID FORMAT
            572     | INVALID OPTION                            
            32171   | MANDATORY DATA MISSING 
        "500":
          content:
            application/vnd.amadeus+json:
              examples:
                example:
                  value:
                    errors:
                      - code: 141
                        status: 500
                        title: SYSTEM ERROR HAS OCCURRED
              schema:
                $ref: "#/components/schemas/Error_500"
          description: Internal Server Error
      summary: GET category rated areas
      tags:
        - category-rated-areas
    parameters: []
components:
  schemas:
    Error_400:
      description: A set of errors
      properties:
        errors:
          items:
            description: The Error Definition
            properties:
              code:
                description: A machine-readable error code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of error
                type: integer
              detail:
                description: An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized.
                type: string
              source:
                properties:
                  example:
                    description: A sample input to guide the user when resolving this issue
                    type: string
                  parameter:
                    description: The key of the URI path or query parameter that caused the error
                    type: string
                  pointer:
                    description: A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error
                    type: string
                title: Error_Source
                type: object
              status:
                description: The [HTTP status code](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) of this response. This is present only in terminal errors which cause an unsuccessful response. In the case of multiple errors, they must all have the same status.
                type: integer
              title:
                description: An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized
                type: string
            title: Error
            type: object
          type: array
      title: Error 400
      type: object
    Error_500:
      description: A set of errors
      properties:
        errors:
          items:
            description: The Error Definition
            properties:
              code:
                description: A machine-readable error code from the Amadeus Canned Messages table, that will enable the API Consumers code to handle this type of error
                type: integer
              detail:
                description: An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized.
                type: string
              source:
                properties:
                  example:
                    description: A sample input to guide the user when resolving this issue
                    type: string
                  parameter:
                    description: The key of the URI path or query parameter that caused the error
                    type: string
                  pointer:
                    description: A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error
                    type: string
                title: Error_Source
                type: object
              status:
                description: The [HTTP status code](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) of this response. This is present only in terminal errors which cause an unsuccessful response. In the case of multiple errors, they must all have the same status.
                type: integer
              title:
                description: An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized
                type: string
            title: Error
            type: object
          type: array
      title: Error 500
      type: object
    Meta:
      description: Meta information about the returned object(s) in "data"
      properties:
        count:
          description: Total number of object(s) retrieved
          exclusiveMinimum: false
          format: int64
          minimum: 0
          type: integer
        links:
          description: Links related to the returned object(s)
          properties:
            self:
              description: Link to the same page.
              format: url
              type: string
          title: Links
          type: object
      title: Meta
      type: object
    Warning:
      description: The Warning Definition
      properties:
        code:
          description: A machine-readable error code from the Canned Messages table, that will enable the API Consumers code to handle this type of error
          type: integer
        detail:
          description: An easy-to-read explanation specific to this occurrence of the problem. It should give the API consumer an idea of what went wrong and how to recover from it. Like the title, this field’s value can be localized.
          type: string
        source:
          description: The Warning Source Definition
          properties:
            example:
              description: A sample input to guide the user when resolving this issu
              type: string
            parameter:
              description: The key of the URI path or query parameter that caused the error
              type: string
            pointer:
              description: A JSON Pointer [RFC6901] to the associated entity in the request body that caused this error
              type: string
          title: Warning_Source
          type: object
        title:
          description: An error title from the Canned Messages table with a 1:1 correspondence to the error code. This may be localized
          type: string
      required:
        - code
        - title
      title: Warning
      type: object
    category-rated-areas:
      allOf:
        - properties:
            categoryScores:
              description: category scoring of the location
              properties:
                nightLife:
                  description: night life category
                  properties:
                    overall:
                      description: score of nigh life possibility from 0 (nothing to do at night) to 100 (many night activities to enjoy)
                      type: number
                  type: object
                restaurant:
                  description: restaurant category
                  properties:
                    overall:
                      description: score of eating possibility from 0 (no place to eat) to 100 (many restaurants to enjoy)
                      type: number
                    vegetarian:
                      description: score of vegetatian eating possibility from 0 (no place to eat vegetatian) to 100 (many restaurants to enjoy)
                      type: number
                  type: object
                shopping:
                  description: shopping category
                  properties:
                    luxury:
                      description: score of luxury shopping possibility from 0 (no luxury shop) to 100 (many luxury shops to enjoy)
                      type: number
                    overall:
                      description: score of shopping possibility from 0 (no shop) to 100 (many shops to enjoy)
                      type: number
                  type: object
                sight:
                  description: sight category
                  properties:
                    beachAndPark:
                      description: score of outdoor activity possibility from 0 (no outdoor spaces) to 100 (many parks or beaches to enjoy)
                      type: integer
                    historical:
                      description: score of historical discovery possibility from 0 (no historical site) to 100 (many historical site to enjoy)
                      type: integer
                    overall:
                      description: score of sight seeing possibility from 0 (nothing to see) to 100 (many sceneries to enjoy)
                      type: integer
                  type: object
              type: object
            geoCode:
              description: Geographic coordinates describing the position of any location on the surface of Earth
              properties:
                latitude:
                  description: Latitude of the position expressed in decimal degrees (WSG 84), e.g. 6.244203. A positive value denotes northern hemisphere or the equator, and a negative value denotes southern hemisphere. The number of digits to represent the precision of the coordinate.
                  example: 48.85837
                  exclusiveMaximum: false
                  exclusiveMinimum: false
                  format: float
                  maximum: 90
                  minimum: -90
                  type: number
                longitude:
                  description: Longitude of the position expressed in decimal degrees (WSG 84), e.g. -75.581211. A positive value denotes east longitude or the prime meridian, and a negative value denotes west longitude.  The number of digits to represent the precision of the coordinate.
                  example: 2.294481
                  exclusiveMaximum: false
                  exclusiveMinimum: false
                  format: float
                  maximum: 180
                  minimum: -180
                  type: number
              title: GeoCode
              type: object
            radius:
              description: Radius of the area in meters
              type: integer
          type: object
        - description: "Identification of a specific version of a resource  "
          properties:
            type:
              description: Type of the manipulatd resource
              example: PNR
              type: string
          title: Abstract Resource
          type: object
      description: ""
      title: scored-locations
