@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api OpenFIGI API
@base https://api.openfigi.com/v3
@version 2.0.0
@auth ApiKey X-OPENFIGI-APIKEY in header
@endpoints 4
@toc mapping(2), search(1), filter(1)

@group mapping
@endpoint POST /mapping
@desc Allows mapping from third-party identifiers to FIGIs.
@returns(200) A list of FIGIs and their metadata.
@errors {400: Invalid request (body)., 401: Unauthorized., 405: Method Not Allowed., 406: Not Acceptable., 415: Unsupported Media Type., 429: Too Many Requests., 500: Internal Server Error., 503: Service Unavailable.}
@example_request [{"idType":"ID_BB_GLOBAL","idValue":"BBG000BLNNH6"}]

@endpoint GET /mapping/values/{key}
@desc Get values for enum-like fields.
@required {key: str(idType/exchCode/micCode/currency/marketSecDes/securityType/securityType2) # Key of MappingJob for which to get possible values.}
@returns(200) {values: [str]} # The list of values.
@errors {400: Invalid request (body)., 401: Unauthorized., 405: Method Not Allowed., 406: Not Acceptable., 415: Unsupported Media Type., 429: Too Many Requests., 500: Internal Server Error., 503: Service Unavailable.}

@endgroup

@group search
@endpoint POST /search
@desc Search for FIGIs using key words and other filters.
@optional {query: str, start: str # The number of results returned for any given request is fixed. When more results are accessible, the response will contain a next property whose value should be sent in succeeding requests as the value of the start property. This will notify the API to return the next "page" of results.}
@returns(200) A list of FIGIs and their metadata.
@errors {400: Invalid request (body)., 401: Unauthorized., 405: Method Not Allowed., 406: Not Acceptable., 415: Unsupported Media Type., 429: Too Many Requests., 500: Internal Server Error., 503: Service Unavailable.}
@example_request {"query":"ibm","exchCode":"US"}

@endgroup

@group filter
@endpoint POST /filter
@desc Search for FIGIs using key words and other filters. The results are listed alphabetically by FIGI and include the number of results.
@returns(200) A list of FIGIs and their metadata.
@errors {400: Invalid request (body)., 401: Unauthorized., 405: Method Not Allowed., 406: Not Acceptable., 415: Unsupported Media Type., 429: Too Many Requests., 500: Internal Server Error., 503: Service Unavailable.}
@example_request {"query":"ibm","exchCode":"US"}

@endgroup

@end
