Back to top

COMPLAINTS API OVERVIEW

Complaints Hypermedia API is designed to give you complete control over the Complaint’s process. API calls use the standard HTTP methods (GET, POST, PUT, DELETE) to perform operations on resources. Responses follow the hypermedia JSON format HAL.

REQUESTS AND RESPONSES

AUTHENTICATION

All requests are performed via HTTPS and use a JWT token in an Authorization header for each request.

Authorization: aa.bb.cc

REQUEST FORMAT

The only supported content type is JSON.

Content-Type: application/json

RESPONSE FORMAT

The response content type is HAL JSON.

Accept: application/hal+json

ERROR FORMAT

Errors will use the most appropriate HTTP status code contained in an API Problem response.

{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616"
}

Complaint

Create complaint

Create complaint
POST/complaints

Example URI

POST https://complaints.spotahome.com/complaints
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "bookingId": "25340a00-12b5-48f7-8531-b6bc2642b22c",
  "type": "1",
  "priority": "1",
  "guilty": "1",
  "motive": "97",
  "notes": "Happiness notes",
  "motiveAdditionalInfo": "desired resolution"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "Id of the complaint type"
    },
    "priority": {
      "type": "string",
      "description": "Id of the priority level"
    },
    "guilty": {
      "type": "string",
      "description": "Id of the guilty"
    },
    "motive": {
      "type": "string"
    },
    "notes": {
      "type": "string",
      "description": "Notes for the complaint"
    },
    "motiveAdditionalInfo": {
      "type": "string",
      "description": "Desired resolution"
    }
  },
  "required": [
    "bookingId",
    "notes"
  ]
}
Response  201
HideShow
Headers
Location: /complaints/8f2dbe69-b68f-4423-bc93-b8b036727a032
Response  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Get Complaint

Get Complaint
GET/complaints/{id}

Get a complaint from a given ID

Example URI

GET https://complaints.spotahome.com/complaints/8f2dbe69-b68f-4423-bc93-b8b036727a032
URI Parameters
HideShow
id
string (required) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "_links": {
    "self": {
      "href": "https://complaints.spotahome.com/complaints/{id}"
    }
  },
  "id": "305e7971-4006-4554-a962-17278a136ba3",
  "bookingId": "305e7971-4006",
  "locator": "FR56GH",
  "ric": "TH",
  "cic": "01",
  "priority": "1",
  "status": "ComplaintWasCreated",
  "creationDate": "2010-01-01T17:40:07+0000",
  "updateDate": "2010-01-01T17:40:07+0000",
  "guilty": "1",
  "topic": "5",
  "motive": "50",
  "agentId": "305e7-4006-4554-a962",
  "stage": 0,
  "zendeskNumber": "7237378F",
  "channel": "1",
  "publicReview": 2,
  "type": "1",
  "resolution": "ComplaintWasResolvedWithAgreement",
  "happinessNotes": "here the notes",
  "isCompanyLoss": true,
  "resolutionDate": "2010-01-01T17:40:07+0000",
  "platformSource": "spotahome",
  "motiveAdditionalInfo": {},
  "previousConditions": null,
  "resolutionConditions": null,
  "attachmentPaths": [
    "[`path1`",
    "`path2`]"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "_links": {
      "type": "object",
      "properties": {
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string"
            }
          }
        }
      }
    },
    "id": {
      "type": "string"
    },
    "bookingId": {
      "type": "string"
    },
    "locator": {
      "type": "string"
    },
    "ric": {
      "type": "string"
    },
    "cic": {
      "type": "string"
    },
    "priority": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "creationDate": {
      "type": "string"
    },
    "updateDate": {
      "type": "string"
    },
    "guilty": {
      "type": "string"
    },
    "topic": {
      "type": "string"
    },
    "motive": {
      "type": "string"
    },
    "agentId": {
      "type": "string"
    },
    "stage": {
      "type": "number"
    },
    "zendeskNumber": {
      "type": "string"
    },
    "channel": {
      "type": "string"
    },
    "publicReview": {
      "type": "number"
    },
    "type": {
      "type": "string"
    },
    "resolution": {
      "type": "string"
    },
    "happinessNotes": {
      "type": "string"
    },
    "isCompanyLoss": {
      "type": "boolean"
    },
    "resolutionDate": {
      "type": "string"
    },
    "platformSource": {
      "type": "string"
    },
    "motiveAdditionalInfo": {
      "type": "object",
      "properties": {}
    },
    "previousConditions": {
      "type": [
        "object",
        "null"
      ],
      "properties": {}
    },
    "resolutionConditions": {
      "type": [
        "object",
        "null"
      ],
      "properties": {}
    },
    "attachmentPaths": {
      "type": "array"
    }
  }
}
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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"
  ]
}

Search Complaints

Search Complaints
GET/complaints{?locator,ric,motive,bookingId,bookingIds,page,itemsPerPage}

Search for complaints given a set of filters

Example URI

