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

string

Optional

Inclusion

Request Body Object Attributes:

Name

Type

Is Required?

Nullable

Description

include

string

Optional

True

Inclusion

Request Body Object Relationships:

Title

Type

Description

available_dids

to-one

Linkage for included available DIDs.

Example

http

POST /v3/did_reservations HTTP/1.1
Host: api.didww.com
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
Api-Key: [API token]

 {
   "data": {
     "type": "did_reservations",
     "attributes": {
       "description": "DIDWW"
     },
     "relationships": {
       "available_did": {
         "data": {
           "type": "available_dids",
           "id": "8bc37f63-acd7-4e43-a760-1a1caa6e4683"
         }
       }
     }
   }
 }

curl

curl -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

HTTP/1.1 201 Created
Content-Type: application/vnd.api+json

     {
       "data": {
         "id": "80167e78-62a1-4720-bf00-229fa7e1935d",
         "type": "did_reservations",
         "links": {
           "self": "https://api.didww.com/v3/did_reservations/80167e78-62a1-4720-bf00-229fa7e1935d"
         },
         "attributes": {
           "expire_at": "2018-03-15 12:34:56",
           "created_at": "2018-03-15 12:14:56",
           "description": "DIDWW"
         },
         "relationships": {
           "available_did": {
             "links": {
               "self": "https://api.didww.com/v3/did_reservations/80167e78-62a1-4720-bf00-229fa7e1935d/relationships/available_did",
               "related": "https://api.didww.com/v3/did_reservations/80167e78-62a1-4720-bf00-229fa7e1935d/available_did"
             }
           }
         }
       }
     }

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

Unprocessable Entity

401

No

Unauthorized