diff --git a/README.md b/README.md index f38cb89b..a2340eef 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ An OpenAPI specification for Woosmap Platform. | [Geolocation](https://developers.woosmap.com/products/geolocation-api/location/) | Complete | | [Stores](https://developers.woosmap.com/products/stores-api/overview/) | Complete | | [Localities](https://developers.woosmap.com/products/localities/get-started/) | Complete | -| [Address](https://developers.woosmap.com/products/address-api/get-started/) | Complete | | [Distance](https://developers.woosmap.com/products/distance-api/get-started/) | Complete | | [Transit](https://developers.woosmap.com/products/transit-api/route-endpoint/) | Complete | | [Indoor](https://developers.woosmap.com/products/indoor-api/get-started/) | Complete | diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.html b/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.html deleted file mode 100644 index 729f0f40..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.html +++ /dev/null @@ -1,69 +0,0 @@ - - -
- The text string on which to search, for example: "london" or "123 Cross - Road". The Woosmap Address API will return predictions matches based on - this string and order the results based on their perceived relevance. -
-
- To restrict your results to specific areas. Currently, you can use
- components to filter over countries. Countries must be passed as three
- characters string (ISO 3166-1 Alpha 3). Components should be passed as an
- array of different options which are separated by a |.
-
- The language code, using ISO 639-1 country codes, indicating in which - language the results should be returned, if possible. If language is not - supplied, the Localities service will use the default language of each - country. -
-
- Bias for the results. Should be pass in lat,lng
- format.
-
- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.md b/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.md deleted file mode 100644 index 6213c941..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressautocomplete.md +++ /dev/null @@ -1,29 +0,0 @@ - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - \ No newline at end of file diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressdetails.html b/dist/documentation/parameters/woosmap_http_parameters_addressdetails.html deleted file mode 100644 index 29952af6..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressdetails.html +++ /dev/null @@ -1,64 +0,0 @@ - - -- A textual identifier that uniquely identifies a locality, returned from an - Address Autocomplete. -
-
- To specify the format for the short
- country code
- expected to be returned in the address_components field (default is
- alpha3).
-
- Used to limit the returning fields (by default, all fields are return).
- Available fields are (geometry) (fields should be separated by a
- ,). By using this parameter you will limit content of
- responses to the geometry part. No address component will be returned.
-
- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressdetails.md b/dist/documentation/parameters/woosmap_http_parameters_addressdetails.md deleted file mode 100644 index 47b230cd..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressdetails.md +++ /dev/null @@ -1,25 +0,0 @@ - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - \ No newline at end of file diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.html b/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.html deleted file mode 100644 index 3b258a09..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.html +++ /dev/null @@ -1,90 +0,0 @@ - - -- The address of which to find the coordinates for. A partial address is - less likely to return the proper coordinates than the complete address. -
-
- To specify the format for the short
- country code
- expected to be returned in the address_components field (default is
- alpha3).
-
- To restrict your results to specific areas. Currently, you can use
- components to filter over countries. Countries must be passed as three
- characters string (ISO 3166-1 Alpha 3). Components should be passed as an
- array of different options which are separated by a |.
-
- The language code, using ISO 639-1 country codes, indicating in which - language the results should be returned, if possible. If language is not - supplied, the Localities service will use the default language of each - country. -
-
- Geographic coordinates. Should be pass in lat,lng
- format.
-
- Maximum number of results to be returned (value from 1 to 100, default - values for geocode request [20] and for reverse geocode request [1]) -
-
- Bias for the results. Should be pass in lat,lng
- format.
-
- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.md b/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.md deleted file mode 100644 index b6abeb46..00000000 --- a/dist/documentation/parameters/woosmap_http_parameters_addressgeocode.md +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - \ No newline at end of file diff --git a/dist/documentation/parameters/woosmap_http_parameters_localitiesdetails.html b/dist/documentation/parameters/woosmap_http_parameters_localitiesdetails.html index c3becbed..49ea7cd3 100644 --- a/dist/documentation/parameters/woosmap_http_parameters_localitiesdetails.html +++ b/dist/documentation/parameters/woosmap_http_parameters_localitiesdetails.html @@ -39,8 +39,9 @@
To specify the format for the short
country code
- expected to be returned in the address_components field (default is
- alpha3).
+ expected to be returned in the address_components field. Default is the
+ format used to specify components or alpha2 if
+ no components are specified.
Address Collection Response containing Localities
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -- Array<AddressAutocompleteResponse> - | -- See - AddressAutocompleteResponse - for more information. - | -
-
-
- |
- optional | -AddressStatus | -- See AddressStatus for - more information. - | -
-{
- "predictions": [
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "description": "London, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz",
- "description": "Londonderry, Northern Ireland, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw",
- "description": "London Heathrow Airport, Hounslow, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy",
- "description": "London Luton Airport, Luton, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- }
- ],
- "status": "OK"
-}
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressautocompletecollectionresponse.md b/dist/documentation/schemas/woosmap_http_schema_addressautocompletecollectionresponse.md deleted file mode 100644 index 021d1203..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressautocompletecollectionresponse.md +++ /dev/null @@ -1,77 +0,0 @@ - - -predictionsstatus{
- "predictions": [
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "description": "London, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz",
- "description": "Londonderry, Northern Ireland, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw",
- "description": "London Heathrow Airport, Hounslow, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- },
- {
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy",
- "description": "London Luton Airport, Luton, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
- }
- ],
- "status": "OK"
-}
-
-Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.html b/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.html deleted file mode 100644 index 02d885df..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.html +++ /dev/null @@ -1,74 +0,0 @@ - - -
- Contains a set of substrings for description. Each substring is identified by
- an offset and a length.`
-
| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -- Array<MatchedSubstring> - | -
-
-
- match substrings for address - See MatchedSubstring for more - information. - - |
-
- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.md b/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.md deleted file mode 100644 index f6ea2bd3..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressautocompletematchedfields.md +++ /dev/null @@ -1,16 +0,0 @@ - - -descriptionmatch substrings for address description
See MatchedSubstring for more information.
Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.html b/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.html deleted file mode 100644 index 44801ff3..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.html +++ /dev/null @@ -1,164 +0,0 @@ - - -Attributes describing an Address.
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -string | -
-
-
- - Address description to be used as suggestion in drop down list if - needed. - - |
-
-
-
- |
- optional | -- AddressAutocompleteMatchedFields - | -- See - AddressAutocompleteMatchedFields - for more information. - | -
-
-
- |
- optional | -string | -
-
-
- - Contains a unique ID for each suggestion. Please use this ID if you - need to give us feedbacks on results. This ID is also required to - perform Address Details request. - - |
-
-
-
- |
- optional | -AddressStatus | -- See AddressStatus for - more information. - | -
-
-
- |
- optional | -AddressTypes | -- See AddressTypes for - more information. - | -
-{
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "description": "London, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
-}
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.md b/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.md deleted file mode 100644 index 4e283acf..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressautocompleteresponse.md +++ /dev/null @@ -1,36 +0,0 @@ - - -descriptionAddress description to be used as suggestion in drop down list if needed.
matched_substringpublic_idContains a unique ID for each suggestion. Please use this ID if you need to give us feedbacks on results. This ID is also required to perform Address Details request.
statustype{
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "description": "London, England, United Kingdom",
- "matched_substring": {
- "description": [
- {
- "offset": 0,
- "length": 4
- }
- ]
- },
- "type": "locality"
-}
-
-Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.html b/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.html deleted file mode 100644 index 519b71e3..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.html +++ /dev/null @@ -1,148 +0,0 @@ - - -Address Details Response
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -object | -
-
-
- the root node of address details - |
-
-
-
- |
- optional | -AddressStatus | -- See AddressStatus for - more information. - | -
-{
- "result": {
- "formatted_address": "London, England, United Kingdom",
- "types": [
- "locality"
- ],
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "address_components": [
- {
- "types": [
- "country"
- ],
- "long_name": "United Kingdom",
- "short_name": "GBR"
- },
- {
- "types": [
- "state"
- ],
- "long_name": "England",
- "short_name": "England"
- },
- {
- "types": [
- "county"
- ],
- "long_name": "London",
- "short_name": "LDN"
- },
- {
- "long_name": "London",
- "short_name": "London",
- "types": [
- "locality"
- ]
- },
- {
- "long_name": "SW1A 2",
- "short_name": "SW1A 2",
- "types": [
- "postal_code"
- ]
- }
- ],
- "geometry": {
- "location_type": "GEOMETRIC_CENTER",
- "location": {
- "lat": 51.50643,
- "lng": -0.12719
- },
- "viewport": {
- "northeast": {
- "lat": 51.68629,
- "lng": 0.28206
- },
- "southwest": {
- "lat": 51.28043,
- "lng": -0.56316
- }
- }
- }
- },
- "status": "OK"
-}
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.md b/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.md deleted file mode 100644 index fe19e42e..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressdetailsresponse.md +++ /dev/null @@ -1,84 +0,0 @@ - - -resultthe root node of address details
status{
- "result": {
- "formatted_address": "London, England, United Kingdom",
- "types": [
- "locality"
- ],
- "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0",
- "address_components": [
- {
- "types": [
- "country"
- ],
- "long_name": "United Kingdom",
- "short_name": "GBR"
- },
- {
- "types": [
- "state"
- ],
- "long_name": "England",
- "short_name": "England"
- },
- {
- "types": [
- "county"
- ],
- "long_name": "London",
- "short_name": "LDN"
- },
- {
- "long_name": "London",
- "short_name": "London",
- "types": [
- "locality"
- ]
- },
- {
- "long_name": "SW1A 2",
- "short_name": "SW1A 2",
- "types": [
- "postal_code"
- ]
- }
- ],
- "geometry": {
- "location_type": "GEOMETRIC_CENTER",
- "location": {
- "lat": 51.50643,
- "lng": -0.12719
- },
- "viewport": {
- "northeast": {
- "lat": 51.68629,
- "lng": 0.28206
- },
- "southwest": {
- "lat": 51.28043,
- "lng": -0.56316
- }
- }
- }
- },
- "status": "OK"
-}
-
-Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.html b/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.html deleted file mode 100644 index 72cfe00c..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.html +++ /dev/null @@ -1,175 +0,0 @@ - - -- Address Geocode Collection Response. Contains one or more Addresses with - coordinates (default to one result for reverse geocoding) -
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -- Array<AddressGeocodeResponse> - | -- See - AddressGeocodeResponse - for more information. - | -
-
-
- |
- optional | -AddressStatus | -- See AddressStatus for - more information. - | -
-{
- "results": [
- {
- "formatted_address": "Place de la Résistance, 75007 Paris, France",
- "types": [
- "address",
- "route"
- ],
- "address_components": [
- {
- "types": [
- "country"
- ],
- "long_name": "France",
- "short_name": "FRA"
- },
- {
- "types": [
- "state"
- ],
- "long_name": "Ile-de-France",
- "short_name": "IDF"
- },
- {
- "types": [
- "county"
- ],
- "long_name": "Paris",
- "short_name": "Paris"
- },
- {
- "long_name": "Paris",
- "short_name": "Paris",
- "types": [
- "locality"
- ]
- },
- {
- "long_name": "7th Arrondissement",
- "short_name": "7th Arrondissement",
- "types": [
- "district"
- ]
- },
- {
- "long_name": "Place de la Résistance",
- "short_name": "Place de la Résistance",
- "types": [
- "route"
- ]
- },
- {
- "long_name": "75007",
- "short_name": "75007",
- "types": [
- "postal_code"
- ]
- }
- ],
- "geometry": {
- "location_type": "GEOMETRIC_CENTER",
- "location": {
- "lat": 48.86213,
- "lng": 2.30152
- },
- "viewport": {
- "northeast": {
- "lat": 48.86231,
- "lng": 2.30541
- },
- "southwest": {
- "lat": 48.86191,
- "lng": 2.30147
- }
- }
- }
- }
- ],
- "status": "OK"
-}
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.md b/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.md deleted file mode 100644 index 250d020a..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocodecollectionresponse.md +++ /dev/null @@ -1,100 +0,0 @@ - - -resultsstatus{
- "results": [
- {
- "formatted_address": "Place de la Résistance, 75007 Paris, France",
- "types": [
- "address",
- "route"
- ],
- "address_components": [
- {
- "types": [
- "country"
- ],
- "long_name": "France",
- "short_name": "FRA"
- },
- {
- "types": [
- "state"
- ],
- "long_name": "Ile-de-France",
- "short_name": "IDF"
- },
- {
- "types": [
- "county"
- ],
- "long_name": "Paris",
- "short_name": "Paris"
- },
- {
- "long_name": "Paris",
- "short_name": "Paris",
- "types": [
- "locality"
- ]
- },
- {
- "long_name": "7th Arrondissement",
- "short_name": "7th Arrondissement",
- "types": [
- "district"
- ]
- },
- {
- "long_name": "Place de la Résistance",
- "short_name": "Place de la Résistance",
- "types": [
- "route"
- ]
- },
- {
- "long_name": "75007",
- "short_name": "75007",
- "types": [
- "postal_code"
- ]
- }
- ],
- "geometry": {
- "location_type": "GEOMETRIC_CENTER",
- "location": {
- "lat": 48.86213,
- "lng": 2.30152
- },
- "viewport": {
- "northeast": {
- "lat": 48.86231,
- "lng": 2.30541
- },
- "southwest": {
- "lat": 48.86191,
- "lng": 2.30147
- }
- }
- }
- }
- ],
- "status": "OK"
-}
-
-Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.html b/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.html deleted file mode 100644 index d9e97b36..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.html +++ /dev/null @@ -1,145 +0,0 @@ - - -Address Geocode Response
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -- AddressComponents - | -- See - AddressComponents - for more information. - | -
-
-
- |
- optional | -- FormattedAddress - | -- See - FormattedAddress - for more information. - | -
-
-
- |
- optional | -- AddressGeometry - | -- See - AddressGeometry - for more information. - | -
-
-
- |
- optional | -- Array<AddressGeocodeTypes> - | -
-
-
-
- The types of result. If result type is a - See AddressGeocodeTypes for more - information. - - |
-
- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.md b/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.md deleted file mode 100644 index 62ac5eb5..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocoderesponse.md +++ /dev/null @@ -1,19 +0,0 @@ - - -address_componentsformatted_addressgeometrytypesThe types of result. If result type is a place, additional types may be returned (eat_and_drink, going_out_entertainment, sights_and_museums, natural_and_geographical, transport, accommodations, leisure_and_outdoor, shopping, business_and_services, facilities, areas_and_buildings)
See AddressGeocodeTypes for more information.
Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.html b/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.html deleted file mode 100644 index 66021fc0..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Contains the type of result.
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.md b/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.md deleted file mode 100644 index e23b5878..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeocodetypes.md +++ /dev/null @@ -1,12 +0,0 @@ - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeometry.html b/dist/documentation/schemas/woosmap_http_schema_addressgeometry.html deleted file mode 100644 index 013783ea..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeometry.html +++ /dev/null @@ -1,134 +0,0 @@ - - -- The location of the result, in latitude and longitude. Accuracy is also - provided. -
-| Field | -Required | -Type | -Description | -
|---|---|---|---|
-
-
- |
- optional | -LatLngLiteral | -- See LatLngLiteral for - more information. - | -
-
-
- |
- optional | -string | -
-
-
- - Specifies additional data about the geocoded location. The following - values are currently supported: - -
- The allowed values include:
- ROOFTOP,
- RANGE_INTERPOLATED, GEOMETRIC_CENTER, and
- APPROXIMATE
- |
-
-
-
- |
- optional | -Bounds | -- See Bounds for more information. - | -
-{
- "location": {
- "lat": 48.829405,
- "lng": 2.367944
- },
- "location_type": "GEOMETRIC_CENTER"
-}
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressgeometry.md b/dist/documentation/schemas/woosmap_http_schema_addressgeometry.md deleted file mode 100644 index c0f54e9c..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressgeometry.md +++ /dev/null @@ -1,28 +0,0 @@ - - -locationlocation_typeSpecifies additional data about the geocoded location. The following values are currently supported:
ROOFTOP result is a precise geocode for which we have location information accurate down to street address precision.RANGE_INTERPOLATED result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.GEOMETRIC_CENTER result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …).APPROXIMATE result is approximate (usually when no other above value applies)viewport{
- "location": {
- "lat": 48.829405,
- "lng": 2.367944
- },
- "location_type": "GEOMETRIC_CENTER"
-}
-
-Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressstatus.html b/dist/documentation/schemas/woosmap_http_schema_addressstatus.html deleted file mode 100644 index ab48f8ab..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressstatus.html +++ /dev/null @@ -1,49 +0,0 @@ - - -- Returns more info on if the request was successful or not, valid responses. -
-OK indicates the response contains a valid result.INVALID_REQUEST indicates that the provided request was invalid
- (e.g. wrong URL syntax).
- REQUEST_DENIED indicates that the service denied use of the
- Address API (e.g. wrong API Key, wrong/no referer, …).
- UNKNOWN_ERROR indicates an Address API request could not be
- processed due to a server error. The request may succeed if you try again.
- - Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addressstatus.md b/dist/documentation/schemas/woosmap_http_schema_addressstatus.md deleted file mode 100644 index 88fad7cd..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addressstatus.md +++ /dev/null @@ -1,17 +0,0 @@ - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addresstypes.html b/dist/documentation/schemas/woosmap_http_schema_addresstypes.html deleted file mode 100644 index cc75dcde..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addresstypes.html +++ /dev/null @@ -1,32 +0,0 @@ - - -Contains the type of result.
-- Generated from the - OpenAPI specification. - ✎ Edit - Report bug -
- - diff --git a/dist/documentation/schemas/woosmap_http_schema_addresstypes.md b/dist/documentation/schemas/woosmap_http_schema_addresstypes.md deleted file mode 100644 index 6450c58b..00000000 --- a/dist/documentation/schemas/woosmap_http_schema_addresstypes.md +++ /dev/null @@ -1,12 +0,0 @@ - - -Generated from the OpenAPI specification. -✎ Edit - Report bug -
- - diff --git a/dist/merged-woosmap-openapi3.json b/dist/merged-woosmap-openapi3.json index 1a8dce38..fc319110 100755 --- a/dist/merged-woosmap-openapi3.json +++ b/dist/merged-woosmap-openapi3.json @@ -53,13 +53,6 @@ "url": "https://developers.woosmap.com/products/localities/get-started/" } }, - { - "name": "Address API", - "description": "Woosmap Address API is a web service that returns addresses and other geographical places in response to an HTTP request. Request is done over HTTPS using GET. Response is formatted as JSON. You must specify a key in your request, included as the value of a `key` parameter for your public key or `private_key` for your private key. This key identifies your application for purposes of quota management. Learn how to [get a key](https://developers.woosmap.com/support/api-keys/).\n>**⚠️ This API has been deprecated in favour of Localities API**\n", - "externalDocs": { - "url": "https://developers.woosmap.com/products/address-api/get-started/" - } - }, { "name": "Store Search" }, @@ -114,167 +107,209 @@ } ], "paths": { - "/address/autocomplete/json": { - "get": { - "deprecated": true, - "summary": "Autocomplete for Addresses", - "operationId": "addressAutocomplete", + "/stores": { + "post": { + "summary": "Create your Assets", + "operationId": "createStores", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Data Management" ], - "description": "Autocomplete on worldwide suggestions for a for text-based geographic searches. It can match on full words as well as substrings.\n", + "description": "Used to batch create Assets to a specific project identified with the `private_key` parameter.\n", "security": [ - { - "Woosmap_Platform_API_Reference_PublicApiKeyAuth": [], - "Woosmap_Platform_API_Reference_RefererHeader": [] - }, { "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] - }, - { - "Woosmap_Platform_API_Reference_PrivateApiKeyHeaderAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_input-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_address_components" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_location-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_language-3" } ], - "responses": { - "200": { - "description": "Autocompletion Address successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressAutocompleteCollectionResponse" - }, - "examples": { - "default": { - "summary": "Autocomplete address results for input `Lond` and components `country:gb`", - "value": { - "predictions": [ - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" + "requestBody": { + "description": "The request body must of Stores Creation be formatted as JSON.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetsCollectionRequest" + }, + "examples": { + "default": { + "summary": "Stores data to create as JSON", + "value": { + "stores": [ + { + "types": [ + "drive", + "click_and_collect" + ], + "tags": [ + "wifi", + "covered_parking" + ], + "location": { + "lat": 38.719, + "lng": -77.1067 }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz", - "description": "Londonderry, Northern Ireland, United Kingdom", - "matched_substring": { - "description": [ + "storeId": "STORE_ID_123456", + "name": "My Cool Store", + "address": { + "lines": [ + "Building Centre", + "26 Store Street" + ], + "countryCode": "UK", + "city": "London", + "zipcode": "WC1E 7BT" + }, + "contact": { + "website": "https://www.woosmap.com", + "phone": "+44 20 7693 4000", + "email": "contact@woosmap.com" + }, + "userProperties": { + "some_user_properties": "associated user value" + }, + "openingHours": { + "timezone": "Europe/London", + "usual": { + "1": [], + "default": [ { - "offset": 0, - "length": 4 + "start": "08:30", + "end": "22:00" } ] }, - "type": "locality" - }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw", - "description": "London Heathrow Airport, Hounslow, England, United Kingdom", - "matched_substring": { - "description": [ + "special": { + "2015-02-07": [ { - "offset": 0, - "length": 4 + "start": "08:00", + "end": "23:00" } ] - }, - "type": "locality" + } + } + }, + { + "types": [ + "drive" + ], + "tags": [ + "covered_parking" + ], + "location": { + "lat": 38.5239, + "lng": -77.0157 }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy", - "description": "London Luton Airport, Luton, England, United Kingdom", - "matched_substring": { - "description": [ + "storeId": "STORE_ID_45678", + "name": "My Cool Store 2", + "address": { + "lines": [ + "1805-1899", + "Orchard St" + ], + "countryCode": "US", + "city": "Alexandria", + "zipcode": "22309" + }, + "contact": { + "website": "https://www.woosmap.com", + "phone": "+44 20 7693 4000", + "email": "contact@woosmap.com" + }, + "userProperties": { + "some_user_properties": "associated user value" + }, + "openingHours": { + "timezone": "America/New_York", + "usual": { + "1": [], + "default": [ { - "offset": 0, - "length": 4 + "start": "08:30", + "end": "22:00" } ] - }, - "type": "locality" + } } - ], - "status": "OK" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Assets successfully created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" + }, + "examples": { + "default": { + "summary": "Success response for Stores Created", + "value": { + "status": "success", + "value": "2 stores" } } } } } }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "400": { + "description": "Invalid. The data is not a valid JSON.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error400" }, "examples": { - "Unauthorized": { - "summary": "Error 401", + "Invalid": { + "summary": "Error 400", "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" + "status": "error", + "value": "The request is invalid, the data is not a valid JSON." } } } } } }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "401": { + "description": "Unauthorized. Incorrect authentication credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" }, "examples": { - "Forbidden": { - "summary": "Error 403", + "Unauthorized": { + "summary": "Error 401", "value": { - "detail": "This Woosmap API is not enabled for this project." + "detail": "Incorrect authentication credentials. Please check or use a valid API Key" } } } } } }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", + "403": { + "description": "Forbidden. This Woosmap API is not enabled for this project.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error429" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" }, "examples": { "Forbidden": { - "summary": "Error 429", + "summary": "Error 403", "value": { - "detail": "The rate limit for this endpoint has been exceeded" + "detail": "This Woosmap API is not enabled for this project." } } } @@ -286,132 +321,143 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "curl -L 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n}'" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] - } - }, - "/address/details/json": { - "get": { - "deprecated": true, - "summary": "Details of an Address", - "operationId": "addressDetails", + }, + "put": { + "summary": "Update the Assets", + "operationId": "updateStores", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Data Management" ], - "description": "Provides details of an address autocomplete suggestion (using the suggestion’s `public_id`).\n", + "description": "Used to update assets in batch. `storeId` must exists when using `PUT` method, if one asset does not exists, the batch will be refused.", "security": [ - { - "Woosmap_Platform_API_Reference_PublicApiKeyAuth": [], - "Woosmap_Platform_API_Reference_RefererHeader": [] - }, { "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] - }, - { - "Woosmap_Platform_API_Reference_PrivateApiKeyHeaderAuth": [] - } - ], - "parameters": [ - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_public_id-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_fields-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format" } ], - "responses": { - "200": { - "description": "Details Address successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressDetailsResponse" - }, - "examples": { - "default": { - "summary": "Address Details for `London, England, United Kingdom`", - "value": { - "result": { - "formatted_address": "London, England, United Kingdom", + "requestBody": { + "description": "The request body of Stores Update must be formatted as JSON.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetsCollectionRequest" + }, + "examples": { + "default": { + "summary": "Stores data to update as JSON", + "value": { + "stores": [ + { "types": [ - "locality" + "drive", + "click_and_collect" ], - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "United Kingdom", - "short_name": "GBR" - }, - { - "types": [ - "state" - ], - "long_name": "England", - "short_name": "England" - }, - { - "types": [ - "county" - ], - "long_name": "London", - "short_name": "LDN" - }, - { - "long_name": "London", - "short_name": "London", - "types": [ - "locality" + "tags": [ + "wifi", + "covered_parking" + ], + "location": { + "lat": 38.719, + "lng": -77.1067 + }, + "storeId": "STORE_ID_123456", + "name": "My Cool Store", + "address": { + "lines": [ + "698-500", + " Lloyds Ln" + ], + "countryCode": "US", + "city": "Alexandria", + "zipcode": "VA 22302" + }, + "contact": { + "website": "https://www.woosmap.com", + "phone": "+44 20 7693 4000", + "email": "contact@woosmap.com" + }, + "userProperties": { + "some_user_properties": "associated user value" + }, + "openingHours": { + "timezone": "Europe/London", + "usual": { + "1": [], + "default": [ + { + "start": "08:30", + "end": "22:00" + } ] }, - { - "long_name": "SW1A 2", - "short_name": "SW1A 2", - "types": [ - "postal_code" + "special": { + "2015-02-07": [ + { + "start": "08:00", + "end": "23:00" + } ] } - ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 51.50643, - "lng": -0.12719 - }, - "viewport": { - "northeast": { - "lat": 51.68629, - "lng": 0.28206 - }, - "southwest": { - "lat": 51.28043, - "lng": -0.56316 - } - } } - }, - "status": "OK" + } + ] + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Assets successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" + }, + "examples": { + "default": { + "summary": "Success response for Stores updated", + "value": { + "status": "success", + "value": "1 stores" + } + } + } + } + } + }, + "400": { + "description": "Invalid. The data is not a valid JSON.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error400" + }, + "examples": { + "Invalid": { + "summary": "Error 400", + "value": { + "status": "error", + "value": "The request is invalid, the data is not a valid JSON." } } } @@ -453,19 +499,104 @@ } } } + } + }, + "x-codeSamples": [ + { + "lang": "curl", + "label": "cURL", + "source": "curl -L -X PUT 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n}'" }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", + { + "lang": "python", + "label": "Python", + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'put',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + } + ] + }, + "delete": { + "summary": "Delete the Assets", + "operationId": "deleteStores", + "servers": [ + { + "url": "https://api.woosmap.com" + } + ], + "tags": [ + "Data Management" + ], + "description": "Used to delete one or more assets. The `storeId` specified in `query` parameter is the id of the asset to delete. To delete several assets, use the comma as a separator. To delete all project assets, omit the `query` parameter.\n", + "security": [ + { + "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "query", + "description": "The query to target assets ID to delete", + "in": "query", + "example": "idstore:[{storeId1},{storeId2}]", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Assets successfully deleted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error429" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" + }, + "examples": { + "default": { + "summary": "Success response for Stores deleted", + "value": { + "status": "success", + "value": 2 + } + } + } + } + } + }, + "401": { + "description": "Unauthorized. Incorrect authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" + }, + "examples": { + "Unauthorized": { + "summary": "Error 401", + "value": { + "detail": "Incorrect authentication credentials. Please check or use a valid API Key" + } + } + } + } + } + }, + "403": { + "description": "Forbidden. This Woosmap API is not enabled for this project.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" }, "examples": { "Forbidden": { - "summary": "Error 429", + "summary": "Error 403", "value": { - "detail": "The rate limit for this endpoint has been exceeded" + "detail": "This Woosmap API is not enabled for this project." } } } @@ -477,35 +608,34 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "curl -L -X DELETE 'https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY'" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\n\nlet config = {\n method: 'delete',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] } }, - "/address/geocode/json": { + "/stores/{storeId}": { "get": { - "deprecated": true, - "summary": "Geocode an Address or Reverse Geocode a latlng", - "operationId": "addressGeocode", + "summary": "Get Asset from ID", + "operationId": "getStore", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Data Management" ], - "description": "Provides details for an address or a geographic position. Either parameter `address` **or** `latlng` is required. Maximum of 25 queries per second (QPS)\n", + "description": "Used to retrieve an asset from his `storeId`\n", "security": [ { "Woosmap_Platform_API_Reference_PublicApiKeyAuth": [], @@ -520,117 +650,202 @@ ], "parameters": [ { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_address-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_latlng-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_address_components" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_language-3" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_location-2" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format" - }, - { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-3" + "in": "path", + "name": "storeId", + "schema": { + "type": "string" + }, + "required": true, + "example": "STORE_ID_123456", + "description": "ID of the asset to get" } ], "responses": { "200": { - "description": "Request Address Geocode successful", + "description": "Asset successfully retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressGeocodeCollectionResponse" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetFeatureResponse" }, "examples": { "default": { - "summary": "Geocode Results for address `Place de la Resistance` with components `country:FR`", + "summary": "Get a store from its store_id", "value": { - "results": [ - { - "formatted_address": "Place de la Résistance, 75007 Paris, France", - "types": [ - "address", - "route" + "type": "Feature", + "properties": { + "store_id": "10031", + "name": "Santa Rosa & Yolanda", + "contact": { + "phone": "707-527-1006", + "website": "https://www.starbucks.com/store-locator/store/10031/santa-rosa-yolanda-2688-santa-rosa-ave-santa-rosa-ca-954077625-us" + }, + "address": { + "lines": [ + "2688 Santa Rosa Ave", + "Santa Rosa, CA 95407" ], - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "France", - "short_name": "FRA" - }, - { - "types": [ - "state" - ], - "long_name": "Ile-de-France", - "short_name": "IDF" - }, - { - "types": [ - "county" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "long_name": "Paris", - "short_name": "Paris", - "types": [ - "locality" - ] - }, - { - "long_name": "7th Arrondissement", - "short_name": "7th Arrondissement", - "types": [ - "district" - ] - }, - { - "long_name": "Place de la Résistance", - "short_name": "Place de la Résistance", - "types": [ - "route" - ] - }, + "country_code": "US", + "city": "Santa Rosa", + "zipcode": "954077625" + }, + "user_properties": { + "take_away": "available" + }, + "tags": [ + "DT", + "WA", + "CD", + "DR", + "LB", + "GO", + "XO", + "MX", + "NB", + "BE", + "LU" + ], + "types": [ + "Coffee shop" + ], + "last_updated": "2022-11-10T13:26:55.066524+00:00", + "open": { + "open_now": false, + "open_hours": [ { - "long_name": "75007", - "short_name": "75007", - "types": [ - "postal_code" - ] + "end": "20:00", + "start": "05:00" } ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 48.86213, - "lng": 2.30152 - }, - "viewport": { - "northeast": { - "lat": 48.86231, - "lng": 2.30541 - }, - "southwest": { - "lat": 48.86191, - "lng": 2.30147 - } - } + "week_day": 2, + "next_opening": { + "day": "2025-09-16", + "start": "05:00", + "end": "20:00" } + }, + "weekly_opening": { + "1": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "2": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "3": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "4": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "5": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "6": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "7": { + "hours": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "isSpecial": false + }, + "timezone": "America/Los_Angeles" + }, + "opening_hours": { + "usual": { + "1": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "2": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "3": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "4": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "5": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "6": [ + { + "end": "20:00", + "start": "05:00" + } + ], + "7": [ + { + "end": "20:00", + "start": "05:00" + } + ] + }, + "special": {}, + "timezone": "America/Los_Angeles" } - ], - "status": "OK" + }, + "geometry": { + "type": "Point", + "coordinates": [ + -122.712924, + 38.41244 + ] + } } } } @@ -673,48 +888,33 @@ } } }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error429" - }, - "examples": { - "Forbidden": { - "summary": "Error 429", - "value": { - "detail": "The rate limit for this endpoint has been exceeded" - } - } - } - } - } + "404": { + "description": "Not Found - `storeId` do not exist." } }, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" + "source": "curl -L 'https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ] } }, - "/stores": { + "/stores/replace": { "post": { - "summary": "Create your Assets", - "operationId": "createStores", + "summary": "Replace all assets", + "operationId": "replaceStores", "servers": [ { "url": "https://api.woosmap.com" @@ -723,14 +923,14 @@ "tags": [ "Data Management" ], - "description": "Used to batch create Assets to a specific project identified with the `private_key` parameter.\n", + "description": "To replace all your Assets. This endpoint will delete all previous assets and import assets in request body. During the operation previous assets could always be displayed on map. If the import failed previous assets are not deleted.", "security": [ { "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] } ], "requestBody": { - "description": "The request body must of Stores Creation be formatted as JSON.", + "description": "The request body of Stores Replace must be formatted as JSON.", "required": true, "content": { "application/json": { @@ -739,7 +939,7 @@ }, "examples": { "default": { - "summary": "Stores data to create as JSON", + "summary": "Stores Data to replace as JSON", "value": { "stores": [ { @@ -847,7 +1047,7 @@ }, "responses": { "200": { - "description": "Assets successfully created", + "description": "Assets successfully replaced", "content": { "application/json": { "schema": { @@ -855,10 +1055,10 @@ }, "examples": { "default": { - "summary": "Success response for Stores Created", + "summary": "Success response for Stores replaced", "value": { "status": "success", - "value": "2 stores" + "value": "2 stores deleted, 2 stores created" } } } @@ -925,833 +1125,540 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n}'" + "source": "curl -L 'https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n}'" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" }, { "lang": "nodejs", "label": "NodeJS", - "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] - }, - "put": { - "summary": "Update the Assets", - "operationId": "updateStores", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], + } + }, + "/datasets/{dataset_id}": { + "get": { "tags": [ - "Data Management" + "Datasets API" ], - "description": "Used to update assets in batch. `storeId` must exists when using `PUT` method, if one asset does not exists, the batch will be refused.", + "summary": "Get Dataset", + "description": "Gets dataset details.\n\n**Rate limit**: `1/1s`\n\n**Ratelimit:** 1/1s", + "operationId": "get_dataset_datasets__dataset_id__get", "security": [ { - "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] + "Datasets_PrivateKeyWithWrite": [] + }, + { + "Datasets_PrivateKeyWithWriteHeader": [] } ], - "requestBody": { - "description": "The request body of Stores Update must be formatted as JSON.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetsCollectionRequest" - }, - "examples": { - "default": { - "summary": "Stores data to update as JSON", - "value": { - "stores": [ - { - "types": [ - "drive", - "click_and_collect" - ], - "tags": [ - "wifi", - "covered_parking" - ], - "location": { - "lat": 38.719, - "lng": -77.1067 - }, - "storeId": "STORE_ID_123456", - "name": "My Cool Store", - "address": { - "lines": [ - "698-500", - " Lloyds Ln" - ], - "countryCode": "US", - "city": "Alexandria", - "zipcode": "VA 22302" - }, - "contact": { - "website": "https://www.woosmap.com", - "phone": "+44 20 7693 4000", - "email": "contact@woosmap.com" - }, - "userProperties": { - "some_user_properties": "associated user value" - }, - "openingHours": { - "timezone": "Europe/London", - "usual": { - "1": [], - "default": [ - { - "start": "08:30", - "end": "22:00" - } - ] - }, - "special": { - "2015-02-07": [ - { - "start": "08:00", - "end": "23:00" - } - ] - } - } - } - ] - } - } - } + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Dataset Id" } } - }, + ], "responses": { "200": { - "description": "Assets successfully updated", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" - }, - "examples": { - "default": { - "summary": "Success response for Stores updated", - "value": { - "status": "success", - "value": "1 stores" - } - } + "$ref": "#/components/schemas/Datasets_DatasetResponse" } } } }, - "400": { - "description": "Invalid. The data is not a valid JSON.", + "401": { + "description": "Unable to locate credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error400" - }, - "examples": { - "Invalid": { - "summary": "Error 400", - "value": { - "status": "error", - "value": "The request is invalid, the data is not a valid JSON." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "402": { + "description": "Out of free quota.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "description": "Credentials found, but not matching.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + } + } + } + }, + "404": { + "description": "Dataset was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_HTTPValidationError" + } + } + } + }, + "429": { + "description": "Rate limit reached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" } } } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L -X PUT 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY'" }, { - "lang": "python", - "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "lang": "javascript", + "label": "JavaScript", + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { - "lang": "nodejs", - "label": "NodeJS", - "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"698-500\",\n \" Lloyds Ln\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"VA 22302\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'put',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + "lang": "python", + "label": "Python", + "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } - ] + ], + "x-original-tag": "dataset" }, "delete": { - "summary": "Delete the Assets", - "operationId": "deleteStores", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], "tags": [ - "Data Management" + "Datasets API" ], - "description": "Used to delete one or more assets. The `storeId` specified in `query` parameter is the id of the asset to delete. To delete several assets, use the comma as a separator. To delete all project assets, omit the `query` parameter.\n", + "summary": "Delete Dataset", + "description": "Schedule a dataset for deletion, deletion will happen in 7 days.\n\n\n**Rate limit**: `1/1s`\n\n**Ratelimit:** 1/1s", + "operationId": "delete_dataset_datasets__dataset_id__delete", "security": [ { - "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] + "Datasets_PrivateKeyWithWrite": [] + }, + { + "Datasets_PrivateKeyWithWriteHeader": [] } ], "parameters": [ { - "name": "query", - "description": "The query to target assets ID to delete", - "in": "query", - "example": "idstore:[{storeId1},{storeId2}]", + "name": "dataset_id", + "in": "path", + "required": true, "schema": { - "type": "string" + "type": "string", + "format": "uuid", + "title": "Dataset Id" } } ], "responses": { "200": { - "description": "Assets successfully deleted", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" - }, - "examples": { - "default": { - "summary": "Success response for Stores deleted", - "value": { - "status": "success", - "value": 2 - } - } + "type": "object", + "additionalProperties": true, + "title": "Response Delete Dataset Datasets Dataset Id Delete" } } } }, "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "description": "Unable to locate credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + } + } + } + }, + "402": { + "description": "Out of free quota.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "description": "Credentials found, but not matching.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + } + } + } + }, + "404": { + "description": "Dataset was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } + }, + "409": { + "description": "The Dataset was already scheduled for deletion.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_HTTPValidationError" + } + } + } + }, + "429": { + "description": "Rate limit reached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" } } } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L -X DELETE 'https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY'" + "source": "curl -L -X DELETE 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY'" }, { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "lang": "javascript", + "label": "JavaScript", + "source": "const requestOptions = {\n method: \"DELETE\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { - "lang": "nodejs", - "label": "NodeJS", - "source": "const axios = require('axios');\n\nlet config = {\n method: 'delete',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" - } - ] - } - }, - "/stores/{storeId}": { - "get": { - "summary": "Get Asset from ID", - "operationId": "getStore", - "servers": [ - { - "url": "https://api.woosmap.com" + "lang": "python", + "label": "Python", + "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], + "x-original-tag": "dataset" + }, + "put": { "tags": [ - "Data Management" + "Datasets API" ], - "description": "Used to retrieve an asset from his `storeId`\n", + "summary": "Update Dataset", + "description": "Updates a dataset url or name.\n\n**Rate limit**: `1/1s`\n\n**Ratelimit:** 1/1s", + "operationId": "update_dataset_datasets__dataset_id__put", "security": [ { - "Woosmap_Platform_API_Reference_PublicApiKeyAuth": [], - "Woosmap_Platform_API_Reference_RefererHeader": [] - }, - { - "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] + "Datasets_PrivateKeyWithWrite": [] }, { - "Woosmap_Platform_API_Reference_PrivateApiKeyHeaderAuth": [] + "Datasets_PrivateKeyWithWriteHeader": [] } ], "parameters": [ { + "name": "dataset_id", "in": "path", - "name": "storeId", - "schema": { - "type": "string" - }, "required": true, - "example": "STORE_ID_123456", - "description": "ID of the asset to get" + "schema": { + "type": "string", + "format": "uuid", + "title": "Dataset Id" + } } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_DatasetUpdate" + } + } + } + }, "responses": { "200": { - "description": "Asset successfully retrieved", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetFeatureResponse" - }, - "examples": { - "default": { - "summary": "Get a store from its store_id", - "value": { - "type": "Feature", - "properties": { - "store_id": "10031", - "name": "Santa Rosa & Yolanda", - "contact": { - "phone": "707-527-1006", - "website": "https://www.starbucks.com/store-locator/store/10031/santa-rosa-yolanda-2688-santa-rosa-ave-santa-rosa-ca-954077625-us" - }, - "address": { - "lines": [ - "2688 Santa Rosa Ave", - "Santa Rosa, CA 95407" - ], - "country_code": "US", - "city": "Santa Rosa", - "zipcode": "954077625" - }, - "user_properties": { - "take_away": "available" - }, - "tags": [ - "DT", - "WA", - "CD", - "DR", - "LB", - "GO", - "XO", - "MX", - "NB", - "BE", - "LU" - ], - "types": [ - "Coffee shop" - ], - "last_updated": "2022-11-10T13:26:55.066524+00:00", - "open": { - "open_now": false, - "open_hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "week_day": 2, - "next_opening": { - "day": "2025-09-16", - "start": "05:00", - "end": "20:00" - } - }, - "weekly_opening": { - "1": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "2": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "3": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "4": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "5": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "6": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "7": { - "hours": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "isSpecial": false - }, - "timezone": "America/Los_Angeles" - }, - "opening_hours": { - "usual": { - "1": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "2": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "3": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "4": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "5": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "6": [ - { - "end": "20:00", - "start": "05:00" - } - ], - "7": [ - { - "end": "20:00", - "start": "05:00" - } - ] - }, - "special": {}, - "timezone": "America/Los_Angeles" - } - }, - "geometry": { - "type": "Point", - "coordinates": [ - -122.712924, - 38.41244 - ] - } - } - } + "$ref": "#/components/schemas/Datasets_DatasetResponse" } } } }, "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "description": "Unable to locate credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + } + } + } + }, + "402": { + "description": "Out of free quota.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "description": "Credentials found, but not matching.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, "404": { - "description": "Not Found - `storeId` do not exist." + "description": "Dataset was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_HTTPValidationError" + } + } + } + }, + "429": { + "description": "Rate limit reached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" + "source": "curl -L -X PUT 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n});\n\nconst requestOptions = {\n method: \"PUT\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/stores/10031/?key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } - ] + ], + "x-original-tag": "dataset" } }, - "/stores/replace": { - "post": { - "summary": "Replace all assets", - "operationId": "replaceStores", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], + "/datasets/": { + "get": { "tags": [ - "Data Management" + "Datasets API" ], - "description": "To replace all your Assets. This endpoint will delete all previous assets and import assets in request body. During the operation previous assets could always be displayed on map. If the import failed previous assets are not deleted.", + "summary": "List Datasets", + "description": "Lists datasets.\n\n**Rate limit**: `1/1s`\n\n**Ratelimit:** 1/1s", + "operationId": "list_datasets_datasets__get", "security": [ { - "Woosmap_Platform_API_Reference_PrivateApiKeyAuth": [] + "Datasets_PrivateKeyWithWrite": [] + }, + { + "Datasets_PrivateKeyWithWriteHeader": [] } ], - "requestBody": { - "description": "The request body of Stores Replace must be formatted as JSON.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AssetsCollectionRequest" - }, - "examples": { - "default": { - "summary": "Stores Data to replace as JSON", - "value": { - "stores": [ - { - "types": [ - "drive", - "click_and_collect" - ], - "tags": [ - "wifi", - "covered_parking" - ], - "location": { - "lat": 38.719, - "lng": -77.1067 - }, - "storeId": "STORE_ID_123456", - "name": "My Cool Store", - "address": { - "lines": [ - "Building Centre", - "26 Store Street" - ], - "countryCode": "UK", - "city": "London", - "zipcode": "WC1E 7BT" - }, - "contact": { - "website": "https://www.woosmap.com", - "phone": "+44 20 7693 4000", - "email": "contact@woosmap.com" - }, - "userProperties": { - "some_user_properties": "associated user value" - }, - "openingHours": { - "timezone": "Europe/London", - "usual": { - "1": [], - "default": [ - { - "start": "08:30", - "end": "22:00" - } - ] - }, - "special": { - "2015-02-07": [ - { - "start": "08:00", - "end": "23:00" - } - ] - } - } - }, - { - "types": [ - "drive" - ], - "tags": [ - "covered_parking" - ], - "location": { - "lat": 38.5239, - "lng": -77.0157 - }, - "storeId": "STORE_ID_45678", - "name": "My Cool Store 2", - "address": { - "lines": [ - "1805-1899", - "Orchard St" - ], - "countryCode": "US", - "city": "Alexandria", - "zipcode": "22309" - }, - "contact": { - "website": "https://www.woosmap.com", - "phone": "+44 20 7693 4000", - "email": "contact@woosmap.com" - }, - "userProperties": { - "some_user_properties": "associated user value" - }, - "openingHours": { - "timezone": "America/New_York", - "usual": { - "1": [], - "default": [ - { - "start": "08:30", - "end": "22:00" - } - ] - } - } - } - ] - } - } - } - } + "parameters": [ + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "description": "The maximum number of elements to return in a result page.", + "default": 10, + "title": "Per Page" + }, + "description": "The maximum number of elements to return in a result page." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "The result page to fetch.", + "default": 1, + "title": "Page" + }, + "description": "The result page to fetch." } - }, + ], "responses": { "200": { - "description": "Assets successfully replaced", + "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Success" - }, - "examples": { - "default": { - "summary": "Success response for Stores replaced", - "value": { - "status": "success", - "value": "2 stores deleted, 2 stores created" - } - } + "$ref": "#/components/schemas/Datasets_DatasetListResponse" } } } }, - "400": { - "description": "Invalid. The data is not a valid JSON.", + "401": { + "description": "Unable to locate credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error400" - }, - "examples": { - "Invalid": { - "summary": "Error 400", - "value": { - "status": "error", - "value": "The request is invalid, the data is not a valid JSON." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "402": { + "description": "Out of free quota.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" } } } }, "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "description": "Credentials found, but not matching.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } + "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_HTTPValidationError" + } + } + } + }, + "429": { + "description": "Rate limit reached", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" } } } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n--data-raw '{\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY'" }, { - "lang": "python", - "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "lang": "javascript", + "label": "JavaScript", + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { - "lang": "nodejs", - "label": "NodeJS", - "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"stores\": [\n {\n \"types\": [\n \"drive\",\n \"click_and_collect\"\n ],\n \"tags\": [\n \"wifi\",\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.719,\n \"lng\": -77.1067\n },\n \"storeId\": \"STORE_ID_123456\",\n \"name\": \"My Cool Store\",\n \"address\": {\n \"lines\": [\n \"Building Centre\",\n \"26 Store Street\"\n ],\n \"countryCode\": \"UK\",\n \"city\": \"London\",\n \"zipcode\": \"WC1E 7BT\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"Europe/London\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n },\n \"special\": {\n \"2015-02-07\": [\n {\n \"start\": \"08:00\",\n \"end\": \"23:00\"\n }\n ]\n }\n }\n },\n {\n \"types\": [\n \"drive\"\n ],\n \"tags\": [\n \"covered_parking\"\n ],\n \"location\": {\n \"lat\": 38.5239,\n \"lng\": -77.0157\n },\n \"storeId\": \"STORE_ID_45678\",\n \"name\": \"My Cool Store 2\",\n \"address\": {\n \"lines\": [\n \"1805-1899\",\n \"Orchard St\"\n ],\n \"countryCode\": \"US\",\n \"city\": \"Alexandria\",\n \"zipcode\": \"22309\"\n },\n \"contact\": {\n \"website\": \"https://www.woosmap.com\",\n \"phone\": \"+44 20 7693 4000\",\n \"email\": \"contact@woosmap.com\"\n },\n \"userProperties\": {\n \"some_user_properties\": \"associated user value\"\n },\n \"openingHours\": {\n \"timezone\": \"America/New_York\",\n \"usual\": {\n \"1\": [],\n \"default\": [\n {\n \"start\": \"08:30\",\n \"end\": \"22:00\"\n }\n ]\n }\n }\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/stores/replace?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + "lang": "python", + "label": "Python", + "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } - ] - } - }, - "/datasets/{dataset_id}": { - "get": { + ], + "x-original-tag": "dataset" + }, + "post": { "tags": [ "Datasets API" ], - "summary": "Get Dataset", - "description": "Gets dataset details.\n\n**Rate limit**: `1/1s`", - "operationId": "get_dataset_datasets__dataset_id__get", + "summary": "Create Dataset", + "description": "Creates a dataset.\n\n**Rate limit**: `1/1s`\n\n**Ratelimit:** 1/1s", + "operationId": "create_dataset_datasets__post", "security": [ { "Datasets_PrivateKeyWithWrite": [] @@ -1760,18 +1667,16 @@ "Datasets_PrivateKeyWithWriteHeader": [] } ], - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Dataset Id" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_DatasetCreateRequest" + } } } - ], + }, "responses": { "200": { "description": "Successful Response", @@ -1813,16 +1718,6 @@ } } }, - "404": { - "description": "Dataset was not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, "422": { "description": "Validation Error", "content": { @@ -1844,32 +1739,36 @@ } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY'" + "source": "curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "dataset" - }, - "delete": { + } + }, + "/datasets/{dataset_id}/status": { + "get": { "tags": [ "Datasets API" ], - "summary": "Delete Dataset", - "description": "Schedule a dataset for deletion, deletion will happen in 7 days.\n\n\n**Rate limit**: `1/1s`", - "operationId": "delete_dataset_datasets__dataset_id__delete", + "summary": "Get Dataset Status", + "description": "Returns the dataset import status.\n\n**Rate limit**: `1/5s`\n\n**Ratelimit:** 1/5s", + "operationId": "get_dataset_status_datasets__dataset_id__status_get", "security": [ { "Datasets_PrivateKeyWithWrite": [] @@ -1896,9 +1795,7 @@ "content": { "application/json": { "schema": { - "type": "object", - "additionalProperties": true, - "title": "Response Delete Dataset Datasets Dataset Id Delete" + "$ref": "#/components/schemas/Datasets_DatasetStatusResponse" } } } @@ -1943,16 +1840,6 @@ } } }, - "409": { - "description": "The Dataset was already scheduled for deletion.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, "422": { "description": "Validation Error", "content": { @@ -1974,32 +1861,36 @@ } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 5, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L -X DELETE 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"DELETE\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "dataset" - }, - "put": { + } + }, + "/datasets/{dataset_id}/import": { + "post": { "tags": [ "Datasets API" ], - "summary": "Update Dataset", - "description": "Updates a dataset url or name.\n\n**Rate limit**: `1/1s`", - "operationId": "update_dataset_datasets__dataset_id__put", + "summary": "Trigger Import", + "description": "Trigger the dataset import.\n\n**Rate limit**: `1/90s`\n\n**Ratelimit:** 1/90s", + "operationId": "trigger_import_datasets__dataset_id__import_post", "security": [ { "Datasets_PrivateKeyWithWrite": [] @@ -2020,23 +1911,13 @@ } } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_DatasetUpdate" - } - } - } - }, "responses": { - "200": { + "202": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_DatasetResponse" + "$ref": "#/components/schemas/Datasets_ImportResponse" } } } @@ -2102,108 +1983,74 @@ } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 90, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L -X PUT 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n});\n\nconst requestOptions = {\n method: \"PUT\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"name\": \"string\",\n \"url\": \"http://example.com\"\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "dataset" } }, - "/datasets/": { - "get": { + "/datasets/hooks/reimport/{reimport_key}": { + "post": { "tags": [ "Datasets API" ], - "summary": "List Datasets", - "description": "Lists datasets.\n\n**Rate limit**: `1/1s`", - "operationId": "list_datasets_datasets__get", - "security": [ - { - "Datasets_PrivateKeyWithWrite": [] - }, - { - "Datasets_PrivateKeyWithWriteHeader": [] - } - ], + "summary": "Reimport Dataset Webhook", + "description": "Triggers the reimport of the dataset linked to the dataset.\n\n**Rate limit**: `1/90s`\n\n**Ratelimit:** 1/90s", + "operationId": "reimport_dataset_webhook_datasets_hooks_reimport__reimport_key__post", "parameters": [ { - "name": "per_page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 20, - "minimum": 1, - "description": "The maximum number of elements to return in a result page.", - "default": 10, - "title": "Per Page" - }, - "description": "The maximum number of elements to return in a result page." - }, - { - "name": "page", - "in": "query", - "required": false, + "name": "reimport_key", + "in": "path", + "required": true, "schema": { - "type": "integer", - "minimum": 1, - "description": "The result page to fetch.", - "default": 1, - "title": "Page" - }, - "description": "The result page to fetch." + "type": "string", + "format": "uuid", + "title": "Reimport Key" + } } ], "responses": { - "200": { + "202": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_DatasetListResponse" + "$ref": "#/components/schemas/Datasets_ImportResponse" } } } }, "401": { - "description": "Unable to locate credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } + "description": "Unauthorized" }, "402": { - "description": "Out of free quota.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } + "description": "Payment Required" }, "403": { - "description": "Credentials found, but not matching.", + "description": "Forbidden" + }, + "404": { + "description": "Dataset was not found", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" } } } @@ -2229,38 +2076,99 @@ } } }, + "x-ratelimit-limit": 1, + "x-ratelimit-window-seconds": 90, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY'" + "source": "curl -L 'https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], + "security": [], "x-original-tag": "dataset" - }, + } + }, + "/datasets/{dataset_id}/features/search/": { "post": { "tags": [ "Datasets API" ], - "summary": "Create Dataset", - "description": "Creates a dataset.\n\n**Rate limit**: `1/1s`", - "operationId": "create_dataset_datasets__post", + "summary": "Search Features", + "description": "Search for features.\n\n**Rate limit**: `20/1s`\n\n**Ratelimit:** 20/1s", + "operationId": "search_features_datasets__dataset_id__features_search__post", "security": [ { - "Datasets_PrivateKeyWithWrite": [] + "Datasets_PublicAPIKey": [] }, { - "Datasets_PrivateKeyWithWriteHeader": [] + "Datasets_PrivateApiKey": [] + }, + { + "Datasets_PrivateApiKeyHeader": [] + } + ], + "parameters": [ + { + "name": "dataset_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Dataset Id" + } + }, + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "geojson", + "wkb" + ], + "type": "string", + "default": "geojson", + "title": "Format" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "description": "The maximum number of elements to return in a result page.", + "default": 10, + "title": "Per Page" + }, + "description": "The maximum number of elements to return in a result page." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "The result page to fetch.", + "default": 1, + "title": "Page" + }, + "description": "The result page to fetch." } ], "requestBody": { @@ -2268,7 +2176,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_DatasetCreateRequest" + "$ref": "#/components/schemas/Datasets_SearchRequest" } } } @@ -2279,7 +2187,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_DatasetResponse" + "$ref": "#/components/schemas/Datasets_SearchResultResponse" } } } @@ -2314,6 +2222,16 @@ } } }, + "404": { + "description": "Dataset was not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" + } + } + } + }, "422": { "description": "Validation Error", "content": { @@ -2335,40 +2253,45 @@ } } }, + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"where\": \"cost_col:>32.3\"\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"where\": \"cost_col:>32.3\"\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"name\": \"string\",\n \"url\": \"http://example.com\",\n \"schema_mapping\": [\n {\n \"schema_key\": \"title\",\n \"data_key\": \"string\"\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"where\": \"cost_col:>32.3\"\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], - "x-original-tag": "dataset" + "x-original-tag": "search" } }, - "/datasets/{dataset_id}/status": { - "get": { + "/datasets/{dataset_id}/features/nearby/": { + "post": { "tags": [ "Datasets API" ], - "summary": "Get Dataset Status", - "description": "Returns the dataset import status.\n\n**Rate limit**: `1/5s`", - "operationId": "get_dataset_status_datasets__dataset_id__status_get", + "summary": "Nearby Features", + "description": "Search for features nearby geometry.\n\n**Rate limit**: `20/1s`\n\n**Ratelimit:** 20/1s", + "operationId": "nearby_features_datasets__dataset_id__features_nearby__post", "security": [ { - "Datasets_PrivateKeyWithWrite": [] + "Datasets_PublicAPIKey": [] }, { - "Datasets_PrivateKeyWithWriteHeader": [] + "Datasets_PrivateApiKey": [] + }, + { + "Datasets_PrivateApiKeyHeader": [] } ], "parameters": [ @@ -2381,135 +2304,152 @@ "format": "uuid", "title": "Dataset Id" } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_DatasetStatusResponse" - } - } - } }, - "401": { - "description": "Unable to locate credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "geojson", + "wkb" + ], + "type": "string", + "default": "geojson", + "title": "Format" } }, - "402": { - "description": "Out of free quota.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "403": { - "description": "Credentials found, but not matching.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "404": { - "description": "Dataset was not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_HTTPValidationError" - } - } - } - }, - "429": { - "description": "Rate limit reached", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/status?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - } - ], - "x-original-tag": "dataset" - } - }, - "/datasets/{dataset_id}/import": { - "post": { - "tags": [ - "Datasets API" - ], - "summary": "Trigger Import", - "description": "Trigger the dataset import.\n\n**Rate limit**: `1/90s`", - "operationId": "trigger_import_datasets__dataset_id__import_post", - "security": [ - { - "Datasets_PrivateKeyWithWrite": [] + { + "name": "per_page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 20, + "minimum": 1, + "description": "The maximum number of elements to return in a result page.", + "default": 10, + "title": "Per Page" + }, + "description": "The maximum number of elements to return in a result page." }, { - "Datasets_PrivateKeyWithWriteHeader": [] + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "The result page to fetch.", + "default": 1, + "title": "Page" + }, + "description": "The result page to fetch." } ], - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Dataset Id" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Datasets_SearchRequestWithGeometry" + }, + "examples": { + "point_geojson": { + "summary": "Request with point geojson geometry", + "value": { + "geometry": { + "type": "Point", + "coordinates": [ + 3.883, + 43.6 + ] + } + } + }, + "linestring_geojson": { + "summary": "Request with linestring geojson geometry", + "value": { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 3.85882, + 43.60912 + ], + [ + 3.86276, + 43.60807 + ], + [ + 3.8649, + 43.60572 + ], + [ + 3.86513, + 43.60412 + ], + [ + 3.86681, + 43.60245 + ], + [ + 3.86822, + 43.60093 + ], + [ + 3.87003, + 43.6 + ] + ] + } + } + }, + "polygon_geojson": { + "summary": "Request with polygon geojson geometry, a 10 meters buffer and a where clause", + "value": { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + 10, + -10 + ], + [ + 10, + 10 + ], + [ + -10, + 10 + ], + [ + -10, + -10 + ] + ] + ] + }, + "buffer": 10, + "where": "cost:<500" + } + } + } } } - ], + }, "responses": { - "202": { + "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_ImportResponse" + "$ref": "#/components/schemas/Datasets_SearchResultResponse" } } } @@ -2575,160 +2515,70 @@ } } }, + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/import?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], - "x-original-tag": "dataset" + "x-original-tag": "search" } }, - "/datasets/hooks/reimport/{reimport_key}": { + "/datasets/{dataset_id}/features/intersects/": { "post": { "tags": [ "Datasets API" ], - "summary": "Reimport Dataset Webhook", - "description": "Triggers the reimport of the dataset linked to the dataset.\n\n**Rate limit**: `1/90s`", - "operationId": "reimport_dataset_webhook_datasets_hooks_reimport__reimport_key__post", + "summary": "Intersect Features", + "description": "Returns the features that are intersecting with geometry.\n\n**Rate limit**: `20/1s`\n\n\n\n**Ratelimit:** 20/1s", + "operationId": "intersect_features_datasets__dataset_id__features_intersects__post", + "security": [ + { + "Datasets_PublicAPIKey": [] + }, + { + "Datasets_PrivateApiKey": [] + }, + { + "Datasets_PrivateApiKeyHeader": [] + } + ], "parameters": [ { - "name": "reimport_key", + "name": "dataset_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid", - "title": "Reimport Key" - } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_ImportResponse" - } - } + "title": "Dataset Id" } }, - "401": { - "description": "Unauthorized" - }, - "402": { - "description": "Payment Required" - }, - "403": { - "description": "Forbidden" - }, - "404": { - "description": "Dataset was not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_HTTPValidationError" - } - } - } - }, - "429": { - "description": "Rate limit reached", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{}'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/hooks/reimport/my_reimport_key?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - } - ], - "security": [], - "x-original-tag": "dataset" - } - }, - "/datasets/{dataset_id}/features/search/": { - "post": { - "tags": [ - "Datasets API" - ], - "summary": "Search Features", - "description": "Search for features.\n\n**Rate limit**: `20/1s`", - "operationId": "search_features_datasets__dataset_id__features_search__post", - "security": [ - { - "Datasets_PublicAPIKey": [] - }, - { - "Datasets_PrivateApiKey": [] - }, - { - "Datasets_PrivateApiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Dataset Id" - } - }, - { - "name": "format", - "in": "query", - "required": false, - "schema": { - "enum": [ - "geojson", - "wkb" - ], - "type": "string", - "default": "geojson", - "title": "Format" + { + "name": "format", + "in": "query", + "required": false, + "schema": { + "enum": [ + "geojson", + "wkb" + ], + "type": "string", + "default": "geojson", + "title": "Format" } }, { @@ -2764,7 +2614,93 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_SearchRequest" + "$ref": "#/components/schemas/Datasets_SearchRequestWithGeometry" + }, + "examples": { + "point_geojson": { + "summary": "Request with point geojson geometry", + "value": { + "geometry": { + "type": "Point", + "coordinates": [ + 3.883, + 43.6 + ] + } + } + }, + "linestring_geojson": { + "summary": "Request with linestring geojson geometry", + "value": { + "geometry": { + "type": "LineString", + "coordinates": [ + [ + 3.85882, + 43.60912 + ], + [ + 3.86276, + 43.60807 + ], + [ + 3.8649, + 43.60572 + ], + [ + 3.86513, + 43.60412 + ], + [ + 3.86681, + 43.60245 + ], + [ + 3.86822, + 43.60093 + ], + [ + 3.87003, + 43.6 + ] + ] + } + } + }, + "polygon_geojson": { + "summary": "Request with polygon geojson geometry, a 10 meters buffer and a where clause", + "value": { + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + -10, + -10 + ], + [ + 10, + -10 + ], + [ + 10, + 10 + ], + [ + -10, + 10 + ], + [ + -10, + -10 + ] + ] + ] + }, + "buffer": 10, + "where": "cost:<500" + } + } } } } @@ -2841,34 +2777,36 @@ } } }, + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"where\": \"cost_col:>32.3\"\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"where\": \"cost_col:>32.3\"\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/search/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"where\": \"cost_col:>32.3\"\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "search" } }, - "/datasets/{dataset_id}/features/nearby/": { + "/datasets/{dataset_id}/features/contains/": { "post": { "tags": [ "Datasets API" ], - "summary": "Nearby Features", - "description": "Search for features nearby geometry.\n\n**Rate limit**: `20/1s`", - "operationId": "nearby_features_datasets__dataset_id__features_nearby__post", + "summary": "Contains Features", + "description": "Search for features containing geometry.\n\n**Rate limit**: `20/1s`\n\n\n\n**Ratelimit:** 20/1s", + "operationId": "contains_features_datasets__dataset_id__features_contains__post", "security": [ { "Datasets_PublicAPIKey": [] @@ -3101,34 +3039,36 @@ } } }, + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/nearby/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n },\n \"buffer\": 5000\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "search" } }, - "/datasets/{dataset_id}/features/intersects/": { + "/datasets/{dataset_id}/features/within/": { "post": { "tags": [ "Datasets API" ], - "summary": "Intersect Features", - "description": "Returns the features that are intersecting with geometry.\n\n**Rate limit**: `20/1s`\n\n", - "operationId": "intersect_features_datasets__dataset_id__features_intersects__post", + "summary": "Within Features", + "description": "Search for features within geometry.\n\n**Rate limit**: `20/1s`\n\n\n\n**Ratelimit:** 20/1s", + "operationId": "within_features_datasets__dataset_id__features_within__post", "security": [ { "Datasets_PublicAPIKey": [] @@ -3198,61 +3138,11 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_SearchRequestWithGeometry" + "$ref": "#/components/schemas/Datasets_SearchRequestWithPolygonGeometry" }, "examples": { - "point_geojson": { - "summary": "Request with point geojson geometry", - "value": { - "geometry": { - "type": "Point", - "coordinates": [ - 3.883, - 43.6 - ] - } - } - }, - "linestring_geojson": { - "summary": "Request with linestring geojson geometry", - "value": { - "geometry": { - "type": "LineString", - "coordinates": [ - [ - 3.85882, - 43.60912 - ], - [ - 3.86276, - 43.60807 - ], - [ - 3.8649, - 43.60572 - ], - [ - 3.86513, - 43.60412 - ], - [ - 3.86681, - 43.60245 - ], - [ - 3.86822, - 43.60093 - ], - [ - 3.87003, - 43.6 - ] - ] - } - } - }, "polygon_geojson": { - "summary": "Request with polygon geojson geometry, a 10 meters buffer and a where clause", + "summary": "An with polygon geojson geometry, a 10 meters buffer and a where clause", "value": { "geometry": { "type": "Polygon", @@ -3361,34 +3251,36 @@ } } }, - "x-codeSamples": [ + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, + "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n}'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/intersects/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], "x-original-tag": "search" } }, - "/datasets/{dataset_id}/features/contains/": { - "post": { + "/datasets/{dataset_id}/features/{feature_id}": { + "get": { "tags": [ "Datasets API" ], - "summary": "Contains Features", - "description": "Search for features containing geometry.\n\n**Rate limit**: `20/1s`\n\n", - "operationId": "contains_features_datasets__dataset_id__features_contains__post", + "summary": "Get Feature", + "description": "Gets a feature from its ID.\n\n**Rate limit**: `20/1s`\n\n**Ratelimit:** 20/1s", + "operationId": "get_feature_datasets__dataset_id__features__feature_id__get", "security": [ { "Datasets_PublicAPIKey": [] @@ -3411,6 +3303,16 @@ "title": "Dataset Id" } }, + { + "name": "feature_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid", + "title": "Feature Id" + } + }, { "name": "format", "in": "query", @@ -3426,136 +3328,29 @@ } }, { - "name": "per_page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 20, - "minimum": 1, - "description": "The maximum number of elements to return in a result page.", - "default": 10, - "title": "Per Page" - }, - "description": "The maximum number of elements to return in a result page." - }, - { - "name": "page", - "in": "query", + "name": "X-Field-Mask", + "in": "header", "required": false, "schema": { - "type": "integer", - "minimum": 1, - "description": "The result page to fetch.", - "default": 1, - "title": "Page" - }, - "description": "The result page to fetch." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_SearchRequestWithGeometry" - }, - "examples": { - "point_geojson": { - "summary": "Request with point geojson geometry", - "value": { - "geometry": { - "type": "Point", - "coordinates": [ - 3.883, - 43.6 - ] - } - } - }, - "linestring_geojson": { - "summary": "Request with linestring geojson geometry", - "value": { - "geometry": { - "type": "LineString", - "coordinates": [ - [ - 3.85882, - 43.60912 - ], - [ - 3.86276, - 43.60807 - ], - [ - 3.8649, - 43.60572 - ], - [ - 3.86513, - 43.60412 - ], - [ - 3.86681, - 43.60245 - ], - [ - 3.86822, - 43.60093 - ], - [ - 3.87003, - 43.6 - ] - ] - } - } + "anyOf": [ + { + "type": "string" }, - "polygon_geojson": { - "summary": "Request with polygon geojson geometry, a 10 meters buffer and a where clause", - "value": { - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -10, - -10 - ], - [ - 10, - -10 - ], - [ - 10, - 10 - ], - [ - -10, - 10 - ], - [ - -10, - -10 - ] - ] - ] - }, - "buffer": 10, - "where": "cost:<500" - } + { + "type": "null" } - } + ], + "title": "X-Field-Mask" } } - }, + ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Datasets_SearchResultResponse" + "$ref": "#/components/schemas/Datasets_FeatureRead" } } } @@ -3591,7 +3386,7 @@ } }, "404": { - "description": "Dataset was not found", + "description": "Feature or Dataset were not found", "content": { "application/json": { "schema": { @@ -3621,476 +3416,105 @@ } } }, + "x-ratelimit-limit": 20, + "x-ratelimit-window-seconds": 1, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n}'" + "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/contains/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [\n 3.883,\n 43.6\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ], - "x-original-tag": "search" + "x-original-tag": "features" } }, - "/datasets/{dataset_id}/features/within/": { - "post": { + "/distance/route/json/": { + "get": { "tags": [ - "Datasets API" + "Distance API" ], - "summary": "Within Features", - "description": "Search for features within geometry.\n\n**Rate limit**: `20/1s`\n\n", - "operationId": "within_features_datasets__dataset_id__features_within__post", + "summary": "Find Routes", + "description": "Get distance, duration and path (as a polyline) for a pair of origin and destination, based on the recommended route between those two points for a specified travel mode.\n\n**Rate limit**: `10/1s`\n\n**Rate limit with TRAFFIC**: `20/1s`", + "operationId": "route_distance_route_json__get", "security": [ { - "Datasets_PublicAPIKey": [] + "Distance_PublicAPIKey": [] }, { - "Datasets_PrivateApiKey": [] + "Distance_PrivateApiKey": [] }, { - "Datasets_PrivateApiKeyHeader": [] + "Distance_PrivateApiKeyHeader": [] } ], "parameters": [ { - "name": "dataset_id", - "in": "path", - "required": true, + "name": "waypoints", + "in": "query", + "required": false, "schema": { - "type": "string", - "format": "uuid", - "title": "Dataset Id" - } + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A list of points by which the route should pass (the route response is divided into legs, one leg corresponding to a route between two waypoints). Waypoints should be separated by | character. \n \nOptionally, you may pass 'optimize:true' as the first argument within the waypoints parameter. This way the provided route is optimized by rearranging the waypoints in a more efficient order based on distance or time according to the method parameter. The route start point and end point order is not changed, their position is considered fixed. \n \n`alternatives` and `waypoints` can not be used at the same time.", + "examples": [ + "optimize:true|48.850077,3.311124|48.850077,3.411124", + "48.850077,3.311124|48.850077,3.411124" + ], + "title": "Waypoints" + }, + "description": "A list of points by which the route should pass (the route response is divided into legs, one leg corresponding to a route between two waypoints). Waypoints should be separated by | character. \n \nOptionally, you may pass 'optimize:true' as the first argument within the waypoints parameter. This way the provided route is optimized by rearranging the waypoints in a more efficient order based on distance or time according to the method parameter. The route start point and end point order is not changed, their position is considered fixed. \n \n`alternatives` and `waypoints` can not be used at the same time." }, { - "name": "format", + "name": "mode", "in": "query", "required": false, "schema": { "enum": [ - "geojson", - "wkb" + "driving", + "walking", + "cycling" ], "type": "string", - "default": "geojson", - "title": "Format" - } + "description": "Specifies the mode of transport to use for the calculation.", + "default": "driving", + "title": "Mode" + }, + "description": "Specifies the mode of transport to use for the calculation." }, { - "name": "per_page", + "name": "method", "in": "query", "required": false, "schema": { - "type": "integer", - "maximum": 20, - "minimum": 1, - "description": "The maximum number of elements to return in a result page.", - "default": 10, - "title": "Per Page" + "enum": [ + "time", + "distance" + ], + "type": "string", + "description": "Specifies how to compute the route between the start point and the end point:\n* `time`: fastest route \n* `distance`: shortest route", + "default": "time", + "title": "Method" }, - "description": "The maximum number of elements to return in a result page." + "description": "Specifies how to compute the route between the start point and the end point:\n* `time`: fastest route \n* `distance`: shortest route" }, { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "The result page to fetch.", - "default": 1, - "title": "Page" - }, - "description": "The result page to fetch." - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_SearchRequestWithPolygonGeometry" - }, - "examples": { - "polygon_geojson": { - "summary": "An with polygon geojson geometry, a 10 meters buffer and a where clause", - "value": { - "geometry": { - "type": "Polygon", - "coordinates": [ - [ - [ - -10, - -10 - ], - [ - 10, - -10 - ], - [ - 10, - 10 - ], - [ - -10, - 10 - ], - [ - -10, - -10 - ] - ] - ] - }, - "buffer": 10, - "where": "cost:<500" - } - } - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_SearchResultResponse" - } - } - } - }, - "401": { - "description": "Unable to locate credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "402": { - "description": "Out of free quota.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "403": { - "description": "Credentials found, but not matching.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "404": { - "description": "Dataset was not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_HTTPValidationError" - } - } - } - }, - "429": { - "description": "Rate limit reached", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n}'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const myHeaders = new Headers();\nmyHeaders.append(\"content-type\", \"application/json\");\n\nconst raw = JSON.stringify({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n});\n\nconst requestOptions = {\n method: \"POST\",\n headers: myHeaders,\n body: raw,\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/within/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"geometry\": {\n \"type\": \"Polygon\",\n \"coordinates\": [\n [\n [\n 2.3522,\n 48.8566\n ],\n [\n 2.3622,\n 48.8566\n ],\n [\n 2.3622,\n 48.8666\n ],\n [\n 2.3522,\n 48.8666\n ],\n [\n 2.3522,\n 48.8566\n ]\n ]\n ]\n }\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - } - ], - "x-original-tag": "search" - } - }, - "/datasets/{dataset_id}/features/{feature_id}": { - "get": { - "tags": [ - "Datasets API" - ], - "summary": "Get Feature", - "description": "Gets a feature from its ID.\n\n**Rate limit**: `20/1s`", - "operationId": "get_feature_datasets__dataset_id__features__feature_id__get", - "security": [ - { - "Datasets_PublicAPIKey": [] - }, - { - "Datasets_PrivateApiKey": [] - }, - { - "Datasets_PrivateApiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "dataset_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Dataset Id" - } - }, - { - "name": "feature_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid", - "title": "Feature Id" - } - }, - { - "name": "format", - "in": "query", - "required": false, - "schema": { - "enum": [ - "geojson", - "wkb" - ], - "type": "string", - "default": "geojson", - "title": "Format" - } - }, - { - "name": "X-Field-Mask", - "in": "header", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Field-Mask" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_FeatureRead" - } - } - } - }, - "401": { - "description": "Unable to locate credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "402": { - "description": "Out of free quota.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "403": { - "description": "Credentials found, but not matching.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_AuthenticationErrorResponse" - } - } - } - }, - "404": { - "description": "Feature or Dataset were not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_HTTPValidationError" - } - } - } - }, - "429": { - "description": "Rate limit reached", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Datasets_features__internal__responses__HTTPErrorModel" - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/datasets/8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0/features/497f6eca-6276-4993-bfeb-53cbbbba6f08?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - } - ], - "x-original-tag": "features" - } - }, - "/distance/route/json/": { - "get": { - "tags": [ - "Distance API" - ], - "summary": "Find Routes", - "description": "Get distance, duration and path (as a polyline) for a pair of origin and destination, based on the recommended route between those two points for a specified travel mode.\n\n**Rate limit**: `10/1s`\n\n**Rate limit with TRAFFIC**: `20/1s`", - "operationId": "route_distance_route_json__get", - "security": [ - { - "Distance_PublicAPIKey": [] - }, - { - "Distance_PrivateApiKey": [] - }, - { - "Distance_PrivateApiKeyHeader": [] - } - ], - "parameters": [ - { - "name": "waypoints", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "A list of points by which the route should pass (the route response is divided into legs, one leg corresponding to a route between two waypoints). Waypoints should be separated by | character. \n \nOptionally, you may pass 'optimize:true' as the first argument within the waypoints parameter. This way the provided route is optimized by rearranging the waypoints in a more efficient order based on distance or time according to the method parameter. The route start point and end point order is not changed, their position is considered fixed. \n \n`alternatives` and `waypoints` can not be used at the same time.", - "examples": [ - "optimize:true|48.850077,3.311124|48.850077,3.411124", - "48.850077,3.311124|48.850077,3.411124" - ], - "title": "Waypoints" - }, - "description": "A list of points by which the route should pass (the route response is divided into legs, one leg corresponding to a route between two waypoints). Waypoints should be separated by | character. \n \nOptionally, you may pass 'optimize:true' as the first argument within the waypoints parameter. This way the provided route is optimized by rearranging the waypoints in a more efficient order based on distance or time according to the method parameter. The route start point and end point order is not changed, their position is considered fixed. \n \n`alternatives` and `waypoints` can not be used at the same time." - }, - { - "name": "mode", - "in": "query", - "required": false, - "schema": { - "enum": [ - "driving", - "walking", - "cycling" - ], - "type": "string", - "description": "Specifies the mode of transport to use for the calculation.", - "default": "driving", - "title": "Mode" - }, - "description": "Specifies the mode of transport to use for the calculation." - }, - { - "name": "method", - "in": "query", - "required": false, - "schema": { - "enum": [ - "time", - "distance" - ], - "type": "string", - "description": "Specifies how to compute the route between the start point and the end point:\n* `time`: fastest route \n* `distance`: shortest route", - "default": "time", - "title": "Method" - }, - "description": "Specifies how to compute the route between the start point and the end point:\n* `time`: fastest route \n* `distance`: shortest route" - }, - { - "name": "units", + "name": "units", "in": "query", "required": false, "schema": { @@ -4117,6 +3541,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -4619,6 +4044,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -5144,6 +4570,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -5624,6 +5051,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -9193,7 +8621,7 @@ "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_data" }, { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format-2" + "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format" } ], "responses": { @@ -11760,7 +11188,7 @@ ], "parameters": [ { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-4" + "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-3" }, { "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_offset" @@ -12748,200 +12176,97 @@ "in": "query" }, "Woosmap_Platform_API_Reference_cc_format": { - "name": "cc_format", - "description": "To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field (default is `alpha3`).\n", - "schema": { - "type": "string", - "enum": [ - "alpha2", - "alpha3" - ], - "example": "alpha2" - }, - "in": "query" - }, - "Woosmap_Platform_API_Reference_page-2": { - "name": "page", - "description": "In a few cases, a postal code details may contain addresses (UK postal codes). The address list is paginated. In that case, you can navigate in the address list thanks to the `addresses_per_page` and `page` parameters. Notice: as all the addresses are now automatically returned in the response, the `page` parameter is deprecated and has been turned off on December 31, 2021.\n", - "schema": { - "type": "integer", - "example": 1 - }, - "in": "query", - "deprecated": true - }, - "Woosmap_Platform_API_Reference_addresses_per_page": { - "name": "addresses_per_page", - "description": "In a few cases, a postal code details may contain addresses (UK postal codes). The address list is paginated. In that case, you can navigate in the address list thanks to the `addresses_per_page` and `page` parameters. Notice: as all the addresses are now automatically returned in the response, the `addresses_per_page` parameter is deprecated and has been turned off on December 31, 2021.\n", - "schema": { - "type": "integer", - "example": 10 - }, - "in": "query", - "deprecated": true - }, - "Woosmap_Platform_API_Reference_address": { - "name": "address", - "description": "The input string to geocode. Can represent an address, a street, a locality or a postal code. The `address` parameter must be URL encoded.\nTo protect against illegitimate requests, only the 20 first tokens found in the first 150 characters will be used.\n", - "schema": { - "type": "string", - "maxLength": 150, - "example": "224%20Rue%20de%20Rivoli%2C%20Paris" - }, - "required": false, - "in": "query" - }, - "Woosmap_Platform_API_Reference_latlng": { - "name": "latlng", - "description": "The latlng parameter is used for reverse geocoding, it’s required if the `address` parameter is missing.\n", - "schema": { - "type": "string", - "example": "5.2,-2.3" - }, - "required": false, - "in": "query" - }, - "Woosmap_Platform_API_Reference_geocode_types": { - "name": "types", - "description": "When executing a geocode request with the `address` parameter, it specifies the types of suggestions to return in the query. Multiple types can be combined using the pipe character (`|`) as a separator. This parameter supports a wide range of locality classifications, including:\n - Standard locality types (e.g., cities, administrative areas, postal codes)\n - Points of Interest (POI) categories\n - POI aliases\n\nThese classifications enable flexible geographic data representation and querying.\nThis parameter is ignored when used with the `latlng` parameter. \n", - "schema": { - "default": "locality|postal_code|address", - "example": "locality|admin_level", - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesAll" - }, - "in": "query" - }, - "Woosmap_Platform_API_Reference_list_sub_buildings": { - "name": "list_sub_buildings", - "description": "When latlng parameter is used for reverse geocoding, setting `list_sub_building=true` allows to retrieve all addresses at the same location for a common street number or building. Results may contain an additional key \"sub_buildings\" with \"public_id\" and \"description\" values for every addresses at the same location sharing the same address components.\n", - "schema": { - "type": "boolean", - "example": true - }, - "required": false, - "in": "query" - }, - "Woosmap_Platform_API_Reference_cc_format-2": { "name": "cc_format", "description": "To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field. Default is the format used to specify `components` or `alpha2` if no components are specified.\n", "schema": { "type": "string", "enum": [ "alpha2", - "alpha3" - ], - "example": "alpha2" - }, - "in": "query" - }, - "Woosmap_Platform_API_Reference_nearby_types": { - "name": "types", - "description": "The types of points of interest to return. Multiple types can be passed using the pipe character (`|`) as a separator. For example: `types=business.shop|medical.pharmacy|business.finance.bank`.\n", - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" - }, - "required": true, - "in": "query" - }, - "Woosmap_Platform_API_Reference_nearby_excluded_types": { - "name": "excluded_types", - "description": "The types of points of interest to exclude from results. results will match the specified `types`, if any, but will not match the specified `excluded_types` Multiple types can be passed using the pipe character (`|`) as a separator. For example: `excluded_types=business.food_and_drinks.fast_food|business.food_and_drinks.pub`.\n", - "schema": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" - }, - "in": "query" - }, - "Woosmap_Platform_API_Reference_input-2": { - "name": "input", - "description": "The text string on which to search, for example: \"london\" or \"123 Cross Road\". The Woosmap Address API will return predictions matches based on this string and order the results based on their perceived relevance.\n", - "schema": { - "type": "string", - "example": "London" + "alpha3" + ], + "example": "alpha2" }, - "required": true, "in": "query" }, - "Woosmap_Platform_API_Reference_address_components": { - "name": "components", - "description": "To restrict your results to specific areas. Currently, you can use components to filter over countries. Countries must be passed as three characters string (ISO 3166-1 Alpha 3). Components should be passed as an array of different options which are separated by a `|`.\n", + "Woosmap_Platform_API_Reference_page-2": { + "name": "page", + "description": "In a few cases, a postal code details may contain addresses (UK postal codes). The address list is paginated. In that case, you can navigate in the address list thanks to the `addresses_per_page` and `page` parameters. Notice: as all the addresses are now automatically returned in the response, the `page` parameter is deprecated and has been turned off on December 31, 2021.\n", "schema": { - "type": "string", - "example": "country:CAN|country:BEL" + "type": "integer", + "example": 1 }, - "in": "query" + "in": "query", + "deprecated": true }, - "Woosmap_Platform_API_Reference_location-2": { - "name": "location", - "description": "Bias for the results. Should be pass in `lat`,`lng` format.\n", + "Woosmap_Platform_API_Reference_addresses_per_page": { + "name": "addresses_per_page", + "description": "In a few cases, a postal code details may contain addresses (UK postal codes). The address list is paginated. In that case, you can navigate in the address list thanks to the `addresses_per_page` and `page` parameters. Notice: as all the addresses are now automatically returned in the response, the `addresses_per_page` parameter is deprecated and has been turned off on December 31, 2021.\n", "schema": { - "type": "string", - "example": "5.2,-2.3" + "type": "integer", + "example": 10 }, - "in": "query" + "in": "query", + "deprecated": true }, - "Woosmap_Platform_API_Reference_language-3": { - "name": "language", - "description": "The language code, using ISO 639-1 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use the default language of each country.\n", + "Woosmap_Platform_API_Reference_address": { + "name": "address", + "description": "The input string to geocode. Can represent an address, a street, a locality or a postal code. The `address` parameter must be URL encoded.\nTo protect against illegitimate requests, only the 20 first tokens found in the first 150 characters will be used.\n", "schema": { "type": "string", - "example": "en" + "maxLength": 150, + "example": "224%20Rue%20de%20Rivoli%2C%20Paris" }, + "required": false, "in": "query" }, - "Woosmap_Platform_API_Reference_public_id-2": { - "name": "public_id", - "description": "A textual identifier that uniquely identifies a locality, returned from an [Address Autocomplete](https://developers.woosmap.com/products/address-api/autocomplete/).\n", + "Woosmap_Platform_API_Reference_latlng": { + "name": "latlng", + "description": "The latlng parameter is used for reverse geocoding, it’s required if the `address` parameter is missing.\n", "schema": { "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMDA1MTI2" + "example": "5.2,-2.3" }, - "required": true, + "required": false, "in": "query" }, - "Woosmap_Platform_API_Reference_fields-2": { - "name": "fields", - "description": "Used to limit the returning fields (by default, all fields are return). Available fields are (geometry) (fields should be separated by a `,`). By using this parameter you will limit content of responses to the geometry part. No address component will be returned.\n", + "Woosmap_Platform_API_Reference_geocode_types": { + "name": "types", + "description": "When executing a geocode request with the `address` parameter, it specifies the types of suggestions to return in the query. Multiple types can be combined using the pipe character (`|`) as a separator. This parameter supports a wide range of locality classifications, including:\n - Standard locality types (e.g., cities, administrative areas, postal codes)\n - Points of Interest (POI) categories\n - POI aliases\n\nThese classifications enable flexible geographic data representation and querying.\nThis parameter is ignored when used with the `latlng` parameter. \n", "schema": { - "type": "string", - "enum": [ - "geometry" - ], - "example": "geometry" + "default": "locality|postal_code|address", + "example": "locality|admin_level", + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesAll" }, "in": "query" }, - "Woosmap_Platform_API_Reference_address-2": { - "name": "address", - "description": "The address of which to find the coordinates for. A partial address is less likely to return the proper coordinates than the complete address.\n", + "Woosmap_Platform_API_Reference_list_sub_buildings": { + "name": "list_sub_buildings", + "description": "When latlng parameter is used for reverse geocoding, setting `list_sub_building=true` allows to retrieve all addresses at the same location for a common street number or building. Results may contain an additional key \"sub_buildings\" with \"public_id\" and \"description\" values for every addresses at the same location sharing the same address components.\n", "schema": { - "type": "string", - "example": "224%20Rue%20de%20Rivoli%2C%20Paris" + "type": "boolean", + "example": true }, "required": false, "in": "query" }, - "Woosmap_Platform_API_Reference_latlng-2": { - "name": "latlng", - "description": "Geographic coordinates. Should be pass in `lat`,`lng` format.\n", + "Woosmap_Platform_API_Reference_nearby_types": { + "name": "types", + "description": "The types of points of interest to return. Multiple types can be passed using the pipe character (`|`) as a separator. For example: `types=business.shop|medical.pharmacy|business.finance.bank`.\n", "schema": { - "type": "string", - "example": "5.2,-2.3" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" }, - "required": false, + "required": true, "in": "query" }, - "Woosmap_Platform_API_Reference_limit-3": { - "name": "limit", - "description": "Maximum number of results to be returned (value from 1 to 100, default values for geocode request [20] and for reverse geocode request [1])\n", + "Woosmap_Platform_API_Reference_nearby_excluded_types": { + "name": "excluded_types", + "description": "The types of points of interest to exclude from results. results will match the specified `types`, if any, but will not match the specified `excluded_types` Multiple types can be passed using the pipe character (`|`) as a separator. For example: `excluded_types=business.food_and_drinks.fast_food|business.food_and_drinks.pub`.\n", "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "example": 10 + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" }, "in": "query" }, - "Woosmap_Platform_API_Reference_limit-4": { + "Woosmap_Platform_API_Reference_limit-3": { "name": "limit", "description": "To limit number of zones retrieved (max 50).\n", "schema": { @@ -12962,36 +12287,6 @@ }, "in": "query" }, - "Woosmap_Platform_API_Reference_address_address_components": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_address_components" - }, - "Woosmap_Platform_API_Reference_address_address": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_address-2" - }, - "Woosmap_Platform_API_Reference_address_cc_format": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format" - }, - "Woosmap_Platform_API_Reference_address_fields": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_fields-2" - }, - "Woosmap_Platform_API_Reference_address_input": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_input-2" - }, - "Woosmap_Platform_API_Reference_address_language": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_language-3" - }, - "Woosmap_Platform_API_Reference_address_latlng": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_latlng-2" - }, - "Woosmap_Platform_API_Reference_address_limit": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-3" - }, - "Woosmap_Platform_API_Reference_address_location": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_location-2" - }, - "Woosmap_Platform_API_Reference_address_public_id": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_public_id-2" - }, "Woosmap_Platform_API_Reference_geolocation_ip_address": { "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_ip_address" }, @@ -13005,7 +12300,7 @@ "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_addresses_per_page" }, "Woosmap_Platform_API_Reference_localities_cc_format": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format-2" + "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_cc_format" }, "Woosmap_Platform_API_Reference_localities_custom_description": { "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_custom_description" @@ -13092,7 +12387,7 @@ "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_zone" }, "Woosmap_Platform_API_Reference_zones_limit": { - "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-4" + "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_limit-3" }, "Woosmap_Platform_API_Reference_zones_offset": { "$ref": "#/components/parameters/Woosmap_Platform_API_Reference_offset" @@ -15681,421 +14976,108 @@ }, "example": { "location": { - "lat": 48.829405, - "lng": 2.367944 - }, - "location_type": "GEOMETRIC_CENTER" - } - }, - "Woosmap_Platform_API_Reference_LocalitiesScoresPerComponents": { - "title": "LocalitiesScoresPerComponents", - "type": "object", - "properties": { - "street_name": { - "description": "Street score", - "type": "number" - }, - "postal_code": { - "description": "Postal code score", - "type": "number" - }, - "locality": { - "description": "Postal code score", - "type": "number" - } - }, - "example": { - "scores_per_components": { - "street_name": 0.6153846153846154, - "postal_code": 0.8, - "locality": 1 - } - } - }, - "Woosmap_Platform_API_Reference_LocalitiesGeocodeResponse": { - "title": "LocalitiesGeocodeResponse", - "type": "object", - "description": "Attributes describing a locality. Not all attributes will be available for all locality types.", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" - }, - "types": { - "description": "An array containing the types of the result", - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesAll" - } - }, - "administrative_area_label": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AdministrativeAreaLabel" - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", - "type": "string", - "example": "MkvnYy6K6oVGqeqfWJGO/6eCgqo=" - }, - "geometry": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesAddressGeometry" - }, - "status": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesStatus" - }, - "address_components": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressComponents" - }, - "distance": { - "description": "When reverse geocoding, this field represents the distance (in meter) to the requested latlng", - "type": "number", - "example": 5.234 - }, - "sub_buildings": { - "description": "When reverse geocoding with `list_sub_buildings=true`, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesAddressSummary" - } - }, - "scores_per_components": { - "description": "For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.", - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesScoresPerComponents" - } - } - }, - "Woosmap_Platform_API_Reference_LocalitiesGeocodeCollectionResponse": { - "title": "LocalitiesGeocodeCollectionResponse", - "type": "object", - "description": "Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesGeocodeResponse" - } - } - }, - "example": { - "results": [ - { - "public_id": "0+FTYd/1MsiBSxLAKq+/Fiyy+uM=", - "types": [ - "address", - "route" - ], - "formatted_address": "Place Jeanne D'Arc, 75013, Paris", - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "France", - "short_name": "FR" - }, - { - "types": [ - "state", - "division_level_1" - ], - "long_name": "Île-de-France", - "short_name": "Île-de-France" - }, - { - "types": [ - "administrative_area_level_1", - "county", - "division_level_2" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "types": [ - "locality" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "types": [ - "postal_codes" - ], - "long_name": "75013", - "short_name": "75013" - }, - { - "types": [ - "route" - ], - "long_name": "Place Jeanne D'Arc", - "short_name": "Place Jeanne D'Arc" - } - ], - "geometry": { - "location": { - "lat": 48.829405, - "lng": 2.367944 - }, - "location_type": "GEOMETRIC_CENTER" - }, - "scores_per_components": { - "street_name": 1 - } - } - ] + "lat": 48.829405, + "lng": 2.367944 + }, + "location_type": "GEOMETRIC_CENTER" } }, - "Woosmap_Platform_API_Reference_LocalitiesNearbyResponse": { - "title": "LocalitiesNearbyResponse", + "Woosmap_Platform_API_Reference_LocalitiesScoresPerComponents": { + "title": "LocalitiesScoresPerComponents", "type": "object", - "description": "Attributes describing a point of interest.", "properties": { + "street_name": { + "description": "Street score", + "type": "number" + }, + "postal_code": { + "description": "Postal code score", + "type": "number" + }, + "locality": { + "description": "Postal code score", + "type": "number" + } + }, + "example": { + "scores_per_components": { + "street_name": 0.6153846153846154, + "postal_code": 0.8, + "locality": 1 + } + } + }, + "Woosmap_Platform_API_Reference_LocalitiesGeocodeResponse": { + "title": "LocalitiesGeocodeResponse", + "type": "object", + "description": "Attributes describing a locality. Not all attributes will be available for all locality types.", + "properties": { + "formatted_address": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" + }, "types": { - "description": "An array containing the types of the result.", + "description": "An array containing the types of the result", "type": "array", - "example": [ - "point_of_interest", - "transit.station.rail.train", - "train_station" - ], "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesAll" } }, - "name": { - "description": "The name of the result.", - "type": "string" + "administrative_area_label": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AdministrativeAreaLabel" }, "public_id": { - "description": "Contains a unique ID for each result. Please use this ID to give feedbacks on results.", + "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", "type": "string", - "example": "NOAeiQADqqisOuN3NM7oXlhkROI=" + "example": "MkvnYy6K6oVGqeqfWJGO/6eCgqo=" }, "geometry": { - "description": "The location of the result, in latitude and longitude, eventually associated with a Viewport.", - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LatLngLiteral" - }, - "viewport": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Bounds" - } - }, - "example": { - "location": { - "lat": 51.4998415, - "lng": -0.1246375 - } - } + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesAddressGeometry" + }, + "status": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesStatus" }, "address_components": { "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressComponents" }, - "categories": { - "description": "An array containing the categories of the result. This information is now available in the `types` field and will be removed.", + "distance": { + "description": "When reverse geocoding, this field represents the distance (in meter) to the requested latlng", + "type": "number", + "example": 5.234 + }, + "sub_buildings": { + "description": "When reverse geocoding with `list_sub_buildings=true`, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.", "type": "array", - "deprecated": true, "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesAddressSummary" } }, - "formatted_address": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" + "scores_per_components": { + "description": "For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.", + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesScoresPerComponents" } } }, - "Woosmap_Platform_API_Reference_LocalitiesNearbyCollectionResponse": { - "title": "LocalitiesNearbyCollectionResponse", + "Woosmap_Platform_API_Reference_LocalitiesGeocodeCollectionResponse": { + "title": "LocalitiesGeocodeCollectionResponse", "type": "object", - "description": "Collection of nearby points of interest.", + "description": "Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)", "properties": { "results": { - "description": "The array of nearby points of interest.", "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesNearbyResponse" - } - }, - "pagination": { - "description": "Helps to navigate through paginated results.", - "type": "object", - "properties": { - "next_page": { - "description": "If more results are available, this will contain the value to pass to the `page` parameter to get the next page", - "type": [ - "integer", - "null" - ] - }, - "previous_page": { - "description": "If previous results are available, this will contain the value to pass to the `page` parameter to get the previous page", - "type": [ - "integer", - "null" - ] - } - } - } - }, - "example": { - "results": [ - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6ZTc2ZDA1YzBiM2M0M2NmNmVkNTJjNGQyZDFiZDE3Nzc0OTZkNjlmOA==", - "types": [ - "point_of_interest", - "business.food_and_drinks.fast_food" - ], - "categories": [ - "business.food_and_drinks.fast_food" - ], - "name": "Pret A Manger", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.715905992166256, - "lng": -74.00508673226767 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6MzBlMGYxMzVhNGUzZDQ4MzRiMmNlNDMzMWJiYjZkOTY0MWJhN2E0Zg==", - "types": [ - "point_of_interest", - "business.food_and_drinks.fast_food" - ], - "categories": [ - "business.food_and_drinks.fast_food" - ], - "name": "Dunkin'", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.71602115951586, - "lng": -74.00494482664695 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmJlMWNkMTE2ZDQwM2E0Y2YwNGQ5NWQ2OTlmZWRmM2FhZTExNGU3ZWY=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" - ], - "categories": [ - "business.food_and_drinks.restaurant" - ], - "name": "Chambers", - "formatted_address": "Chambers Street, New York", - "geometry": { - "location": { - "lat": 40.71461844801976, - "lng": -74.00754036678366 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Chambers Street", - "short_name": "Chambers Street" - } - ] - }, + "items": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesGeocodeResponse" + } + } + }, + "example": { + "results": [ { - "public_id": "cG9pOnVzOmJ1c2luZXNzLnNob3AuZ3JvY2VyeTo1YTczMjYxOTQyYjVlZmUwOGEzZjQ1NGZmMTMwMmJjNjA4ODE3NmRk", + "public_id": "0+FTYd/1MsiBSxLAKq+/Fiyy+uM=", "types": [ - "point_of_interest", - "business.shop.grocery" - ], - "categories": [ - "business.shop.grocery" + "address", + "route" ], - "name": "City Hall Oasis", - "geometry": { - "location": { - "lat": 40.71283012706819, - "lng": -74.00727837935057 - }, - "viewport": { - "northeast": { - "lat": 40.71286059528623, - "lng": -74.00724213866874 - }, - "southwest": { - "lat": 40.71279957503111, - "lng": -74.00731464213119 - } - } - }, + "formatted_address": "Place Jeanne D'Arc, 75013, Paris", "address_components": [ { "types": [ @@ -16103,125 +15085,172 @@ "administrative_area_level_0", "division_level_0" ], - "long_name": "United States", - "short_name": "US" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZpbmFuY2UuYmFuazpiOGY5MDE4Nzc2ZDZjNmEwZTljOGM4YWM0OTAxZWZlNzNmODZkM2M3", - "types": [ - "point_of_interest", - "business.finance.bank" - ], - "categories": [ - "business.finance.bank" - ], - "name": "Citibank", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.7130414767567, - "lng": -74.0074818610995 - } - }, - "address_components": [ + "long_name": "France", + "short_name": "FR" + }, { "types": [ - "country", - "administrative_area_level_0", - "division_level_0" + "state", + "division_level_1" ], - "long_name": "United States", - "short_name": "US" + "long_name": "Île-de-France", + "short_name": "Île-de-France" + }, + { + "types": [ + "administrative_area_level_1", + "county", + "division_level_2" + ], + "long_name": "Paris", + "short_name": "Paris" }, { "types": [ "locality" ], - "long_name": "New York", - "short_name": "New York" + "long_name": "Paris", + "short_name": "Paris" }, { "types": [ - "route" + "postal_codes" ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQzMTMzZTJkODdiOGJjMGE3ZjI2YTdiMWVjYTZlZmI1MjQyYWE3MTE=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" - ], - "categories": [ - "business.food_and_drinks.restaurant" - ], - "name": "Saffron", - "geometry": { - "location": { - "lat": 40.71467049963849, - "lng": -74.00767187884445 - } - }, - "address_components": [ + "long_name": "75013", + "short_name": "75013" + }, { "types": [ - "country", - "administrative_area_level_0", - "division_level_0" + "route" ], - "long_name": "United States", - "short_name": "US" + "long_name": "Place Jeanne D'Arc", + "short_name": "Place Jeanne D'Arc" } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQ1NjMyN2RiM2EyNWJlYmIwNjJjZjNlYWYwMDE3ZDIyYzEyNWNlMjY=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" ], - "categories": [ - "business.food_and_drinks.restaurant" - ], - "name": "Gran Morsi", "geometry": { "location": { - "lat": 40.71432885326513, - "lng": -74.00778746528921 - } + "lat": 48.829405, + "lng": 2.367944 + }, + "location_type": "GEOMETRIC_CENTER" }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - } - ] + "scores_per_components": { + "street_name": 1 + } + } + ] + } + }, + "Woosmap_Platform_API_Reference_LocalitiesNearbyResponse": { + "title": "LocalitiesNearbyResponse", + "type": "object", + "description": "Attributes describing a point of interest.", + "properties": { + "types": { + "description": "An array containing the types of the result.", + "type": "array", + "example": [ + "point_of_interest", + "transit.station.rail.train", + "train_station" + ], + "items": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" + } + }, + "name": { + "description": "The name of the result.", + "type": "string" + }, + "public_id": { + "description": "Contains a unique ID for each result. Please use this ID to give feedbacks on results.", + "type": "string", + "example": "NOAeiQADqqisOuN3NM7oXlhkROI=" + }, + "geometry": { + "description": "The location of the result, in latitude and longitude, eventually associated with a Viewport.", + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LatLngLiteral" + }, + "viewport": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Bounds" + } }, + "example": { + "location": { + "lat": 51.4998415, + "lng": -0.1246375 + } + } + }, + "address_components": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressComponents" + }, + "categories": { + "description": "An array containing the categories of the result. This information is now available in the `types` field and will be removed.", + "type": "array", + "deprecated": true, + "items": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesTypesPoi" + } + }, + "formatted_address": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" + } + } + }, + "Woosmap_Platform_API_Reference_LocalitiesNearbyCollectionResponse": { + "title": "LocalitiesNearbyCollectionResponse", + "type": "object", + "description": "Collection of nearby points of interest.", + "properties": { + "results": { + "description": "The array of nearby points of interest.", + "type": "array", + "items": { + "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LocalitiesNearbyResponse" + } + }, + "pagination": { + "description": "Helps to navigate through paginated results.", + "type": "object", + "properties": { + "next_page": { + "description": "If more results are available, this will contain the value to pass to the `page` parameter to get the next page", + "type": [ + "integer", + "null" + ] + }, + "previous_page": { + "description": "If previous results are available, this will contain the value to pass to the `page` parameter to get the previous page", + "type": [ + "integer", + "null" + ] + } + } + } + }, + "example": { + "results": [ { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5iYXI6MDE5ZGUzNTdiZDkyNzAyZDM4ZDUyOWQ0YmJiZjBmODQ5YWEzZmY1NA==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6ZTc2ZDA1YzBiM2M0M2NmNmVkNTJjNGQyZDFiZDE3Nzc0OTZkNjlmOA==", "types": [ "point_of_interest", - "business.food_and_drinks.bar" + "business.food_and_drinks.fast_food" ], "categories": [ - "business.food_and_drinks.bar" + "business.food_and_drinks.fast_food" ], - "name": "Bon Courage", - "formatted_address": "Reade Street, New York", + "name": "Pret A Manger", + "formatted_address": "Broadway, New York", "geometry": { "location": { - "lat": 40.71541472882126, - "lng": -74.00719193106873 + "lat": 40.715905992166256, + "lng": -74.00508673226767 } }, "address_components": [ @@ -16245,13 +15274,13 @@ "types": [ "route" ], - "long_name": "Reade Street", - "short_name": "Reade Street" + "long_name": "Broadway", + "short_name": "Broadway" } ] }, { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6OGIyNDY5MDM4M2JhYzE1NmY4OGRiMGQzYmIyYzNjMTVmOTk0NDQwZQ==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6MzBlMGYxMzVhNGUzZDQ4MzRiMmNlNDMzMWJiYjZkOTY0MWJhN2E0Zg==", "types": [ "point_of_interest", "business.food_and_drinks.fast_food" @@ -16259,12 +15288,12 @@ "categories": [ "business.food_and_drinks.fast_food" ], - "name": "Burger King", + "name": "Dunkin'", "formatted_address": "Broadway, New York", "geometry": { "location": { - "lat": 40.71619516782573, - "lng": -74.00480635760651 + "lat": 40.71602115951586, + "lng": -74.00494482664695 } }, "address_components": [ @@ -16294,20 +15323,20 @@ ] }, { - "public_id": "cG9pOnVzOmJ1c2luZXNzLnRoZWF0cmU6MTU1Yjk5YmEwY2FiYzIzZjYxYWYyYTViYzI0ZDViYTVlNmVmZTAwNA==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmJlMWNkMTE2ZDQwM2E0Y2YwNGQ5NWQ2OTlmZWRmM2FhZTExNGU3ZWY=", "types": [ "point_of_interest", - "business.theatre" + "business.food_and_drinks.restaurant" ], "categories": [ - "business.theatre" + "business.food_and_drinks.restaurant" ], - "name": "The Flea", - "formatted_address": "Thomas Street, New York", + "name": "Chambers", + "formatted_address": "Chambers Street, New York", "geometry": { "location": { - "lat": 40.71609349534023, - "lng": -74.00589281989586 + "lat": 40.71461844801976, + "lng": -74.00754036678366 } }, "address_components": [ @@ -16331,432 +15360,282 @@ "types": [ "route" ], - "long_name": "Thomas Street", - "short_name": "Thomas Street" + "long_name": "Chambers Street", + "short_name": "Chambers Street" } ] - } - ], - "pagination": { - "previous_page": 2, - "next_page": 4 - } - } - }, - "Woosmap_Platform_API_Reference_AddressAutocompleteMatchedFields": { - "title": "AddressAutocompleteMatchedFields", - "type": "object", - "description": "Contains a set of substrings for description. Each substring is identified by an `offset` and a `length`.`", - "properties": { - "description": { - "description": "match substrings for address `description`", - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_MatchedSubstring" - } - } - } - }, - "Woosmap_Platform_API_Reference_AddressTypes": { - "title": "AddressTypes", - "type": "string", - "description": "Contains the type of result.", - "enum": [ - "house_number", - "route", - "address_block", - "locality", - "admin_level", - "country" - ] - }, - "Woosmap_Platform_API_Reference_AddressStatus": { - "title": "AddressStatus", - "type": "string", - "example": "OK", - "description": "Returns more info on if the request was successful or not, valid responses.\n * `OK` indicates the response contains a valid result.\n * `INVALID_REQUEST` indicates that the provided request was invalid (e.g. wrong URL syntax).\n * `REQUEST_DENIED` indicates that the service denied use of the Address API (e.g. wrong API Key, wrong/no referer, …).\n * `UNKNOWN_ERROR` indicates an Address API request could not be processed due to a server error. The request may succeed if you try again.\n", - "enum": [ - "OK", - "INVALID_REQUEST", - "REQUEST_DENIED", - "UNKNOWN_ERROR" - ] - }, - "Woosmap_Platform_API_Reference_AddressAutocompleteResponse": { - "title": "AddressAutocompleteResponse", - "type": "object", - "description": "Attributes describing an Address.", - "properties": { - "description": { - "description": "Address description to be used as suggestion in drop down list if needed.", - "type": "string", - "example": "London, England, United Kingdom" - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID if you need to give us feedbacks on results. This ID is also required to perform Address Details request.", - "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0" - }, - "matched_substring": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressAutocompleteMatchedFields" - }, - "type": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressTypes" - }, - "status": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressStatus" - } - }, - "example": { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - } - }, - "Woosmap_Platform_API_Reference_AddressAutocompleteCollectionResponse": { - "title": "AddressAutocompleteCollectionResponse", - "type": "object", - "description": "Address Collection Response containing Localities", - "properties": { - "predictions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressAutocompleteResponse" - } - }, - "status": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressStatus" - } - }, - "example": { - "predictions": [ - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz", - "description": "Londonderry, Northern Ireland, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" }, { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw", - "description": "London Heathrow Airport, Hounslow, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 + "public_id": "cG9pOnVzOmJ1c2luZXNzLnNob3AuZ3JvY2VyeTo1YTczMjYxOTQyYjVlZmUwOGEzZjQ1NGZmMTMwMmJjNjA4ODE3NmRk", + "types": [ + "point_of_interest", + "business.shop.grocery" + ], + "categories": [ + "business.shop.grocery" + ], + "name": "City Hall Oasis", + "geometry": { + "location": { + "lat": 40.71283012706819, + "lng": -74.00727837935057 + }, + "viewport": { + "northeast": { + "lat": 40.71286059528623, + "lng": -74.00724213866874 + }, + "southwest": { + "lat": 40.71279957503111, + "lng": -74.00731464213119 } - ] + } }, - "type": "locality" + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" + } + ] }, { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy", - "description": "London Luton Airport, Luton, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - } - ], - "status": "OK" - } - }, - "Woosmap_Platform_API_Reference_AddressGeometry": { - "title": "AddressGeometry", - "type": "object", - "description": "The location of the result, in latitude and longitude. Accuracy is also provided.", - "properties": { - "location_type": { - "description": "Specifies additional data about the geocoded location. The following values are currently supported: \n - `ROOFTOP` result is a precise geocode for which we have location information accurate down to street address precision.\n - `RANGE_INTERPOLATED` result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.\n - `GEOMETRIC_CENTER` result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …).\n - `APPROXIMATE` result is approximate (usually when no other above value applies)\n", - "type": "string", - "enum": [ - "ROOFTOP", - "RANGE_INTERPOLATED", - "GEOMETRIC_CENTER", - "APPROXIMATE" - ] - }, - "location": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_LatLngLiteral" - }, - "viewport": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_Bounds" - } - }, - "example": { - "location": { - "lat": 48.829405, - "lng": 2.367944 - }, - "location_type": "GEOMETRIC_CENTER" - } - }, - "Woosmap_Platform_API_Reference_AddressDetailsResponse": { - "title": "AddressDetailsResponse", - "type": "object", - "description": "Address Details Response", - "properties": { - "status": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressStatus" - }, - "result": { - "description": "the root node of address details", - "type": "object", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" - }, - "types": { - "description": "The types of result.", - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressTypes" - } - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", - "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0" - }, - "address_components": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressComponents" - }, - "geometry": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressGeometry" - } - } - } - }, - "example": { - "result": { - "formatted_address": "London, England, United Kingdom", - "types": [ - "locality" - ], - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "United Kingdom", - "short_name": "GBR" - }, - { - "types": [ - "state" - ], - "long_name": "England", - "short_name": "England" - }, - { - "types": [ - "county" - ], - "long_name": "London", - "short_name": "LDN" - }, - { - "long_name": "London", - "short_name": "London", - "types": [ - "locality" - ] - }, - { - "long_name": "SW1A 2", - "short_name": "SW1A 2", - "types": [ - "postal_code" - ] - } - ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 51.50643, - "lng": -0.12719 + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZpbmFuY2UuYmFuazpiOGY5MDE4Nzc2ZDZjNmEwZTljOGM4YWM0OTAxZWZlNzNmODZkM2M3", + "types": [ + "point_of_interest", + "business.finance.bank" + ], + "categories": [ + "business.finance.bank" + ], + "name": "Citibank", + "formatted_address": "Broadway, New York", + "geometry": { + "location": { + "lat": 40.7130414767567, + "lng": -74.0074818610995 + } }, - "viewport": { - "northeast": { - "lat": 51.68629, - "lng": 0.28206 + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" + }, + { + "types": [ + "locality" + ], + "long_name": "New York", + "short_name": "New York" }, - "southwest": { - "lat": 51.28043, - "lng": -0.56316 + { + "types": [ + "route" + ], + "long_name": "Broadway", + "short_name": "Broadway" } - } - } - }, - "status": "OK" - } - }, - "Woosmap_Platform_API_Reference_AddressGeocodeTypes": { - "title": "AddressGeocodeTypes", - "type": "string", - "description": "Contains the type of result.", - "enum": [ - "address", - "house_number", - "route", - "address_block", - "locality", - "admin_level", - "country", - "place" - ] - }, - "Woosmap_Platform_API_Reference_AddressGeocodeResponse": { - "title": "AddressGeocodeResponse", - "type": "object", - "description": "Address Geocode Response", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_FormattedAddress" - }, - "types": { - "description": "The types of result. If result type is a `place`, additional types may be returned (`eat_and_drink`, `going_out_entertainment`, `sights_and_museums`, `natural_and_geographical`, `transport`, `accommodations`, `leisure_and_outdoor`, `shopping`, `business_and_services`, `facilities`, `areas_and_buildings`)", - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressGeocodeTypes" - } - }, - "address_components": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressComponents" - }, - "geometry": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressGeometry" - } - } - }, - "Woosmap_Platform_API_Reference_AddressGeocodeCollectionResponse": { - "title": "AddressGeocodeCollectionResponse", - "type": "object", - "description": "Address Geocode Collection Response. Contains one or more Addresses with coordinates (default to one result for reverse geocoding)", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressGeocodeResponse" - } - }, - "status": { - "$ref": "#/components/schemas/Woosmap_Platform_API_Reference_AddressStatus" - } - }, - "example": { - "results": [ + ] + }, { - "formatted_address": "Place de la Résistance, 75007 Paris, France", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQzMTMzZTJkODdiOGJjMGE3ZjI2YTdiMWVjYTZlZmI1MjQyYWE3MTE=", "types": [ - "address", - "route" + "point_of_interest", + "business.food_and_drinks.restaurant" + ], + "categories": [ + "business.food_and_drinks.restaurant" ], + "name": "Saffron", + "geometry": { + "location": { + "lat": 40.71467049963849, + "lng": -74.00767187884445 + } + }, "address_components": [ { "types": [ - "country" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "France", - "short_name": "FRA" - }, + "long_name": "United States", + "short_name": "US" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQ1NjMyN2RiM2EyNWJlYmIwNjJjZjNlYWYwMDE3ZDIyYzEyNWNlMjY=", + "types": [ + "point_of_interest", + "business.food_and_drinks.restaurant" + ], + "categories": [ + "business.food_and_drinks.restaurant" + ], + "name": "Gran Morsi", + "geometry": { + "location": { + "lat": 40.71432885326513, + "lng": -74.00778746528921 + } + }, + "address_components": [ { "types": [ - "state" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "Ile-de-France", - "short_name": "IDF" - }, + "long_name": "United States", + "short_name": "US" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5iYXI6MDE5ZGUzNTdiZDkyNzAyZDM4ZDUyOWQ0YmJiZjBmODQ5YWEzZmY1NA==", + "types": [ + "point_of_interest", + "business.food_and_drinks.bar" + ], + "categories": [ + "business.food_and_drinks.bar" + ], + "name": "Bon Courage", + "formatted_address": "Reade Street, New York", + "geometry": { + "location": { + "lat": 40.71541472882126, + "lng": -74.00719193106873 + } + }, + "address_components": [ { "types": [ - "county" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "Paris", - "short_name": "Paris" + "long_name": "United States", + "short_name": "US" }, { - "long_name": "Paris", - "short_name": "Paris", "types": [ "locality" - ] + ], + "long_name": "New York", + "short_name": "New York" }, { - "long_name": "7th Arrondissement", - "short_name": "7th Arrondissement", "types": [ - "district" - ] + "route" + ], + "long_name": "Reade Street", + "short_name": "Reade Street" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6OGIyNDY5MDM4M2JhYzE1NmY4OGRiMGQzYmIyYzNjMTVmOTk0NDQwZQ==", + "types": [ + "point_of_interest", + "business.food_and_drinks.fast_food" + ], + "categories": [ + "business.food_and_drinks.fast_food" + ], + "name": "Burger King", + "formatted_address": "Broadway, New York", + "geometry": { + "location": { + "lat": 40.71619516782573, + "lng": -74.00480635760651 + } + }, + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" }, { - "long_name": "Place de la Résistance", - "short_name": "Place de la Résistance", "types": [ - "route" - ] + "locality" + ], + "long_name": "New York", + "short_name": "New York" }, { - "long_name": "75007", - "short_name": "75007", "types": [ - "postal_code" - ] + "route" + ], + "long_name": "Broadway", + "short_name": "Broadway" } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLnRoZWF0cmU6MTU1Yjk5YmEwY2FiYzIzZjYxYWYyYTViYzI0ZDViYTVlNmVmZTAwNA==", + "types": [ + "point_of_interest", + "business.theatre" + ], + "categories": [ + "business.theatre" ], + "name": "The Flea", + "formatted_address": "Thomas Street, New York", "geometry": { - "location_type": "GEOMETRIC_CENTER", "location": { - "lat": 48.86213, - "lng": 2.30152 + "lat": 40.71609349534023, + "lng": -74.00589281989586 + } + }, + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" }, - "viewport": { - "northeast": { - "lat": 48.86231, - "lng": 2.30541 - }, - "southwest": { - "lat": 48.86191, - "lng": 2.30147 - } + { + "types": [ + "locality" + ], + "long_name": "New York", + "short_name": "New York" + }, + { + "types": [ + "route" + ], + "long_name": "Thomas Street", + "short_name": "Thomas Street" } - } + ] } ], - "status": "OK" + "pagination": { + "previous_page": 2, + "next_page": 4 + } } }, "Woosmap_Platform_API_Reference_Zone": { @@ -21427,6 +20306,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -21682,6 +20562,7 @@ "da", "de", "es", + "et", "fi", "he", "it", @@ -22867,7 +21748,6 @@ "tags": [ "Geolocation API", "Localities API", - "Address API", "Datasets API", "Woosmap for what3words API" ] diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.go b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.go deleted file mode 100644 index e5a17ac8..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.go +++ /dev/null @@ -1,39 +0,0 @@ -// [START woosmap_http_address_autocomplete_collection] -package main - -import ( - "fmt" - "net/http" - "io" -) - -func main() { - - url := "https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY" - method := "GET" - - client := &http.Client { - } - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return - } - req.Header.Add("Referer", "http://localhost") - - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return - } - defer res.Body.Close() - - body, err := io.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return - } - fmt.Println(string(body)) -} -// [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.java b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.java deleted file mode 100644 index b56cd92e..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.java +++ /dev/null @@ -1,12 +0,0 @@ -// [START woosmap_http_address_autocomplete_collection] -OkHttpClient client = new OkHttpClient().newBuilder() - .build(); -MediaType mediaType = MediaType.parse("text/plain"); -RequestBody body = RequestBody.create(mediaType, ""); -Request request = new Request.Builder() - .url("https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY") - .method("GET", body) - .addHeader("Referer", "http://localhost") - .build(); -Response response = client.newCall(request).execute(); -// [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.js b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.js deleted file mode 100644 index 884e6e25..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.js +++ /dev/null @@ -1,11 +0,0 @@ -// [START woosmap_http_address_autocomplete_collection] -const requestOptions = { - method: "GET", - redirect: "follow" -}; - -fetch("https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); -// [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.node.js b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.node.js deleted file mode 100644 index 5ca014d6..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.node.js +++ /dev/null @@ -1,21 +0,0 @@ -// [START woosmap_http_address_autocomplete_collection] -const axios = require('axios'); - -let config = { - method: 'get', - maxBodyLength: Infinity, - url: 'https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY', - headers: { - 'Referer': 'http://localhost' - } -}; - -axios.request(config) -.then((response) => { - console.log(JSON.stringify(response.data)); -}) -.catch((error) => { - console.log(error); -}); - -// [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.py b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.py deleted file mode 100644 index e9aa66a6..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.py +++ /dev/null @@ -1,15 +0,0 @@ -# [START woosmap_http_address_autocomplete_collection] -import requests - -url = "https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY" - -payload = {} -headers = { - 'Referer': 'http://localhost' -} - -response = requests.request("GET", url, headers=headers, data=payload) - -print(response.text) - -# [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.rb b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.rb deleted file mode 100644 index 6ad7f8ac..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.rb +++ /dev/null @@ -1,16 +0,0 @@ -# [START woosmap_http_address_autocomplete_collection] -require "uri" -require "net/http" - -url = URI("https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY") - -https = Net::HTTP.new(url.host, url.port) -https.use_ssl = true - -request = Net::HTTP::Get.new(url) -request["Referer"] = "http://localhost" - -response = https.request(request) -puts response.read_body - -# [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.sh b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.sh deleted file mode 100644 index 131d60de..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.sh +++ /dev/null @@ -1,4 +0,0 @@ -# [START woosmap_http_address_autocomplete_collection] -curl -L 'https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY' \ --H 'Referer: http://localhost' -# [END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.txt b/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.txt deleted file mode 100644 index c84de836..00000000 --- a/dist/snippets/woosmap_http_address_autocomplete_collection/woosmap_http_address_autocomplete_collection.txt +++ /dev/null @@ -1,6 +0,0 @@ -[START woosmap_http_address_autocomplete_collection] -https://api.woosmap.com/address/autocomplete/json - ?components=country%3Agb - &input=Lond - &key=YOUR_PUBLIC_API_KEY -[END woosmap_http_address_autocomplete_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.go b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.go deleted file mode 100644 index 8fdcf343..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.go +++ /dev/null @@ -1,39 +0,0 @@ -// [START woosmap_http_address_details] -package main - -import ( - "fmt" - "net/http" - "io" -) - -func main() { - - url := "https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY" - method := "GET" - - client := &http.Client { - } - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return - } - req.Header.Add("Referer", "http://localhost") - - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return - } - defer res.Body.Close() - - body, err := io.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return - } - fmt.Println(string(body)) -} -// [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.java b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.java deleted file mode 100644 index 853c5b55..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.java +++ /dev/null @@ -1,12 +0,0 @@ -// [START woosmap_http_address_details] -OkHttpClient client = new OkHttpClient().newBuilder() - .build(); -MediaType mediaType = MediaType.parse("text/plain"); -RequestBody body = RequestBody.create(mediaType, ""); -Request request = new Request.Builder() - .url("https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY") - .method("GET", body) - .addHeader("Referer", "http://localhost") - .build(); -Response response = client.newCall(request).execute(); -// [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.js b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.js deleted file mode 100644 index 9912be2d..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.js +++ /dev/null @@ -1,11 +0,0 @@ -// [START woosmap_http_address_details] -const requestOptions = { - method: "GET", - redirect: "follow" -}; - -fetch("https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); -// [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.node.js b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.node.js deleted file mode 100644 index 56040713..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.node.js +++ /dev/null @@ -1,21 +0,0 @@ -// [START woosmap_http_address_details] -const axios = require('axios'); - -let config = { - method: 'get', - maxBodyLength: Infinity, - url: 'https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY', - headers: { - 'Referer': 'http://localhost' - } -}; - -axios.request(config) -.then((response) => { - console.log(JSON.stringify(response.data)); -}) -.catch((error) => { - console.log(error); -}); - -// [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.py b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.py deleted file mode 100644 index b7d1d084..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.py +++ /dev/null @@ -1,15 +0,0 @@ -# [START woosmap_http_address_details] -import requests - -url = "https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY" - -payload = {} -headers = { - 'Referer': 'http://localhost' -} - -response = requests.request("GET", url, headers=headers, data=payload) - -print(response.text) - -# [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.rb b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.rb deleted file mode 100644 index 53f7c276..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.rb +++ /dev/null @@ -1,16 +0,0 @@ -# [START woosmap_http_address_details] -require "uri" -require "net/http" - -url = URI("https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY") - -https = Net::HTTP.new(url.host, url.port) -https.use_ssl = true - -request = Net::HTTP::Get.new(url) -request["Referer"] = "http://localhost" - -response = https.request(request) -puts response.read_body - -# [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.sh b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.sh deleted file mode 100644 index c686eda3..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.sh +++ /dev/null @@ -1,4 +0,0 @@ -# [START woosmap_http_address_details] -curl -L 'https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY' \ --H 'Referer: http://localhost' -# [END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.txt b/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.txt deleted file mode 100644 index a17f354e..00000000 --- a/dist/snippets/woosmap_http_address_details/woosmap_http_address_details.txt +++ /dev/null @@ -1,5 +0,0 @@ -[START woosmap_http_address_details] -https://api.woosmap.com/address/details/json - ?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - &key=YOUR_PUBLIC_API_KEY -[END woosmap_http_address_details] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.go b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.go deleted file mode 100644 index dfd371fc..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.go +++ /dev/null @@ -1,39 +0,0 @@ -// [START woosmap_http_address_geocode_collection] -package main - -import ( - "fmt" - "net/http" - "io" -) - -func main() { - - url := "https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY" - method := "GET" - - client := &http.Client { - } - req, err := http.NewRequest(method, url, nil) - - if err != nil { - fmt.Println(err) - return - } - req.Header.Add("Referer", "http://localhost") - - res, err := client.Do(req) - if err != nil { - fmt.Println(err) - return - } - defer res.Body.Close() - - body, err := io.ReadAll(res.Body) - if err != nil { - fmt.Println(err) - return - } - fmt.Println(string(body)) -} -// [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.java b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.java deleted file mode 100644 index 675fd5ce..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.java +++ /dev/null @@ -1,12 +0,0 @@ -// [START woosmap_http_address_geocode_collection] -OkHttpClient client = new OkHttpClient().newBuilder() - .build(); -MediaType mediaType = MediaType.parse("text/plain"); -RequestBody body = RequestBody.create(mediaType, ""); -Request request = new Request.Builder() - .url("https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY") - .method("GET", body) - .addHeader("Referer", "http://localhost") - .build(); -Response response = client.newCall(request).execute(); -// [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.js b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.js deleted file mode 100644 index ce011102..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.js +++ /dev/null @@ -1,11 +0,0 @@ -// [START woosmap_http_address_geocode_collection] -const requestOptions = { - method: "GET", - redirect: "follow" -}; - -fetch("https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); -// [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.node.js b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.node.js deleted file mode 100644 index 7e2ba5e7..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.node.js +++ /dev/null @@ -1,21 +0,0 @@ -// [START woosmap_http_address_geocode_collection] -const axios = require('axios'); - -let config = { - method: 'get', - maxBodyLength: Infinity, - url: 'https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY', - headers: { - 'Referer': 'http://localhost' - } -}; - -axios.request(config) -.then((response) => { - console.log(JSON.stringify(response.data)); -}) -.catch((error) => { - console.log(error); -}); - -// [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.py b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.py deleted file mode 100644 index 1e5a5740..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.py +++ /dev/null @@ -1,15 +0,0 @@ -# [START woosmap_http_address_geocode_collection] -import requests - -url = "https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY" - -payload = {} -headers = { - 'Referer': 'http://localhost' -} - -response = requests.request("GET", url, headers=headers, data=payload) - -print(response.text) - -# [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.rb b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.rb deleted file mode 100644 index 77cbf63c..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.rb +++ /dev/null @@ -1,16 +0,0 @@ -# [START woosmap_http_address_geocode_collection] -require "uri" -require "net/http" - -url = URI("https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY") - -https = Net::HTTP.new(url.host, url.port) -https.use_ssl = true - -request = Net::HTTP::Get.new(url) -request["Referer"] = "http://localhost" - -response = https.request(request) -puts response.read_body - -# [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.sh b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.sh deleted file mode 100644 index f10b62a3..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.sh +++ /dev/null @@ -1,4 +0,0 @@ -# [START woosmap_http_address_geocode_collection] -curl -L 'https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY' \ --H 'Referer: http://localhost' -# [END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.txt b/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.txt deleted file mode 100644 index 56fe95f1..00000000 --- a/dist/snippets/woosmap_http_address_geocode_collection/woosmap_http_address_geocode_collection.txt +++ /dev/null @@ -1,7 +0,0 @@ -[START woosmap_http_address_geocode_collection] -https://api.woosmap.com/address/geocode/json - ?address=Place%20de%20la%20Resistance%20Paris - &components=country%3AFR - &limit=5 - &key=YOUR_PUBLIC_API_KEY -[END woosmap_http_address_geocode_collection] \ No newline at end of file diff --git a/dist/woosmap-openapi3.json b/dist/woosmap-openapi3.json index 391b2854..91e6964f 100755 --- a/dist/woosmap-openapi3.json +++ b/dist/woosmap-openapi3.json @@ -64,13 +64,6 @@ "externalDocs": { "url": "https://developers.woosmap.com/products/localities/get-started/" } - }, - { - "name": "Address API", - "description": "Woosmap Address API is a web service that returns addresses and other geographical places in response to an HTTP request. Request is done over HTTPS using GET. Response is formatted as JSON. You must specify a key in your request, included as the value of a `key` parameter for your public key or `private_key` for your private key. This key identifies your application for purposes of quota management. Learn how to [get a key](https://developers.woosmap.com/support/api-keys/).\n>**⚠️ This API has been deprecated in favour of Localities API**\n", - "externalDocs": { - "url": "https://developers.woosmap.com/products/address-api/get-started/" - } } ], "paths": { @@ -2895,7 +2888,7 @@ "$ref": "#/components/parameters/data" }, { - "$ref": "#/components/parameters/cc_format-2" + "$ref": "#/components/parameters/cc_format" } ], "responses": { @@ -3783,113 +3776,65 @@ ] } }, - "/address/autocomplete/json": { + "/zones": { "get": { - "deprecated": true, - "summary": "Autocomplete for Addresses", - "operationId": "addressAutocomplete", + "summary": "List your Zones", + "operationId": "listZones", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Zones" ], - "description": "Autocomplete on worldwide suggestions for a for text-based geographic searches. It can match on full words as well as substrings.\n", + "description": "List all zones for the current project, sorted by `zone_id`.\n", "security": [ - { - "PublicApiKeyAuth": [], - "RefererHeader": [] - }, { "PrivateApiKeyAuth": [] - }, - { - "PrivateApiKeyHeaderAuth": [] } ], "parameters": [ { - "$ref": "#/components/parameters/input-2" - }, - { - "$ref": "#/components/parameters/address_components" - }, - { - "$ref": "#/components/parameters/location-2" + "$ref": "#/components/parameters/limit-3" }, { - "$ref": "#/components/parameters/language-3" + "$ref": "#/components/parameters/offset" } ], "responses": { "200": { - "description": "Autocompletion Address successfully retrieved", + "description": "Zones successfully retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressAutocompleteCollectionResponse" + "$ref": "#/components/schemas/ZonesCollectionResponse" }, "examples": { "default": { - "summary": "Autocomplete address results for input `Lond` and components `country:gb`", + "summary": "Zones data", "value": { - "predictions": [ - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz", - "description": "Londonderry, Northern Ireland, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - }, + "zones": [ { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw", - "description": "London Heathrow Airport, Hounslow, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" + "store_id": "STORE_ID_123456", + "zone_id": "ZoneB", + "polygon": "POLYGON ((-122.4546384 37.774656, -122.4515485 37.7595934, -122.4354306 37.7602172, -122.4333707 37.7512596, -122.423071 37.7511239, -122.4242726 37.7687665, -122.4259893 37.7691736, -122.4289075 37.7732444, -122.4306241 37.7850483, -122.4472753 37.7830133, -122.445902 37.7759581, -122.4546384 37.774656))", + "types": [ + "delivery" + ], + "description": "Delivery Zone for Store B" }, { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy", - "description": "London Luton Airport, Luton, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" + "store_id": "STORE_ID_45678", + "zone_id": "ZoneC", + "polygon": "POLYGON ((-122.4758889 37.7524995, -122.4751594 37.7321718, -122.4688079 37.7299995, -122.4648597 37.7261979, -122.4519851 37.7228035, -122.4483802 37.7215815, -122.4458053 37.726741, -122.4365356 37.7310857, -122.4315574 37.7324433, -122.4246909 37.7312214, -122.4219444 37.731493, -122.423071 37.7511239, -122.4333707 37.7512596, -122.4354306 37.7602172, -122.4515485 37.7595934, -122.4528628 37.7582744, -122.4540375 37.7566755, -122.4565266 37.7513144, -122.4601315 37.7521288, -122.4618481 37.7514501, -122.4635648 37.7530788, -122.4758889 37.7524995))", + "types": [ + "delivery" + ], + "description": "Delivery Zone for Store C" } ], - "status": "OK" + "status": "ok" } } } @@ -3955,186 +3900,153 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" + "source": "curl -L 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1'" }, { "lang": "javascript", "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ] - } - }, - "/address/details/json": { - "get": { - "deprecated": true, - "summary": "Details of an Address", - "operationId": "addressDetails", + }, + "post": { + "summary": "Create your Zones", + "operationId": "createZones", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Zones" ], - "description": "Provides details of an address autocomplete suggestion (using the suggestion’s `public_id`).\n", + "description": "Used to batch create Zones to a specific project identified with the `private_key` parameter.\n", "security": [ - { - "PublicApiKeyAuth": [], - "RefererHeader": [] - }, { "PrivateApiKeyAuth": [] - }, - { - "PrivateApiKeyHeaderAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/public_id-2" - }, - { - "$ref": "#/components/parameters/fields-2" - }, - { - "$ref": "#/components/parameters/cc_format" + "requestBody": { + "description": "The request body of Zones Creation must be formatted as JSON.", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZonesCollectionRequest" + }, + "examples": { + "default": { + "summary": "Zones data as JSON", + "value": { + "zones": [ + { + "zone_id": "ZoneA", + "description": "Delivery Zone for Store A", + "store_id": "STORE_ID_123456", + "polygon": "POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))", + "types": [ + "delivery" + ] + }, + { + "zone_id": "ZoneB", + "description": "Delivery Zone for Store B", + "store_id": "STORE_ID_123456", + "polygon": "POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))", + "types": [ + "delivery" + ] + }, + { + "zone_id": "ZoneC", + "description": "Delivery Zone for Store C", + "store_id": "STORE_ID_45678", + "polygon": "POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))", + "types": [ + "delivery" + ] + } + ] + } + } + } + } } - ], + }, "responses": { "200": { - "description": "Details Address successfully retrieved", + "description": "Zones successfully created", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressDetailsResponse" + "$ref": "#/components/schemas/SuccessZones" }, "examples": { "default": { - "summary": "Address Details for `London, England, United Kingdom`", + "summary": "Success response for Zones Created", "value": { - "result": { - "formatted_address": "London, England, United Kingdom", - "types": [ - "locality" - ], - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "United Kingdom", - "short_name": "GBR" - }, - { - "types": [ - "state" - ], - "long_name": "England", - "short_name": "England" - }, - { - "types": [ - "county" - ], - "long_name": "London", - "short_name": "LDN" - }, - { - "long_name": "London", - "short_name": "London", - "types": [ - "locality" - ] - }, - { - "long_name": "SW1A 2", - "short_name": "SW1A 2", - "types": [ - "postal_code" - ] - } - ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 51.50643, - "lng": -0.12719 - }, - "viewport": { - "northeast": { - "lat": 51.68629, - "lng": 0.28206 - }, - "southwest": { - "lat": 51.28043, - "lng": -0.56316 - } - } - } - }, - "status": "OK" + "status": "ok", + "message": "Zones successfully added." } } } } } }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "400": { + "description": "Invalid. The data is not a valid JSON.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error401" + "$ref": "#/components/schemas/Error400" }, "examples": { - "Unauthorized": { - "summary": "Error 401", + "Invalid": { + "summary": "Error 400", "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" + "status": "error", + "value": "The request is invalid, the data is not a valid JSON." } } } } } }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "401": { + "description": "Unauthorized. Incorrect authentication credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error403" + "$ref": "#/components/schemas/Error401" }, "examples": { - "Forbidden": { - "summary": "Error 403", + "Unauthorized": { + "summary": "Error 401", "value": { - "detail": "This Woosmap API is not enabled for this project." + "detail": "Incorrect authentication credentials. Please check or use a valid API Key" } } } } } }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", + "403": { + "description": "Forbidden. This Woosmap API is not enabled for this project.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error429" + "$ref": "#/components/schemas/Error403" }, "examples": { "Forbidden": { - "summary": "Error 429", + "summary": "Error 403", "value": { - "detail": "The rate limit for this endpoint has been exceeded" + "detail": "This Woosmap API is not enabled for this project." } } } @@ -4146,214 +4058,152 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "curl -L 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n}'" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] - } - }, - "/address/geocode/json": { - "get": { - "deprecated": true, - "summary": "Geocode an Address or Reverse Geocode a latlng", - "operationId": "addressGeocode", + }, + "put": { + "summary": "Update the Zones", + "operationId": "updateZones", "servers": [ { "url": "https://api.woosmap.com" } ], "tags": [ - "Address API" + "Zones" ], - "description": "Provides details for an address or a geographic position. Either parameter `address` **or** `latlng` is required. Maximum of 25 queries per second (QPS)\n", + "description": "Used to update zones in batch. `zone_id` must exists when using `PUT` method, if one zone does not exists, the batch will be refused.", "security": [ - { - "PublicApiKeyAuth": [], - "RefererHeader": [] - }, { "PrivateApiKeyAuth": [] - }, - { - "PrivateApiKeyHeaderAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/address-2" - }, - { - "$ref": "#/components/parameters/latlng-2" - }, - { - "$ref": "#/components/parameters/address_components" - }, - { - "$ref": "#/components/parameters/language-3" - }, - { - "$ref": "#/components/parameters/location-2" - }, - { - "$ref": "#/components/parameters/cc_format" - }, - { - "$ref": "#/components/parameters/limit-3" + "requestBody": { + "description": "The request body of Zones Update must be formatted as JSON.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ZonesCollectionRequest" + }, + "examples": { + "default": { + "summary": "Zones data", + "value": { + "zones": [ + { + "zone_id": "ZoneA", + "description": "Delivery Zone for Store A", + "store_id": "STORE_ID_123456", + "polygon": "POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))", + "types": [ + "delivery" + ] + }, + { + "zone_id": "ZoneB", + "description": "Delivery Zone for Store B", + "store_id": "STORE_ID_123456", + "polygon": "POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))", + "types": [ + "delivery" + ] + }, + { + "zone_id": "ZoneC", + "description": "Delivery Zone for Store C", + "store_id": "STORE_ID_45678", + "polygon": "POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))", + "types": [ + "delivery" + ] + } + ] + } + } + } + } } - ], + }, "responses": { "200": { - "description": "Request Address Geocode successful", + "description": "Zones successfully updated", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/AddressGeocodeCollectionResponse" + "$ref": "#/components/schemas/SuccessZones" }, "examples": { "default": { - "summary": "Geocode Results for address `Place de la Resistance` with components `country:FR`", + "summary": "Success response for Zones updated", "value": { - "results": [ - { - "formatted_address": "Place de la Résistance, 75007 Paris, France", - "types": [ - "address", - "route" - ], - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "France", - "short_name": "FRA" - }, - { - "types": [ - "state" - ], - "long_name": "Ile-de-France", - "short_name": "IDF" - }, - { - "types": [ - "county" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "long_name": "Paris", - "short_name": "Paris", - "types": [ - "locality" - ] - }, - { - "long_name": "7th Arrondissement", - "short_name": "7th Arrondissement", - "types": [ - "district" - ] - }, - { - "long_name": "Place de la Résistance", - "short_name": "Place de la Résistance", - "types": [ - "route" - ] - }, - { - "long_name": "75007", - "short_name": "75007", - "types": [ - "postal_code" - ] - } - ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 48.86213, - "lng": 2.30152 - }, - "viewport": { - "northeast": { - "lat": 48.86231, - "lng": 2.30541 - }, - "southwest": { - "lat": 48.86191, - "lng": 2.30147 - } - } - } - } - ], - "status": "OK" + "status": "ok", + "message": "Zones successfully added." } } } } } }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", + "400": { + "description": "Invalid. The data is not a valid JSON.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error401" + "$ref": "#/components/schemas/Error400" }, "examples": { - "Unauthorized": { - "summary": "Error 401", + "Invalid": { + "summary": "Error 400", "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" + "status": "error", + "value": "The request is invalid, the data is not a valid JSON." } } } } } }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", + "401": { + "description": "Unauthorized. Incorrect authentication credentials.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error403" + "$ref": "#/components/schemas/Error401" }, "examples": { - "Forbidden": { - "summary": "Error 403", + "Unauthorized": { + "summary": "Error 401", "value": { - "detail": "This Woosmap API is not enabled for this project." + "detail": "Incorrect authentication credentials. Please check or use a valid API Key" } } } } } }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", + "403": { + "description": "Forbidden. This Woosmap API is not enabled for this project.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Error429" + "$ref": "#/components/schemas/Error403" }, "examples": { "Forbidden": { - "summary": "Error 429", + "summary": "Error 403", "value": { - "detail": "The rate limit for this endpoint has been exceeded" + "detail": "This Woosmap API is not enabled for this project." } } } @@ -4365,25 +4215,23 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY' \\\n-H 'Referer: http://localhost'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "curl -L -X PUT 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n}'" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY\"\n\npayload = {}\nheaders = {\n 'Referer': 'http://localhost'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n});\n\nlet config = {\n method: 'put',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] - } - }, - "/zones": { - "get": { - "summary": "List your Zones", - "operationId": "listZones", + }, + "delete": { + "summary": "Delete the Zones", + "operationId": "deleteZones", "servers": [ { "url": "https://api.woosmap.com" @@ -4392,53 +4240,26 @@ "tags": [ "Zones" ], - "description": "List all zones for the current project, sorted by `zone_id`.\n", + "description": "Used to delete one or more Zones.", "security": [ { "PrivateApiKeyAuth": [] } ], - "parameters": [ - { - "$ref": "#/components/parameters/limit-4" - }, - { - "$ref": "#/components/parameters/offset" - } - ], "responses": { "200": { - "description": "Zones successfully retrieved", + "description": "Zones successfully deleted", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ZonesCollectionResponse" + "$ref": "#/components/schemas/SuccessZones" }, "examples": { "default": { - "summary": "Zones data", + "summary": "Success response for Zones deleted", "value": { - "zones": [ - { - "store_id": "STORE_ID_123456", - "zone_id": "ZoneB", - "polygon": "POLYGON ((-122.4546384 37.774656, -122.4515485 37.7595934, -122.4354306 37.7602172, -122.4333707 37.7512596, -122.423071 37.7511239, -122.4242726 37.7687665, -122.4259893 37.7691736, -122.4289075 37.7732444, -122.4306241 37.7850483, -122.4472753 37.7830133, -122.445902 37.7759581, -122.4546384 37.774656))", - "types": [ - "delivery" - ], - "description": "Delivery Zone for Store B" - }, - { - "store_id": "STORE_ID_45678", - "zone_id": "ZoneC", - "polygon": "POLYGON ((-122.4758889 37.7524995, -122.4751594 37.7321718, -122.4688079 37.7299995, -122.4648597 37.7261979, -122.4519851 37.7228035, -122.4483802 37.7215815, -122.4458053 37.726741, -122.4365356 37.7310857, -122.4315574 37.7324433, -122.4246909 37.7312214, -122.4219444 37.731493, -122.423071 37.7511239, -122.4333707 37.7512596, -122.4354306 37.7602172, -122.4515485 37.7595934, -122.4528628 37.7582744, -122.4540375 37.7566755, -122.4565266 37.7513144, -122.4601315 37.7521288, -122.4618481 37.7514501, -122.4635648 37.7530788, -122.4758889 37.7524995))", - "types": [ - "delivery" - ], - "description": "Delivery Zone for Store C" - } - ], - "status": "ok" + "status": "ok", + "message": "Zones deleted." } } } @@ -4480,47 +4301,31 @@ } } } - }, - "429": { - "description": "Too Many Requests. The rate limit for this endpoint has been exceeded.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error429" - }, - "examples": { - "Forbidden": { - "summary": "Error 429", - "value": { - "detail": "The rate limit for this endpoint has been exceeded" - } - } - } - } - } } }, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" + "source": "curl -L -X DELETE 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY'" }, { "lang": "python", "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY&limit=2&offset=1\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + }, + { + "lang": "nodejs", + "label": "NodeJS", + "source": "const axios = require('axios');\n\nlet config = {\n method: 'delete',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" } ] - }, - "post": { - "summary": "Create your Zones", - "operationId": "createZones", + } + }, + "/zones/{zone_id}": { + "get": { + "summary": "Get Zone from ID", + "operationId": "getZone", "servers": [ { "url": "https://api.woosmap.com" @@ -4529,92 +4334,44 @@ "tags": [ "Zones" ], - "description": "Used to batch create Zones to a specific project identified with the `private_key` parameter.\n", + "description": "Used to retrieve a zone from his `zone_id`\n", "security": [ { "PrivateApiKeyAuth": [] } ], - "requestBody": { - "description": "The request body of Zones Creation must be formatted as JSON.", - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ZonesCollectionRequest" - }, - "examples": { - "default": { - "summary": "Zones data as JSON", - "value": { - "zones": [ - { - "zone_id": "ZoneA", - "description": "Delivery Zone for Store A", - "store_id": "STORE_ID_123456", - "polygon": "POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))", - "types": [ - "delivery" - ] - }, - { - "zone_id": "ZoneB", - "description": "Delivery Zone for Store B", - "store_id": "STORE_ID_123456", - "polygon": "POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))", - "types": [ - "delivery" - ] - }, - { - "zone_id": "ZoneC", - "description": "Delivery Zone for Store C", - "store_id": "STORE_ID_45678", - "polygon": "POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))", - "types": [ - "delivery" - ] - } - ] - } - } - } - } + "parameters": [ + { + "in": "path", + "name": "zone_id", + "schema": { + "type": "string" + }, + "required": true, + "example": "ZoneA", + "description": "ID of the zone to get" } - }, + ], "responses": { "200": { - "description": "Zones successfully created", + "description": "Zone successfully retrieved", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SuccessZones" + "$ref": "#/components/schemas/Zone" }, "examples": { "default": { - "summary": "Success response for Zones Created", - "value": { - "status": "ok", - "message": "Zones successfully added." - } - } - } - } - } - }, - "400": { - "description": "Invalid. The data is not a valid JSON.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error400" - }, - "examples": { - "Invalid": { - "summary": "Error 400", + "summary": "Get a zone from its zone_id", "value": { - "status": "error", - "value": "The request is invalid, the data is not a valid JSON." + "store_id": "STORE_ID_123456", + "zone_id": "ZoneA", + "polygon": "POLYGON ((-122.496116 37.7648181, -122.4954079 37.751518, -122.4635648 37.7530788, -122.4618481 37.7514501, -122.4601315 37.7521288, -122.4565266 37.7513144, -122.4540375 37.7566755, -122.4528359 37.7583041, -122.4515485 37.7595934, -122.4546384 37.774656, -122.4718903 37.7731635, -122.472577 37.772485, -122.4755811 37.7725529, -122.4791001 37.7723493, -122.4793576 37.7713995, -122.4784993 37.769839, -122.4783276 37.7680071, -122.4774693 37.766718, -122.4772118 37.7652931, -122.496116 37.7648181))", + "types": [ + "delivery" + ], + "description": "Delivery Zone for Store A", + "status": "ok" } } } @@ -4656,29 +4413,32 @@ } } } + }, + "404": { + "description": "Not Found - `zone_id` do not exist." } }, "x-codeSamples": [ { "lang": "curl", "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n}'" + "source": "curl -L 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'" }, { - "lang": "python", - "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "lang": "javascript", + "label": "JavaScript", + "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" }, { - "lang": "nodejs", - "label": "NodeJS", - "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneB\",\n \"description\": \"Delivery Zone for Store B\",\n \"store_id\": \"STORE_ID_123456\",\n \"polygon\": \"POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))\",\n \"types\": [\n \"delivery\"\n ]\n },\n {\n \"zone_id\": \"ZoneC\",\n \"description\": \"Delivery Zone for Store C\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n});\n\nlet config = {\n method: 'post',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + "lang": "python", + "label": "Python", + "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" } ] }, - "put": { - "summary": "Update the Zones", - "operationId": "updateZones", + "delete": { + "summary": "Delete Zone from ID", + "operationId": "deleteZone", "servers": [ { "url": "https://api.woosmap.com" @@ -4687,61 +4447,27 @@ "tags": [ "Zones" ], - "description": "Used to update zones in batch. `zone_id` must exists when using `PUT` method, if one zone does not exists, the batch will be refused.", + "description": "Used to delete one Zone. The `zone_id` is the id of the zone to delete. To delete several zones, use the comma as a separator.", "security": [ { "PrivateApiKeyAuth": [] } ], - "requestBody": { - "description": "The request body of Zones Update must be formatted as JSON.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ZonesCollectionRequest" - }, - "examples": { - "default": { - "summary": "Zones data", - "value": { - "zones": [ - { - "zone_id": "ZoneA", - "description": "Delivery Zone for Store A", - "store_id": "STORE_ID_123456", - "polygon": "POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))", - "types": [ - "delivery" - ] - }, - { - "zone_id": "ZoneB", - "description": "Delivery Zone for Store B", - "store_id": "STORE_ID_123456", - "polygon": "POLYGON ((-122.4546384 37.774656,-122.4515485 37.7595934,-122.4354306 37.7602172,-122.4333707 37.7512596,-122.423071 37.7511239,-122.4242726 37.7687665,-122.4259893 37.7691736,-122.4289075 37.7732444,-122.4306241 37.7850483,-122.4472753 37.7830133,-122.445902 37.7759581,-122.4546384 37.774656))", - "types": [ - "delivery" - ] - }, - { - "zone_id": "ZoneC", - "description": "Delivery Zone for Store C", - "store_id": "STORE_ID_45678", - "polygon": "POLYGON ((-122.4758889 37.7524995,-122.4751594 37.7321718,-122.4688079 37.7299995,-122.4648597 37.7261979,-122.4519851 37.7228035,-122.4483802 37.7215815,-122.4458053 37.726741,-122.4365356 37.7310857,-122.4315574 37.7324433,-122.4246909 37.7312214,-122.4219444 37.731493,-122.423071 37.7511239,-122.4333707 37.7512596,-122.4354306 37.7602172,-122.4515485 37.7595934,-122.4528628 37.7582744,-122.4540375 37.7566755,-122.4565266 37.7513144,-122.4601315 37.7521288,-122.4618481 37.7514501,-122.4635648 37.7530788,-122.4758889 37.7524995))", - "types": [ - "delivery" - ] - } - ] - } - } - } - } + "parameters": [ + { + "in": "path", + "name": "zone_id", + "schema": { + "type": "string" + }, + "required": true, + "example": "ZoneA", + "description": "ID of the zone to delete" } - }, + ], "responses": { "200": { - "description": "Zones successfully updated", + "description": "Zones successfully deleted", "content": { "application/json": { "schema": { @@ -4749,29 +4475,10 @@ }, "examples": { "default": { - "summary": "Success response for Zones updated", + "summary": "Success response for Zones deleted", "value": { "status": "ok", - "message": "Zones successfully added." - } - } - } - } - } - }, - "400": { - "description": "Invalid. The data is not a valid JSON.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error400" - }, - "examples": { - "Invalid": { - "summary": "Error 400", - "value": { - "status": "error", - "value": "The request is invalid, the data is not a valid JSON." + "message": "Zone ZoneA deleted." } } } @@ -4819,343 +4526,32 @@ { "lang": "curl", "label": "cURL", - "source": "curl -L -X PUT 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY' \\\n-H 'content-type: application/json' \\\n-d '{\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n}'" + "source": "curl -L -X DELETE 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'" }, { "lang": "python", "label": "Python", - "source": "import requests\nimport json\n\nurl = \"https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = json.dumps({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n})\nheaders = {\n 'content-type': 'application/json'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n" + "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload={}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" }, { "lang": "nodejs", "label": "NodeJS", - "source": "const axios = require('axios');\nlet data = JSON.stringify({\n \"zones\": [\n {\n \"zone_id\": \"ZoneA\",\n \"description\": \"Delivery Zone for Store A\",\n \"store_id\": \"STORE_ID_45678\",\n \"polygon\": \"POLYGON ((-122.496116 37.7648181,-122.4954079 37.751518,-122.4635648 37.7530788,-122.4618481 37.7514501,-122.4601315 37.7521288,-122.4565266 37.7513144,-122.4540375 37.7566755,-122.4528359 37.7583041,-122.4515485 37.7595934,-122.4546384 37.774656,-122.4718903 37.7731635,-122.472577 37.772485,-122.4755811 37.7725529,-122.4791001 37.7723493,-122.4793576 37.7713995,-122.4784993 37.769839,-122.4783276 37.7680071,-122.4774693 37.766718,-122.4772118 37.7652931,-122.496116 37.7648181))\",\n \"types\": [\n \"delivery\"\n ]\n }\n ]\n});\n\nlet config = {\n method: 'put',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY',\n headers: { \n 'content-type': 'application/json'\n },\n data : data\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" + "source": "var axios = require('axios');\n\nvar config = {\n method: 'delete',\n url: 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios(config)\n.then(function (response) {\n console.log(JSON.stringify(response.data));\n})\n.catch(function (error) {\n console.log(error);\n});\n" } ] - }, - "delete": { - "summary": "Delete the Zones", - "operationId": "deleteZones", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], - "tags": [ - "Zones" - ], - "description": "Used to delete one or more Zones.", - "security": [ - { - "PrivateApiKeyAuth": [] - } - ], - "responses": { - "200": { - "description": "Zones successfully deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessZones" - }, - "examples": { - "default": { - "summary": "Success response for Zones deleted", - "value": { - "status": "ok", - "message": "Zones deleted." - } - } - } - } - } - }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } - } - } - } - }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L -X DELETE 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY'" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - }, - { - "lang": "nodejs", - "label": "NodeJS", - "source": "const axios = require('axios');\n\nlet config = {\n method: 'delete',\n maxBodyLength: Infinity,\n url: 'https://api.woosmap.com/zones/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios.request(config)\n.then((response) => {\n console.log(JSON.stringify(response.data));\n})\n.catch((error) => {\n console.log(error);\n});\n" - } - ] - } - }, - "/zones/{zone_id}": { - "get": { - "summary": "Get Zone from ID", - "operationId": "getZone", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], - "tags": [ - "Zones" - ], - "description": "Used to retrieve a zone from his `zone_id`\n", - "security": [ - { - "PrivateApiKeyAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "zone_id", - "schema": { - "type": "string" - }, - "required": true, - "example": "ZoneA", - "description": "ID of the zone to get" - } - ], - "responses": { - "200": { - "description": "Zone successfully retrieved", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Zone" - }, - "examples": { - "default": { - "summary": "Get a zone from its zone_id", - "value": { - "store_id": "STORE_ID_123456", - "zone_id": "ZoneA", - "polygon": "POLYGON ((-122.496116 37.7648181, -122.4954079 37.751518, -122.4635648 37.7530788, -122.4618481 37.7514501, -122.4601315 37.7521288, -122.4565266 37.7513144, -122.4540375 37.7566755, -122.4528359 37.7583041, -122.4515485 37.7595934, -122.4546384 37.774656, -122.4718903 37.7731635, -122.472577 37.772485, -122.4755811 37.7725529, -122.4791001 37.7723493, -122.4793576 37.7713995, -122.4784993 37.769839, -122.4783276 37.7680071, -122.4774693 37.766718, -122.4772118 37.7652931, -122.496116 37.7648181))", - "types": [ - "delivery" - ], - "description": "Delivery Zone for Store A", - "status": "ok" - } - } - } - } - } - }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } - } - } - } - }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } - } - } - } - }, - "404": { - "description": "Not Found - `zone_id` do not exist." - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'" - }, - { - "lang": "javascript", - "label": "JavaScript", - "source": "const requestOptions = {\n method: \"GET\",\n redirect: \"follow\"\n};\n\nfetch(\"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\", requestOptions)\n .then((response) => response.text())\n .then((result) => console.log(result))\n .catch((error) => console.error(error));" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload = {}\nheaders = {}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - } - ] - }, - "delete": { - "summary": "Delete Zone from ID", - "operationId": "deleteZone", - "servers": [ - { - "url": "https://api.woosmap.com" - } - ], - "tags": [ - "Zones" - ], - "description": "Used to delete one Zone. The `zone_id` is the id of the zone to delete. To delete several zones, use the comma as a separator.", - "security": [ - { - "PrivateApiKeyAuth": [] - } - ], - "parameters": [ - { - "in": "path", - "name": "zone_id", - "schema": { - "type": "string" - }, - "required": true, - "example": "ZoneA", - "description": "ID of the zone to delete" - } - ], - "responses": { - "200": { - "description": "Zones successfully deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessZones" - }, - "examples": { - "default": { - "summary": "Success response for Zones deleted", - "value": { - "status": "ok", - "message": "Zone ZoneA deleted." - } - } - } - } - } - }, - "401": { - "description": "Unauthorized. Incorrect authentication credentials.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error401" - }, - "examples": { - "Unauthorized": { - "summary": "Error 401", - "value": { - "detail": "Incorrect authentication credentials. Please check or use a valid API Key" - } - } - } - } - } - }, - "403": { - "description": "Forbidden. This Woosmap API is not enabled for this project.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Error403" - }, - "examples": { - "Forbidden": { - "summary": "Error 403", - "value": { - "detail": "This Woosmap API is not enabled for this project." - } - } - } - } - } - } - }, - "x-codeSamples": [ - { - "lang": "curl", - "label": "cURL", - "source": "curl -L -X DELETE 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY'" - }, - { - "lang": "python", - "label": "Python", - "source": "import requests\n\nurl = \"https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY\"\n\npayload={}\nheaders = {}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n" - }, - { - "lang": "nodejs", - "label": "NodeJS", - "source": "var axios = require('axios');\n\nvar config = {\n method: 'delete',\n url: 'https://api.woosmap.com/zones/ZoneA/?private_key=YOUR_PRIVATE_API_KEY',\n headers: { }\n};\n\naxios(config)\n.then(function (response) {\n console.log(JSON.stringify(response.data));\n})\n.catch(function (error) {\n console.log(error);\n});\n" - } - ] - } - } - }, - "components": { - "parameters": { - "ip_address": { - "name": "ip_address", - "description": "The ip_address you want to geolocate. For **server call with private_key** only. Without this parameter, the API will geolocate the IP Address attached to the raw TCP request.\n", - "in": "query", - "schema": { - "type": "string", - "example": "75.134.29.90" - } + } + } + }, + "components": { + "parameters": { + "ip_address": { + "name": "ip_address", + "description": "The ip_address you want to geolocate. For **server call with private_key** only. Without this parameter, the API will geolocate the IP Address attached to the raw TCP request.\n", + "in": "query", + "schema": { + "type": "string", + "example": "75.134.29.90" + } }, "limit": { "name": "limit", @@ -5389,7 +4785,7 @@ }, "cc_format": { "name": "cc_format", - "description": "To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field (default is `alpha3`).\n", + "description": "To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field. Default is the format used to specify `components` or `alpha2` if no components are specified.\n", "schema": { "type": "string", "enum": [ @@ -5461,19 +4857,6 @@ "required": false, "in": "query" }, - "cc_format-2": { - "name": "cc_format", - "description": "To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field. Default is the format used to specify `components` or `alpha2` if no components are specified.\n", - "schema": { - "type": "string", - "enum": [ - "alpha2", - "alpha3" - ], - "example": "alpha2" - }, - "in": "query" - }, "nearby_types": { "name": "types", "description": "The types of points of interest to return. Multiple types can be passed using the pipe character (`|`) as a separator. For example: `types=business.shop|medical.pharmacy|business.finance.bank`.\n", @@ -5491,97 +4874,7 @@ }, "in": "query" }, - "input-2": { - "name": "input", - "description": "The text string on which to search, for example: \"london\" or \"123 Cross Road\". The Woosmap Address API will return predictions matches based on this string and order the results based on their perceived relevance.\n", - "schema": { - "type": "string", - "example": "London" - }, - "required": true, - "in": "query" - }, - "address_components": { - "name": "components", - "description": "To restrict your results to specific areas. Currently, you can use components to filter over countries. Countries must be passed as three characters string (ISO 3166-1 Alpha 3). Components should be passed as an array of different options which are separated by a `|`.\n", - "schema": { - "type": "string", - "example": "country:CAN|country:BEL" - }, - "in": "query" - }, - "location-2": { - "name": "location", - "description": "Bias for the results. Should be pass in `lat`,`lng` format.\n", - "schema": { - "type": "string", - "example": "5.2,-2.3" - }, - "in": "query" - }, - "language-3": { - "name": "language", - "description": "The language code, using ISO 639-1 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use the default language of each country.\n", - "schema": { - "type": "string", - "example": "en" - }, - "in": "query" - }, - "public_id-2": { - "name": "public_id", - "description": "A textual identifier that uniquely identifies a locality, returned from an [Address Autocomplete](https://developers.woosmap.com/products/address-api/autocomplete/).\n", - "schema": { - "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMDA1MTI2" - }, - "required": true, - "in": "query" - }, - "fields-2": { - "name": "fields", - "description": "Used to limit the returning fields (by default, all fields are return). Available fields are (geometry) (fields should be separated by a `,`). By using this parameter you will limit content of responses to the geometry part. No address component will be returned.\n", - "schema": { - "type": "string", - "enum": [ - "geometry" - ], - "example": "geometry" - }, - "in": "query" - }, - "address-2": { - "name": "address", - "description": "The address of which to find the coordinates for. A partial address is less likely to return the proper coordinates than the complete address.\n", - "schema": { - "type": "string", - "example": "224%20Rue%20de%20Rivoli%2C%20Paris" - }, - "required": false, - "in": "query" - }, - "latlng-2": { - "name": "latlng", - "description": "Geographic coordinates. Should be pass in `lat`,`lng` format.\n", - "schema": { - "type": "string", - "example": "5.2,-2.3" - }, - "required": false, - "in": "query" - }, "limit-3": { - "name": "limit", - "description": "Maximum number of results to be returned (value from 1 to 100, default values for geocode request [20] and for reverse geocode request [1])\n", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "example": 10 - }, - "in": "query" - }, - "limit-4": { "name": "limit", "description": "To limit number of zones retrieved (max 50).\n", "schema": { @@ -5602,36 +4895,6 @@ }, "in": "query" }, - "address_address_components": { - "$ref": "#/components/parameters/address_components" - }, - "address_address": { - "$ref": "#/components/parameters/address-2" - }, - "address_cc_format": { - "$ref": "#/components/parameters/cc_format" - }, - "address_fields": { - "$ref": "#/components/parameters/fields-2" - }, - "address_input": { - "$ref": "#/components/parameters/input-2" - }, - "address_language": { - "$ref": "#/components/parameters/language-3" - }, - "address_latlng": { - "$ref": "#/components/parameters/latlng-2" - }, - "address_limit": { - "$ref": "#/components/parameters/limit-3" - }, - "address_location": { - "$ref": "#/components/parameters/location-2" - }, - "address_public_id": { - "$ref": "#/components/parameters/public_id-2" - }, "geolocation_ip_address": { "$ref": "#/components/parameters/ip_address" }, @@ -5645,7 +4908,7 @@ "$ref": "#/components/parameters/addresses_per_page" }, "localities_cc_format": { - "$ref": "#/components/parameters/cc_format-2" + "$ref": "#/components/parameters/cc_format" }, "localities_custom_description": { "$ref": "#/components/parameters/custom_description" @@ -5732,7 +4995,7 @@ "$ref": "#/components/parameters/zone" }, "zones_limit": { - "$ref": "#/components/parameters/limit-4" + "$ref": "#/components/parameters/limit-3" }, "zones_offset": { "$ref": "#/components/parameters/offset" @@ -8324,418 +7587,105 @@ "lat": 48.829405, "lng": 2.367944 }, - "location_type": "GEOMETRIC_CENTER" - } - }, - "LocalitiesScoresPerComponents": { - "title": "LocalitiesScoresPerComponents", - "type": "object", - "properties": { - "street_name": { - "description": "Street score", - "type": "number" - }, - "postal_code": { - "description": "Postal code score", - "type": "number" - }, - "locality": { - "description": "Postal code score", - "type": "number" - } - }, - "example": { - "scores_per_components": { - "street_name": 0.6153846153846154, - "postal_code": 0.8, - "locality": 1 - } - } - }, - "LocalitiesGeocodeResponse": { - "title": "LocalitiesGeocodeResponse", - "type": "object", - "description": "Attributes describing a locality. Not all attributes will be available for all locality types.", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/FormattedAddress" - }, - "types": { - "description": "An array containing the types of the result", - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalitiesTypesAll" - } - }, - "administrative_area_label": { - "$ref": "#/components/schemas/AdministrativeAreaLabel" - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", - "type": "string", - "example": "MkvnYy6K6oVGqeqfWJGO/6eCgqo=" - }, - "geometry": { - "$ref": "#/components/schemas/LocalitiesAddressGeometry" - }, - "status": { - "$ref": "#/components/schemas/LocalitiesStatus" - }, - "address_components": { - "$ref": "#/components/schemas/AddressComponents" - }, - "distance": { - "description": "When reverse geocoding, this field represents the distance (in meter) to the requested latlng", - "type": "number", - "example": 5.234 - }, - "sub_buildings": { - "description": "When reverse geocoding with `list_sub_buildings=true`, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.", - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalitiesAddressSummary" - } - }, - "scores_per_components": { - "description": "For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.", - "$ref": "#/components/schemas/LocalitiesScoresPerComponents" - } - } - }, - "LocalitiesGeocodeCollectionResponse": { - "title": "LocalitiesGeocodeCollectionResponse", - "type": "object", - "description": "Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalitiesGeocodeResponse" - } - } - }, - "example": { - "results": [ - { - "public_id": "0+FTYd/1MsiBSxLAKq+/Fiyy+uM=", - "types": [ - "address", - "route" - ], - "formatted_address": "Place Jeanne D'Arc, 75013, Paris", - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "France", - "short_name": "FR" - }, - { - "types": [ - "state", - "division_level_1" - ], - "long_name": "Île-de-France", - "short_name": "Île-de-France" - }, - { - "types": [ - "administrative_area_level_1", - "county", - "division_level_2" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "types": [ - "locality" - ], - "long_name": "Paris", - "short_name": "Paris" - }, - { - "types": [ - "postal_codes" - ], - "long_name": "75013", - "short_name": "75013" - }, - { - "types": [ - "route" - ], - "long_name": "Place Jeanne D'Arc", - "short_name": "Place Jeanne D'Arc" - } - ], - "geometry": { - "location": { - "lat": 48.829405, - "lng": 2.367944 - }, - "location_type": "GEOMETRIC_CENTER" - }, - "scores_per_components": { - "street_name": 1 - } - } - ] + "location_type": "GEOMETRIC_CENTER" } }, - "LocalitiesNearbyResponse": { - "title": "LocalitiesNearbyResponse", + "LocalitiesScoresPerComponents": { + "title": "LocalitiesScoresPerComponents", "type": "object", - "description": "Attributes describing a point of interest.", "properties": { + "street_name": { + "description": "Street score", + "type": "number" + }, + "postal_code": { + "description": "Postal code score", + "type": "number" + }, + "locality": { + "description": "Postal code score", + "type": "number" + } + }, + "example": { + "scores_per_components": { + "street_name": 0.6153846153846154, + "postal_code": 0.8, + "locality": 1 + } + } + }, + "LocalitiesGeocodeResponse": { + "title": "LocalitiesGeocodeResponse", + "type": "object", + "description": "Attributes describing a locality. Not all attributes will be available for all locality types.", + "properties": { + "formatted_address": { + "$ref": "#/components/schemas/FormattedAddress" + }, "types": { - "description": "An array containing the types of the result.", + "description": "An array containing the types of the result", "type": "array", - "example": [ - "point_of_interest", - "transit.station.rail.train", - "train_station" - ], "items": { - "$ref": "#/components/schemas/LocalitiesTypesPoi" + "$ref": "#/components/schemas/LocalitiesTypesAll" } }, - "name": { - "description": "The name of the result.", - "type": "string" + "administrative_area_label": { + "$ref": "#/components/schemas/AdministrativeAreaLabel" }, "public_id": { - "description": "Contains a unique ID for each result. Please use this ID to give feedbacks on results.", + "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", "type": "string", - "example": "NOAeiQADqqisOuN3NM7oXlhkROI=" + "example": "MkvnYy6K6oVGqeqfWJGO/6eCgqo=" }, "geometry": { - "description": "The location of the result, in latitude and longitude, eventually associated with a Viewport.", - "type": "object", - "properties": { - "location": { - "$ref": "#/components/schemas/LatLngLiteral" - }, - "viewport": { - "$ref": "#/components/schemas/Bounds" - } - }, - "example": { - "location": { - "lat": 51.4998415, - "lng": -0.1246375 - } - } + "$ref": "#/components/schemas/LocalitiesAddressGeometry" + }, + "status": { + "$ref": "#/components/schemas/LocalitiesStatus" }, "address_components": { "$ref": "#/components/schemas/AddressComponents" }, - "categories": { - "description": "An array containing the categories of the result. This information is now available in the `types` field and will be removed.", + "distance": { + "description": "When reverse geocoding, this field represents the distance (in meter) to the requested latlng", + "type": "number", + "example": 5.234 + }, + "sub_buildings": { + "description": "When reverse geocoding with `list_sub_buildings=true`, this field will contain a list of precise addresses that can be found at that location, i.e. all flats within a building.", "type": "array", - "deprecated": true, "items": { - "$ref": "#/components/schemas/LocalitiesTypesPoi" + "$ref": "#/components/schemas/LocalitiesAddressSummary" } }, - "formatted_address": { - "$ref": "#/components/schemas/FormattedAddress" + "scores_per_components": { + "description": "For each component (street_name, postal_code, and locality), it indicates the degree of correspondence with the original query. This value ranges from 0 to 1, with 0 indicating no match with the original query, and enables you to assess the quality of the Geocode’s result.", + "$ref": "#/components/schemas/LocalitiesScoresPerComponents" } } }, - "LocalitiesNearbyCollectionResponse": { - "title": "LocalitiesNearbyCollectionResponse", + "LocalitiesGeocodeCollectionResponse": { + "title": "LocalitiesGeocodeCollectionResponse", "type": "object", - "description": "Collection of nearby points of interest.", - "properties": { - "results": { - "description": "The array of nearby points of interest.", - "type": "array", - "items": { - "$ref": "#/components/schemas/LocalitiesNearbyResponse" - } - }, - "pagination": { - "description": "Helps to navigate through paginated results.", - "type": "object", - "properties": { - "next_page": { - "description": "If more results are available, this will contain the value to pass to the `page` parameter to get the next page", - "type": [ - "integer", - "null" - ] - }, - "previous_page": { - "description": "If previous results are available, this will contain the value to pass to the `page` parameter to get the previous page", - "type": [ - "integer", - "null" - ] - } - } - } - }, - "example": { - "results": [ - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6ZTc2ZDA1YzBiM2M0M2NmNmVkNTJjNGQyZDFiZDE3Nzc0OTZkNjlmOA==", - "types": [ - "point_of_interest", - "business.food_and_drinks.fast_food" - ], - "categories": [ - "business.food_and_drinks.fast_food" - ], - "name": "Pret A Manger", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.715905992166256, - "lng": -74.00508673226767 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6MzBlMGYxMzVhNGUzZDQ4MzRiMmNlNDMzMWJiYjZkOTY0MWJhN2E0Zg==", - "types": [ - "point_of_interest", - "business.food_and_drinks.fast_food" - ], - "categories": [ - "business.food_and_drinks.fast_food" - ], - "name": "Dunkin'", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.71602115951586, - "lng": -74.00494482664695 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmJlMWNkMTE2ZDQwM2E0Y2YwNGQ5NWQ2OTlmZWRmM2FhZTExNGU3ZWY=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" - ], - "categories": [ - "business.food_and_drinks.restaurant" - ], - "name": "Chambers", - "formatted_address": "Chambers Street, New York", - "geometry": { - "location": { - "lat": 40.71461844801976, - "lng": -74.00754036678366 - } - }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - }, - { - "types": [ - "locality" - ], - "long_name": "New York", - "short_name": "New York" - }, - { - "types": [ - "route" - ], - "long_name": "Chambers Street", - "short_name": "Chambers Street" - } - ] - }, + "description": "Localities Geocode Collection Response. Contains one or more detailed Localities or Addresses in FR or in the UK, with coordinates (default to one result for reverse geocoding)", + "properties": { + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalitiesGeocodeResponse" + } + } + }, + "example": { + "results": [ { - "public_id": "cG9pOnVzOmJ1c2luZXNzLnNob3AuZ3JvY2VyeTo1YTczMjYxOTQyYjVlZmUwOGEzZjQ1NGZmMTMwMmJjNjA4ODE3NmRk", + "public_id": "0+FTYd/1MsiBSxLAKq+/Fiyy+uM=", "types": [ - "point_of_interest", - "business.shop.grocery" - ], - "categories": [ - "business.shop.grocery" + "address", + "route" ], - "name": "City Hall Oasis", - "geometry": { - "location": { - "lat": 40.71283012706819, - "lng": -74.00727837935057 - }, - "viewport": { - "northeast": { - "lat": 40.71286059528623, - "lng": -74.00724213866874 - }, - "southwest": { - "lat": 40.71279957503111, - "lng": -74.00731464213119 - } - } - }, + "formatted_address": "Place Jeanne D'Arc, 75013, Paris", "address_components": [ { "types": [ @@ -8743,125 +7693,172 @@ "administrative_area_level_0", "division_level_0" ], - "long_name": "United States", - "short_name": "US" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZpbmFuY2UuYmFuazpiOGY5MDE4Nzc2ZDZjNmEwZTljOGM4YWM0OTAxZWZlNzNmODZkM2M3", - "types": [ - "point_of_interest", - "business.finance.bank" - ], - "categories": [ - "business.finance.bank" - ], - "name": "Citibank", - "formatted_address": "Broadway, New York", - "geometry": { - "location": { - "lat": 40.7130414767567, - "lng": -74.0074818610995 - } - }, - "address_components": [ + "long_name": "France", + "short_name": "FR" + }, { "types": [ - "country", - "administrative_area_level_0", - "division_level_0" + "state", + "division_level_1" ], - "long_name": "United States", - "short_name": "US" + "long_name": "Île-de-France", + "short_name": "Île-de-France" + }, + { + "types": [ + "administrative_area_level_1", + "county", + "division_level_2" + ], + "long_name": "Paris", + "short_name": "Paris" }, { "types": [ "locality" ], - "long_name": "New York", - "short_name": "New York" + "long_name": "Paris", + "short_name": "Paris" }, { "types": [ - "route" + "postal_codes" ], - "long_name": "Broadway", - "short_name": "Broadway" - } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQzMTMzZTJkODdiOGJjMGE3ZjI2YTdiMWVjYTZlZmI1MjQyYWE3MTE=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" - ], - "categories": [ - "business.food_and_drinks.restaurant" - ], - "name": "Saffron", - "geometry": { - "location": { - "lat": 40.71467049963849, - "lng": -74.00767187884445 - } - }, - "address_components": [ + "long_name": "75013", + "short_name": "75013" + }, { "types": [ - "country", - "administrative_area_level_0", - "division_level_0" + "route" ], - "long_name": "United States", - "short_name": "US" + "long_name": "Place Jeanne D'Arc", + "short_name": "Place Jeanne D'Arc" } - ] - }, - { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQ1NjMyN2RiM2EyNWJlYmIwNjJjZjNlYWYwMDE3ZDIyYzEyNWNlMjY=", - "types": [ - "point_of_interest", - "business.food_and_drinks.restaurant" - ], - "categories": [ - "business.food_and_drinks.restaurant" ], - "name": "Gran Morsi", "geometry": { "location": { - "lat": 40.71432885326513, - "lng": -74.00778746528921 - } + "lat": 48.829405, + "lng": 2.367944 + }, + "location_type": "GEOMETRIC_CENTER" }, - "address_components": [ - { - "types": [ - "country", - "administrative_area_level_0", - "division_level_0" - ], - "long_name": "United States", - "short_name": "US" - } - ] + "scores_per_components": { + "street_name": 1 + } + } + ] + } + }, + "LocalitiesNearbyResponse": { + "title": "LocalitiesNearbyResponse", + "type": "object", + "description": "Attributes describing a point of interest.", + "properties": { + "types": { + "description": "An array containing the types of the result.", + "type": "array", + "example": [ + "point_of_interest", + "transit.station.rail.train", + "train_station" + ], + "items": { + "$ref": "#/components/schemas/LocalitiesTypesPoi" + } + }, + "name": { + "description": "The name of the result.", + "type": "string" + }, + "public_id": { + "description": "Contains a unique ID for each result. Please use this ID to give feedbacks on results.", + "type": "string", + "example": "NOAeiQADqqisOuN3NM7oXlhkROI=" + }, + "geometry": { + "description": "The location of the result, in latitude and longitude, eventually associated with a Viewport.", + "type": "object", + "properties": { + "location": { + "$ref": "#/components/schemas/LatLngLiteral" + }, + "viewport": { + "$ref": "#/components/schemas/Bounds" + } }, + "example": { + "location": { + "lat": 51.4998415, + "lng": -0.1246375 + } + } + }, + "address_components": { + "$ref": "#/components/schemas/AddressComponents" + }, + "categories": { + "description": "An array containing the categories of the result. This information is now available in the `types` field and will be removed.", + "type": "array", + "deprecated": true, + "items": { + "$ref": "#/components/schemas/LocalitiesTypesPoi" + } + }, + "formatted_address": { + "$ref": "#/components/schemas/FormattedAddress" + } + } + }, + "LocalitiesNearbyCollectionResponse": { + "title": "LocalitiesNearbyCollectionResponse", + "type": "object", + "description": "Collection of nearby points of interest.", + "properties": { + "results": { + "description": "The array of nearby points of interest.", + "type": "array", + "items": { + "$ref": "#/components/schemas/LocalitiesNearbyResponse" + } + }, + "pagination": { + "description": "Helps to navigate through paginated results.", + "type": "object", + "properties": { + "next_page": { + "description": "If more results are available, this will contain the value to pass to the `page` parameter to get the next page", + "type": [ + "integer", + "null" + ] + }, + "previous_page": { + "description": "If previous results are available, this will contain the value to pass to the `page` parameter to get the previous page", + "type": [ + "integer", + "null" + ] + } + } + } + }, + "example": { + "results": [ { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5iYXI6MDE5ZGUzNTdiZDkyNzAyZDM4ZDUyOWQ0YmJiZjBmODQ5YWEzZmY1NA==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6ZTc2ZDA1YzBiM2M0M2NmNmVkNTJjNGQyZDFiZDE3Nzc0OTZkNjlmOA==", "types": [ "point_of_interest", - "business.food_and_drinks.bar" + "business.food_and_drinks.fast_food" ], "categories": [ - "business.food_and_drinks.bar" + "business.food_and_drinks.fast_food" ], - "name": "Bon Courage", - "formatted_address": "Reade Street, New York", + "name": "Pret A Manger", + "formatted_address": "Broadway, New York", "geometry": { "location": { - "lat": 40.71541472882126, - "lng": -74.00719193106873 + "lat": 40.715905992166256, + "lng": -74.00508673226767 } }, "address_components": [ @@ -8885,13 +7882,13 @@ "types": [ "route" ], - "long_name": "Reade Street", - "short_name": "Reade Street" + "long_name": "Broadway", + "short_name": "Broadway" } ] }, { - "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6OGIyNDY5MDM4M2JhYzE1NmY4OGRiMGQzYmIyYzNjMTVmOTk0NDQwZQ==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6MzBlMGYxMzVhNGUzZDQ4MzRiMmNlNDMzMWJiYjZkOTY0MWJhN2E0Zg==", "types": [ "point_of_interest", "business.food_and_drinks.fast_food" @@ -8899,12 +7896,12 @@ "categories": [ "business.food_and_drinks.fast_food" ], - "name": "Burger King", + "name": "Dunkin'", "formatted_address": "Broadway, New York", "geometry": { "location": { - "lat": 40.71619516782573, - "lng": -74.00480635760651 + "lat": 40.71602115951586, + "lng": -74.00494482664695 } }, "address_components": [ @@ -8934,20 +7931,20 @@ ] }, { - "public_id": "cG9pOnVzOmJ1c2luZXNzLnRoZWF0cmU6MTU1Yjk5YmEwY2FiYzIzZjYxYWYyYTViYzI0ZDViYTVlNmVmZTAwNA==", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmJlMWNkMTE2ZDQwM2E0Y2YwNGQ5NWQ2OTlmZWRmM2FhZTExNGU3ZWY=", "types": [ "point_of_interest", - "business.theatre" + "business.food_and_drinks.restaurant" ], "categories": [ - "business.theatre" + "business.food_and_drinks.restaurant" ], - "name": "The Flea", - "formatted_address": "Thomas Street, New York", + "name": "Chambers", + "formatted_address": "Chambers Street, New York", "geometry": { "location": { - "lat": 40.71609349534023, - "lng": -74.00589281989586 + "lat": 40.71461844801976, + "lng": -74.00754036678366 } }, "address_components": [ @@ -8971,432 +7968,282 @@ "types": [ "route" ], - "long_name": "Thomas Street", - "short_name": "Thomas Street" + "long_name": "Chambers Street", + "short_name": "Chambers Street" } ] - } - ], - "pagination": { - "previous_page": 2, - "next_page": 4 - } - } - }, - "AddressAutocompleteMatchedFields": { - "title": "AddressAutocompleteMatchedFields", - "type": "object", - "description": "Contains a set of substrings for description. Each substring is identified by an `offset` and a `length`.`", - "properties": { - "description": { - "description": "match substrings for address `description`", - "type": "array", - "items": { - "$ref": "#/components/schemas/MatchedSubstring" - } - } - } - }, - "AddressTypes": { - "title": "AddressTypes", - "type": "string", - "description": "Contains the type of result.", - "enum": [ - "house_number", - "route", - "address_block", - "locality", - "admin_level", - "country" - ] - }, - "AddressStatus": { - "title": "AddressStatus", - "type": "string", - "example": "OK", - "description": "Returns more info on if the request was successful or not, valid responses.\n * `OK` indicates the response contains a valid result.\n * `INVALID_REQUEST` indicates that the provided request was invalid (e.g. wrong URL syntax).\n * `REQUEST_DENIED` indicates that the service denied use of the Address API (e.g. wrong API Key, wrong/no referer, …).\n * `UNKNOWN_ERROR` indicates an Address API request could not be processed due to a server error. The request may succeed if you try again.\n", - "enum": [ - "OK", - "INVALID_REQUEST", - "REQUEST_DENIED", - "UNKNOWN_ERROR" - ] - }, - "AddressAutocompleteResponse": { - "title": "AddressAutocompleteResponse", - "type": "object", - "description": "Attributes describing an Address.", - "properties": { - "description": { - "description": "Address description to be used as suggestion in drop down list if needed.", - "type": "string", - "example": "London, England, United Kingdom" - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID if you need to give us feedbacks on results. This ID is also required to perform Address Details request.", - "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0" - }, - "matched_substring": { - "$ref": "#/components/schemas/AddressAutocompleteMatchedFields" - }, - "type": { - "$ref": "#/components/schemas/AddressTypes" - }, - "status": { - "$ref": "#/components/schemas/AddressStatus" - } - }, - "example": { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - } - }, - "AddressAutocompleteCollectionResponse": { - "title": "AddressAutocompleteCollectionResponse", - "type": "object", - "description": "Address Collection Response containing Localities", - "properties": { - "predictions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressAutocompleteResponse" - } - }, - "status": { - "$ref": "#/components/schemas/AddressStatus" - } - }, - "example": { - "predictions": [ - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "description": "London, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - }, - { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz", - "description": "Londonderry, Northern Ireland, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" }, { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw", - "description": "London Heathrow Airport, Hounslow, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 + "public_id": "cG9pOnVzOmJ1c2luZXNzLnNob3AuZ3JvY2VyeTo1YTczMjYxOTQyYjVlZmUwOGEzZjQ1NGZmMTMwMmJjNjA4ODE3NmRk", + "types": [ + "point_of_interest", + "business.shop.grocery" + ], + "categories": [ + "business.shop.grocery" + ], + "name": "City Hall Oasis", + "geometry": { + "location": { + "lat": 40.71283012706819, + "lng": -74.00727837935057 + }, + "viewport": { + "northeast": { + "lat": 40.71286059528623, + "lng": -74.00724213866874 + }, + "southwest": { + "lat": 40.71279957503111, + "lng": -74.00731464213119 } - ] + } }, - "type": "locality" + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" + } + ] }, { - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy", - "description": "London Luton Airport, Luton, England, United Kingdom", - "matched_substring": { - "description": [ - { - "offset": 0, - "length": 4 - } - ] - }, - "type": "locality" - } - ], - "status": "OK" - } - }, - "AddressGeometry": { - "title": "AddressGeometry", - "type": "object", - "description": "The location of the result, in latitude and longitude. Accuracy is also provided.", - "properties": { - "location_type": { - "description": "Specifies additional data about the geocoded location. The following values are currently supported: \n - `ROOFTOP` result is a precise geocode for which we have location information accurate down to street address precision.\n - `RANGE_INTERPOLATED` result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.\n - `GEOMETRIC_CENTER` result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …).\n - `APPROXIMATE` result is approximate (usually when no other above value applies)\n", - "type": "string", - "enum": [ - "ROOFTOP", - "RANGE_INTERPOLATED", - "GEOMETRIC_CENTER", - "APPROXIMATE" - ] - }, - "location": { - "$ref": "#/components/schemas/LatLngLiteral" - }, - "viewport": { - "$ref": "#/components/schemas/Bounds" - } - }, - "example": { - "location": { - "lat": 48.829405, - "lng": 2.367944 - }, - "location_type": "GEOMETRIC_CENTER" - } - }, - "AddressDetailsResponse": { - "title": "AddressDetailsResponse", - "type": "object", - "description": "Address Details Response", - "properties": { - "status": { - "$ref": "#/components/schemas/AddressStatus" - }, - "result": { - "description": "the root node of address details", - "type": "object", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/FormattedAddress" - }, - "types": { - "description": "The types of result.", - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressTypes" - } - }, - "public_id": { - "description": "Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results.", - "type": "string", - "example": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0" - }, - "address_components": { - "$ref": "#/components/schemas/AddressComponents" - }, - "geometry": { - "$ref": "#/components/schemas/AddressGeometry" - } - } - } - }, - "example": { - "result": { - "formatted_address": "London, England, United Kingdom", - "types": [ - "locality" - ], - "public_id": "aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0", - "address_components": [ - { - "types": [ - "country" - ], - "long_name": "United Kingdom", - "short_name": "GBR" - }, - { - "types": [ - "state" - ], - "long_name": "England", - "short_name": "England" - }, - { - "types": [ - "county" - ], - "long_name": "London", - "short_name": "LDN" - }, - { - "long_name": "London", - "short_name": "London", - "types": [ - "locality" - ] - }, - { - "long_name": "SW1A 2", - "short_name": "SW1A 2", - "types": [ - "postal_code" - ] - } - ], - "geometry": { - "location_type": "GEOMETRIC_CENTER", - "location": { - "lat": 51.50643, - "lng": -0.12719 + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZpbmFuY2UuYmFuazpiOGY5MDE4Nzc2ZDZjNmEwZTljOGM4YWM0OTAxZWZlNzNmODZkM2M3", + "types": [ + "point_of_interest", + "business.finance.bank" + ], + "categories": [ + "business.finance.bank" + ], + "name": "Citibank", + "formatted_address": "Broadway, New York", + "geometry": { + "location": { + "lat": 40.7130414767567, + "lng": -74.0074818610995 + } }, - "viewport": { - "northeast": { - "lat": 51.68629, - "lng": 0.28206 + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" + }, + { + "types": [ + "locality" + ], + "long_name": "New York", + "short_name": "New York" }, - "southwest": { - "lat": 51.28043, - "lng": -0.56316 + { + "types": [ + "route" + ], + "long_name": "Broadway", + "short_name": "Broadway" } - } - } - }, - "status": "OK" - } - }, - "AddressGeocodeTypes": { - "title": "AddressGeocodeTypes", - "type": "string", - "description": "Contains the type of result.", - "enum": [ - "address", - "house_number", - "route", - "address_block", - "locality", - "admin_level", - "country", - "place" - ] - }, - "AddressGeocodeResponse": { - "title": "AddressGeocodeResponse", - "type": "object", - "description": "Address Geocode Response", - "properties": { - "formatted_address": { - "$ref": "#/components/schemas/FormattedAddress" - }, - "types": { - "description": "The types of result. If result type is a `place`, additional types may be returned (`eat_and_drink`, `going_out_entertainment`, `sights_and_museums`, `natural_and_geographical`, `transport`, `accommodations`, `leisure_and_outdoor`, `shopping`, `business_and_services`, `facilities`, `areas_and_buildings`)", - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressGeocodeTypes" - } - }, - "address_components": { - "$ref": "#/components/schemas/AddressComponents" - }, - "geometry": { - "$ref": "#/components/schemas/AddressGeometry" - } - } - }, - "AddressGeocodeCollectionResponse": { - "title": "AddressGeocodeCollectionResponse", - "type": "object", - "description": "Address Geocode Collection Response. Contains one or more Addresses with coordinates (default to one result for reverse geocoding)", - "properties": { - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressGeocodeResponse" - } - }, - "status": { - "$ref": "#/components/schemas/AddressStatus" - } - }, - "example": { - "results": [ + ] + }, { - "formatted_address": "Place de la Résistance, 75007 Paris, France", + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQzMTMzZTJkODdiOGJjMGE3ZjI2YTdiMWVjYTZlZmI1MjQyYWE3MTE=", "types": [ - "address", - "route" + "point_of_interest", + "business.food_and_drinks.restaurant" + ], + "categories": [ + "business.food_and_drinks.restaurant" ], + "name": "Saffron", + "geometry": { + "location": { + "lat": 40.71467049963849, + "lng": -74.00767187884445 + } + }, "address_components": [ { "types": [ - "country" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "France", - "short_name": "FRA" - }, + "long_name": "United States", + "short_name": "US" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5yZXN0YXVyYW50OmQ1NjMyN2RiM2EyNWJlYmIwNjJjZjNlYWYwMDE3ZDIyYzEyNWNlMjY=", + "types": [ + "point_of_interest", + "business.food_and_drinks.restaurant" + ], + "categories": [ + "business.food_and_drinks.restaurant" + ], + "name": "Gran Morsi", + "geometry": { + "location": { + "lat": 40.71432885326513, + "lng": -74.00778746528921 + } + }, + "address_components": [ { "types": [ - "state" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "Ile-de-France", - "short_name": "IDF" - }, + "long_name": "United States", + "short_name": "US" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5iYXI6MDE5ZGUzNTdiZDkyNzAyZDM4ZDUyOWQ0YmJiZjBmODQ5YWEzZmY1NA==", + "types": [ + "point_of_interest", + "business.food_and_drinks.bar" + ], + "categories": [ + "business.food_and_drinks.bar" + ], + "name": "Bon Courage", + "formatted_address": "Reade Street, New York", + "geometry": { + "location": { + "lat": 40.71541472882126, + "lng": -74.00719193106873 + } + }, + "address_components": [ { "types": [ - "county" + "country", + "administrative_area_level_0", + "division_level_0" ], - "long_name": "Paris", - "short_name": "Paris" + "long_name": "United States", + "short_name": "US" }, { - "long_name": "Paris", - "short_name": "Paris", "types": [ "locality" - ] + ], + "long_name": "New York", + "short_name": "New York" }, { - "long_name": "7th Arrondissement", - "short_name": "7th Arrondissement", "types": [ - "district" - ] + "route" + ], + "long_name": "Reade Street", + "short_name": "Reade Street" + } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLmZvb2RfYW5kX2RyaW5rcy5mYXN0X2Zvb2Q6OGIyNDY5MDM4M2JhYzE1NmY4OGRiMGQzYmIyYzNjMTVmOTk0NDQwZQ==", + "types": [ + "point_of_interest", + "business.food_and_drinks.fast_food" + ], + "categories": [ + "business.food_and_drinks.fast_food" + ], + "name": "Burger King", + "formatted_address": "Broadway, New York", + "geometry": { + "location": { + "lat": 40.71619516782573, + "lng": -74.00480635760651 + } + }, + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" }, { - "long_name": "Place de la Résistance", - "short_name": "Place de la Résistance", "types": [ - "route" - ] + "locality" + ], + "long_name": "New York", + "short_name": "New York" }, { - "long_name": "75007", - "short_name": "75007", "types": [ - "postal_code" - ] + "route" + ], + "long_name": "Broadway", + "short_name": "Broadway" } + ] + }, + { + "public_id": "cG9pOnVzOmJ1c2luZXNzLnRoZWF0cmU6MTU1Yjk5YmEwY2FiYzIzZjYxYWYyYTViYzI0ZDViYTVlNmVmZTAwNA==", + "types": [ + "point_of_interest", + "business.theatre" + ], + "categories": [ + "business.theatre" ], + "name": "The Flea", + "formatted_address": "Thomas Street, New York", "geometry": { - "location_type": "GEOMETRIC_CENTER", "location": { - "lat": 48.86213, - "lng": 2.30152 + "lat": 40.71609349534023, + "lng": -74.00589281989586 + } + }, + "address_components": [ + { + "types": [ + "country", + "administrative_area_level_0", + "division_level_0" + ], + "long_name": "United States", + "short_name": "US" }, - "viewport": { - "northeast": { - "lat": 48.86231, - "lng": 2.30541 - }, - "southwest": { - "lat": 48.86191, - "lng": 2.30147 - } + { + "types": [ + "locality" + ], + "long_name": "New York", + "short_name": "New York" + }, + { + "types": [ + "route" + ], + "long_name": "Thomas Street", + "short_name": "Thomas Street" } - } + ] } ], - "status": "OK" + "pagination": { + "previous_page": 2, + "next_page": 4 + } } }, "Zone": { diff --git a/dist/woosmap-openapi3.yml b/dist/woosmap-openapi3.yml index abdfbe6a..5d7bfb20 100755 --- a/dist/woosmap-openapi3.yml +++ b/dist/woosmap-openapi3.yml @@ -57,12 +57,6 @@ tags: Woosmap Localities API is a web service that returns a great amount of geographical places in response to an HTTP request. Among others are city names, postal codes, suburbs, addresses or airports. Request is done over HTTPS using GET. Response is formatted as JSON. You must specify a key in your request, included as the value of a `key` parameter for your public key or `private_key` for your private key. This key identifies your application for purposes of quota management. Learn how to [get a key](https://developers.woosmap.com/support/api-keys/). externalDocs: url: https://developers.woosmap.com/products/localities/get-started/ - - name: Address API - description: | - Woosmap Address API is a web service that returns addresses and other geographical places in response to an HTTP request. Request is done over HTTPS using GET. Response is formatted as JSON. You must specify a key in your request, included as the value of a `key` parameter for your public key or `private_key` for your private key. This key identifies your application for purposes of quota management. Learn how to [get a key](https://developers.woosmap.com/support/api-keys/). - >**⚠️ This API has been deprecated in favour of Localities API** - externalDocs: - url: https://developers.woosmap.com/products/address-api/get-started/ paths: /geolocation/position: get: @@ -2849,7 +2843,7 @@ paths: - $ref: '#/components/parameters/language-2' - $ref: '#/components/parameters/fields' - $ref: '#/components/parameters/data' - - $ref: '#/components/parameters/cc_format-2' + - $ref: '#/components/parameters/cc_format' responses: '200': description: Request Localities Geocode successful @@ -3368,427 +3362,15 @@ paths: short_name: US - types: - locality - long_name: New York - short_name: New York - - types: - - route - long_name: Thomas Street - short_name: Thomas Street - pagination: - previous_page: 2 - next_page: 4 - '401': - description: Unauthorized. Incorrect authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/Error401' - examples: - Unauthorized: - summary: Error 401 - value: - detail: Incorrect authentication credentials. Please check or use a valid API Key - '403': - description: Forbidden. This Woosmap API is not enabled for this project. - content: - application/json: - schema: - $ref: '#/components/schemas/Error403' - examples: - Forbidden: - summary: Error 403 - value: - detail: This Woosmap API is not enabled for this project. - '429': - description: Too Many Requests. The rate limit for this endpoint has been exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/Error429' - examples: - Forbidden: - summary: Error 429 - value: - detail: The rate limit for this endpoint has been exceeded - x-codeSamples: - - lang: curl - label: cURL - source: |- - curl -L 'https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY' \ - -H 'Referer: http://localhost' - - lang: javascript - label: JavaScript - source: |- - const requestOptions = { - method: "GET", - redirect: "follow" - }; - - fetch("https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); - - lang: python - label: Python - source: | - import requests - - url = "https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY" - - payload = {} - headers = { - 'Referer': 'http://localhost' - } - - response = requests.request("GET", url, headers=headers, data=payload) - - print(response.text) - /address/autocomplete/json: - get: - deprecated: true - summary: Autocomplete for Addresses - operationId: addressAutocomplete - servers: - - url: https://api.woosmap.com - tags: - - Address API - description: | - Autocomplete on worldwide suggestions for a for text-based geographic searches. It can match on full words as well as substrings. - security: - - PublicApiKeyAuth: [] - RefererHeader: [] - - PrivateApiKeyAuth: [] - - PrivateApiKeyHeaderAuth: [] - parameters: - - $ref: '#/components/parameters/input-2' - - $ref: '#/components/parameters/address_components' - - $ref: '#/components/parameters/location-2' - - $ref: '#/components/parameters/language-3' - responses: - '200': - description: Autocompletion Address successfully retrieved - content: - application/json: - schema: - $ref: '#/components/schemas/AddressAutocompleteCollectionResponse' - examples: - default: - summary: Autocomplete address results for input `Lond` and components `country:gb` - value: - predictions: - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - description: London, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz - description: Londonderry, Northern Ireland, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw - description: London Heathrow Airport, Hounslow, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy - description: London Luton Airport, Luton, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - status: OK - '401': - description: Unauthorized. Incorrect authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/Error401' - examples: - Unauthorized: - summary: Error 401 - value: - detail: Incorrect authentication credentials. Please check or use a valid API Key - '403': - description: Forbidden. This Woosmap API is not enabled for this project. - content: - application/json: - schema: - $ref: '#/components/schemas/Error403' - examples: - Forbidden: - summary: Error 403 - value: - detail: This Woosmap API is not enabled for this project. - '429': - description: Too Many Requests. The rate limit for this endpoint has been exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/Error429' - examples: - Forbidden: - summary: Error 429 - value: - detail: The rate limit for this endpoint has been exceeded - x-codeSamples: - - lang: curl - label: cURL - source: |- - curl -L 'https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY' \ - -H 'Referer: http://localhost' - - lang: javascript - label: JavaScript - source: |- - const requestOptions = { - method: "GET", - redirect: "follow" - }; - - fetch("https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); - - lang: python - label: Python - source: | - import requests - - url = "https://api.woosmap.com/address/autocomplete/json?input=Lond&components=country%3Agb&key=YOUR_PUBLIC_API_KEY" - - payload = {} - headers = { - 'Referer': 'http://localhost' - } - - response = requests.request("GET", url, headers=headers, data=payload) - - print(response.text) - /address/details/json: - get: - deprecated: true - summary: Details of an Address - operationId: addressDetails - servers: - - url: https://api.woosmap.com - tags: - - Address API - description: | - Provides details of an address autocomplete suggestion (using the suggestion’s `public_id`). - security: - - PublicApiKeyAuth: [] - RefererHeader: [] - - PrivateApiKeyAuth: [] - - PrivateApiKeyHeaderAuth: [] - parameters: - - $ref: '#/components/parameters/public_id-2' - - $ref: '#/components/parameters/fields-2' - - $ref: '#/components/parameters/cc_format' - responses: - '200': - description: Details Address successfully retrieved - content: - application/json: - schema: - $ref: '#/components/schemas/AddressDetailsResponse' - examples: - default: - summary: Address Details for `London, England, United Kingdom` - value: - result: - formatted_address: London, England, United Kingdom - types: - - locality - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - address_components: - - types: - - country - long_name: United Kingdom - short_name: GBR - - types: - - state - long_name: England - short_name: England - - types: - - county - long_name: London - short_name: LDN - - long_name: London - short_name: London - types: - - locality - - long_name: SW1A 2 - short_name: SW1A 2 - types: - - postal_code - geometry: - location_type: GEOMETRIC_CENTER - location: - lat: 51.50643 - lng: -0.12719 - viewport: - northeast: - lat: 51.68629 - lng: 0.28206 - southwest: - lat: 51.28043 - lng: -0.56316 - status: OK - '401': - description: Unauthorized. Incorrect authentication credentials. - content: - application/json: - schema: - $ref: '#/components/schemas/Error401' - examples: - Unauthorized: - summary: Error 401 - value: - detail: Incorrect authentication credentials. Please check or use a valid API Key - '403': - description: Forbidden. This Woosmap API is not enabled for this project. - content: - application/json: - schema: - $ref: '#/components/schemas/Error403' - examples: - Forbidden: - summary: Error 403 - value: - detail: This Woosmap API is not enabled for this project. - '429': - description: Too Many Requests. The rate limit for this endpoint has been exceeded. - content: - application/json: - schema: - $ref: '#/components/schemas/Error429' - examples: - Forbidden: - summary: Error 429 - value: - detail: The rate limit for this endpoint has been exceeded - x-codeSamples: - - lang: curl - label: cURL - source: |- - curl -L 'https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY' \ - -H 'Referer: http://localhost' - - lang: javascript - label: JavaScript - source: |- - const requestOptions = { - method: "GET", - redirect: "follow" - }; - - fetch("https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY", requestOptions) - .then((response) => response.text()) - .then((result) => console.log(result)) - .catch((error) => console.error(error)); - - lang: python - label: Python - source: | - import requests - - url = "https://api.woosmap.com/address/details/json?public_id=aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0&key=YOUR_PUBLIC_API_KEY" - - payload = {} - headers = { - 'Referer': 'http://localhost' - } - - response = requests.request("GET", url, headers=headers, data=payload) - - print(response.text) - /address/geocode/json: - get: - deprecated: true - summary: Geocode an Address or Reverse Geocode a latlng - operationId: addressGeocode - servers: - - url: https://api.woosmap.com - tags: - - Address API - description: | - Provides details for an address or a geographic position. Either parameter `address` **or** `latlng` is required. Maximum of 25 queries per second (QPS) - security: - - PublicApiKeyAuth: [] - RefererHeader: [] - - PrivateApiKeyAuth: [] - - PrivateApiKeyHeaderAuth: [] - parameters: - - $ref: '#/components/parameters/address-2' - - $ref: '#/components/parameters/latlng-2' - - $ref: '#/components/parameters/address_components' - - $ref: '#/components/parameters/language-3' - - $ref: '#/components/parameters/location-2' - - $ref: '#/components/parameters/cc_format' - - $ref: '#/components/parameters/limit-3' - responses: - '200': - description: Request Address Geocode successful - content: - application/json: - schema: - $ref: '#/components/schemas/AddressGeocodeCollectionResponse' - examples: - default: - summary: Geocode Results for address `Place de la Resistance` with components `country:FR` - value: - results: - - formatted_address: Place de la Résistance, 75007 Paris, France - types: - - address - - route - address_components: - - types: - - country - long_name: France - short_name: FRA - - types: - - state - long_name: Ile-de-France - short_name: IDF - - types: - - county - long_name: Paris - short_name: Paris - - long_name: Paris - short_name: Paris - types: - - locality - - long_name: 7th Arrondissement - short_name: 7th Arrondissement - types: - - district - - long_name: Place de la Résistance - short_name: Place de la Résistance - types: + long_name: New York + short_name: New York + - types: - route - - long_name: '75007' - short_name: '75007' - types: - - postal_code - geometry: - location_type: GEOMETRIC_CENTER - location: - lat: 48.86213 - lng: 2.30152 - viewport: - northeast: - lat: 48.86231 - lng: 2.30541 - southwest: - lat: 48.86191 - lng: 2.30147 - status: OK + long_name: Thomas Street + short_name: Thomas Street + pagination: + previous_page: 2 + next_page: 4 '401': description: Unauthorized. Incorrect authentication credentials. content: @@ -3826,7 +3408,7 @@ paths: - lang: curl label: cURL source: |- - curl -L 'https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY' \ + curl -L 'https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY' \ -H 'Referer: http://localhost' - lang: javascript label: JavaScript @@ -3836,7 +3418,7 @@ paths: redirect: "follow" }; - fetch("https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY", requestOptions) + fetch("https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY", requestOptions) .then((response) => response.text()) .then((result) => console.log(result)) .catch((error) => console.error(error)); @@ -3845,7 +3427,7 @@ paths: source: | import requests - url = "https://api.woosmap.com/address/geocode/json?address=Place%20de%20la%20Resistance%20Paris&components=country%3AFR&limit=5&key=YOUR_PUBLIC_API_KEY" + url = "https://api.woosmap.com/localities/nearby?types=business&location=40.71399%2C-74.00499&page=3&key=YOUR_PUBLIC_API_KEY" payload = {} headers = { @@ -3868,7 +3450,7 @@ paths: security: - PrivateApiKeyAuth: [] parameters: - - $ref: '#/components/parameters/limit-4' + - $ref: '#/components/parameters/limit-3' - $ref: '#/components/parameters/offset' responses: '200': @@ -4884,7 +4466,7 @@ components: cc_format: name: cc_format description: | - To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field (default is `alpha3`). + To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field. Default is the format used to specify `components` or `alpha2` if no components are specified. schema: type: string enum: @@ -4954,17 +4536,6 @@ components: example: true required: false in: query - cc_format-2: - name: cc_format - description: | - To specify the format for the short [country code](https://en.wikipedia.org/wiki/ISO_3166-1) expected to be returned in the address_components field. Default is the format used to specify `components` or `alpha2` if no components are specified. - schema: - type: string - enum: - - alpha2 - - alpha3 - example: alpha2 - in: query nearby_types: name: types description: | @@ -4980,87 +4551,7 @@ components: schema: $ref: '#/components/schemas/LocalitiesTypesPoi' in: query - input-2: - name: input - description: | - The text string on which to search, for example: "london" or "123 Cross Road". The Woosmap Address API will return predictions matches based on this string and order the results based on their perceived relevance. - schema: - type: string - example: London - required: true - in: query - address_components: - name: components - description: | - To restrict your results to specific areas. Currently, you can use components to filter over countries. Countries must be passed as three characters string (ISO 3166-1 Alpha 3). Components should be passed as an array of different options which are separated by a `|`. - schema: - type: string - example: country:CAN|country:BEL - in: query - location-2: - name: location - description: | - Bias for the results. Should be pass in `lat`,`lng` format. - schema: - type: string - example: 5.2,-2.3 - in: query - language-3: - name: language - description: | - The language code, using ISO 639-1 country codes, indicating in which language the results should be returned, if possible. If language is not supplied, the Localities service will use the default language of each country. - schema: - type: string - example: en - in: query - public_id-2: - name: public_id - description: | - A textual identifier that uniquely identifies a locality, returned from an [Address Autocomplete](https://developers.woosmap.com/products/address-api/autocomplete/). - schema: - type: string - example: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMDA1MTI2 - required: true - in: query - fields-2: - name: fields - description: | - Used to limit the returning fields (by default, all fields are return). Available fields are (geometry) (fields should be separated by a `,`). By using this parameter you will limit content of responses to the geometry part. No address component will be returned. - schema: - type: string - enum: - - geometry - example: geometry - in: query - address-2: - name: address - description: | - The address of which to find the coordinates for. A partial address is less likely to return the proper coordinates than the complete address. - schema: - type: string - example: 224%20Rue%20de%20Rivoli%2C%20Paris - required: false - in: query - latlng-2: - name: latlng - description: | - Geographic coordinates. Should be pass in `lat`,`lng` format. - schema: - type: string - example: 5.2,-2.3 - required: false - in: query limit-3: - name: limit - description: | - Maximum number of results to be returned (value from 1 to 100, default values for geocode request [20] and for reverse geocode request [1]) - schema: - type: integer - minimum: 1 - maximum: 100 - example: 10 - in: query - limit-4: name: limit description: | To limit number of zones retrieved (max 50). @@ -5079,26 +4570,6 @@ components: minimum: 1 example: 20 in: query - address_address_components: - $ref: '#/components/parameters/address_components' - address_address: - $ref: '#/components/parameters/address-2' - address_cc_format: - $ref: '#/components/parameters/cc_format' - address_fields: - $ref: '#/components/parameters/fields-2' - address_input: - $ref: '#/components/parameters/input-2' - address_language: - $ref: '#/components/parameters/language-3' - address_latlng: - $ref: '#/components/parameters/latlng-2' - address_limit: - $ref: '#/components/parameters/limit-3' - address_location: - $ref: '#/components/parameters/location-2' - address_public_id: - $ref: '#/components/parameters/public_id-2' geolocation_ip_address: $ref: '#/components/parameters/ip_address' geolocation_limit: @@ -5108,7 +4579,7 @@ components: localities_addresses_per_page: $ref: '#/components/parameters/addresses_per_page' localities_cc_format: - $ref: '#/components/parameters/cc_format-2' + $ref: '#/components/parameters/cc_format' localities_custom_description: $ref: '#/components/parameters/custom_description' localities_data: @@ -5166,7 +4637,7 @@ components: search_zone: $ref: '#/components/parameters/zone' zones_limit: - $ref: '#/components/parameters/limit-4' + $ref: '#/components/parameters/limit-3' zones_offset: $ref: '#/components/parameters/offset' schemas: @@ -7425,292 +6896,6 @@ components: pagination: previous_page: 2 next_page: 4 - AddressAutocompleteMatchedFields: - title: AddressAutocompleteMatchedFields - type: object - description: Contains a set of substrings for description. Each substring is identified by an `offset` and a `length`.` - properties: - description: - description: match substrings for address `description` - type: array - items: - $ref: '#/components/schemas/MatchedSubstring' - AddressTypes: - title: AddressTypes - type: string - description: Contains the type of result. - enum: - - house_number - - route - - address_block - - locality - - admin_level - - country - AddressStatus: - title: AddressStatus - type: string - example: OK - description: | - Returns more info on if the request was successful or not, valid responses. - * `OK` indicates the response contains a valid result. - * `INVALID_REQUEST` indicates that the provided request was invalid (e.g. wrong URL syntax). - * `REQUEST_DENIED` indicates that the service denied use of the Address API (e.g. wrong API Key, wrong/no referer, …). - * `UNKNOWN_ERROR` indicates an Address API request could not be processed due to a server error. The request may succeed if you try again. - enum: - - OK - - INVALID_REQUEST - - REQUEST_DENIED - - UNKNOWN_ERROR - AddressAutocompleteResponse: - title: AddressAutocompleteResponse - type: object - description: Attributes describing an Address. - properties: - description: - description: Address description to be used as suggestion in drop down list if needed. - type: string - example: London, England, United Kingdom - public_id: - description: Contains a unique ID for each suggestion. Please use this ID if you need to give us feedbacks on results. This ID is also required to perform Address Details request. - type: string - example: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - matched_substring: - $ref: '#/components/schemas/AddressAutocompleteMatchedFields' - type: - $ref: '#/components/schemas/AddressTypes' - status: - $ref: '#/components/schemas/AddressStatus' - example: - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - description: London, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - AddressAutocompleteCollectionResponse: - title: AddressAutocompleteCollectionResponse - type: object - description: Address Collection Response containing Localities - properties: - predictions: - type: array - items: - $ref: '#/components/schemas/AddressAutocompleteResponse' - status: - $ref: '#/components/schemas/AddressStatus' - example: - predictions: - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - description: London, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwNDE5Nzgz - description: Londonderry, Northern Ireland, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NjEw - description: London Heathrow Airport, Hounslow, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM0NDEy - description: London Luton Airport, Luton, England, United Kingdom - matched_substring: - description: - - offset: 0 - length: 4 - type: locality - status: OK - AddressGeometry: - title: AddressGeometry - type: object - description: The location of the result, in latitude and longitude. Accuracy is also provided. - properties: - location_type: - description: | - Specifies additional data about the geocoded location. The following values are currently supported: - - `ROOFTOP` result is a precise geocode for which we have location information accurate down to street address precision. - - `RANGE_INTERPOLATED` result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address. - - `GEOMETRIC_CENTER` result is the geometric center of a result such as a polyline (for example, a street) or polygon (city, region, …). - - `APPROXIMATE` result is approximate (usually when no other above value applies) - type: string - enum: - - ROOFTOP - - RANGE_INTERPOLATED - - GEOMETRIC_CENTER - - APPROXIMATE - location: - $ref: '#/components/schemas/LatLngLiteral' - viewport: - $ref: '#/components/schemas/Bounds' - example: - location: - lat: 48.829405 - lng: 2.367944 - location_type: GEOMETRIC_CENTER - AddressDetailsResponse: - title: AddressDetailsResponse - type: object - description: Address Details Response - properties: - status: - $ref: '#/components/schemas/AddressStatus' - result: - description: the root node of address details - type: object - properties: - formatted_address: - $ref: '#/components/schemas/FormattedAddress' - types: - description: The types of result. - type: array - items: - $ref: '#/components/schemas/AddressTypes' - public_id: - description: Contains a unique ID for each suggestion. Please use this ID to give feedbacks on results. - type: string - example: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - address_components: - $ref: '#/components/schemas/AddressComponents' - geometry: - $ref: '#/components/schemas/AddressGeometry' - example: - result: - formatted_address: London, England, United Kingdom - types: - - locality - public_id: aGVyZTpjbTpuYW1lZHBsYWNlOjIwMzM3NDU0 - address_components: - - types: - - country - long_name: United Kingdom - short_name: GBR - - types: - - state - long_name: England - short_name: England - - types: - - county - long_name: London - short_name: LDN - - long_name: London - short_name: London - types: - - locality - - long_name: SW1A 2 - short_name: SW1A 2 - types: - - postal_code - geometry: - location_type: GEOMETRIC_CENTER - location: - lat: 51.50643 - lng: -0.12719 - viewport: - northeast: - lat: 51.68629 - lng: 0.28206 - southwest: - lat: 51.28043 - lng: -0.56316 - status: OK - AddressGeocodeTypes: - title: AddressGeocodeTypes - type: string - description: Contains the type of result. - enum: - - address - - house_number - - route - - address_block - - locality - - admin_level - - country - - place - AddressGeocodeResponse: - title: AddressGeocodeResponse - type: object - description: Address Geocode Response - properties: - formatted_address: - $ref: '#/components/schemas/FormattedAddress' - types: - description: The types of result. If result type is a `place`, additional types may be returned (`eat_and_drink`, `going_out_entertainment`, `sights_and_museums`, `natural_and_geographical`, `transport`, `accommodations`, `leisure_and_outdoor`, `shopping`, `business_and_services`, `facilities`, `areas_and_buildings`) - type: array - items: - $ref: '#/components/schemas/AddressGeocodeTypes' - address_components: - $ref: '#/components/schemas/AddressComponents' - geometry: - $ref: '#/components/schemas/AddressGeometry' - AddressGeocodeCollectionResponse: - title: AddressGeocodeCollectionResponse - type: object - description: Address Geocode Collection Response. Contains one or more Addresses with coordinates (default to one result for reverse geocoding) - properties: - results: - type: array - items: - $ref: '#/components/schemas/AddressGeocodeResponse' - status: - $ref: '#/components/schemas/AddressStatus' - example: - results: - - formatted_address: Place de la Résistance, 75007 Paris, France - types: - - address - - route - address_components: - - types: - - country - long_name: France - short_name: FRA - - types: - - state - long_name: Ile-de-France - short_name: IDF - - types: - - county - long_name: Paris - short_name: Paris - - long_name: Paris - short_name: Paris - types: - - locality - - long_name: 7th Arrondissement - short_name: 7th Arrondissement - types: - - district - - long_name: Place de la Résistance - short_name: Place de la Résistance - types: - - route - - long_name: '75007' - short_name: '75007' - types: - - postal_code - geometry: - location_type: GEOMETRIC_CENTER - location: - lat: 48.86213 - lng: 2.30152 - viewport: - northeast: - lat: 48.86231 - lng: 2.30541 - southwest: - lat: 48.86191 - lng: 2.30147 - status: OK Zone: title: Zone type: object diff --git a/dist/woosmap-postman.json b/dist/woosmap-postman.json index 647c1a0d..8dce4f72 100755 --- a/dist/woosmap-postman.json +++ b/dist/woosmap-postman.json @@ -10,7 +10,7 @@ "description": "Manage the store and asset data within your Woosmap project. It provides full CRUD (Create, Read, Update, Delete) operations through standard HTTP methods, supporting batch imports up to 15MB, along with an atomic replace operation for swapping entire datasets without downtime.\nThis endpoint handles the complete lifecycle of your location data. You can add new assets in batch using POST, update existing assets with PUT, retrieve assets as GeoJSON with GET, remove individual or all assets with DELETE, and atomically replace your entire dataset using the replace operation. All write operations accept JSON payloads containing an array of store objects, each with a unique storeId, name, and geographic coordinates.\n\n``` POST|GET|PUT|DELETE https://api.woosmap.com/stores ```\n", "item": [ { - "id": "28fa046e-ef15-457a-8cfa-d92ab09a6242", + "id": "2e6ed137-d78b-474c-b7ef-d88f69b75349", "name": "Create your Assets", "request": { "name": "Create your Assets", @@ -44,7 +44,7 @@ "method": "POST", "body": { "mode": "raw", - "raw": "{\n \"stores\": [\n {\n \"location\": {\n \"lat\": \"