Back to top

RESTful API of Verification Request Bounded Context

Headers

As this API is working with JSON every request must add the following headers:

Accept: application/json

And for requests with body:

Content-Type: application/json

Verification Request

Create verification request

Create one verification request
POST/verification-requests

Example URI

POST https://listings.spotahome.com/verification-requests
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "unitId": "12345",
  "bookingStartDate": "2018-09-11",
  "bookingEndDate": "2018-09-11"
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /verification-requests/{new-id}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Internal Server Error",
  "status": 500,
  "title": "Internal Server Error",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Listing verification requests

View all from a listing id
GET/listings/{listingId}/verification-requesters{?createdAtFrom,page,itemsPerPage}

Example URI

GET https://listings.spotahome.com/listings/656441/verification-requesters?createdAtFrom=2021-07-28 10:50:00&page=1&itemsPerPage=100
URI Parameters
HideShow
listingId
string (required) Example: 656441
createdAtFrom
string (optional) Example: 2021-07-28 10:50:00
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 100
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 2,
  "total": 2,
  "_links": {
    "self": {
      "href": "/listings/656441/verification-requesters?page=1"
    },
    "first": {
      "href": "/listings/656441/verification-requesters?page=1"
    },
    "last": {
      "href": "/listings/656441/verification-requesters?page=2"
    },
    "next": {
      "href": "/listings/656441/verification-requesters?page=1"
    },
    "previous": {
      "href": "/listings/656441/verification-requesters?page=2"
    }
  },
  "_embedded": {
    "sah:verification_requesters": [
      {
        "id": "aaaaa-bbbb-cccc",
        "listingId": "656441",
        "requesterId": "e0f28c43-9b74-447b-95a8-f7235c6071d0",
        "bookingStartDate": "2021-06-07",
        "bookingEndDate": "2021-08-07",
        "createdAt": "2021-06-07 11:34:05"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number"
    },
    "total": {
      "type": "number"
    },
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          },
          "required": [
            "href"
          ]
        },
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          },
          "required": [
            "href"
          ]
        },
        "previous": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          },
          "required": [
            "href"
          ]
        }
      },
      "required": [
        "self",
        "first",
        "last"
      ]
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "sah:verification_requesters": {
          "type": "array"
        }
      }
    }
  },
  "required": [
    "count",
    "total",
    "_links"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Internal Server Error",
  "status": 500,
  "title": "Internal Server Error",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

Generated by aglio on 03 Dec 2025