openapi: 3.0.0
info:
  title: HKIMR - Trade with Japan
  description: "For more details, refer the link: https://www.aof.org.hk/research/HKIMR/publications-and-research/hong-kong-economic-history-database/trade-with-japan"
  version: v1
servers:
  - url: https://api.hkma.gov.hk/public
    variables: {}
paths:
  /hkimr/trade-japan:
    get:
      summary: Retrieve data of HKIMR - Trade with Japan
      parameters:
        - name: pagesize
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: offset
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: integer
            format: int32
        - name: fields
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: column
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: filter
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: choose
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: from
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: to
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: sortby
          in: query
          description: ""
          style: form
          explode: true
          schema:
            type: string
        - name: sortorder
          in: query
          description: ""
          style: form
          explode: true
          schema:
            $ref: "#/components/schemas/Sortorder"
      responses:
        "200":
          description: Expected response to a valid request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Response"
        "500":
          description: Unexcpeted error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ErrorResponse"
components:
  schemas:
    Header:
      title: Header
      type: object
      properties:
        success:
          type: boolean
        err_code:
          type: string
        err_msg:
          type: string
    Response:
      title: response
      type: object
      properties:
        header:
          $ref: "#/components/schemas/Header"
        result:
          $ref: "#/components/schemas/Result"
    Result:
      title: Result
      type: object
      properties:
        datasize:
          type: integer
          format: int32
        records:
          type: array
          items:
            $ref: "#/components/schemas/Record"
          description: ""
    Record:
      title: Record
      type: object
      properties:
        Tr_yr:
          type: string
          format: date
        Tr_japimptl_a:
          type: number
        Tr_japexptl_a:
          type: number
        Tr_japimpchi_a:
          type: number
        Tr_japexpchi_a:
          type: number
        Tr_japimpmanc_a:
          type: number
        Tr_japexpmanc_a:
          type: number
        Tr_japimpkt_a:
          type: number
        Tr_japexpkt_a:
          type: number
        Tr_japimphk_a:
          type: number
        Tr_japexphk_a:
          type: number
    Sortorder:
      title: sortorder
      enum:
        - asc
        - desc
      type: string
      example: asc
      x-enum-elements:
        - name: asc
          description: ""
        - name: desc
          description: ""
    ErrorResponse:
      title: errorResponse
      type: object
      properties:
        header:
          $ref: "#/components/schemas/Header"