GET https://complaints.spotahome.com/complaints?locator=8BA4E&ric=GT&motive=97&bookingId=8f2dbe69-b68f-4423-bc93-b8b036727a032&bookingIds=8f2dbe69-b68f-4423-bc93-b8b036727a032&page=1&itemsPerPage=1
URI Parameters
HideShow
locator
string (optional) Example: 8BA4E
ric
string (optional) Example: GT
motive
string (optional) Example: 97
bookingId
string (optional) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
bookingIds
array[string] (optional) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 1
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "complaints": [
      {
        "_links": {
          "self": {
            "href": "https://complaints.spotahome.com/complaints/{id}"
          }
        },
        "id": "305e7971-4006-4554-a962-17278a136ba3",
        "bookingId": "305e7971-4006",
        "locator": "FR56GH",
        "ric": "TH",
        "cic": "01",
        "priority": "1",
        "status": "ComplaintWasCreated",
        "creationDate": "2010-01-01T17:40:07+0000",
        "updateDate": "2010-01-01T17:40:07+0000",
        "guilty": "1",
        "topic": "5",
        "motive": "50",
        "agentId": "305e7-4006-4554-a962",
        "stage": 0,
        "zendeskNumber": "7237378F",
        "channel": "1",
        "publicReview": 2,
        "type": "1",
        "resolution": "ComplaintWasResolvedWithAgreement",
        "happinessNotes": "here the notes",
        "isCompanyLoss": true,
        "resolutionDate": "2010-01-01T17:40:07+0000",
        "platformSource": "spotahome",
        "motiveAdditionalInfo": {},
        "previousConditions": null,
        "resolutionConditions": null,
        "attachmentPaths": [
          "[`path1`",
          "`path2`]"
        ]
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "complaints": {
          "type": "array",
          "description": "A list of Complaints"
        }
      }
    }
  }
}

Edit Complaint

Edit Complaint
PUT/complaints/{id}

Update a Complaint

Example URI

PUT https://complaints.spotahome.com/complaints/8f2dbe69-b68f-4423-bc93-b8b036727a032
URI Parameters
HideShow
id
string (required) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "priority": "1",
  "guilty": "1",
  "motive": "1",
  "zendeskNumber": "90a4ee94-1eff-4c93-8844-f6db9300d332",
  "channel": "1",
  "publicRate": 4,
  "type": "1",
  "notes": "Happiness notes"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "priority": {
      "type": "string",
      "description": "Id of the priority level"
    },
    "guilty": {
      "type": "string",
      "description": "Id of the guilty"
    },
    "motive": {
      "type": "string",
      "description": "Id of the motive"
    },
    "zendeskNumber": {
      "type": "string",
      "description": "Id in Zendesk"
    },
    "channel": {
      "type": "string",
      "description": "Id of the channel"
    },
    "publicRate": {
      "type": "number",
      "description": "Value should be from 0 to 5"
    },
    "type": {
      "type": "string",
      "description": "Id of the complaint type"
    },
    "notes": {
      "type": "string",
      "description": "Notes for the complaint"
    }
  },
  "required": [
    "priority",
    "guilty",
    "motive",
    "zendeskNumber",
    "channel",
    "publicRate",
    "type",
    "notes"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Edit guilty for a resolved complaint

Edit guilty for a resolved complaint
PATCH/complaints/{id}

Update the guilty for a Complaint that has been resolved

Example URI

PATCH https://complaints.spotahome.com/complaints/8f2dbe69-b68f-4423-bc93-b8b036727a032
URI Parameters
HideShow
id
string (required) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "guilty": "1"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "guilty": {
      "type": "string",
      "description": "Id of the guilty"
    }
  },
  "required": [
    "guilty"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Discard a Complaint

Discard a Complaint
PUT/complaints/{id}/discard

Discards a Complaint

Example URI

PUT https://complaints.spotahome.com/complaints/8f2dbe69-b68f-4423-bc93-b8b036727a032/discard
URI Parameters
HideShow
id
string (required) Example: 8f2dbe69-b68f-4423-bc93-b8b036727a032
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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"
  ]
}

Tenant Create cancellation complaint

Tenant Create cancellation complaint
POST/tenants/me/complaints/cancellation

Example URI

POST https://complaints.spotahome.com/tenants/me/complaints/cancellation
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "bookingId": "25340a00-12b5-48f7-8531-b6bc2642b22c",
  "motive": "25",
  "notes": "Tenant notes about the cancellation",
  "attachmentPaths": [
    "[`path1`",
    "`path2`]"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "motive": {
      "type": "string"
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "attachmentPaths": {
      "type": "array",
      "description": "Paths of the attachments"
    }
  }
}
Response  201
Response  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Authorization denied",
  "status": 403,
  "title": "Forbidden",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Tenant Create change dates complaint

Tenant Create change dates complaint
POST/tenants/me/complaints/change-dates

Example URI

POST https://complaints.spotahome.com/tenants/me/complaints/change-dates
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "bookingId": "25340a00-12b5-48f7-8531-b6bc2642b22c",
  "moveIn": "2020-01-01",
  "moveOut": "2020-01-01",
  "notes": "Tenant notes about the change dates request"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "moveIn": {
      "type": "string"
    },
    "moveOut": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    }
  }
}
Response  201
Response  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Authorization denied",
  "status": 403,
  "title": "Forbidden",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Landlord Create complaint

Landlord Create complaint
POST/landlords/me/complaints/cancellation

Example URI

POST https://complaints.spotahome.com/landlords/me/complaints/cancellation
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "bookingId": "25340a00-12b5-48f7-8531-b6bc2642b22c",
  "motive": "25"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "bookingId": {
      "type": "string"
    },
    "motive": {
      "type": "string"
    }
  }
}
Response  201
Response  401
HideShow
Headers
Content-Type: application/problem+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  403
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "Authorization denied",
  "status": 403,
  "title": "Forbidden",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Agent

Assign Agent
PUT/complaints/{id}/agent

Assign an agent to a Complaint.

Example URI

PUT https://complaints.spotahome.com/complaints/id/agent
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "agentId": "Agent's id to assign"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "agentId": {
      "type": "string"
    }
  },
  "required": [
    "agentId"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  422
HideShow
Headers
Content-Type: application/problem+json

Type

List Options

List Options
GET/types{?page,itemsPerPage}

Return all available complaint types

Example URI

GET https://complaints.spotahome.com/types?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "types": [
      {
        "id": "1",
        "text": "complaint"
      },
      {
        "id": "2",
        "text": "issue"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "types": {
          "type": "array"
        }
      }
    }
  }
}

