Create DID Reservation#
Description
Creates a DID Reservation.
Request#
HTTP Method: POST
URI Path: /v3/did_reservations
URI Query Parameters:
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
include |
|
Optional |
Request Body Object Attributes:
Name |
Type |
Is Required? |
Nullable |
Description |
|---|---|---|---|---|
include |
|
Optional |
True |
Request Body Object Relationships:
Title |
Type |
Description |
|---|---|---|
available_dids |
to-one | Linkage for included available DIDs. |
|
Example#
http
1POST /v3/did_reservations 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": "did_reservations",
10 "attributes": {
11 "description": "DIDWW"
12 },
13 "relationships": {
14 "available_did": {
15 "data": {
16 "type": "available_dids",
17 "id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683"
18 }
19 }
20 }
21 }
22}
curl
1curl -i -X POST https://api.didww.com/v3/did_reservations -H "Accept: application/vnd.api+json" -H "Api-Key: [API token]" -H "Content-Type: application/vnd.api+json" --data-raw '{"data": {"attributes": {"description": "DIDWW"}, "relationships": {"available_did": {"data": {"id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683", "type": "available_dids"}}}, "type": "did_reservations"}}'
response
1HTTP/1.1 201 Created
2Content-Type: application/vnd.api+json
3
4{
5 "data": {
6 "id": "d73e1c2f-6d65-4f77-915b-ec964efa3636",
7 "type": "did_reservations",
8 "attributes": {
9 "expire_at": "2022-06-28T06:39:20.567Z",
10 "created_at": "2022-06-28T06:09:20.574Z",
11 "description": "DIDWW"
12 },
13 "relationships": {
14 "available_did": {
15 "links": {
16 "self": "https://api.didww.com/v3/did_reservations/d73e1c2f-6d65-4f77-915b-ec964efa3636/relationships/available_did",
17 "related": "https://api.didww.com/v3/did_reservations/d73e1c2f-6d65-4f77-915b-ec964efa3636/available_did"
18 }
19 }
20 }
21 },
22 "meta": {
23 "api_version": "2017-09-18"
24 }
25}
Other Responses#
Code |
Success |
Description |
|---|---|---|
201 |
Yes |
Created DID Reservation with not reserved Available DID. Returns DID Reservation Object |
202 |
Yes |
Updated DID Reservation with already reserved Available DID. Request updates current reservation if exists. Returns DID Reservation Object |
422 |
No |
|
401 |
No |