Skip to content

Instantly share code, notes, and snippets.

@keremcankabadayi
Created May 8, 2019 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keremcankabadayi/1393a95674328792b3a0411f60ae2a06 to your computer and use it in GitHub Desktop.
Save keremcankabadayi/1393a95674328792b3a0411f60ae2a06 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"description": "## TMF API Reference : TMF 673 - Geographic Address Management\n### Release : 17.5 - January 2018\n\nThe Geographic Address API provides a standardized client interface to an Address management system.\nIt allows looking for worldwide addresses.\nIt can also be used to validate geographic address data, to be sure that it corresponds to a real address.\nFinally, it can be used to look for an address by: searching an area as a start (city, town …), then zooming on the streets of this area, and finally listing all the street segments (numbers) in a street.\n\n### Resources\n- GeographicAddress\n\n### Operations\nGeographic Address Management API performs the following operations :\n- Retrieve a geographic address or a collection of geographic addresses",
"version": "1.6",
"title": "API GeographicAddress"
},
"host": "serverRoot",
"basePath": "/geographicAddressManagement/v1/",
"schemes": [
"https"
],
"consumes": [
"application/json;charset=utf-8"
],
"produces": [
"application/json;charset=utf-8"
],
"tags": [
{
"name": "GeographicAddress",
"description": ""
}
],
"paths": {
"/geographicAddress/autoComplete": {
"post": {
"tags": [
"GeographicAddress/autoComplete"
],
"operationId": "geographicAddressAutoComplete",
"description": "Finds all address labels matching the search string.",
"produces": [
"application/json"
],
"parameters": [
{
"name": "geographicAutoCompleteRequest",
"in": "body",
"required": true,
"description": "The search term to find.",
"schema": {
"$ref": "#/definitions/GeographicAutoCompleteRequestVL"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/GeographicAutoCompleteResponseVL"
}
},
"400": {
"description": "Bad Request\n\nList of supported error codes:\n- 39091: Requete invalide",
"schema": {
"$ref": "#/definitions/ErrorRepresentation"
}
},
"500": {
"description": "Internal Server Error\n\nList of supported error codes:\n- 39093: Erreur interne pendant l'appel au backend \n- 39096: Probleme avec le chargement des proprietes pour le package\n- 99999: Erreur non prévue (fatale)"
}
}
}
},
"/geographicAddress": {
"get": {
"tags": [
"GeographicAddress"
],
"operationId": "geographicAddressFind",
"summary": "List geographic addresses",
"description": "This operation is used to retrieve geographic addresses corresponding to search criteria.\nFiltering is allowed on all attributes. See example below.\nAttribute selection is possible for all attributes. Providing filtering criteria is mandatory to avoid too many answers retrieved.\n",
"deprecated": false,
"parameters": [
{
"name": "streetNr",
"required": false,
"in": "query",
"description": "Number identifying a specific property on a public street",
"type": "string"
},
{
"name": "streetNrSuffix",
"required": false,
"in": "query",
"description": "Street number suffix",
"type": "string"
},
{
"name": "streetName",
"required": false,
"in": "query",
"description": "The name of the street",
"type": "string"
},
{
"name": "streetType",
"required": false,
"in": "query",
"description": "Avenue, rue, boulevard, …",
"type": "string"
},
{
"name": "streetSuffix",
"required": false,
"in": "query",
"description": "Street direction",
"type": "string"
},
{
"name": "unitType",
"required": false,
"in": "query",
"description": "Local type (apt, suite, etc...)",
"type": "string"
},
{
"name": "unitNr",
"required": false,
"in": "query",
"description": "Local number",
"type": "string"
},
{
"name": "postcode",
"required": false,
"in": "query",
"description": "Description for a postal area",
"type": "string"
},
{
"name": "locality",
"required": false,
"in": "query",
"description": "\"An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi-rural in nature.\" [ANZLIC-STREET], or a suburb \"a bounded locality within a city, town or shire principally of urban character \" [ANZLICSTREET].",
"type": "string"
},
{
"name": "city",
"required": false,
"in": "query",
"description": "City that the address is in",
"type": "string"
},
{
"name": "stateOrProvince",
"required": false,
"in": "query",
"description": "The State or Province that the address is in",
"type": "string"
},
{
"name": "country",
"required": false,
"in": "query",
"description": "Country that the address is in",
"type": "string"
},
{
"name": "zoning.usageCode",
"required": false,
"in": "query",
"description": "Residential or commercial",
"type": "string"
},
{
"name": "geographicSubAddress.id",
"required": false,
"in": "query",
"description": "The id of the geographicSubAddress entity",
"type": "string"
},
{
"name": "geographicSubAddress.subUnitNumber",
"required": false,
"in": "query",
"description": "The discriminator used for the subunit",
"type": "string"
},
{
"name": "geographicSubAddress.postAddress.id",
"required": false,
"in": "query",
"description": "The id of the postAddress entity",
"type": "string"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/GeographicAddressVL"
}
}
},
"400": {
"description": "Bad Request\n\nList of supported error codes:\n- 39091: Requete invalide",
"schema": {
"$ref": "#/definitions/ErrorRepresentation"
}
},
"404": {
"description": "Not Found\nList of supported error codes:\n- 38752: Resource inexistante",
"schema": {
"$ref": "#/definitions/ErrorRepresentation"
}
},
"500": {
"description": "Internal Server Error\n\nList of supported error codes:\n- 39093: Erreur interne pendant l'appel au backend \n- 39096: Probleme avec le chargement des proprietes pour le package\n- 38750: Erreur lors de l appel au SAG\n- 99999: Erreur non prévue (fatale)"
}
}
}
}
},
"definitions": {
"ErrorRepresentation": {
"description": "Standard tmf error representation",
"required": [
"code",
"reason"
],
"type": "object",
"properties": {
"code": {
"description": "Application related code (as defined in the API or from a common list)",
"type": "string"
},
"reason": {
"description": "Text that explains the reason for error. This can be shown to a client server.",
"type": "string"
},
"message": {
"description": "Text that provides more details and corrective actions related to the error. This can be shown to a client server.",
"type": "string"
},
"status": {
"description": "http error code extension like 400-2",
"type": "string"
},
"referenceError": {
"description": "url pointing to documentation describing the error",
"type": "string"
},
"@type": {
"description": "Class type of the REST resource",
"type": "string"
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "Link to the schema describing the REST resource",
"type": "string"
}
}
},
"GeographicSubAddress": {
"description": "It is used for addressing within a property in an urban area (country properties are often defined differently). It may refer to a building, a building cluster, or a floor of a multistory building.",
"type": "object",
"properties": {
"id": {
"description": "Unique Identifier of the subAddress",
"type": "string"
},
"href": {
"description": "Href of the subAddress",
"type": "string"
},
"type": {
"description": "Type of subAddress : it can be a subunit or a private street",
"type": "string"
},
"name": {
"description": "Name of the subAddress to identify it with a meaningful identification",
"type": "string"
},
"subUnitType": {
"description": "The type of subunit\ne.g.BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF.",
"type": "string"
},
"subUnitNumber": {
"description": "The discriminator used for the subunit\noften just a simple number e.g. FLAT 5, may also be a range",
"type": "string"
},
"levelType": {
"description": "Describes level types within a building",
"type": "string"
},
"levelNumber": {
"description": "Used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2",
"type": "string"
},
"buildingName": {
"description": "Allows for buildings that have well-known names",
"type": "string"
},
"privateStreetNumber": {
"description": "Private streets numbers internal to a private street",
"type": "string"
},
"privateStreetName": {
"description": "Private streets internal to a property (e.g. a university) may have internal names that are not recorded by the land title office",
"type": "string"
},
"@type": {
"description": "Type of the resource for this subAdress",
"type": "string"
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "A link to the schema describing this REST Resource",
"type": "string"
}
}
},
"GeographicAddress": {
"description": "A geographic address is a structured textual way of describing how to find a Property in an urban area (country properties are often defined differently)",
"type": "object",
"properties": {
"id": {
"description": "Unique identifier of the address",
"type": "string"
},
"href": {
"description": "An URI used to access to the address resource",
"type": "string"
},
"streetNr": {
"description": "Number identifying a specific property on a public street. It may be combined with streetNrLast for ranged addresses",
"type": "string"
},
"streetNrSuffix": {
"description": "The first street number suffix",
"type": "string"
},
"streetNrLast": {
"description": "Last number in a range of street numbers allocated to a property",
"type": "string"
},
"streetNrLastSuffix": {
"description": "Last street number suffix for a ranged address",
"type": "string"
},
"streetName": {
"description": "Name of the street or other street type",
"type": "string"
},
"streetType": {
"description": "Alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace, parade, place, tarn, way, wharf",
"type": "string"
},
"streetSuffix": {
"description": "A modifier denoting a relative direction",
"type": "string"
},
"postcode": {
"description": "Descriptor for a postal delivery area, used to speed and simplify the delivery of mail (also known as zipcode)",
"type": "string"
},
"locality": {
"description": "\"An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi-rural in nature.\" [ANZLIC-STREET], or a suburb \"a bounded locality within a city, town or shire principally of urban character \" [ANZLICSTREET].",
"type": "string"
},
"city": {
"description": "City that the address is in",
"type": "string"
},
"stateOrProvince": {
"description": "The State or Province that the address is in",
"type": "string"
},
"country": {
"description": "Country that the address is in",
"type": "string"
},
"@type": {
"description": "Indicates the type of the resource. Here can be 'UrbanPropertyAddress', ‘FormattedAddress’, ‘JapanesePropertyAddress’ , ‘AustralianPropertyAddress’, etc…",
"type": "string"
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "A Link to the schema describing this REST Resource. The resource described 'UrbanPropertyAddress' but a schema could be used for other property address description.",
"type": "string"
},
"geographicSubAddress": {
"type": "array",
"items": {
"$ref": "#/definitions/GeographicSubAddress"
}
}
}
},
"GeographicAutoCompleteRequestVL": {
"type": "object",
"properties": {
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@type": {
"description": "Indicates the type of resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "Link to schema describing this REST resource",
"type": "string"
},
"searchTerm": {
"description": "Text to search",
"type": "string"
},
"country": {
"type": "string",
"description": "The name or ISO 2 or 3 character code for the country to search in. Most country names will be recognised but the use of the ISO country code is recommended for clarity. ",
"default": "CAN"
},
"language": {
"type": "string",
"description": "The 2 character language preference identifier (fr or en). ",
"default": "fr-ca"
}
},
"example": {
"@type": "GeographicAutoCompleteRequestVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"searchTerm": "1590 Lar",
"country": "CA",
"language": "en"
}
},
"GeographicAutoCompleteResponseVL": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeographicAutoCompleteRequestVL"
},
{
"type": "object",
"properties": {
"items": {
"description": "Resulting potential matches",
"type": "array",
"items": {
"$ref": "#/definitions/AutoCompleteItemVL"
}
}
}
}
],
"example": {
"@type": "GeographicAutoCompleteResponseVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"searchTerm": "1590 Lar",
"country": "CA",
"language": "en",
"items": [
{
"@type": "AutoCompleteItemVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"postAddressId": "CA|CP|B|3468576",
"_links": {
"@type": "LinkObjectVL",
"@baseType": "LinkObject",
"@schemaLocation": ".../LinkObjectVL.yml",
"retrieve-geographicAddress": {
"href": "/geographicAddressManagement/v1/geographicAddress?geographicSubAddress.postAddress.Id=CA|CP|B|3468576"
}
},
"label": "1590 Lartigue Ave, Montréal, QC, H2L 3A9",
"highlight": "0-4,5-8"
},
{
"@type": "AutoCompleteItemVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"postAddressId": "CA|CP|B|6898481",
"_links": {
"@type": "LinkObjectVL",
"@baseType": "LinkObject",
"@schemaLocation": ".../LinkObjectVL.yml",
"retrieve-geographicAddress": {
"href": "/geographicAddressManagement/v1/geographicAddress?geographicSubAddress.postAddress.Id=CA|CP|B|6898481"
}
},
"label": "1590 Larocque St, Sherbrooke, QC, J1H 4S3",
"highlight": "0-4,5-8"
}
]
}
},
"AutoCompleteItemVL": {
"type": "object",
"properties": {
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@type": {
"description": "Indicates the type of resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "Link to schema describing this REST resource",
"type": "string"
},
"postAddressId": {
"description": "The id of Canada Post",
"type": "string"
},
"_links": {
"$ref": "#/definitions/LinkObjectVL"
},
"label": {
"description": "Descriptive information about the found item",
"type": "string"
},
"highlight": {
"description": "A list of number ranges identifying the characters to highlight in the text response (zero-based start position and end). ",
"type": "string"
}
}
},
"GeographicAddressVL": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeographicAddress"
},
{
"type": "object",
"properties": {
"geographicSubAddress": {
"type": "array",
"items": {
"$ref": "#/definitions/GeographicSubAddressVL"
}
},
"geographicRegion": {
"type": "array",
"items": {
"$ref": "#/definitions/GeographicRegionVL"
}
}
}
}
],
"example": {
"id": "244160",
"streetNr": "1590",
"streetName": "LARTIGUE",
"streetType": "AV",
"postcode": "H2L3A9",
"locality": "VILLE-MARIE",
"city": "MONTREAL",
"stateOrProvince": "QC",
"country": "CA",
"@type": "GeographicAddressVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"@baseType": "GeographicAddress",
"geographicRegion": [
{
"id": 1,
"name": "REG_BVILL",
"geographicRegionType": "BroadcastRegion",
"@type": "GeographicRegionVL",
"@schemaLocation": ".../GeographicAddressVL.yml"
},
{
"id": 3,
"name": "REG_CO_CS",
"geographicRegionType": "SimSubRegion",
"@type": "GeographicRegionVL",
"@schemaLocation": ".../GeographicAddressVL.yml"
}
],
"geographicSubAddress": [
{
"id": "244160-001",
"@type": "GeographicSubAddressVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"@basetype": "GeographicSubAddress",
"zoning": {
"@type": "ZoningVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"usageCode": "RES"
},
"alternateFicticious": [
{
"@type": "AlternateFicticiousVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"id": "244160-004",
"type": "Ficticious"
},
{
"@type": "AlternateFicticiousVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"id": "244160-005",
"type": "BM"
}
],
"postAddress": [
{
"Id": "CA|CP|B|10212580",
"DomesticId": "10212580",
"Language": "FRE",
"LanguageAlternatives": "FRE,ENG",
"BuildingNumber": "1590",
"Street": "Av Lartigue",
"City": "Montréal",
"Line1": "1590 Av Lartigue",
"Province": "QC",
"ProvinceName": "Québec",
"ProvinceCode": "QC",
"PostalCode": "H2L 3A9",
"CountryName": "CANADA",
"CountryIso2": "CA",
"CountryIso3": "CAN",
"CountryIsoNumber": "124",
"Label": "1590 Av Lartigue MONTRÉAL QC H2L 3A9 CANADA",
"Type": "Residential",
"DataLevel": "Premise",
"@type": "CanadaPostAddressVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"@baseType": "PostAddressVL"
},
{
"Id": "CA|CP|B|10212580",
"DomesticId": "10212580",
"Language": "ENG",
"LanguageAlternatives": "FRE,ENG",
"BuildingNumber": "1590",
"Street": "Av Lartigue",
"City": "Montréal",
"Line1": "1590 Av Lartigue",
"Province": "QC",
"ProvinceName": "Quebec",
"ProvinceCode": "QC",
"PostalCode": "H2L 3A9",
"CountryName": "CANADA",
"CountryIso2": "CA",
"CountryIso3": "CAN",
"CountryIsoNumber": "124",
"Label": "1590 Av Lartigue MONTRÉAL QC H2L 3A9 CANADA",
"Type": "Residential",
"DataLevel": "Premise",
"@type": "CanadaPostAddressVL",
"@schemaLocation": ".../GeographicAddressVL.yml",
"@baseType": "PostAddressVL"
}
]
}
]
}
},
"GeographicSubAddressVL": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/GeographicSubAddress"
},
{
"type": "object",
"properties": {
"zoning": {
"$ref": "#/definitions/ZoningVL"
},
"postAddress": {
"type": "array",
"items": {
"$ref": "#/definitions/CanadaPostAddressVL"
}
},
"alternateFicticious": {
"type": "array",
"items": {
"$ref": "#/definitions/AlternateFicticiousVL"
}
}
}
}
]
},
"ZoningVL": {
"type": "object",
"properties": {
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@type": {
"description": "Indicates the type of resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "Link to schema describing this REST resource",
"type": "string"
},
"zoneNumber": {
"description": "",
"type": "string"
},
"usageCode": {
"description": "Residential or commercial",
"type": "string",
"enum": [
"RES",
"COMM"
]
},
"usageDescription": {
"description": "",
"type": "string"
}
}
},
"PostAddressVL": {
"type": "object",
"properties": {
"@type": {
"description": "Indicates the type of the address reference. Here can be 'CanadaPostAddressVL', ‘QASPostAddress’, etc…",
"type": "string"
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "A Link to the schema describing this REST Resource. The resource described 'UrbanPropertyAddress' but a schema could be used for other property address description.",
"type": "string"
}
}
},
"CanadaPostAddressVL": {
"allOf": [
{
"$ref": "#/definitions/PostAddressVL"
},
{
"type": "object",
"properties": {
"Id": {
"type": "string"
},
"DomesticId": {
"type": "string"
},
"Language": {
"type": "string"
},
"LanguageAlternatives": {
"type": "string"
},
"Department": {
"type": "string"
},
"Company": {
"type": "string"
},
"SubBuilding": {
"type": "string"
},
"BuildingNumber": {
"type": "string"
},
"BuildingName": {
"type": "string"
},
"SecondaryStreet": {
"type": "string"
},
"Street": {
"type": "string"
},
"Block": {
"type": "string"
},
"Neighbourhood": {
"type": "string"
},
"District": {
"type": "string"
},
"City": {
"type": "string"
},
"Line1": {
"type": "string"
},
"Line2": {
"type": "string"
},
"Line3": {
"type": "string"
},
"Line4": {
"type": "string"
},
"Line5": {
"type": "string"
},
"AdminAreaName": {
"type": "string"
},
"AdminAreaCode": {
"type": "string"
},
"Province": {
"type": "string"
},
"ProvinceName": {
"type": "string"
},
"ProvinceCode": {
"type": "string"
},
"PostalCode": {
"type": "string"
},
"CountryName": {
"type": "string"
},
"CountryIso2": {
"type": "string"
},
"CountryIso3": {
"type": "string"
},
"CountryIsoNumber": {
"type": "string"
},
"SortingNumber1": {
"type": "string"
},
"SortingNumber2": {
"type": "string"
},
"Barcode": {
"type": "string"
},
"POBoxNumber": {
"type": "string"
},
"Label": {
"type": "string"
},
"Type": {
"type": "string"
},
"DataLevel": {
"type": "string"
},
"Field1": {
"type": "string"
},
"Field2": {
"type": "string"
},
"Field3": {
"type": "string"
},
"Field4": {
"type": "string"
},
"Field5": {
"type": "string"
},
"Field6": {
"type": "string"
},
"Field7": {
"type": "string"
},
"Field8": {
"type": "string"
},
"Field9": {
"type": "string"
},
"Field10": {
"type": "string"
},
"Field11": {
"type": "string"
},
"Field12": {
"type": "string"
},
"Field13": {
"type": "string"
},
"Field14": {
"type": "string"
},
"Field15": {
"type": "string"
},
"Field16": {
"type": "string"
},
"Field17": {
"type": "string"
},
"Field18": {
"type": "string"
},
"Field19": {
"type": "string"
},
"Field20": {
"type": "string"
}
}
}
]
},
"LinkObjectVL": {
"description": "A Link Object represents a hyperlink from the containing resource to a URI.",
"properties": {
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@type": {
"description": "Indicates the type of resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "Link to schema describing this REST resource",
"type": "string"
},
"retrieve-geographicAddress": {
"$ref": "#/definitions/Href"
}
}
},
"Href": {
"type": "object",
"properties": {
"href": {
"type": "string"
}
}
},
"GeographicRegionVL": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"geographicRegionType": {
"type": "string"
},
"@type": {
"type": "string",
"description": "The class type of the actual resource."
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "A Link to the schema describing this REST Resource. The resource described 'UrbanPropertyAddress' but a schema could be used for other property address description.",
"type": "string"
}
}
},
"AlternateFicticiousVL": {
"type": "object",
"properties": {
"@type": {
"type": "string",
"description": "The class type of the actual resource."
},
"@baseType": {
"description": "Indicates the base type of the resource. Here can be resourceQualification",
"type": "string"
},
"@schemaLocation": {
"description": "A Link to the schema describing this REST Resource. The resource described 'UrbanPropertyAddress' but a schema could be used for other property address description.",
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Real",
"Ficticious",
"Aitp",
"Fsi",
"FicticiousEFH",
"BM"
]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment