Get Area

Description

Returns an area for a given area ID. Note that a unique identification number is allocated to each area.

Request

HTTP Method: GET

URI Path: /v3/areas/

URI Query Parameters:

Name

Type

Is Required?

Description

id

string

Yes

Unique ID number for the area

includes

string

Optional

Inclusion

Includes:

Value

Description

country

Country Object

Examples

http

GET /v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3 HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]

curl

curl -i https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3 -H 'Accept: application/vnd.api+json' -H 'Api-Key: [API Token]' -H 'Content-Type: application/vnd.api+json'

response

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "9fcc7390-84a2-47f1-a900-0558cdcb6ce3",
    "type": "areas",
    "attributes": {
      "name": "Tuscany"
    },
    "relationships": {
      "country": {
        "links": {
          "self": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/relationships/country",
          "related": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/country"
        }
      }
    }
  }
}

http

GET /v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3?include=country HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API Token]

curl

curl -i 'https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3?include=country' -H 'Accept: application/vnd.api+json' -H 'Api-Key: [API Token]' -H 'Content-Type: application/vnd.api+json'

response

HTTP/1.1 200 OK
Content-Type: application/vnd.api+json

{
  "data": {
    "id": "9fcc7390-84a2-47f1-a900-0558cdcb6ce3",
    "type": "areas",
    "attributes": {
      "name": "Tuscany"
    },
    "relationships": {
      "country": {
        "links": {
          "self": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/relationships/country",
          "related": "https://api.didww.com/v3/areas/9fcc7390-84a2-47f1-a900-0558cdcb6ce3/country"
        },
        "data": {
          "type": "countries",
          "id": "51d3fe2a-6588-496b-870c-398e627de5c4"
        }
      }
    }
  },
  "included": [
    {
      "id": "51d3fe2a-6588-496b-870c-398e627de5c4",
      "type": "countries",
      "attributes": {
        "name": "Italy",
        "prefix": "39",
        "iso": "IT"
      }
    }
  ]
}

Other Responses

Code

Success

Description

404

No

Not Found

401

No

Unauthorized