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": "d73e1c2f-6d65-4f77-915b-ec964efa3636",
        "type": "did_reservations",
        "attributes": {
            "expire_at": "2022-06-28T06:39:20.567Z",
            "created_at": "2022-06-28T06:09:20.574Z",
            "description": "DIDWW"
        },
        "relationships": {
            "available_did": {
                "links": {
                    "self": "https://api.didww.com/v3/did_reservations/d73e1c2f-6d65-4f77-915b-ec964efa3636/relationships/available_did",
                    "related": "https://api.didww.com/v3/did_reservations/d73e1c2f-6d65-4f77-915b-ec964efa3636/available_did"
                }
            }
        }
    },
    "meta": {
        "api_version": "2017-09-18"
    }
}

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