Create Addresses#

Description

Creates an Address that can be assigned to an Identity.

Request#

HTTP Method: POST

URI Path: /v3/addresses

Request Body Object Attributes:

Name

Type

Required

Description

city_name

string

Yes

City name of the address.

postal_code

string

Yes

Postal code of the address.

address

string

Yes

Full address.

description

string

Optional

The description of the address.

Request Body Object Relationships:

Title

Type

Description

countries

Countries

Specifies the country for the address.

identities

Identities

Specifies the identity for the address.

Examples#

http

 1POST /v3/addresses HTTP/1.1
 2Host: api.didww.com
 3Content-Type: application/vnd.api+json
 4Accept: application/vnd.api+json
 5Api-Key: [API token]
 6
 7{
 8  "data": {
 9    "type": "addresses",
10    "attributes": {
11      "city_name": "string",
12      "postal_code": "string",
13      "address": "string",
14      "description": "string"
15    },
16    "relationships": {
17      "identity": {
18        "data": {
19          "id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d",
20          "type": "identities"
21        }
22      },
23      "country": {
24        "data": {
25          "id": "38003e8b-cccc-41d4-b1a6-d1e6fddf2c0f",
26          "type": "countries"
27        }
28      }
29    }
30  }
31}

curl

1curl -i -X POST https://api.didww.com/v3/addresses -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"address": "string", "city_name": "string", "description": "string", "postal_code": "string"}, "relationships": {"country": {"data": {"id": "38003e8b-cccc-41d4-b1a6-d1e6fddf2c0f", "type": "countries"}}, "identity": {"data": {"id": "6c832a1d-b19d-471b-b416-9b5bf2b6ef9d", "type": "identities"}}}, "type": "addresses"}}'

response

 1HTTP/1.1 200 OK
 2Content-Type: application/vnd.api+json
 3
 4{
 5    "data": {
 6        "id": "49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0",
 7        "type": "addresses",
 8        "attributes": {
 9            "city_name": "string",
10            "postal_code": "string",
11            "address": "string",
12            "description": "string",
13            "created_at": "2020-09-16T10:23:07.846Z"
14        },
15        "relationships": {
16            "identity": {
17                "links": {
18                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/identity",
19                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/identity"
20                }
21            },
22            "country": {
23                "links": {
24                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/country",
25                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/country"
26                }
27            },
28            "proofs": {
29                "links": {
30                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/proofs",
31                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/proofs"
32                }
33            },
34            "area": {
35                "links": {
36                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/area",
37                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/area"
38                }
39            },
40            "city": {
41                "links": {
42                    "self": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/relationships/city",
43                    "related": "https://sandbox-api.didww.com/v3/addresses/49f09b7f-c5bf-4c90-bac1-a8b335d2c3f0/city"
44                }
45            }
46        }
47    },
48    "meta": {
49        "api_version": "2021-12-15"
50    }
51}

Other Responses#

Code

Success

Description

404

No

Not Found

401

No

Unauthorized