Motive Topics

List Motive Topics

List Motive Topics
GET/motive-topics{?page,itemsPerPage}

Return all available complaint motive topics

Example URI

GET https://complaints.spotahome.com/motive-topics?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "motive-topics": [
      {
        "id": "1",
        "text": "Acceptance Letter"
      },
      {
        "id": "2",
        "text": "Neighbourhood"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "motive-topics": {
          "type": "array"
        }
      }
    }
  }
}

Tenant Motive Topics

List Tenant Motive Topics

List Tenant Motive Topics
GET/tenant-motive-topics{?page,itemsPerPage}

Return all available tenant complaint motive topics

Example URI

GET https://complaints.spotahome.com/tenant-motive-topics?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "motive-topics": [
      {
        "id": "1",
        "text": "Does not need property anymore"
      },
      {
        "id": "2",
        "text": "Property conditions"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "motive-topics": {
          "type": "array"
        }
      }
    }
  }
}

List landlord motive topics

List landlord motive topics
GET/landlord-motive-topics{?page,itemsPerPage}

Return all available landlord complaint motive topics

Example URI

GET https://complaints.spotahome.com/landlord-motive-topics?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "motive-topics": [
      {
        "id": "1",
        "text": "Does not need property anymore"
      },
      {
        "id": "2",
        "text": "Property conditions"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "motive-topics": {
          "type": "array"
        }
      }
    }
  }
}

Guilty

List Options

List Options
GET/guilties{?page,itemsPerPage}

Return all available options for Guilty field

Example URI

GET https://complaints.spotahome.com/guilties?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "guilties": [
      {
        "id": "1",
        "text": "aaaa"
      },
      {
        "id": "2",
        "text": "bbbb"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "guilties": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Priority

List Options

List Options
GET/priorities{?page,itemsPerPage}

Return all available options for Priority field

Example URI

GET https://complaints.spotahome.com/priorities?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "priorities": [
      {
        "id": "1",
        "text": "aaaa"
      },
      {
        "id": "2",
        "text": "bbbb"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "priorities": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Motive

List Options

List Options
GET/motives{?type,topic,tenantTopic,page,itemsPerPage}

Return all available options for Motive field to indicate the reason why the complaint is created. This list can be filtered by their topic. The supported motive topics are returned by the /motive-topics endpoint.

Example URI

GET https://complaints.spotahome.com/motives?type=1&topic=1&tenantTopic=1&page=1&itemsPerPage=50
URI Parameters
HideShow
type
string (optional) Example: 1
topic
string (optional) Example: 1
tenantTopic
string (optional) Example: 1
landlordTopic
string (optional) Example: 1
enabled
boolean (optional) Example: 1
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "motives": [
      {
        "id": "1",
        "text": "aaaa",
        "enabled": true,
        "topic": "2",
        "tenantTopic": "2"
      },
      {
        "id": "2",
        "text": "bbbb",
        "enabled": false,
        "topic": "1",
        "tenantTopic": "1"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "motives": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Agents

List Agents

List Agents
GET/agents{?page,itemsPerPage}

Return all available complaint agents

Example URI

GET https://complaints.spotahome.com/agents?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "agents": [
      {
        "id": "570c0ddd233c7292688b4568",
        "email": "j.doe@test.com",
        "fullName": "John Doe"
      },
      {
        "id": "568e3194233c720a4f8b4581",
        "email": "j.doe.jr@test.com",
        "fullName": "John Doe Jr"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "agents": {
          "type": "array"
        }
      }
    }
  }
}

Channel

List Channels

List Channels
GET/channels{?page,itemsPerPage}

Return all available options for channel field

Example URI

GET https://complaints.spotahome.com/channels?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "channels": [
      {
        "id": "1",
        "text": "facebook"
      },
      {
        "id": "2",
        "text": "twitter"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "channels": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Status

List Status

List Status
GET/statuses{?page,itemsPerPage}

Return the list of complaint’s status

Example URI

GET https://complaints.spotahome.com/statuses?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "statuses": [
      {
        "id": "XXX"
      },
      {
        "id": "YYY"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "statuses": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Resolution

Complaint Resolution

Resolve Complaint
PUT/complaints/{id}/resolution

Mark Complaint as resolved

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "cancelSplitFeePayments": false,
  "cancelRentPayments": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cancelSplitFeePayments": {
      "type": "boolean"
    },
    "cancelRentPayments": {
      "type": "boolean"
    }
  }
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json

Mark resolution as failed
DELETE/complaints/{id}/resolution

Mark the resolution of a Complaint as failed

Example URI

DELETE https://complaints.spotahome.com/complaints/id/resolution
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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"
  ]
}

List Resolutions

List Resolutions
GET/complaints/resolutions{?page,itemsPerPage}

Return all available options for complaint’s resolutions field

Example URI

GET https://complaints.spotahome.com/complaints/resolutions?page=1&itemsPerPage=50
URI Parameters
HideShow
page
number (optional) Example: 1
itemsPerPage
number (optional) Example: 50
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "count": 1,
  "total": 20,
  "_links": {
    "first": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://complaints.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "resolutions": [
      {
        "id": "ComplaintWasResolvedWithAgreement",
        "text": "aaaa"
      },
      {
        "id": "ComplaintWasResolvedWithCancellation",
        "text": "bbbb"
      },
      {
        "id": "ComplaintWasResolvedWithRelocation",
        "text": "cccc"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of listed items"
    },
    "total": {
      "type": "number",
      "description": "Total number of items"
    },
    "_links": {
      "type": "object",
      "properties": {
        "first": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "prev": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "next": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "last": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        },
        "self": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "description": "The link URI or URI template"
            }
          },
          "required": [
            "href"
          ]
        }
      }
    },
    "_embedded": {
      "type": "object",
      "properties": {
        "resolutions": {
          "type": "array"
        }
      }
    }
  }
}
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"
  ]
}

Resolution agreement

Agreement
PUT/complaints/{id}/resolution-agreement

Resolve Complaint with agreement

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution-agreement
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "pricingId": "hh-22-ju",
  "adjustments": {
    "downpayment": 143000,
    "downpaymentMethod": "1",
    "downpaymentType": "charge",
    "landlordFee": 9500,
    "landlordFeeMethod": "1",
    "landlordFeeType": "refund",
    "tenantFee": 12300,
    "tenantFeeMethod": "1",
    "tenantFeeType": "charge",
    "tenantLosses": 1000,
    "tenantLossesMethod": "1",
    "tenantLossesType": "charge",
    "landlordLosses": 3200,
    "landlordLossesMethod": "1",
    "landlordLossesType": "refund",
    "landlordPenalty": 1400,
    "landlordPenaltyMethod": "1",
    "landlordPenaltyType": "charge",
    "tenantPenalty": 1200,
    "tenantPenaltyMethod": "1",
    "tenantPenaltyType": "charge",
    "tenantDepositGuarantee": 0,
    "tenantDepositGuaranteeMethod": "1",
    "tenantDepositGuaranteeType": "charge",
    "landlordDepositGuarantee": 0,
    "landlordDepositGuaranteeMethod": "1",
    "landlordDepositGuaranteeType": "charge",
    "landlordTransfer": 0,
    "landlordTransferMethod": "1",
    "landlordTransferType": "refund",
    "isCompanyLoss": true,
    "cancelSplitFeePayments": false,
    "cancelRentPayments": false
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pricingId": {
      "type": "string"
    },
    "adjustments": {
      "type": "object",
      "properties": {
        "downpayment": {
          "type": "number"
        },
        "downpaymentMethod": {
          "type": "string"
        },
        "downpaymentType": {
          "type": "string"
        },
        "landlordFee": {
          "type": "number"
        },
        "landlordFeeMethod": {
          "type": "string"
        },
        "landlordFeeType": {
          "type": "string"
        },
        "tenantFee": {
          "type": "number"
        },
        "tenantFeeMethod": {
          "type": "string"
        },
        "tenantFeeType": {
          "type": "string"
        },
        "tenantLosses": {
          "type": "number"
        },
        "tenantLossesMethod": {
          "type": "string"
        },
        "tenantLossesType": {
          "type": "string"
        },
        "landlordLosses": {
          "type": "number"
        },
        "landlordLossesMethod": {
          "type": "string"
        },
        "landlordLossesType": {
          "type": "string"
        },
        "landlordPenalty": {
          "type": "number"
        },
        "landlordPenaltyMethod": {
          "type": "string"
        },
        "landlordPenaltyType": {
          "type": "string"
        },
        "tenantPenalty": {
          "type": "number"
        },
        "tenantPenaltyMethod": {
          "type": "string"
        },
        "tenantPenaltyType": {
          "type": "string"
        },
        "tenantDepositGuarantee": {
          "type": "number"
        },
        "tenantDepositGuaranteeMethod": {
          "type": "string"
        },
        "tenantDepositGuaranteeType": {
          "type": "string"
        },
        "landlordDepositGuarantee": {
          "type": "number"
        },
        "landlordDepositGuaranteeMethod": {
          "type": "string"
        },
        "landlordDepositGuaranteeType": {
          "type": "string"
        },
        "landlordTransfer": {
          "type": "number"
        },
        "landlordTransferMethod": {
          "type": "string"
        },
        "landlordTransferType": {
          "type": "string"
        },
        "isCompanyLoss": {
          "type": "boolean"
        },
        "cancelSplitFeePayments": {
          "type": "boolean"
        },
        "cancelRentPayments": {
          "type": "boolean"
        }
      }
    }
  },
  "required": [
    "pricingId",
    "adjustments"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Resolution renegotiation

Renegotiation
PUT/complaints/{id}/resolution-renegotiation

Resolve Complaint with renegotiation

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution-renegotiation
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "pricingId": "hh-22-ju",
  "listingId": "aabb12",
  "pricing": {
    "moveIn": "2010-01-01",
    "moveOut": "2010-02-30",
    "startContractDate": "2010-01-01",
    "endContractDate": "2010-02-30",
    "seasonalPrice": [
      10000,
      10000,
      5000,
      5000,
      5000,
      5000,
      5000,
      5000,
      5000,
      8000,
      8000,
      8000
    ]
  },
  "adjustments": {
    "downpayment": 143000,
    "downpaymentMethod": "1",
    "downpaymentType": "charge",
    "landlordFee": 9500,
    "landlordFeeMethod": "1",
    "landlordFeeType": "refund",
    "tenantFee": 12300,
    "tenantFeeMethod": "1",
    "tenantFeeType": "charge",
    "tenantLosses": 1000,
    "tenantLossesMethod": "1",
    "tenantLossesType": "charge",
    "landlordLosses": 3200,
    "landlordLossesMethod": "1",
    "landlordLossesType": "refund",
    "landlordPenalty": 1400,
    "landlordPenaltyMethod": "1",
    "landlordPenaltyType": "charge",
    "tenantPenalty": 1200,
    "tenantPenaltyMethod": "1",
    "tenantPenaltyType": "charge",
    "tenantDepositGuarantee": 0,
    "tenantDepositGuaranteeMethod": "1",
    "tenantDepositGuaranteeType": "charge",
    "landlordDepositGuarantee": 0,
    "landlordDepositGuaranteeMethod": "1",
    "landlordDepositGuaranteeType": "charge",
    "landlordTransfer": 0,
    "landlordTransferMethod": "1",
    "landlordTransferType": "refund",
    "isCompanyLoss": true
  },
  "cancelSplitFeePayments": false,
  "cancelRentPayments": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pricingId": {
      "type": "string"
    },
    "listingId": {
      "type": "string"
    },
    "pricing": {
      "type": "object",
      "properties": {
        "moveIn": {
          "type": "string",
          "description": "Move in date"
        },
        "moveOut": {
          "type": "string",
          "description": "Move out date"
        },
        "startContractDate": {
          "type": "string",
          "description": "Date of contract start"
        },
        "endContractDate": {
          "type": "string",
          "description": "Date of contract end"
        },
        "seasonalPrice": {
          "type": "array"
        }
      }
    },
    "adjustments": {
      "type": "object",
      "properties": {
        "downpayment": {
          "type": "number"
        },
        "downpaymentMethod": {
          "type": "string"
        },
        "downpaymentType": {
          "type": "string"
        },
        "landlordFee": {
          "type": "number"
        },
        "landlordFeeMethod": {
          "type": "string"
        },
        "landlordFeeType": {
          "type": "string"
        },
        "tenantFee": {
          "type": "number"
        },
        "tenantFeeMethod": {
          "type": "string"
        },
        "tenantFeeType": {
          "type": "string"
        },
        "tenantLosses": {
          "type": "number"
        },
        "tenantLossesMethod": {
          "type": "string"
        },
        "tenantLossesType": {
          "type": "string"
        },
        "landlordLosses": {
          "type": "number"
        },
        "landlordLossesMethod": {
          "type": "string"
        },
        "landlordLossesType": {
          "type": "string"
        },
        "landlordPenalty": {
          "type": "number"
        },
        "landlordPenaltyMethod": {
          "type": "string"
        },
        "landlordPenaltyType": {
          "type": "string"
        },
        "tenantPenalty": {
          "type": "number"
        },
        "tenantPenaltyMethod": {
          "type": "string"
        },
        "tenantPenaltyType": {
          "type": "string"
        },
        "tenantDepositGuarantee": {
          "type": "number"
        },
        "tenantDepositGuaranteeMethod": {
          "type": "string"
        },
        "tenantDepositGuaranteeType": {
          "type": "string"
        },
        "landlordDepositGuarantee": {
          "type": "number"
        },
        "landlordDepositGuaranteeMethod": {
          "type": "string"
        },
        "landlordDepositGuaranteeType": {
          "type": "string"
        },
        "landlordTransfer": {
          "type": "number"
        },
        "landlordTransferMethod": {
          "type": "string"
        },
        "landlordTransferType": {
          "type": "string"
        },
        "isCompanyLoss": {
          "type": "boolean"
        }
      }
    },
    "cancelSplitFeePayments": {
      "type": "boolean"
    },
    "cancelRentPayments": {
      "type": "boolean"
    }
  },
  "required": [
    "pricingId",
    "listingId",
    "pricing",
    "adjustments"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Resolution cancellation

Cancellation
PUT/complaints/{id}/resolution-cancellation

Solve Complaint with a cancellation

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution-cancellation
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "pricingId": "hh-22-ju",
  "motive": "Complaint motive",
  "guilty": "Complaint guilty",
  "adjustments": {
    "downpayment": 143000,
    "downpaymentMethod": "1",
    "downpaymentType": "charge",
    "landlordFee": 9500,
    "landlordFeeMethod": "1",
    "landlordFeeType": "refund",
    "tenantFee": 12300,
    "tenantFeeMethod": "1",
    "tenantFeeType": "charge",
    "tenantLosses": 1000,
    "tenantLossesMethod": "1",
    "tenantLossesType": "charge",
    "landlordLosses": 3200,
    "landlordLossesMethod": "1",
    "landlordLossesType": "refund",
    "landlordPenalty": 1400,
    "landlordPenaltyMethod": "1",
    "landlordPenaltyType": "charge",
    "tenantPenalty": 1200,
    "tenantPenaltyMethod": "1",
    "tenantPenaltyType": "charge",
    "tenantDepositGuarantee": 0,
    "tenantDepositGuaranteeMethod": "1",
    "tenantDepositGuaranteeType": "charge",
    "landlordDepositGuarantee": 0,
    "landlordDepositGuaranteeMethod": "1",
    "landlordDepositGuaranteeType": "charge",
    "landlordTransfer": 0,
    "landlordTransferMethod": "1",
    "landlordTransferType": "refund",
    "isCompanyLoss": true
  },
  "cancelSplitFeePayments": false,
  "cancelRentPayments": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pricingId": {
      "type": "string"
    },
    "motive": {
      "type": "string"
    },
    "guilty": {
      "type": "string"
    },
    "adjustments": {
      "type": "object",
      "properties": {
        "downpayment": {
          "type": "number"
        },
        "downpaymentMethod": {
          "type": "string"
        },
        "downpaymentType": {
          "type": "string"
        },
        "landlordFee": {
          "type": "number"
        },
        "landlordFeeMethod": {
          "type": "string"
        },
        "landlordFeeType": {
          "type": "string"
        },
        "tenantFee": {
          "type": "number"
        },
        "tenantFeeMethod": {
          "type": "string"
        },
        "tenantFeeType": {
          "type": "string"
        },
        "tenantLosses": {
          "type": "number"
        },
        "tenantLossesMethod": {
          "type": "string"
        },
        "tenantLossesType": {
          "type": "string"
        },
        "landlordLosses": {
          "type": "number"
        },
        "landlordLossesMethod": {
          "type": "string"
        },
        "landlordLossesType": {
          "type": "string"
        },
        "landlordPenalty": {
          "type": "number"
        },
        "landlordPenaltyMethod": {
          "type": "string"
        },
        "landlordPenaltyType": {
          "type": "string"
        },
        "tenantPenalty": {
          "type": "number"
        },
        "tenantPenaltyMethod": {
          "type": "string"
        },
        "tenantPenaltyType": {
          "type": "string"
        },
        "tenantDepositGuarantee": {
          "type": "number"
        },
        "tenantDepositGuaranteeMethod": {
          "type": "string"
        },
        "tenantDepositGuaranteeType": {
          "type": "string"
        },
        "landlordDepositGuarantee": {
          "type": "number"
        },
        "landlordDepositGuaranteeMethod": {
          "type": "string"
        },
        "landlordDepositGuaranteeType": {
          "type": "string"
        },
        "landlordTransfer": {
          "type": "number"
        },
        "landlordTransferMethod": {
          "type": "string"
        },
        "landlordTransferType": {
          "type": "string"
        },
        "isCompanyLoss": {
          "type": "boolean"
        }
      }
    },
    "cancelSplitFeePayments": {
      "type": "boolean"
    },
    "cancelRentPayments": {
      "type": "boolean"
    }
  },
  "required": [
    "pricingId",
    "motive",
    "guilty",
    "adjustments"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Resolution relocation

Relocation
PUT/complaints/{id}/resolution-relocation

Resolve Complaint with relocation

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution-relocation
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "pricingId": "hh-22-ju",
  "guilty": "Complaint guilty",
  "motive": "Complaint motive",
  "adjustments": {
    "downpayment": 143000,
    "downpaymentMethod": "1",
    "downpaymentType": "charge",
    "landlordFee": 9500,
    "landlordFeeMethod": "1",
    "landlordFeeType": "refund",
    "tenantFee": 12300,
    "tenantFeeMethod": "1",
    "tenantFeeType": "charge",
    "tenantLosses": 1000,
    "tenantLossesMethod": "1",
    "tenantLossesType": "charge",
    "landlordLosses": 3200,
    "landlordLossesMethod": "1",
    "landlordLossesType": "refund",
    "landlordPenalty": 1400,
    "landlordPenaltyMethod": "1",
    "landlordPenaltyType": "charge",
    "tenantPenalty": 1200,
    "tenantPenaltyMethod": "1",
    "tenantPenaltyType": "charge",
    "tenantDepositGuarantee": 0,
    "tenantDepositGuaranteeMethod": "1",
    "tenantDepositGuaranteeType": "charge",
    "landlordDepositGuarantee": 0,
    "landlordDepositGuaranteeMethod": "1",
    "landlordDepositGuaranteeType": "charge",
    "landlordTransfer": 0,
    "landlordTransferMethod": "1",
    "landlordTransferType": "refund",
    "isCompanyLoss": true
  },
  "cancelSplitFeePayments": false,
  "cancelRentPayments": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pricingId": {
      "type": "string"
    },
    "guilty": {
      "type": "string"
    },
    "motive": {
      "type": "string"
    },
    "adjustments": {
      "type": "object",
      "properties": {
        "downpayment": {
          "type": "number"
        },
        "downpaymentMethod": {
          "type": "string"
        },
        "downpaymentType": {
          "type": "string"
        },
        "landlordFee": {
          "type": "number"
        },
        "landlordFeeMethod": {
          "type": "string"
        },
        "landlordFeeType": {
          "type": "string"
        },
        "tenantFee": {
          "type": "number"
        },
        "tenantFeeMethod": {
          "type": "string"
        },
        "tenantFeeType": {
          "type": "string"
        },
        "tenantLosses": {
          "type": "number"
        },
        "tenantLossesMethod": {
          "type": "string"
        },
        "tenantLossesType": {
          "type": "string"
        },
        "landlordLosses": {
          "type": "number"
        },
        "landlordLossesMethod": {
          "type": "string"
        },
        "landlordLossesType": {
          "type": "string"
        },
        "landlordPenalty": {
          "type": "number"
        },
        "landlordPenaltyMethod": {
          "type": "string"
        },
        "landlordPenaltyType": {
          "type": "string"
        },
        "tenantPenalty": {
          "type": "number"
        },
        "tenantPenaltyMethod": {
          "type": "string"
        },
        "tenantPenaltyType": {
          "type": "string"
        },
        "tenantDepositGuarantee": {
          "type": "number"
        },
        "tenantDepositGuaranteeMethod": {
          "type": "string"
        },
        "tenantDepositGuaranteeType": {
          "type": "string"
        },
        "landlordDepositGuarantee": {
          "type": "number"
        },
        "landlordDepositGuaranteeMethod": {
          "type": "string"
        },
        "landlordDepositGuaranteeType": {
          "type": "string"
        },
        "landlordTransfer": {
          "type": "number"
        },
        "landlordTransferMethod": {
          "type": "string"
        },
        "landlordTransferType": {
          "type": "string"
        },
        "isCompanyLoss": {
          "type": "boolean"
        }
      }
    },
    "cancelSplitFeePayments": {
      "type": "boolean"
    },
    "cancelRentPayments": {
      "type": "boolean"
    }
  },
  "required": [
    "pricingId",
    "guilty",
    "motive",
    "adjustments"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Resolution landlord conditions

Landlord Conditions
PUT/complaints/{id}/resolution-landlord-conditions

Resolve Complaint with new landlord conditions

Example URI

PUT https://complaints.spotahome.com/complaints/id/resolution-landlord-conditions
URI Parameters
HideShow
id
string (required) 

Id of a Complaint.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "pricingId": "hh-22-ju",
  "landlordCommission": 12.3,
  "adjustments": {
    "downpayment": 143000,
    "downpaymentMethod": "1",
    "downpaymentType": "charge",
    "landlordFee": 9500,
    "landlordFeeMethod": "1",
    "landlordFeeType": "refund",
    "tenantFee": 12300,
    "tenantFeeMethod": "1",
    "tenantFeeType": "charge",
    "tenantLosses": 1000,
    "tenantLossesMethod": "1",
    "tenantLossesType": "charge",
    "landlordLosses": 3200,
    "landlordLossesMethod": "1",
    "landlordLossesType": "refund",
    "landlordPenalty": 1400,
    "landlordPenaltyMethod": "1",
    "landlordPenaltyType": "charge",
    "tenantPenalty": 1200,
    "tenantPenaltyMethod": "1",
    "tenantPenaltyType": "charge",
    "tenantDepositGuarantee": 0,
    "tenantDepositGuaranteeMethod": "1",
    "tenantDepositGuaranteeType": "charge",
    "landlordDepositGuarantee": 0,
    "landlordDepositGuaranteeMethod": "1",
    "landlordDepositGuaranteeType": "charge",
    "landlordTransfer": 0,
    "landlordTransferMethod": "1",
    "landlordTransferType": "refund",
    "isCompanyLoss": true
  },
  "cancelSplitFeePayments": false,
  "cancelRentPayments": false
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pricingId": {
      "type": "string"
    },
    "landlordCommission": {
      "type": "number"
    },
    "adjustments": {
      "type": "object",
      "properties": {
        "downpayment": {
          "type": "number"
        },
        "downpaymentMethod": {
          "type": "string"
        },
        "downpaymentType": {
          "type": "string"
        },
        "landlordFee": {
          "type": "number"
        },
        "landlordFeeMethod": {
          "type": "string"
        },
        "landlordFeeType": {
          "type": "string"
        },
        "tenantFee": {
          "type": "number"
        },
        "tenantFeeMethod": {
          "type": "string"
        },
        "tenantFeeType": {
          "type": "string"
        },
        "tenantLosses": {
          "type": "number"
        },
        "tenantLossesMethod": {
          "type": "string"
        },
        "tenantLossesType": {
          "type": "string"
        },
        "landlordLosses": {
          "type": "number"
        },
        "landlordLossesMethod": {
          "type": "string"
        },
        "landlordLossesType": {
          "type": "string"
        },
        "landlordPenalty": {
          "type": "number"
        },
        "landlordPenaltyMethod": {
          "type": "string"
        },
        "landlordPenaltyType": {
          "type": "string"
        },
        "tenantPenalty": {
          "type": "number"
        },
        "tenantPenaltyMethod": {
          "type": "string"
        },
        "tenantPenaltyType": {
          "type": "string"
        },
        "tenantDepositGuarantee": {
          "type": "number"
        },
        "tenantDepositGuaranteeMethod": {
          "type": "string"
        },
        "tenantDepositGuaranteeType": {
          "type": "string"
        },
        "landlordDepositGuarantee": {
          "type": "number"
        },
        "landlordDepositGuaranteeMethod": {
          "type": "string"
        },
        "landlordDepositGuaranteeType": {
          "type": "string"
        },
        "landlordTransfer": {
          "type": "number"
        },
        "landlordTransferMethod": {
          "type": "string"
        },
        "landlordTransferType": {
          "type": "string"
        },
        "isCompanyLoss": {
          "type": "boolean"
        }
      }
    },
    "cancelSplitFeePayments": {
      "type": "boolean"
    },
    "cancelRentPayments": {
      "type": "boolean"
    }
  },
  "required": [
    "pricingId",
    "landlordCommission",
    "adjustments"
  ]
}
Response  204
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  404
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The resource was not found",
  "status": 404,
  "title": "Not Found",
  "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  409
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be completed due to a conflict with the current state of the resource",
  "status": 409,
  "title": "Conflict",
  "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  422
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request was well formed but was unable to be followed due to semantic errors",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "`http://www.w3.org/Protocols/rfc2616/rfc2616",
  "validationMessages": {
    "field": {
      "stringLength": "The input is less than 6 characters long"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "description": "sec10.html (string, required)"
    },
    "validationMessages": {
      "type": "object",
      "properties": {
        "field": {
          "type": "object",
          "properties": {
            "stringLength": {
              "type": "string"
            }
          },
          "required": [
            "stringLength"
          ]
        }
      },
      "description": "Contains a property for each field that failed validation."
    }
  },
  "required": [
    "detail",
    "status",
    "title"
  ]
}

Event Schema

List of Event Schemas

List of Event Schemas
GET/event-schemas

Return all stored event schemas

Example URI

GET https://complaints.spotahome.com/event-schemas
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "EA14917183508531F65B35E9D4C64066",
    "name": "Sah\\Complaints\\Domain\\Complaints\\Events\\ComplaintWasCreated",
    "schema": {
      "type": "record",
      "name": "ComplaintWasCreated",
      "namespace": "com.spotahome.events",
      "fields": [
        {
          "name": "id",
          "type": "string"
        },
        {
          "name": "name",
          "type": "string"
        },
        {
          "name": "email",
          "type": "string"
        }
      ]
    },
    "timestamp": 0
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
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"
  ]
}

ATOM feed

Complaints ATOM feed

Complaints ATOM feed
GET/event-store/{fromEventId}/{toEventId}

Return all events from event store complaint agents

Example URI

GET https://complaints.spotahome.com/event-store/0/100
URI Parameters
HideShow
fromEventId
number (required) Example: 0
toEventId
number (required) Example: 100
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "events": [
    {
      "id": "150",
      "typeName": "Sah\\Complaints\\Domain\\Complaints\\Events\\ComplaintWasCreated",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'cic': '59', 'ric': '59', 'stage': 3}",
      "eventSchemaId": "ab45frth7i8",
      "binaryBody": "SDhhYWY3OTg2LTg1ZWUtND",
      "streamId": "aa-bb-cc-dd"
    },
    {
      "id": "151",
      "typeName": "Sah\\Complaints\\Domain\\Complaints\\Events\\ComplaintWasEdited",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'motive': '1'}",
      "eventSchemaId": "ttgy67tq54",
      "binaryBody": "SDFFYWY3OTg2LTg1ZWUtND",
      "streamId": "aa-bb-cc-dd"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "events": {
      "type": "array"
    }
  }
}
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"
  ]
}

Stream's ATOM feed

Stream's ATOM feed
GET/event-store/streams/{streamId}

Return all events from event store for a given stream

Example URI

GET https://complaints.spotahome.com/event-store/streams/1b9ab58b-4f3c-445a-9843-daa90c137bba
URI Parameters
HideShow
streamId
string (required) Example: 1b9ab58b-4f3c-445a-9843-daa90c137bba
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "events": [
    {
      "id": "250",
      "typeName": "Sah\\Complaints\\Domain\\Complaints\\Events\\ComplaintWasCreated",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'cic': '59', 'ric': '59', 'stage': 3}",
      "eventSchemaId": "ab45frth7i8",
      "binaryBody": "SDhhYWY3OTg2LTg1ZWUtND",
      "streamId": "aa-bb-cc-dd"
    },
    {
      "id": "251",
      "typeName": "Sah\\Complaints\\Domain\\Complaints\\Events\\ComplaintWasEdited",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'motive': '1'}",
      "eventSchemaId": "ttgy67tq54",
      "binaryBody": "SDFFYWY3OTg2LTg1ZWUtND",
      "streamId": "aa-bb-cc-dd"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "events": {
      "type": "array"
    }
  }
}
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"
  ]
}

Domain Events

ComplaintWasCreated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasCreated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "bookingId" : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "locator"   : "GF56TG",
        "ric"       : "HY",
        "cic"       : "02",
        "stage"     : 1,
        "priority"  : "1",
        "motive"    : "1",
        "guilty"    : "1",
        "createdBy" : "tenant",
        "desiredResolution" : "cancellation",
        "version"   : 1,
        "platformSource" : "spotahome",
        "happinessNotes" : "anything",
        "attachmentPaths" : ["path1", "path2"]
    }
}

ComplaintWasInitiated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasInitiated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "version"   : 1,
    }
}

AgentWasAssigned

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\AgentWasAssigned",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"   : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "version"   : 1,
    }
}

ComplaintWasEdited

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasEdited",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"             : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"       : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "type"           : "1",
        "guilty"         : "GF56TG",
        "motive"         : "HY",
        "agentId"        : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "channel"        : "2",
        "priority"       : "1",
        "publicReview"   : 4,
        "zendeskNumber"  : "90a4ee94-1eff-4c93-8844-f6db9300d332",
        "happinessNotes" : "anything",
        "version"        : 1,
    }
}

ResolveComplaintWithAgreementWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithAgreementWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithCancellationWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithCancellationWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "guilty"                 : "1",
        "motive"                 : "2",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithNewConditionsWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithNewConditionsWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "moveIn"                 : "2018-01-01",
        "moveOut"                : "2018-05-30",
        "endContractDate"        : "2018-05-30",
        "startContractDate"      : "2018-01-01"}
        "seasonalPricing"        : [10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000, 8000, 8000, 8000],
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithNewLandlordConditionsWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithNewLandlordConditionsWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "agentId"                : "25340a00-12b5-48f7-8531-b6bc2642b22c",
        "landlordCommission"     : 6,
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ResolveComplaintWithRelocationWasRequested

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ResolveComplaintWithRelocationWasRequested",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"                     : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"               : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "guilty"                 : "1",
        "motive"                 : "1",
        "agentId"                : "32a68c2d-d60c-4d8f-a0cb-52fed140adfd",
        "isCompanyLoss"          : true,
        "cancelSplitFeePayments" : false, 
        "cancelRentPayments"     : false, 
        "version"                : 1,
    }
}

ComplaintWasResolved

{
    "id"         : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasResolved",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"       : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata" : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "version"  : 1,
    }
}

ComplaintWasDiscarded

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasDiscarded",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "discarded" : true,
        "version"   : 1,
    }
}

ComplaintWasAmendedAfterBeingSolved

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintWasAmendedAfterBeingSolved",
    "occurred_on" : "2017-12-18T09:55:06.000Z",
    "event_body"  : {
        "id"       : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "metadata" : {"occurredOn": {"date": "2017-12-18 09:55:06", "executedBy": "1234-5678", "timezone": "UTC", "timezone_type": 3}},
        "guilty"   : "2",
    }
}

ComplaintMotiveWasUpdated

{
    "id"          : 1,
    "type_name"   : "Sah\Complaints\Domain\Complaints\Events\ComplaintMotiveWasUpdated",
    "occurred_on" : "2018-01-18 12:01:43",
    "event_body"  : {
        "id"        : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "motive"    : "125",
        "metadata"  : {"occurredOn": {"date": "2017-12-18 09:55:06", "timezone": "UTC", "timezone_type": 3}},
        "discarded" : true,
        "version"   : 1,
    }
}

Generated by aglio on 08 Dec 2025