Back to top

API OVERVIEW

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"
}

Pricing

Calculate Pricing

Calculate Pricing
POST/pricing

Example URI

POST https://pricing.spotahome.com/api/pricing
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "listingId": "123000",
  "checkInDate": "2018-01-01",
  "checkOutDate": "2018-01-01",
  "contractDurationType": "temporal",
  "tenantCommissionStrategy": "increasedPercentage"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingId": {
      "type": "string"
    },
    "checkInDate": {
      "type": "string"
    },
    "checkOutDate": {
      "type": "string"
    },
    "contractDurationType": {
      "type": "string",
      "enum": [
        "temporal",
        "permanent"
      ]
    },
    "tenantCommissionStrategy": {
      "type": "string",
      "enum": [
        "increasedPercentage",
        "decreasedPercentage"
      ]
    }
  },
  "required": [
    "listingId",
    "checkInDate",
    "contractDurationType",
    "tenantCommissionStrategy"
  ]
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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  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"
  ]
}

Pricing quotation
GET/quotation/{listingId}{?checkInDate,checkOutDate,contractDurationType,tenantCommissionStrategy}

Example URI

GET https://pricing.spotahome.com/api/quotation/123456?checkInDate=2019-01-01&checkOutDate=2018-01-01&contractDurationType=&tenantCommissionStrategy=
URI Parameters
HideShow
listingId
string (required) Example: 123456
checkInDate
string (required) Example: 2019-01-01

(string, required)

checkOutDate
string (optional) Example: 2018-01-01
contractDurationType
string (required) 
  • temporal

  • permanent

tenantCommissionStrategy
string (required) 
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "id": "46a18a00",
  "listingPrice": [
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000
  ],
  "currencyCode": "EUR",
  "monthlyPrice": 77000,
  "monthlyPriceWithoutOffer": 77000,
  "dailyPrice": 2516,
  "downpayment": 77000,
  "downpaymentWithoutOffer": 77000,
  "totalContractValue": 193758,
  "originalTotalContractValue": 193758,
  "revenue": 14553,
  "tenantCommissionStrategy": "default",
  "tenantCommissionType": "percentage",
  "tenantCommission": 7,
  "tenantFeeNet": 6803,
  "tenantFeeGross": 8300,
  "tenantFeeMinCap": 4132,
  "tenantFeeMaxCap": 24300,
  "landlordCommissionType": "percentage",
  "landlordCommissionValue": 4,
  "landlordFeeNet": 7750,
  "landlordFeeGross": 9455,
  "landlordTransfer": 67545,
  "landlordNoCapFeeNet": 7750,
  "landlordNoCapFeeGross": 9455,
  "landlordFeeOwed": 67545,
  "reservationPrice": 85300,
  "landlordContractType": "fortnightly",
  "startContractDate": "2020-10-16",
  "endContractDate": "2020-12-31",
  "tenantDiscount": 8274,
  "tenantDiscountPercentage": 50,
  "landlordTransferDueDate": "2020-10-28",
  "tenantPayments": [
    39744,
    0,
    77000
  ],
  "tenantPaymentsWithoutOffer": [
    39744,
    0,
    77000
  ],
  "listingId": "122325",
  "checkIn": "2020-10-26",
  "checkOut": "2020-12-24",
  "promoCode": "DOUBLEBOOKING",
  "expirationDate": "2020-12-31",
  "promoPercentage": 50,
  "vat": 22,
  "downpaymentAdjustment": 10000,
  "downpaymentAdjustmentType": "refund",
  "tenantFeeSplit": [
    2767,
    2767,
    2767
  ],
  "tenantFeeAdjustment": 20000,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 10000,
  "tenantPenaltyAdjustmentType": "refund",
  "landlordFeeAdjustment": 40000,
  "landlordFeeAdjustmentType": "charge",
  "securityDeposit": 64000,
  "securityDepositType": "fixed",
  "securityDepositValue": 64000,
  "adminFee": 32000,
  "adminFeeType": "fixed",
  "adminFeeValue": 32000,
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69",
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "downpaymentMonthIndex": 1,
  "listingDailyPricing": [
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ]
  ],
  "offer": {
    "id": "ad983u2-asd34231-asdjoa784-asd08sd",
    "discountType": "percentage",
    "discountValue": 100
  },
  "contractDurationType": "temporal",
  "listing Costs": [],
  "createdAt": "2018-02-09T15:13:42",
  "updatedAt": "2018-02-09T15:13:42+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "4e9b-463a-8aad-e4165efb4f92 (string) ,"
    },
    "listingPrice": {
      "type": "array"
    },
    "currencyCode": {
      "type": "string"
    },
    "monthlyPrice": {
      "type": "number"
    },
    "monthlyPriceWithoutOffer": {
      "type": "number"
    },
    "dailyPrice": {
      "type": "number"
    },
    "downpayment": {
      "type": "number"
    },
    "downpaymentWithoutOffer": {
      "type": [
        "number",
        "null"
      ]
    },
    "totalContractValue": {
      "type": "number"
    },
    "originalTotalContractValue": {
      "type": "number"
    },
    "revenue": {
      "type": "number"
    },
    "tenantCommissionStrategy": {
      "type": "string"
    },
    "tenantCommissionType": {
      "type": "string"
    },
    "tenantCommission": {
      "type": "number"
    },
    "tenantFeeNet": {
      "type": "number"
    },
    "tenantFeeGross": {
      "type": "number"
    },
    "tenantFeeMinCap": {
      "type": "number"
    },
    "tenantFeeMaxCap": {
      "type": "number"
    },
    "landlordCommissionType": {
      "type": "string"
    },
    "landlordCommissionValue": {
      "type": "number"
    },
    "landlordFeeNet": {
      "type": "number"
    },
    "landlordFeeGross": {
      "type": "number"
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordNoCapFeeNet": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordNoCapFeeGross": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordFeeOwed": {
      "type": [
        "number",
        "null"
      ]
    },
    "reservationPrice": {
      "type": "number"
    },
    "landlordContractType": {
      "type": "string"
    },
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "tenantDiscount": {
      "type": "number"
    },
    "tenantDiscountPercentage": {
      "type": "number"
    },
    "landlordTransferDueDate": {
      "type": "string"
    },
    "tenantPayments": {
      "type": "array"
    },
    "tenantPaymentsWithoutOffer": {
      "type": [
        "array",
        "null"
      ]
    },
    "listingId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    },
    "promoPercentage": {
      "type": "number"
    },
    "vat": {
      "type": "number"
    },
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "type": "string"
    },
    "tenantFeeSplit": {
      "type": "array"
    },
    "tenantFeeAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "type": "string"
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "type": "string"
    },
    "landlordFeeAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "type": "string"
    },
    "securityDeposit": {
      "type": "number"
    },
    "securityDepositType": {
      "type": "string"
    },
    "securityDepositValue": {
      "type": "number"
    },
    "adminFee": {
      "type": "number"
    },
    "adminFeeType": {
      "type": "string"
    },
    "adminFeeValue": {
      "type": "number"
    },
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string",
      "description": "b68f-4423-bc93-b8b036727a014 (string)"
    },
    "downpaymentMaxCapType": {
      "type": "string"
    },
    "downpaymentMaxCapValue": {
      "type": "number"
    },
    "downpaymentMonthIndex": {
      "type": "number"
    },
    "listingDailyPricing": {
      "type": "array",
      "items": [
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        }
      ]
    },
    "offer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "discountType": {
          "type": "string",
          "enum": [
            "percentage",
            "fixed"
          ]
        },
        "discountValue": {
          "type": "number"
        }
      }
    },
    "contractDurationType": {
      "type": "string",
      "enum": [
        "temporal",
        "permanent"
      ]
    },
    "listing Costs": {
      "type": "null"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "listingDailyPricing"
  ]
}
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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  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"
  ]
}

Renegotiate pricing

Renegotiate pricing
PUT/pricing/{pricingId}/renegotiation

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/renegotiation
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "startContractDate": "2018-01-01",
  "endContractDate": "2018-05-01",
  "listingPrice": [
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000
  ],
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69-b68f-4423-bc93-b8b036727a014",
  "listingId": "121235"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "listingPrice": {
      "type": "array"
    },
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string"
    },
    "listingId": {
      "type": "string"
    }
  }
}
Response  204
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  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"
  ]
}

Change Landlord Commission

Change landlord commission
PUT/pricing/{pricingId}/landlord-commission

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/landlord-commission
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "landlordCommission": 15.3,
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69-b68f-4423-bc93-b8b036727a014"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "landlordCommission": {
      "type": "number",
      "description": "Commission value"
    },
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string"
    }
  }
}
Response  204
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  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"
  ]
}

Pricing renegotiation simulation

Pricing renegotiation simulation
POST/pricing/{pricingId}/renegotiation-simulation

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/renegotiation-simulation
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "startContractDate": "2018-01-01",
  "endContractDate": "2018-05-01",
  "listingPrice": [
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000,
    10000
  ],
  "sourceType": "COMPLAINT",
  "listingId": "121235"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "listingPrice": {
      "type": "array"
    },
    "sourceType": {
      "type": "string"
    },
    "listingId": {
      "type": "string"
    }
  },
  "required": [
    "sourceType"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "id": "46a18a00",
  "listingPrice": [
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000
  ],
  "currencyCode": "EUR",
  "monthlyPrice": 77000,
  "monthlyPriceWithoutOffer": 77000,
  "dailyPrice": 2516,
  "downpayment": 77000,
  "downpaymentWithoutOffer": 77000,
  "totalContractValue": 193758,
  "originalTotalContractValue": 193758,
  "revenue": 14553,
  "tenantCommissionStrategy": "default",
  "tenantCommissionType": "percentage",
  "tenantCommission": 7,
  "tenantFeeNet": 6803,
  "tenantFeeGross": 8300,
  "tenantFeeMinCap": 4132,
  "tenantFeeMaxCap": 24300,
  "landlordCommissionType": "percentage",
  "landlordCommissionValue": 4,
  "landlordFeeNet": 7750,
  "landlordFeeGross": 9455,
  "landlordTransfer": 67545,
  "landlordNoCapFeeNet": 7750,
  "landlordNoCapFeeGross": 9455,
  "landlordFeeOwed": 67545,
  "reservationPrice": 85300,
  "landlordContractType": "fortnightly",
  "startContractDate": "2020-10-16",
  "endContractDate": "2020-12-31",
  "tenantDiscount": 8274,
  "tenantDiscountPercentage": 50,
  "landlordTransferDueDate": "2020-10-28",
  "tenantPayments": [
    39744,
    0,
    77000
  ],
  "tenantPaymentsWithoutOffer": [
    39744,
    0,
    77000
  ],
  "listingId": "122325",
  "checkIn": "2020-10-26",
  "checkOut": "2020-12-24",
  "promoCode": "DOUBLEBOOKING",
  "expirationDate": "2020-12-31",
  "promoPercentage": 50,
  "vat": 22,
  "downpaymentAdjustment": 10000,
  "downpaymentAdjustmentType": "refund",
  "tenantFeeSplit": [
    2767,
    2767,
    2767
  ],
  "tenantFeeAdjustment": 20000,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 10000,
  "tenantPenaltyAdjustmentType": "refund",
  "landlordFeeAdjustment": 40000,
  "landlordFeeAdjustmentType": "charge",
  "securityDeposit": 64000,
  "securityDepositType": "fixed",
  "securityDepositValue": 64000,
  "adminFee": 32000,
  "adminFeeType": "fixed",
  "adminFeeValue": 32000,
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69",
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "downpaymentMonthIndex": 1,
  "listingDailyPricing": [
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ]
  ],
  "offer": {
    "id": "ad983u2-asd34231-asdjoa784-asd08sd",
    "discountType": "percentage",
    "discountValue": 100
  },
  "contractDurationType": "temporal",
  "listing Costs": [],
  "createdAt": "2018-02-09T15:13:42",
  "updatedAt": "2018-02-09T15:13:42+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "4e9b-463a-8aad-e4165efb4f92 (string) ,"
    },
    "listingPrice": {
      "type": "array"
    },
    "currencyCode": {
      "type": "string"
    },
    "monthlyPrice": {
      "type": "number"
    },
    "monthlyPriceWithoutOffer": {
      "type": "number"
    },
    "dailyPrice": {
      "type": "number"
    },
    "downpayment": {
      "type": "number"
    },
    "downpaymentWithoutOffer": {
      "type": [
        "number",
        "null"
      ]
    },
    "totalContractValue": {
      "type": "number"
    },
    "originalTotalContractValue": {
      "type": "number"
    },
    "revenue": {
      "type": "number"
    },
    "tenantCommissionStrategy": {
      "type": "string"
    },
    "tenantCommissionType": {
      "type": "string"
    },
    "tenantCommission": {
      "type": "number"
    },
    "tenantFeeNet": {
      "type": "number"
    },
    "tenantFeeGross": {
      "type": "number"
    },
    "tenantFeeMinCap": {
      "type": "number"
    },
    "tenantFeeMaxCap": {
      "type": "number"
    },
    "landlordCommissionType": {
      "type": "string"
    },
    "landlordCommissionValue": {
      "type": "number"
    },
    "landlordFeeNet": {
      "type": "number"
    },
    "landlordFeeGross": {
      "type": "number"
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordNoCapFeeNet": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordNoCapFeeGross": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordFeeOwed": {
      "type": [
        "number",
        "null"
      ]
    },
    "reservationPrice": {
      "type": "number"
    },
    "landlordContractType": {
      "type": "string"
    },
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "tenantDiscount": {
      "type": "number"
    },
    "tenantDiscountPercentage": {
      "type": "number"
    },
    "landlordTransferDueDate": {
      "type": "string"
    },
    "tenantPayments": {
      "type": "array"
    },
    "tenantPaymentsWithoutOffer": {
      "type": [
        "array",
        "null"
      ]
    },
    "listingId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    },
    "promoPercentage": {
      "type": "number"
    },
    "vat": {
      "type": "number"
    },
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "type": "string"
    },
    "tenantFeeSplit": {
      "type": "array"
    },
    "tenantFeeAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "type": "string"
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "type": "string"
    },
    "landlordFeeAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "type": "string"
    },
    "securityDeposit": {
      "type": "number"
    },
    "securityDepositType": {
      "type": "string"
    },
    "securityDepositValue": {
      "type": "number"
    },
    "adminFee": {
      "type": "number"
    },
    "adminFeeType": {
      "type": "string"
    },
    "adminFeeValue": {
      "type": "number"
    },
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string",
      "description": "b68f-4423-bc93-b8b036727a014 (string)"
    },
    "downpaymentMaxCapType": {
      "type": "string"
    },
    "downpaymentMaxCapValue": {
      "type": "number"
    },
    "downpaymentMonthIndex": {
      "type": "number"
    },
    "listingDailyPricing": {
      "type": "array",
      "items": [
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        }
      ]
    },
    "offer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "discountType": {
          "type": "string",
          "enum": [
            "percentage",
            "fixed"
          ]
        },
        "discountValue": {
          "type": "number"
        }
      }
    },
    "contractDurationType": {
      "type": "string",
      "enum": [
        "temporal",
        "permanent"
      ]
    },
    "listing Costs": {
      "type": "null"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "listingDailyPricing"
  ]
}
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  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"
  ]
}

Apply Promotion

Apply Promotion
PUT/pricing/{pricingId}/promotion

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/promotion
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "code": "SOME_CODE"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    }
  },
  "required": [
    "code"
  ]
}
Response  204
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  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"
  ]
}

Apply Tenant Fee Discount

Apply Tenant Fee Discount
PUT/pricing/{pricingId}/tenant-fee-discount

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/tenant-fee-discount
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "discountPercentage": 10,
  "sourceType": "BOOKING",
  "sourceId": "123456"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "discountPercentage": {
      "type": "number"
    },
    "sourceType": {
      "type": "string",
      "enum": [
        "BOOKING",
        "COMPLAINT"
      ]
    },
    "sourceId": {
      "type": "string"
    }
  },
  "required": [
    "discountPercentage",
    "sourceType",
    "sourceId"
  ]
}
Response  204
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  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"
  ]
}

Apply adjustments

Apply adjustments to pricing
PUT/pricing/{pricingId}/adjustments

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/adjustments
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpaymentAdjustment": 123000,
  "downpaymentAdjustmentType": "charge",
  "landlordFeeGrossAdjustment": 9500,
  "landlordFeeAdjustmentType": "charge",
  "tenantFeeGrossAdjustment": 12300,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 2500,
  "tenantPenaltyAdjustmentType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFeeGrossAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFeeGrossAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  },
  "required": [
    "downpaymentAdjustment",
    "downpaymentAdjustmentType",
    "landlordFeeGrossAdjustment",
    "landlordFeeAdjustmentType",
    "tenantFeeGrossAdjustment",
    "tenantFeeAdjustmentType",
    "tenantPenaltyAdjustment",
    "tenantPenaltyAdjustmentType",
    "sourceId",
    "sourceType"
  ]
}
Response  204
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  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"
  ]
}

View pricing for listing

View pricing for listing
GET/listings/{listingId}

This endpoint returns the pricing for a given listing ID

Example URI

GET https://pricing.spotahome.com/api/listings/123456
URI Parameters
HideShow
listingId
string (required) Example: 123456

Id of a Listing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "listingId": "1234456",
  "currencyCode": "EUR",
  "securityDepositType": "fixed",
  "securityDepositValue": 50000,
  "adminFeeType": "noAdminFee",
  "adminFeeValue": 1234,
  "tenantFeeType": "fixed",
  "tenantFeeValue": 1234,
  "contractDurationTypesAllowed": [
    "temporal"
  ],
  "costs": [
    {
      "key": "",
      "value": {
        "id": "f426fa1d",
        "name": "Cat Fee",
        "amount": 50000
      },
      "applyOn": "no",
      "applyPayment": "mandatory",
      "enabled": null,
      "frequency": "monthly",
      "paymentMethod": "cash",
      "requestedOn": "bookingAccepted",
      "reason": null
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingId": {
      "type": "string"
    },
    "currencyCode": {
      "type": "string"
    },
    "securityDepositType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "securityDepositValue": {
      "type": "number"
    },
    "adminFeeType": {
      "type": "string",
      "enum": [
        "noAdminFee",
        "fixed",
        "monthlyPercentage",
        "tcvPercentage"
      ]
    },
    "adminFeeValue": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "tenantFeeValue": {
      "type": "number"
    },
    "contractDurationTypesAllowed": {
      "type": "array"
    },
    "costs": {
      "type": "array"
    }
  }
}
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  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"
  ]
}

Partial listing booking conditions update
PATCH/listings/{listingId}

This endpoint updates listing booking conditions partially (admin fee, tenant fee, security deposit, contract duration types).

Example URI

PATCH https://pricing.spotahome.com/api/listings/123456
URI Parameters
HideShow
listingId
string (required) Example: 123456

Id of a Listing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "securityDepositType": "fixed",
  "securityDepositValue": 50000,
  "adminFeeType": "noAdminFee",
  "adminFeeValue": 1234,
  "tenantFeeType": "fixed",
  "tenantFeeValue": 1234,
  "contractDurationTypesAllowed": [
    "temporal"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "securityDepositType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "securityDepositValue": {
      "type": "number"
    },
    "adminFeeType": {
      "type": "string",
      "enum": [
        "noAdminFee",
        "fixed",
        "monthlyPercentage",
        "tcvPercentage"
      ]
    },
    "adminFeeValue": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "tenantFeeValue": {
      "type": "number"
    },
    "contractDurationTypesAllowed": {
      "type": "array"
    }
  }
}
Response  204
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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  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"
  ]
}

Set multiple listing pricings in bulk

Set multiple listing pricings in bulk
PUT/pricing/listings/multiple

This endpoint establish create or update multiple listing pricings in bulk

Example URI

PUT https://pricing.spotahome.com/api/pricing/listings/multiple
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "listings": [
    {
      "listingId": "1234456",
      "currencyCode": "EUR",
      "securityDepositType": "fixed",
      "securityDepositValue": 50000,
      "adminFeeType": "noAdminFee",
      "adminFeeValue": 1234,
      "tenantFeeType": "fixed",
      "tenantFeeValue": 1234,
      "contractDurationTypesAllowed": [
        "temporal"
      ],
      "costs": [
        {
          "key": "",
          "value": {
            "id": "f426fa1d",
            "name": "Cat Fee",
            "amount": 50000
          },
          "applyOn": "no",
          "applyPayment": "mandatory",
          "enabled": null,
          "frequency": "monthly",
          "paymentMethod": "cash",
          "requestedOn": "bookingAccepted",
          "reason": null
        }
      ]
    },
    {
      "listingId": "1234456",
      "currencyCode": "EUR",
      "securityDepositType": "fixed",
      "securityDepositValue": 50000,
      "adminFeeType": "noAdminFee",
      "adminFeeValue": 1234,
      "tenantFeeType": "fixed",
      "tenantFeeValue": 1234,
      "contractDurationTypesAllowed": [
        "temporal"
      ],
      "costs": [
        {
          "key": "",
          "value": {
            "id": "f426fa1d",
            "name": "Cat Fee",
            "amount": 50000
          },
          "applyOn": "no",
          "applyPayment": "mandatory",
          "enabled": null,
          "frequency": "monthly",
          "paymentMethod": "cash",
          "requestedOn": "bookingAccepted",
          "reason": null
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listings": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "listingId": {
              "type": "string",
              "enum": [
                "1234456"
              ]
            },
            "currencyCode": {
              "type": "string",
              "enum": [
                "EUR"
              ]
            },
            "securityDepositType": {
              "type": "string",
              "enum": [
                "fixed",
                "percentage"
              ]
            },
            "securityDepositValue": {
              "type": "number",
              "enum": [
                50000
              ]
            },
            "adminFeeType": {
              "type": "string",
              "enum": [
                "noAdminFee",
                "fixed",
                "monthlyPercentage",
                "tcvPercentage"
              ]
            },
            "adminFeeValue": {
              "type": "number",
              "enum": [
                1234
              ]
            },
            "tenantFeeType": {
              "type": "string",
              "enum": [
                "fixed",
                "percentage"
              ]
            },
            "tenantFeeValue": {
              "type": "number",
              "enum": [
                1234
              ]
            },
            "contractDurationTypesAllowed": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "temporal",
                  "permanent"
                ]
              }
            },
            "costs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {},
                  "value": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "enum": [
                          "f426fa1d"
                        ],
                        "description": "5efa-4faf-8724-5b598a952e6c (string, optional)"
                      },
                      "name": {
                        "type": "string",
                        "enum": [
                          "Cat Fee"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "enum": [
                          50000
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "amount"
                    ],
                    "additionalProperties": false
                  },
                  "applyOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "no",
                      "included",
                      "fixedFee",
                      "estimatedCost",
                      "monthlyPercentage",
                      "tcvPercentage",
                      null
                    ]
                  },
                  "applyPayment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "mandatory",
                      "underCertainConditions",
                      "onTenantDemand",
                      null
                    ]
                  },
                  "enabled": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "enum": [
                      false,
                      null
                    ]
                  },
                  "frequency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "monthly",
                      "weekly",
                      "biMonthly",
                      "onePayment",
                      null
                    ]
                  },
                  "paymentMethod": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "cash",
                      "bankTransfer",
                      "creditCard",
                      "payToProvider",
                      "payThroughSpotahome",
                      "paypal",
                      null
                    ]
                  },
                  "requestedOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "bookingAccepted",
                      "signingContract",
                      "moveIn",
                      "duringStay",
                      "moveOut",
                      "duringStayOnBill",
                      "duringStayPerUse",
                      null
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "",
                      null
                    ]
                  }
                },
                "required": [
                  "key",
                  "value",
                  "applyOn",
                  "applyPayment",
                  "enabled",
                  "frequency",
                  "paymentMethod",
                  "requestedOn",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "listingId",
            "currencyCode",
            "securityDepositType",
            "securityDepositValue",
            "adminFeeType",
            "adminFeeValue",
            "tenantFeeType",
            "tenantFeeValue",
            "contractDurationTypesAllowed",
            "costs"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "listingId": {
              "type": "string",
              "enum": [
                "1234456"
              ]
            },
            "currencyCode": {
              "type": "string",
              "enum": [
                "EUR"
              ]
            },
            "securityDepositType": {
              "type": "string",
              "enum": [
                "fixed",
                "percentage"
              ]
            },
            "securityDepositValue": {
              "type": "number",
              "enum": [
                50000
              ]
            },
            "adminFeeType": {
              "type": "string",
              "enum": [
                "noAdminFee",
                "fixed",
                "monthlyPercentage",
                "tcvPercentage"
              ]
            },
            "adminFeeValue": {
              "type": "number",
              "enum": [
                1234
              ]
            },
            "tenantFeeType": {
              "type": "string",
              "enum": [
                "fixed",
                "percentage"
              ]
            },
            "tenantFeeValue": {
              "type": "number",
              "enum": [
                1234
              ]
            },
            "contractDurationTypesAllowed": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "temporal",
                  "permanent"
                ]
              }
            },
            "costs": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "key": {},
                  "value": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "enum": [
                          "f426fa1d"
                        ],
                        "description": "5efa-4faf-8724-5b598a952e6c (string, optional)"
                      },
                      "name": {
                        "type": "string",
                        "enum": [
                          "Cat Fee"
                        ]
                      },
                      "amount": {
                        "type": "number",
                        "enum": [
                          50000
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "amount"
                    ],
                    "additionalProperties": false
                  },
                  "applyOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "no",
                      "included",
                      "fixedFee",
                      "estimatedCost",
                      "monthlyPercentage",
                      "tcvPercentage",
                      null
                    ]
                  },
                  "applyPayment": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "mandatory",
                      "underCertainConditions",
                      "onTenantDemand",
                      null
                    ]
                  },
                  "enabled": {
                    "type": [
                      "boolean",
                      "null"
                    ],
                    "enum": [
                      false,
                      null
                    ]
                  },
                  "frequency": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "monthly",
                      "weekly",
                      "biMonthly",
                      "onePayment",
                      null
                    ]
                  },
                  "paymentMethod": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "cash",
                      "bankTransfer",
                      "creditCard",
                      "payToProvider",
                      "payThroughSpotahome",
                      "paypal",
                      null
                    ]
                  },
                  "requestedOn": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "bookingAccepted",
                      "signingContract",
                      "moveIn",
                      "duringStay",
                      "moveOut",
                      "duringStayOnBill",
                      "duringStayPerUse",
                      null
                    ]
                  },
                  "reason": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "",
                      null
                    ]
                  }
                },
                "required": [
                  "key",
                  "value",
                  "applyOn",
                  "applyPayment",
                  "enabled",
                  "frequency",
                  "paymentMethod",
                  "requestedOn",
                  "reason"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "listingId",
            "currencyCode",
            "securityDepositType",
            "securityDepositValue",
            "adminFeeType",
            "adminFeeValue",
            "tenantFeeType",
            "tenantFeeValue",
            "contractDurationTypesAllowed",
            "costs"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "listings"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json
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  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"
  ]
}

Security Deposit types

List the security deposit types and their possible values
GET/pricing/security-deposit-types

Return all available types of security deposits and their possible values

Example URI

GET https://pricing.spotahome.com/api/pricing/security-deposit-types
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    {
      "name": "fixed",
      "options": null
    },
    {
      "name": "percentage",
      "options": [
        50,
        100,
        150,
        200,
        300
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "enum": [
                "fixed"
              ]
            },
            "options": {
              "type": [
                "object",
                "null"
              ],
              "properties": {},
              "additionalProperties": false
            }
          },
          "required": [
            "name",
            "options"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "enum": [
                "percentage"
              ]
            },
            "options": {
              "type": "array",
              "items": [
                {
                  "type": "number",
                  "enum": [
                    50
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    100
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    150
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    200
                  ]
                },
                {
                  "type": "number",
                  "enum": [
                    300
                  ]
                }
              ]
            }
          },
          "required": [
            "name",
            "options"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "required": [
    "types"
  ]
}
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"
  ]
}

Admin Fee types

List the admin fee types
GET/pricing/admin-fee-types

Return all available types of admin fees

Example URI

GET https://pricing.spotahome.com/api/pricing/admin-fee-types
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    "noAdminFee",
    "notDefined",
    "fixed",
    "monthlyPercentage",
    "tcvPercentage"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "noAdminFee"
          ]
        },
        {
          "type": "string",
          "enum": [
            "notDefined"
          ]
        },
        {
          "type": "string",
          "enum": [
            "fixed"
          ]
        },
        {
          "type": "string",
          "enum": [
            "monthlyPercentage"
          ]
        },
        {
          "type": "string",
          "enum": [
            "tcvPercentage"
          ]
        }
      ]
    }
  },
  "required": [
    "types"
  ]
}
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"
  ]
}

Tenant Fee types

List the tenant fee types
GET/pricing/tenant-fee-types

Return all available types of tenant fees

Example URI

GET https://pricing.spotahome.com/api/pricing/tenant-fee-types
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    "fixed",
    "percentage"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "fixed"
          ]
        },
        {
          "type": "string",
          "enum": [
            "percentage"
          ]
        }
      ]
    }
  },
  "required": [
    "types"
  ]
}
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"
  ]
}

Close a pricing for a source type

Close a pricing for a source type
PUT/pricing/{pricingId}/close

Example URI

PUT https://pricing.spotahome.com/api/pricing/pricingId/close
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69-b68f-4423-bc93-b8b036727a014"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string"
    }
  }
}
Response  204
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  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"
  ]
}

View pricing

View pricing
GET/pricing/{pricingId}

Example URI

GET https://pricing.spotahome.com/api/pricing/pricingId
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
{
  "id": "46a18a00",
  "listingPrice": [
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000,
    77000
  ],
  "currencyCode": "EUR",
  "monthlyPrice": 77000,
  "monthlyPriceWithoutOffer": 77000,
  "dailyPrice": 2516,
  "downpayment": 77000,
  "downpaymentWithoutOffer": 77000,
  "totalContractValue": 193758,
  "originalTotalContractValue": 193758,
  "revenue": 14553,
  "tenantCommissionStrategy": "default",
  "tenantCommissionType": "percentage",
  "tenantCommission": 7,
  "tenantFeeNet": 6803,
  "tenantFeeGross": 8300,
  "tenantFeeMinCap": 4132,
  "tenantFeeMaxCap": 24300,
  "landlordCommissionType": "percentage",
  "landlordCommissionValue": 4,
  "landlordFeeNet": 7750,
  "landlordFeeGross": 9455,
  "landlordTransfer": 67545,
  "landlordNoCapFeeNet": 7750,
  "landlordNoCapFeeGross": 9455,
  "landlordFeeOwed": 67545,
  "reservationPrice": 85300,
  "landlordContractType": "fortnightly",
  "startContractDate": "2020-10-16",
  "endContractDate": "2020-12-31",
  "tenantDiscount": 8274,
  "tenantDiscountPercentage": 50,
  "landlordTransferDueDate": "2020-10-28",
  "tenantPayments": [
    39744,
    0,
    77000
  ],
  "tenantPaymentsWithoutOffer": [
    39744,
    0,
    77000
  ],
  "listingId": "122325",
  "checkIn": "2020-10-26",
  "checkOut": "2020-12-24",
  "promoCode": "DOUBLEBOOKING",
  "expirationDate": "2020-12-31",
  "promoPercentage": 50,
  "vat": 22,
  "downpaymentAdjustment": 10000,
  "downpaymentAdjustmentType": "refund",
  "tenantFeeSplit": [
    2767,
    2767,
    2767
  ],
  "tenantFeeAdjustment": 20000,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 10000,
  "tenantPenaltyAdjustmentType": "refund",
  "landlordFeeAdjustment": 40000,
  "landlordFeeAdjustmentType": "charge",
  "securityDeposit": 64000,
  "securityDepositType": "fixed",
  "securityDepositValue": 64000,
  "adminFee": 32000,
  "adminFeeType": "fixed",
  "adminFeeValue": 32000,
  "sourceType": "COMPLAINT",
  "sourceId": "1a6fbe69",
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "downpaymentMonthIndex": 1,
  "listingDailyPricing": [
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ],
    [
      1
    ]
  ],
  "offer": {
    "id": "ad983u2-asd34231-asdjoa784-asd08sd",
    "discountType": "percentage",
    "discountValue": 100
  },
  "contractDurationType": "temporal",
  "listing Costs": [],
  "createdAt": "2018-02-09T15:13:42",
  "updatedAt": "2018-02-09T15:13:42+0000"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "4e9b-463a-8aad-e4165efb4f92 (string) ,"
    },
    "listingPrice": {
      "type": "array"
    },
    "currencyCode": {
      "type": "string"
    },
    "monthlyPrice": {
      "type": "number"
    },
    "monthlyPriceWithoutOffer": {
      "type": "number"
    },
    "dailyPrice": {
      "type": "number"
    },
    "downpayment": {
      "type": "number"
    },
    "downpaymentWithoutOffer": {
      "type": [
        "number",
        "null"
      ]
    },
    "totalContractValue": {
      "type": "number"
    },
    "originalTotalContractValue": {
      "type": "number"
    },
    "revenue": {
      "type": "number"
    },
    "tenantCommissionStrategy": {
      "type": "string"
    },
    "tenantCommissionType": {
      "type": "string"
    },
    "tenantCommission": {
      "type": "number"
    },
    "tenantFeeNet": {
      "type": "number"
    },
    "tenantFeeGross": {
      "type": "number"
    },
    "tenantFeeMinCap": {
      "type": "number"
    },
    "tenantFeeMaxCap": {
      "type": "number"
    },
    "landlordCommissionType": {
      "type": "string"
    },
    "landlordCommissionValue": {
      "type": "number"
    },
    "landlordFeeNet": {
      "type": "number"
    },
    "landlordFeeGross": {
      "type": "number"
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordNoCapFeeNet": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordNoCapFeeGross": {
      "type": [
        "number",
        "null"
      ]
    },
    "landlordFeeOwed": {
      "type": [
        "number",
        "null"
      ]
    },
    "reservationPrice": {
      "type": "number"
    },
    "landlordContractType": {
      "type": "string"
    },
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "tenantDiscount": {
      "type": "number"
    },
    "tenantDiscountPercentage": {
      "type": "number"
    },
    "landlordTransferDueDate": {
      "type": "string"
    },
    "tenantPayments": {
      "type": "array"
    },
    "tenantPaymentsWithoutOffer": {
      "type": [
        "array",
        "null"
      ]
    },
    "listingId": {
      "type": "string"
    },
    "checkIn": {
      "type": "string"
    },
    "checkOut": {
      "type": "string"
    },
    "promoCode": {
      "type": "string"
    },
    "expirationDate": {
      "type": "string"
    },
    "promoPercentage": {
      "type": "number"
    },
    "vat": {
      "type": "number"
    },
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "type": "string"
    },
    "tenantFeeSplit": {
      "type": "array"
    },
    "tenantFeeAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "type": "string"
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "type": "string"
    },
    "landlordFeeAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "type": "string"
    },
    "securityDeposit": {
      "type": "number"
    },
    "securityDepositType": {
      "type": "string"
    },
    "securityDepositValue": {
      "type": "number"
    },
    "adminFee": {
      "type": "number"
    },
    "adminFeeType": {
      "type": "string"
    },
    "adminFeeValue": {
      "type": "number"
    },
    "sourceType": {
      "type": "string"
    },
    "sourceId": {
      "type": "string",
      "description": "b68f-4423-bc93-b8b036727a014 (string)"
    },
    "downpaymentMaxCapType": {
      "type": "string"
    },
    "downpaymentMaxCapValue": {
      "type": "number"
    },
    "downpaymentMonthIndex": {
      "type": "number"
    },
    "listingDailyPricing": {
      "type": "array",
      "items": [
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        },
        {
          "type": "array",
          "items": {
            "type": "number",
            "enum": [
              0
            ]
          }
        }
      ]
    },
    "offer": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "discountType": {
          "type": "string",
          "enum": [
            "percentage",
            "fixed"
          ]
        },
        "discountValue": {
          "type": "number"
        }
      }
    },
    "contractDurationType": {
      "type": "string",
      "enum": [
        "temporal",
        "permanent"
      ]
    },
    "listing Costs": {
      "type": "null"
    },
    "createdAt": {
      "type": "string"
    },
    "updatedAt": {
      "type": "string"
    }
  },
  "required": [
    "listingDailyPricing"
  ]
}
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  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"
  ]
}

Resource Group

Cancellation adjustments

Calculate and return the cancellation adjustments for a pricing
POST/pricing/{pricingId}/cancellation-adjustments

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/cancellation-adjustments
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "cancellationPolicy": {
    "tenantPenalty": 50,
    "downpaymentPercentageRefund": 100,
    "reservationFeePercentageRefund": 100,
    "deadlineDaysToMoveIn": 60
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cancellationPolicy": {
      "type": "object",
      "properties": {
        "tenantPenalty": {
          "type": "number"
        },
        "downpaymentPercentageRefund": {
          "type": "number"
        },
        "reservationFeePercentageRefund": {
          "type": "number"
        },
        "deadlineDaysToMoveIn": {
          "type": "number"
        }
      }
    }
  },
  "required": [
    "cancellationPolicy"
  ]
}
Response  200
HideShow
Body
{
  "downpaymentAdjustment": 123000,
  "downpaymentAdjustmentType": "charge",
  "tenantFeeGrossAdjustment": 12300,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 5000,
  "tenantPenaltyAdjustmentType": "charge",
  "landlordFeeGrossAdjustment": 9500,
  "landlordFeeAdjustmentType": "charge"
}
Schema
{
  "type": "object",
  "properties": {
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFeeGrossAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFeeGrossAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
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  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"
  ]
}

New conditions adjustments

Calculate and return the cancellation adjustments for a pricing
POST/pricing/{pricingId}/new-conditions-adjustments

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/new-conditions-adjustments
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "startContractDate": "2020-10-16",
  "endContractDate": "2020-11-16",
  "tenantCommissionType": "fixed",
  "tenantCommissionValue": 20,
  "landlordCommissionType": "fixed",
  "landlordCommissionValue": 20000
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "startContractDate": {
      "type": "string"
    },
    "endContractDate": {
      "type": "string"
    },
    "tenantCommissionType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "tenantCommissionValue": {
      "type": "number"
    },
    "landlordCommissionType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "landlordCommissionValue": {
      "type": "number"
    }
  },
  "required": [
    "startContractDate",
    "endContractDate"
  ]
}
Response  200
HideShow
Body
{
  "downpaymentAdjustment": 123000,
  "downpaymentAdjustmentType": "charge",
  "tenantFeeGrossAdjustment": 12300,
  "tenantFeeAdjustmentType": "charge",
  "tenantPenaltyAdjustment": 5000,
  "tenantPenaltyAdjustmentType": "charge",
  "landlordFeeGrossAdjustment": 9500,
  "landlordFeeAdjustmentType": "charge"
}
Schema
{
  "type": "object",
  "properties": {
    "downpaymentAdjustment": {
      "type": "number"
    },
    "downpaymentAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFeeGrossAdjustment": {
      "type": "number"
    },
    "tenantFeeAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenaltyAdjustment": {
      "type": "number"
    },
    "tenantPenaltyAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFeeGrossAdjustment": {
      "type": "number"
    },
    "landlordFeeAdjustmentType": {
      "enum": [
        "charge",
        "refund"
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
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  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"
  ]
}

Cost Configurations

Search Cost Configurations
GET/pricing/cost-configurations{?showAll,page,itemsPerPage}

Returns the available cost configuration definitions.

Example URI

GET https://pricing.spotahome.com/api/pricing/cost-configurations?showAll=false&page=1&itemsPerPage=20
URI Parameters
HideShow
showAll
boolean (optional) Example: false

When true, includes non-visible configurations. Default: false.

page
number (optional) Example: 1

Page number to retrieve. Default: 1.

itemsPerPage
number (optional) Example: 20

Number of items per page. Default: 50.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/hal+json
Body
+ Attributes (Cost Configurations Collection Resource)`

Pricing ATOM feed

Pricing ATOM feed

Pricing ATOM feed
GET/pricing/event-store/{fromEventId}/{toEventId}

Return all events from pricing event store

Example URI

GET https://pricing.spotahome.com/api/pricing/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\\Pricing\\Domain\\Events\\PricingForListingWasCalculated",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'vat': 21, 'revenue': 13811}"
    },
    {
      "id": "151",
      "typeName": "SAH\\Pricing\\Domain\\Events\\PricingAdjustmentsWereApplied",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '0179489b-88b1-493a-95bb-0dd497e78629', 'revenue': '18963'}"
    }
  ]
}
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/pricing/event-store/streams/{streamId}

Return all events from pricing event store for a given stream

Example URI

GET https://pricing.spotahome.com/api/pricing/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": "150",
      "typeName": "SAH\\Pricing\\Domain\\Events\\PricingForListingWasCalculated",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '1b9ab58b-4f3c-445a-9843-daa90c137bba', 'vat': 21, 'revenue': 13811}"
    },
    {
      "id": "151",
      "typeName": "SAH\\Pricing\\Domain\\Events\\PricingAdjustmentsWereApplied",
      "occurredOn": "2018-05-30T14:37:23+982300",
      "eventBody": "{'id': '1b9ab58b-4f3c-445a-9843-daa90c137bba', 'revenue': '18963'}"
    }
  ]
}
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"
  ]
}

Adjustment

View Adjustments

Search Adjustments
GET/adjustments{?sourceType,sourceId,page,itemsPerPage}

This endpoint returns a list of adjustments

Example URI

GET https://pricing.spotahome.com/api/adjustments?sourceType=COMPLAINT&sourceId=593a803d422ff6f3068b4567&page=1&itemsPerPage=1
URI Parameters
HideShow
sourceType
string (optional) Example: COMPLAINT
sourceId
string (optional) Example: 593a803d422ff6f3068b4567
itemsPerPage
number (optional) Example: 1
page
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://issues.spotahome.com/{resource}?page={pageNumber}"
    },
    "prev": {
      "href": "https://issues.spotahome.com/{resource}?page={pageNumber}"
    },
    "next": {
      "href": "https://issues.spotahome.com/{resource}?page={pageNumber}"
    },
    "last": {
      "href": "https://issues.spotahome.com/{resource}?page={pageNumber}"
    },
    "self": {
      "href": "https://issues.spotahome.com/{resource}?page={pageNumber}"
    }
  },
  "_embedded": {
    "adjustments": [
      {
        "id": "46a18a00-4e9b-463a-8aad-e4165efb4f92",
        "sourceType": "COMPLAINT",
        "sourceId": "1a6fbe69-b68f-4423-bc93-b8b036727a014",
        "pricingId": "2g6fbe69-b68f-4423-bc93-b8b036727a014",
        "createdAt": "2018-02-09T15:13:42",
        "tenantFeeNet": 18048,
        "tenantFeeGross": 21477,
        "tenantFeeType": "charge",
        "landlordFeeNet": 16426,
        "landlordFeeGross": 19547,
        "landlordFeeType": "charge",
        "tenantLosses": 18048,
        "tenantLossesType": "charge",
        "landlordLosses": 5752,
        "landlordLossesType": "charge",
        "landlordPenalty": 1400,
        "landlordPenaltyType": "charge",
        "tenantPenalty": 1400,
        "tenantPenaltyType": "charge",
        "downpayment": 6414,
        "downpaymentType": "charge",
        "landlordTransfer": 23000,
        "landlordTransferType": "charge",
        "tenantDepositGuaranteeNet": 4000,
        "tenantDepositGuarantee": 4760,
        "tenantDepositGuaranteeType": "charge",
        "landlordDepositGuaranteeNet": 3000,
        "landlordDepositGuarantee": 3570,
        "landlordDepositGuaranteeType": "charge",
        "vat": 19.5,
        "currencyCode": "EUR"
      }
    ]
  }
}
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": {
        "adjustments": {
          "type": "array",
          "description": "A list of Adjustments"
        }
      }
    }
  }
}
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"
  ]
}

Calculate Agreement Adjustment

Calculate Agreement Adjustment
POST/pricing/{pricingId}/adjustment-agreement

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/adjustment-agreement
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpayment": 123000,
  "downpaymentType": "charge",
  "landlordTransfer": 23000,
  "landlordTransferType": "charge",
  "landlordFee": 9500,
  "landlordFeeType": "charge",
  "tenantFee": 12300,
  "tenantFeeType": "charge",
  "tenantLosses": 1000,
  "tenantLossesType": "charge",
  "landlordLosses": 3200,
  "landlordLossesType": "charge",
  "tenantPenalty": 2500,
  "tenantPenaltyType": "charge",
  "landlordPenalty": 1400,
  "landlordPenaltyType": "charge",
  "tenantDepositGuarantee": 4760,
  "tenantDepositGuaranteeType": "charge",
  "landlordDepositGuarantee": 3570,
  "landlordDepositGuaranteeType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpayment": {
      "type": "number"
    },
    "downpaymentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordTransferType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFee": {
      "type": "number"
    },
    "landlordFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFee": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantLosses": {
      "type": "number"
    },
    "tenantLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordLosses": {
      "type": "number"
    },
    "landlordLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenalty": {
      "type": "number"
    },
    "tenantPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordPenalty": {
      "type": "number"
    },
    "landlordPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantDepositGuarantee": {
      "type": "number"
    },
    "tenantDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordDepositGuarantee": {
      "type": "number"
    },
    "landlordDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  }
}
Response  201
HideShow
Headers
Location: c5ab6b1d-9cfc-486c-9f7c-28dce58b53ef
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  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"
  ]
}

Calculate Cancellation Adjustment

Calculate Cancellation Adjustment
POST/pricing/{pricingId}/adjustment-cancellation

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/adjustment-cancellation
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpayment": 123000,
  "downpaymentType": "charge",
  "landlordTransfer": 23000,
  "landlordTransferType": "charge",
  "landlordFee": 9500,
  "landlordFeeType": "charge",
  "tenantFee": 12300,
  "tenantFeeType": "charge",
  "tenantLosses": 1000,
  "tenantLossesType": "charge",
  "landlordLosses": 3200,
  "landlordLossesType": "charge",
  "tenantPenalty": 2500,
  "tenantPenaltyType": "charge",
  "landlordPenalty": 1400,
  "landlordPenaltyType": "charge",
  "tenantDepositGuarantee": 4760,
  "tenantDepositGuaranteeType": "charge",
  "landlordDepositGuarantee": 3570,
  "landlordDepositGuaranteeType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpayment": {
      "type": "number"
    },
    "downpaymentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordTransferType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFee": {
      "type": "number"
    },
    "landlordFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFee": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantLosses": {
      "type": "number"
    },
    "tenantLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordLosses": {
      "type": "number"
    },
    "landlordLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenalty": {
      "type": "number"
    },
    "tenantPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordPenalty": {
      "type": "number"
    },
    "landlordPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantDepositGuarantee": {
      "type": "number"
    },
    "tenantDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordDepositGuarantee": {
      "type": "number"
    },
    "landlordDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  }
}
Response  201
HideShow
Headers
Location: c5ab6b1d-9cfc-486c-9f7c-28dce58b53ef
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  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"
  ]
}

Calculate Renegotiation Adjustment

Calculate Renegotiation Adjustment
POST/pricing/{pricingId}/adjustment-renegotiation

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/adjustment-renegotiation
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpayment": 123000,
  "downpaymentType": "charge",
  "landlordTransfer": 23000,
  "landlordTransferType": "charge",
  "landlordFee": 9500,
  "landlordFeeType": "charge",
  "tenantFee": 12300,
  "tenantFeeType": "charge",
  "tenantLosses": 1000,
  "tenantLossesType": "charge",
  "landlordLosses": 3200,
  "landlordLossesType": "charge",
  "tenantPenalty": 2500,
  "tenantPenaltyType": "charge",
  "landlordPenalty": 1400,
  "landlordPenaltyType": "charge",
  "tenantDepositGuarantee": 4760,
  "tenantDepositGuaranteeType": "charge",
  "landlordDepositGuarantee": 3570,
  "landlordDepositGuaranteeType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpayment": {
      "type": "number"
    },
    "downpaymentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordTransferType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFee": {
      "type": "number"
    },
    "landlordFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFee": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantLosses": {
      "type": "number"
    },
    "tenantLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordLosses": {
      "type": "number"
    },
    "landlordLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenalty": {
      "type": "number"
    },
    "tenantPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordPenalty": {
      "type": "number"
    },
    "landlordPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantDepositGuarantee": {
      "type": "number"
    },
    "tenantDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordDepositGuarantee": {
      "type": "number"
    },
    "landlordDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  }
}
Response  201
HideShow
Headers
Location: c5ab6b1d-9cfc-486c-9f7c-28dce58b53ef
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  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"
  ]
}

Calculate Relocation Adjustment

Calculate Relocation Adjustment
POST/pricing/{pricingId}/adjustment-relocation

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/adjustment-relocation
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpayment": 123000,
  "downpaymentType": "charge",
  "landlordTransfer": 23000,
  "landlordTransferType": "charge",
  "landlordFee": 9500,
  "landlordFeeType": "charge",
  "tenantFee": 12300,
  "tenantFeeType": "charge",
  "tenantLosses": 1000,
  "tenantLossesType": "charge",
  "landlordLosses": 3200,
  "landlordLossesType": "charge",
  "tenantPenalty": 2500,
  "tenantPenaltyType": "charge",
  "landlordPenalty": 1400,
  "landlordPenaltyType": "charge",
  "tenantDepositGuarantee": 4760,
  "tenantDepositGuaranteeType": "charge",
  "landlordDepositGuarantee": 3570,
  "landlordDepositGuaranteeType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpayment": {
      "type": "number"
    },
    "downpaymentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordTransferType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFee": {
      "type": "number"
    },
    "landlordFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFee": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantLosses": {
      "type": "number"
    },
    "tenantLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordLosses": {
      "type": "number"
    },
    "landlordLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenalty": {
      "type": "number"
    },
    "tenantPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordPenalty": {
      "type": "number"
    },
    "landlordPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantDepositGuarantee": {
      "type": "number"
    },
    "tenantDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordDepositGuarantee": {
      "type": "number"
    },
    "landlordDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  }
}
Response  201
HideShow
Headers
Location: c5ab6b1d-9cfc-486c-9f7c-28dce58b53ef
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  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"
  ]
}

Calculate New Landlord Conditions Adjustment

Calculate New Landlord Conditions Adjustment
POST/pricing/{pricingId}/adjustment-landlord-conditions

Example URI

POST https://pricing.spotahome.com/api/pricing/pricingId/adjustment-landlord-conditions
URI Parameters
HideShow
pricingId
string (required) 

Id of a Pricing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "downpayment": 123000,
  "downpaymentType": "charge",
  "landlordTransfer": 23000,
  "landlordTransferType": "charge",
  "landlordFee": 9500,
  "landlordFeeType": "charge",
  "tenantFee": 12300,
  "tenantFeeType": "charge",
  "tenantLosses": 1000,
  "tenantLossesType": "charge",
  "landlordLosses": 3200,
  "landlordLossesType": "charge",
  "tenantPenalty": 2500,
  "tenantPenaltyType": "charge",
  "landlordPenalty": 1400,
  "landlordPenaltyType": "charge",
  "tenantDepositGuarantee": 4760,
  "tenantDepositGuaranteeType": "charge",
  "landlordDepositGuarantee": 3570,
  "landlordDepositGuaranteeType": "charge",
  "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "sourceType": "COMPLAINT"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "downpayment": {
      "type": "number"
    },
    "downpaymentType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordTransfer": {
      "type": "number"
    },
    "landlordTransferType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordFee": {
      "type": "number"
    },
    "landlordFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantFee": {
      "type": "number"
    },
    "tenantFeeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantLosses": {
      "type": "number"
    },
    "tenantLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordLosses": {
      "type": "number"
    },
    "landlordLossesType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantPenalty": {
      "type": "number"
    },
    "tenantPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordPenalty": {
      "type": "number"
    },
    "landlordPenaltyType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "tenantDepositGuarantee": {
      "type": "number"
    },
    "tenantDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "landlordDepositGuarantee": {
      "type": "number"
    },
    "landlordDepositGuaranteeType": {
      "type": "string",
      "enum": [
        "charge",
        "refund"
      ]
    },
    "sourceId": {
      "type": "string"
    },
    "sourceType": {
      "type": "string"
    }
  }
}
Response  201
HideShow
Headers
Location: c5ab6b1d-9cfc-486c-9f7c-28dce58b53ef
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  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"
  ]
}

Cities Pricing

City Pricing Collection

Get the list of pricing configuration for all the cities
GET/cities

Example URI

GET https://pricing.spotahome.com/api/cities
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "cities": [
    {
      "id": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "refCode": "madrid",
      "name": "Madrid",
      "countryRefCode": "spain",
      "customerFee": 0.055,
      "capServiceFeeMin": 10000,
      "capServiceFeeMax": 49500,
      "downpaymentMaxCapType": "weekly",
      "downpaymentMaxCapValue": 1,
      "adminFeeMaxCapType": "monthlyPercentage",
      "adminFeeMaxCapValue": 50,
      "securityDepositMaxCapType": "monthlyPercentage",
      "securityDepositMaxCapValue": 2,
      "discounts": []
    },
    {
      "id": "2a2dbe69-b68f-4423-bc93-b8b036727a785",
      "refCode": "barcelona",
      "name": "Barcelona",
      "countryRefCode": "spain",
      "customerFee": 0.055,
      "capServiceFeeMin": 10000,
      "capServiceFeeMax": 49500,
      "downpaymentMaxCapType": "notDefined",
      "downpaymentMaxCapValue": null,
      "discounts": [
        {
          "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
          "conditions": [
            {
              "type": "property",
              "value": "room"
            }
          ],
          "discountValue": 15,
          "discountType": "fixed",
          "fromDate": "2019-05-25",
          "toDate": "2019-08-07"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "cities": {
      "type": "array"
    }
  }
}
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"
  ]
}

City's Pricing

Get pricing configuration for a given city
GET/cities/{cityId}

Example URI

GET https://pricing.spotahome.com/api/cities/hhshs-56gth
URI Parameters
HideShow
cityId
string (required) Example: hhshs-56gth

Id of a City.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "refCode": "madrid",
  "name": "Madrid",
  "countryRefCode": "spain",
  "customerFee": 0.055,
  "capServiceFeeMin": 10000,
  "capServiceFeeMax": 49500,
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "adminFeeMaxCapType": "monthlyPercentage",
  "adminFeeMaxCapValue": 50,
  "securityDepositMaxCapType": "monthlyPercentage",
  "securityDepositMaxCapValue": 2,
  "discounts": [
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "conditions": [
        {
          "type": "property",
          "value": "room"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "refCode": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "countryRefCode": {
      "type": "string"
    },
    "customerFee": {
      "type": "number"
    },
    "capServiceFeeMin": {
      "type": "number"
    },
    "capServiceFeeMax": {
      "type": "number"
    },
    "downpaymentMaxCapType": {
      "type": [
        "string",
        "null"
      ]
    },
    "downpaymentMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "adminFeeMaxCapType": {
      "type": "string",
      "enum": [
        "monthlyPercentage",
        "noAdminFee",
        "notDefined",
        "null"
      ]
    },
    "adminFeeMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "securityDepositMaxCapType": {
      "type": "string",
      "enum": [
        "monthlyPercentage",
        "londonLaw",
        "notDefined",
        "null"
      ]
    },
    "securityDepositMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "discounts": {
      "type": "array"
    }
  }
}
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  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"
  ]
}

Update city's pricing configuration
PUT/cities/{cityId}

Example URI

PUT https://pricing.spotahome.com/api/cities/hhshs-56gth
URI Parameters
HideShow
cityId
string (required) Example: hhshs-56gth

Id of a City.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "customerFee": 0.055,
  "capServiceFeeMin": 10000,
  "capServiceFeeMax": 49500,
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "adminFeeMaxCapType": "monthlyPercentage",
  "adminFeeMaxCapValue": 1,
  "securityDepositMaxCapType": "monthlyPercentage",
  "securityDepositMaxCapValue": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "customerFee": {
      "type": "number"
    },
    "capServiceFeeMin": {
      "type": "number"
    },
    "capServiceFeeMax": {
      "type": "number"
    },
    "downpaymentMaxCapType": {
      "type": "string"
    },
    "downpaymentMaxCapValue": {
      "type": "number"
    },
    "adminFeeMaxCapType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "monthlyPercentage",
        "noAdminFee",
        "notDefined",
        "null",
        null
      ]
    },
    "adminFeeMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "securityDepositMaxCapType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "monthlyPercentage",
        "londonLaw",
        "notDefined",
        "null",
        null
      ]
    },
    "securityDepositMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "customerFee",
    "capServiceFeeMin",
    "capServiceFeeMax",
    "downpaymentMaxCapType",
    "downpaymentMaxCapValue"
  ]
}
Response  204
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  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 City's Configuration by city code

Get city's configuration for a given city code
GET/cities/city/{refCode}

Example URI

GET https://pricing.spotahome.com/api/cities/city/madrid
URI Parameters
HideShow
refCode
string (required) Example: madrid

City code.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
  "refCode": "madrid",
  "name": "Madrid",
  "countryRefCode": "spain",
  "customerFee": 0.055,
  "capServiceFeeMin": 10000,
  "capServiceFeeMax": 49500,
  "downpaymentMaxCapType": "weekly",
  "downpaymentMaxCapValue": 1,
  "adminFeeMaxCapType": "monthlyPercentage",
  "adminFeeMaxCapValue": 50,
  "securityDepositMaxCapType": "monthlyPercentage",
  "securityDepositMaxCapValue": 2,
  "discounts": [
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "conditions": [
        {
          "type": "property",
          "value": "room"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "refCode": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "countryRefCode": {
      "type": "string"
    },
    "customerFee": {
      "type": "number"
    },
    "capServiceFeeMin": {
      "type": "number"
    },
    "capServiceFeeMax": {
      "type": "number"
    },
    "downpaymentMaxCapType": {
      "type": [
        "string",
        "null"
      ]
    },
    "downpaymentMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "adminFeeMaxCapType": {
      "type": "string",
      "enum": [
        "monthlyPercentage",
        "noAdminFee",
        "notDefined",
        "null"
      ]
    },
    "adminFeeMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "securityDepositMaxCapType": {
      "type": "string",
      "enum": [
        "monthlyPercentage",
        "londonLaw",
        "notDefined",
        "null"
      ]
    },
    "securityDepositMaxCapValue": {
      "type": [
        "number",
        "null"
      ]
    },
    "discounts": {
      "type": "array"
    }
  }
}
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  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"
  ]
}

Downpayment Max Cap types

Get the list downpayment's Max Cap types
GET/cities/downpayment-max-cap-types

Return all available types for downpayment max cap

Example URI

GET https://pricing.spotahome.com/api/cities/downpayment-max-cap-types
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    "weekly",
    "notDefined"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "weekly"
          ]
        },
        {
          "type": "string",
          "enum": [
            "notDefined"
          ]
        }
      ]
    }
  },
  "required": [
    "types"
  ]
}
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"
  ]
}

Discount types

Discount types
GET/cities/discount-types{?discountType}

Example URI

GET https://pricing.spotahome.com/api/cities/discount-types?discountType=property
URI Parameters
HideShow
discountType
string (required) Example: property

(string, required)

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "types": [
    "studio",
    "apartment",
    "roomShared",
    "residence"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "types": {
      "type": "array"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/json
Body
{
  "detail": "Unauthorized user",
  "status": 401,
  "title": "Unauthorized",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}

City Discounts

Create Discount
POST/cities/{cityId}/discounts

This endpoint allows users with a specific role to create a discount for a specific city

Example URI

POST https://pricing.spotahome.com/api/cities/hhshs-56gth/discounts
URI Parameters
HideShow
cityId
string (required) Example: hhshs-56gth

Id of a City.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "conditionType": "property",
  "conditionValue": "roomShared",
  "value": 15,
  "fromDate": "2018-02-01",
  "toDate": "2018-07-31"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "conditionType": {
      "type": "string"
    },
    "conditionValue": {
      "type": "string",
      "enum": [
        "roomShared",
        "apartment",
        "studio",
        "residence"
      ]
    },
    "value": {
      "type": "number"
    },
    "fromDate": {
      "type": "string"
    },
    "toDate": {
      "type": "string"
    }
  },
  "required": [
    "conditionType",
    "conditionValue",
    "value"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
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  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"
  ]
}

Get the list of discounts
GET/cities/{cityId}/discounts

Example URI

GET https://pricing.spotahome.com/api/cities/hhshs-56gth/discounts
URI Parameters
HideShow
cityId
string (required) Example: hhshs-56gth

Id of a City.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "discounts": [
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "city": "madrid",
      "conditions": [
        {
          "type": "property",
          "value": "roomShared"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    },
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "city": "madrid",
      "conditions": [
        {
          "type": "property",
          "value": "roomShared"
        },
        {
          "type": "couples",
          "value": "true"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "discounts": {
      "type": "array"
    }
  }
}
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  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"
  ]
}

City Discount

Delete Discount
DELETE/cities/{cityId}/discounts/{discountId}

Example URI

DELETE https://pricing.spotahome.com/api/cities/hhshs-56gth/discounts/ewfewg-235ef
URI Parameters
HideShow
cityId
string (required) Example: hhshs-56gth

Id of a City.

discountId
string (required) Example: ewfewg-235ef

Id of a City discount.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
HideShow
Headers
Content-Type: application/json
Body
{
  "discounts": [
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "city": "madrid",
      "conditions": [
        {
          "type": "property",
          "value": "roomShared"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    },
    {
      "discountId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
      "city": "madrid",
      "conditions": [
        {
          "type": "property",
          "value": "roomShared"
        },
        {
          "type": "couples",
          "value": "true"
        }
      ],
      "discountValue": 15,
      "discountType": "fixed",
      "fromDate": "2019-05-25",
      "toDate": "2019-08-07"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "discounts": {
      "type": "array"
    }
  }
}
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  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"
  ]
}

Minimum Guaranteed Price

Bulk CSV update minimum guaranteed price

Bulk update of the minimum guaranteed prices for listings
PUT/pricing/minimum-guaranteed-price-bulk

Example URI

PUT https://pricing.spotahome.com/api/pricing/minimum-guaranteed-price-bulk
Request
HideShow
Headers
Content-Type: multipart/form-data
Authorization: aa.bb.cc
Body
{
  "file": "it should be a text/csv file"
}
Schema
{
  "type": "object",
  "properties": {
    "file": {
      "type": "string"
    }
  },
  "required": [
    "file"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  204
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  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"
  ]
}

Offers

Get a offers

View offers
GET/offers{?listingId}

This endpoint is used to get offers by different criterias.

Example URI

GET https://pricing.spotahome.com/api/offers?listingId=786271
URI Parameters
HideShow
listingId
string (optional) Example: 786271

Criteria by listingId.

enabled
number (optional) Example: 1

Criteria by enable.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "f777bd33-d835-470d-83d7-463e5230f213",
    "discountType": "fixed",
    "discountValue": 7500,
    "minLengthOfStay": 60,
    "maxLengthOfStay": 120,
    "totalListings": 2
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
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": "Forbidden access",
  "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"
  ]
}

Get a user's offers

View offers
GET/me/offers

This endpoint returns the offers a given user has. User is gotten from the authorization token.

Example URI

GET https://pricing.spotahome.com/api/me/offers
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "f777bd33-d835-470d-83d7-463e5230f213",
    "discountType": "fixed",
    "discountValue": 7500,
    "minLengthOfStay": 60,
    "maxLengthOfStay": 120,
    "totalListings": 2
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
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": "Forbidden access",
  "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"
  ]
}

Create offer
POST/me/offers

This endpoint creates a new offer for a given user. User is gotten from the authorization token.

Example URI

POST https://pricing.spotahome.com/api/me/offers
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "discountType": "percentage",
  "discountValue": 2000,
  "minLengthStay": 30,
  "maxLengthStay": 200
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "discountType": {
      "type": "string",
      "enum": [
        "percentage",
        "fixed"
      ]
    },
    "discountValue": {
      "type": "number"
    },
    "minLengthStay": {
      "type": "number"
    },
    "maxLengthStay": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "discountType",
    "discountValue",
    "minLengthStay",
    "maxLengthStay"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: aaaa-bbbb-cccc-dddd
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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"
  ]
}

Offers by Id

View offer by id
GET/me/offers/{offerId}

This endpoint returns the offer a given user has. User is gotten from the authorization token.

Example URI

GET https://pricing.spotahome.com/api/me/offers/offerId
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "f777bd33-d835-470d-83d7-463e5230f213",
  "discountType": "fixed",
  "discountValue": 7500,
  "minLengthOfStay": 60,
  "maxLengthOfStay": 120,
  "totalListings": 2
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "discountType": {
      "type": "string",
      "enum": [
        "fixed",
        "percentage"
      ]
    },
    "discountValue": {
      "type": "number"
    },
    "minLengthOfStay": {
      "type": "number"
    },
    "maxLengthOfStay": {
      "type": [
        "number",
        "null"
      ]
    },
    "totalListings": {
      "type": "number"
    }
  }
}
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": "Forbidden access",
  "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  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"
  ]
}

Update offer by id
PUT/me/offers/{offerId}

This endpoint updates a user’s offer. User information is extracted from the authorization token.

Example URI

PUT https://pricing.spotahome.com/api/me/offers/offerId
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "discountType": "percentage",
  "discountValue": 2000,
  "minLengthStay": 30,
  "maxLengthStay": 200
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "discountType": {
      "type": "string",
      "enum": [
        "percentage",
        "fixed"
      ]
    },
    "discountValue": {
      "type": "number"
    },
    "minLengthStay": {
      "type": "number"
    },
    "maxLengthStay": {
      "type": [
        "number",
        "null"
      ]
    }
  },
  "required": [
    "discountType",
    "discountValue",
    "minLengthStay",
    "maxLengthStay"
  ]
}
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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": "Forbidden access",
  "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  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"
  ]
}

Delete offer by id
DELETE/me/offers/{offerId}

This endpoint deletes a user’s offer. User information is extracted from the authorization token.

Example URI

DELETE https://pricing.spotahome.com/api/me/offers/offerId
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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": "Forbidden access",
  "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  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"
  ]
}

Attach/Detach listings to an offer

Attach listings
POST/me/offers/{offerId}/listings

This endpoint updates a user’s offer. User information is extracted from the authorization token.

Example URI

POST https://pricing.spotahome.com/api/me/offers/offerId/listings
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "listingIds": [
    "list of listing ids to attach to the offer"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "listingIds": {
      "type": "array"
    }
  },
  "required": [
    "listingIds"
  ]
}
Response  201
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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": "Forbidden access",
  "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  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"
  ]
}

Attach/Detach all listings to an offer

Attach listings
POST/me/offers/{offerId}/listings/all

This endpoint associates all listings to an offer. User information is extracted from the authorization token.

Example URI

POST https://pricing.spotahome.com/api/me/offers/offerId/listings/all
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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": "Forbidden access",
  "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  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"
  ]
}

Update listings in an offer

Detach listing
DELETE/me/offers/{offerId}/listings/{listingId}

This endpoint updates a user’s offer. User information is extracted from the authorization token.

Example URI

DELETE https://pricing.spotahome.com/api/me/offers/offerId/listings/listingId
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

listingId
string (required) 

Id of an listing.

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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": "Forbidden access",
  "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  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"
  ]
}

Disable an offer

Disable offer
PUT/me/offers/{offerId}/disabling

This endpoint disabled an offer.

Example URI

PUT https://pricing.spotahome.com/api/me/offers/offerId/disabling
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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": "Forbidden access",
  "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  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"
  ]
}

Enable an offer

Enable offer
PUT/me/offers/{offerId}/enabling

This endpoint disabled an offer.

Example URI

PUT https://pricing.spotahome.com/api/me/offers/offerId/enabling
URI Parameters
HideShow
offerId
string (required) 

Id of an offer. Must match an UUID’s regular expression

Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Response  204
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": "Forbidden access",
  "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  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"
  ]
}

Suggested prices

Get a suggested prices

View suggested prices
GET/suggested-prices{?userId,listingId,page,itemsPerPage}

This endpoint is used to get suggested prices by different criterias.

Example URI

GET https://pricing.spotahome.com/api/suggested-prices?userId=9983e2e5-711d-4ea8-be42-8b1d7f1ee782&listingId=786271&page=1&itemsPerPage=1
URI Parameters
HideShow
listingId
string (optional) Example: 786271

Criteria by listing id.

userId
string (optional) Example: 9983e2e5-711d-4ea8-be42-8b1d7f1ee782

Criteria by user id.

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/json
Body
[
  {
    "id": "f777bd33-d835-470d-83d7-463e5230f213",
    "discountType": "fixed",
    "discountValue": 7500,
    "minLengthOfStay": 60,
    "maxLengthOfStay": 120,
    "totalListings": 2
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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": "Forbidden access",
  "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"
  ]
}

A user suggests a price for a listing

Create suggest a price for a listing
POST/me/suggested-price

Suggest a price for a listing by the logged user.

Example URI

POST https://pricing.spotahome.com/api/me/suggested-price
Request
HideShow
Headers
Content-Type: application/json
Authorization: aa.bb.cc
Body
{
  "suggestedPrice": 750,
  "listingId": "45678"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "suggestedPrice": {
      "type": "number"
    },
    "listingId": {
      "type": "string"
    }
  },
  "required": [
    "suggestedPrice",
    "listingId"
  ]
}
Response  201
HideShow
Headers
Location: aaaa-bbbb-cccc-dddd
Response  400
HideShow
Headers
Content-Type: application/problem+json
Body
{
  "detail": "The request could not be understood by the server due to malformed syntax",
  "status": 400,
  "title": "Bad Request",
  "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "detail": {
      "type": "string"
    },
    "status": {
      "type": "number"
    },
    "title": {
      "type": "string"
    },
    "type": {
      "type": "string"
    }
  },
  "required": [
    "detail",
    "status",
    "title",
    "type"
  ]
}
Response  401
HideShow
Headers
Content-Type: application/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": "Forbidden access",
  "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  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"
  ]
}

Domain Events

PricingForListingWasCalculated

{
    "_id" : 1,
    "type_name" : "SAH\Pricing\Domain\Events\PricingForListingWasCalculated",
    "occurred_on" : "2018-02-05 16:00:44",
    "event_body" : {
        "id": "d5f931c9-b0f9-4e45-9ca5-9e6ac3112c4b",
        "vat": 21,
        "checkIn": "2019-06-01",
        "revenue": 9659,
        "checkOut": "2019-09-30",
        "listingId": "100641",
        "dailyPrice": 1319,
        "downpayment": 40000,
        "downpaymentWithoutOffer": 40000,
        "currencyCode": "EUR",
        "listingPrice": [
            43000,
            43000,
            43000,
            43000,
            40000,
            40000,
            39000,
            39000,
            43000,
            43000,
            43000,
            43000
        ],
        "monthlyPrice": 40250,
        "monthlyPriceWithoutOffer": 40250,
        "tenantFeeNet": 0,
        "landlordFeeNet": 9659,
        "landlordNoCapFeeNet": 9659,
        "landlordNoCapFeeGross": 11688,
        "landlordFeeOwed": 0,
        "tenantDiscount": 0,
        "tenantFeeGross": 10000,
        "tenantPayments": [
            0,
            39000,
            39000,
            43000
        ],
        "tenantPaymentsWithoutOffer": [
            0,
            39000,
            39000,
            43000
        ],
        "endContractDate": "2019-09-30",
        "securityDeposit": 0,
        "tenantFeeMaxCap": 0,
        "tenantFeeMinCap": 0,
        "landlordFeeGross": 11687,
        "landlordTransfer": 28313,
        "reservationPrice": 40000,
        "tenantCommissionStrategy": "default",
        "tenantCommissionType": "percentage",
        "tenantCommission": 0,
        "startContractDate": "2019-06-01",
        "totalContractValue": 160976,
        "landlordContractType": "daily",
        "securityDepositType": "fixed",
        "securityDepositValue": 0,
        "securityDepositMaxCapType": "monthlyPercentage",
        "securityDepositMaxCapValue": 50,
        "landlordCommissionType": "percentage",
        "landlordCommissionValue": 6,
        "tenantDiscountPercentage": 0,
        "originalTotalContractValue": 160976,
        "adminFee": 123,
        "adminFeeType": "fixed",
        "adminFeeValue": 123,
        "adminFeeMaxCapType": "monthlyPercentage",
        "adminFeeMaxCapValue": 75,
        "downpaymentMaxCapType": "weekly",
        "downpaymentMaxCapValue": 1,
        "downpaymentMonthIndex":0,
        "tenantFeeSplit": [
            250,
            250,
            250,
            250
        ],
        "listingDailyPricing": [
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
            [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100],
        ],
        "offerId": "id",
        "offerDiscountType": "percentage",
        "offerDiscountValue": 20,
        "tenantFeeUplift": 2000,
        "downPaymentStrategy": "downPaymentFirstFullMonthStrategy"
    }
}

PricingWasRenegotiated

{
    "_id" : 1,
    "type_name" : "SAH\Pricing\Domain\Events\PricingWasRenegotiated",
    "occurred_on" : "2018-02-05 16:00:44",
    "event_body" : {
        "id": "060c707a-c8c1-418c-a35e-4a5879f152be",
        "revenue": 9659,
        "metadata": {
            "occurredOn": {
                "date": "2018-12-13 12:48:51.810106",
                "timezone": "UTC",
                "timezone_type": 3
            }
        },
        "sourceId": "eecf4121-b510-4008-8c4e-f61f72c0b891",
        "dailyPrice": 4426,
        "sourceType": "COMPLAINT",
        "downpayment": 40000,
        "listingPrice": [
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000,
            135000
        ],
        "monthlyPrice": 135000,
        "tenantFeeNet": 0,
        "landlordFeeNet": 9659,
        "tenantFeeGross": 0,
        "tenantPayments": [
            0,
            135000,
            135000,
            135000
        ],
        "endContractDate": "2019-09-30",
        "securityDeposit": 50000,
        "landlordFeeGross": 11687,
        "landlordTransfer": 28313,
        "landlordNoCapFeeNet": 9659,
        "landlordNoCapFeeGross": 11687,
        "landlordFeeOwed": 0,
        "reservationPrice": 40000,
        "startContractDate": "2019-06-01",
        "totalContractValue": 540010,
        "securityDepositType": "fixed",
        "securityDepositValue": 50000,
        "adminFee": 123,
        "adminFeeType": "fixed",
        "adminFeeValue": 123,
        "downpaymentMonthIndex": 0,
        "tenantFeeSplit": [
              4800,
              4800
        ]
    }
}
AdjustmentForRelocationWasCalculated
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\AdjustmentForRelocationWasCalculated",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id"               : "649d3dd7-3aaa-43f4-b429-ba9dbef6f16c",
        "sourceId"         : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType"       : "COMPLAINT",
        "pricingId"        : "6372",
        "adjustments"      : {
                "downpayment"           : 345,
                "downpaymentType"       : 345,
                "landlordTransfer"      : 345,
                "landlordTransferType"  : "refund",
                "landlordFeeNet"        : 345,
                "landlordFeeGross"      : "charge",
                "landlordFeeType"       : "refund",
                "tenantFeeNet"          : 345,
                "tenantFeeGross"        : 345,
                "tenantFeeType"         : "refund",
                "tenantLossesNet"       : 345,
                "tenantLosses"          : 345,
                "tenantLossesType"      : "charge",
                "landlordLossesNet"     : 345,
                "landlordLosses"        : 345,
                "landlordLossesType"    : "charge",
                "tenantPenaltyNet"      : 345,
                "tenantPenalty"         : 345,
                "tenantPenaltyType"     : "refund",
                "landlordPenaltyNet"    : 345,
                "landlordPenalty"       : 345,
                "landlordPenaltyType"   : "charge",
                "vat"                   : 21,
                "currencyCode"          : "€",
        },
        "metadata"         : {
            "occurredOn" : {
                "date"          : "2018-02-05 15:34:33.663011",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
AdjustmentForAgreementWasCalculated
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\AdjustmentForAgreementWasCalculated",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id"               : "649d3dd7-3aaa-43f4-b429-ba9dbef6f16c",
        "sourceId"         : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType"       : "COMPLAINT",
        "pricingId"        : "6372",
        "adjustments"      : {
                "downpayment"           : 345,
                "downpaymentType"       : 345,
                "landlordTransfer"      : 345,
                "landlordTransferType"  : "refund",
                "landlordFeeNet"        : 345,
                "landlordFeeGross"      : "charge",
                "landlordFeeType"       : "refund",
                "tenantFeeNet"          : 345,
                "tenantFeeGross"        : 345,
                "tenantFeeType"         : "refund",
                "tenantLossesNet"       : 345,
                "tenantLosses"          : 345,
                "tenantLossesType"      : "charge",
                "landlordLossesNet"     : 345,
                "landlordLosses"        : 345,
                "landlordLossesType"    : "charge",
                "tenantPenaltyNet"      : 345,
                "tenantPenalty"         : 345,
                "tenantPenaltyType"     : "refund",
                "landlordPenaltyNet"    : 345,
                "landlordPenalty"       : 345,
                "landlordPenaltyType"   : "charge",
                "vat"                   : 21,
                "currencyCode"          : "€",
        },
        "metadata"         : {
            "occurredOn" : {
                "date"          : "2018-02-05 15:34:33.663011",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
AdjustmentForNewLandlordConditionsWasCalculated
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\AdjustmentForNewLandlordConditionsWasCalculated",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id"               : "649d3dd7-3aaa-43f4-b429-ba9dbef6f16c",
        "sourceId"         : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType"       : "COMPLAINT",
        "pricingId"        : "6372",
        "adjustments"      : {
                "downpayment"           : 345,
                "downpaymentType"       : 345,
                "landlordTransfer"      : 345,
                "landlordTransferType"  : "refund",
                "landlordFeeNet"        : 345,
                "landlordFeeGross"      : "charge",
                "landlordFeeType"       : "refund",
                "tenantFeeNet"          : 345,
                "tenantFeeGross"        : 345,
                "tenantFeeType"         : "refund",
                "tenantLossesNet"       : 345,
                "tenantLosses"          : 345,
                "tenantLossesType"      : "charge",
                "landlordLossesNet"     : 345,
                "landlordLosses"        : 345,
                "landlordLossesType"    : "charge",
                "tenantPenaltyNet"      : 345,
                "tenantPenalty"         : 345,
                "tenantPenaltyType"     : "refund",
                "landlordPenaltyNet"    : 345,
                "landlordPenalty"       : 345,
                "landlordPenaltyType"   : "charge",
                "vat"                   : 21,
                "currencyCode"          : "€",
        },
        "metadata"         : {
            "occurredOn" : {
                "date"          : "2018-02-05 15:34:33.663011",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
AdjustmentForCancellationWasCalculated
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\AdjustmentForCancellationWasCalculated",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id"               : "649d3dd7-3aaa-43f4-b429-ba9dbef6f16c",
        "sourceId"         : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType"       : "COMPLAINT",
        "pricingId"        : "6372",
        "adjustments"      : {
                "downpayment"           : 345,
                "downpaymentType"       : 345,
                "landlordTransfer"      : 345,
                "landlordTransferType"  : "refund",
                "landlordFeeNet"        : 345,
                "landlordFeeGross"      : "charge",
                "landlordFeeType"       : "refund",
                "tenantFeeNet"          : 345,
                "tenantFeeGross"        : 345,
                "tenantFeeType"         : "refund",
                "tenantLossesNet"       : 345,
                "tenantLosses"          : 345,
                "tenantLossesType"      : "charge",
                "landlordLossesNet"     : 345,
                "landlordLosses"        : 345,
                "landlordLossesType"    : "charge",
                "tenantPenaltyNet"      : 345,
                "tenantPenalty"         : 345,
                "tenantPenaltyType"     : "refund",
                "landlordPenaltyNet"    : 345,
                "landlordPenalty"       : 345,
                "landlordPenaltyType"   : "charge",
                "vat"                   : 21,
                "currencyCode"          : "€",
        },
        "metadata"         : {
            "occurredOn" : {
                "date"          : "2018-02-05 15:34:33.663011",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
AdjustmentForRenegotiationWasCalculated
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\AdjustmentForRenegotiationWasCalculated",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id"               : "649d3dd7-3aaa-43f4-b429-ba9dbef6f16c",
        "sourceId"         : "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType"       : "COMPLAINT",
        "pricingId"        : "6372",
        "adjustments"      : {
                "downpayment"           : 345,
                "downpaymentType"       : 345,
                "landlordTransfer"      : 345,
                "landlordTransferType"  : "refund",
                "landlordFeeNet"        : 345,
                "landlordFeeGross"      : "charge",
                "landlordFeeType"       : "refund",
                "tenantFeeNet"          : 345,
                "tenantFeeGross"        : 345,
                "tenantFeeType"         : "refund",
                "tenantLossesNet"       : 345,
                "tenantLosses"          : 345,
                "tenantLossesType"      : "charge",
                "landlordLossesNet"     : 345,
                "landlordLosses"        : 345,
                "landlordLossesType"    : "charge",
                "tenantPenaltyNet"      : 345,
                "tenantPenalty"         : 345,
                "tenantPenaltyType"     : "refund",
                "landlordPenaltyNet"    : 345,
                "landlordPenalty"       : 345,
                "landlordPenaltyType"   : "charge",
                "vat"                   : 21,
                "currencyCode"          : "€",
        },
        "metadata"         : {
            "occurredOn" : {
                "date"          : "2018-02-05 15:34:33.663011",
                "timezone"      : "UTC",
                "timezone_type" : 3
            }
        }
    }
}
PricingWasClosedForASourceType
{
    "_id"         : 1,
    "type_name"   : "SAH\Pricing\Domain\Events\PricingWasClosedForASourceType",
    "occurred_on" : "2018-02-05 15:34:33",
    "event_body"  : {
        "id": "fd945e4d-80b7-4316-8c98-57b8762c79ba",
        "sourceId": "8f2dbe69-b68f-4423-bc93-b8b036727a032",
        "sourceType": "BOOKING",
        "metadata": {
            "occurredOn": {
                "date": "2018-05-30 11:22:50.780300",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
CityDiscountWasApplied
{
    "id" : 1,
    "type_name": "Sah\Pricing\Domain\Events\CityDiscountWasApplied",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "02904801-7c0c-46cb-8769-efea9132dead",
        "discountId": "428fd748-f673-4f44-a8e3-1c39bd3a41e6",
        "tenantFeeNet": 25000,
        "tenantFeeGross": 30000,
        "reservationPrice": 215000,
        "tenantFeeDiscount": 7496,
        "discountPercentage": 20.0,
        "tenantFeeNetOriginal": 31250,
        "tenantFeeGrossOriginal": 37500,
        "tenantFeeSplit": [
              25000,
              25000
        ]
        "metadata": {
            "occurredOn": {
                "date": "2018-05-30 11:22:50.780300",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
PromoWasApplied
{
    "id" : 1,
    "type_name": "Sah\Pricing\Domain\Events\PromoWasApplied",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "02904801-7c0c-46cb-8769-efea9132dead",
        "promoCode": "DOUBLEBOOKING",
        "tenantFeeNet": 24793,
        "tenantFeeGross": 30000,
        "reservationPrice": 158800,
        "discountAmount": 29948,
        "percentageDiscount": 50,
        "expirationDate": "2020-12-31",
        "reservationPrice": 37500,
        "revenue": 27368,
        "tenantFeeSplit": [
              15000,
              15000
        ]
        "metadata": {
            "occurredOn": {
                "date": "2018-05-30 11:22:50.780300",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
LandlordCommissionWasChanged
{
    "_id" : 1,
    "type_name" : "SAH\Pricing\Domain\Events\LandlordCommissionWasChanged",
    "occurred_on" : "2018-02-05 16:00:44",
    "event_body" : {
        "id": "d5f931c9-b0f9-4e45-9ca5-9e6ac3112c4b",
        "revenue": 9659,
        "landlordFeeNet": 9659,
        "landlordFeeGross": 11687,
        "landlordNoCapFeeNet": 9659,
        "landlordNoCapFeeGross": 11688,
        "landlordFeeOwed": 0,
        "landlordTransfer": 28313,
        "commission": 6,
        "sourceType": "type",
        "sourceId": "id",
        "metadata": {
            "occurredOn": {
                "date": "2018-05-30 11:22:50.780300",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
PricingAdjustmentsWereApplied
{
    "_id" : 1,
    "type_name" : "SAH\Pricing\Domain\Events\LandlordCommissionWasChanged",
    "occurred_on" : "2018-02-05 16:00:44",
    "event_body" : {
        "id" : "4d74d16e-7952-4883-b2cd-4447c77b3918",
        "downpayment" : 255333,
        "downpaymentAdjustment" : 112200,
        "downpaymentAdjustmentType" : "charge",
        "landlordFeeAdjustment" : 19547,
        "landlordFeeAdjustmentType" : "refund",
        "landlordFeeGross" : 16268,
        "landlordFeeNet" : 13445,
        "landlordTransfer" : 271601,
        "reservationPrice" : 287510,
        "revenue" : 13148,
        "sourceId" : "ce801ec0-2583-4984-bed2-3ca916099991",
        "sourceType" : "COMPLAINT",
        "tenantFeeAdjustment" : 21477,
        "tenantFeeAdjustmentType" : "charge",
        "tenantFeeGross" : 32177,
        "tenantFeeNet" : 26593,
        "tenantPenaltyAdjustment" : 7633,
        "tenantPenaltyAdjustmentType" : "charge",
        "landlordNoCapFeeNet": 9659,
        "landlordNoCapFeeGross": 11688,
        "landlordFeeOwed": 0,
        "metadata" : {
            "occurredOn" : {
                "date" : "2018-03-27 10:55:48.139980",
                "timezone" : "UTC",
                "timezone_type" : 3
            }
        },
    }
}
ListingWasCreated
{
    "_id" : 1,
    "type_name": "SAH\Pricing\Domain\Listing\Events\ListingWasCreated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "metadata": {
            "occurredOn": {
                "date": "2018-05-18 14:34:14.216743",
                "timezone": "UTC",
                "timezone_type": 3
            }
        },
        "listingId": "99912",
        "securityDepositType": "percentage",
        "securityDepositValue": 100,
        "adminFeeType": "fixed",
        "adminFeeValue": 123,
        "tenantFeeType": "fixed",
        "tenantFeeValue": 123,
        "contractDurationTypesAllowed": ["temporal"]
    }
}
ListingWasUpdated
{
    "_id" : 1,
    "type_name": "SAH\Pricing\Domain\Listing\Events\ListingWasUpdated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "metadata": {
            "occurredOn": {
                "date": "2018-05-18 14:34:14.216743",
                "timezone": "UTC",
                "timezone_type": 3
            }
        },
        "listingId": "99912",
        "securityDepositType": "percentage",
        "securityDepositValue": 100,
        "adminFeeType": "fixed",
        "adminFeeValue": 123,
        "tenantFeeType": "fixed",
        "tenantFeeValue": 123
        "contractDurationTypesAllowed": ["permanent"]
    }
}
ListingCostsWereChanged
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Listing\Events\ListingCostsWereChanged",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body": {
        "id": "627381",
        "costs": [
            {
                "key": "petFee",
                "value": {
                    "amount": 10000
                },
                "applyOn": null,
                "enabled": true,
                "frequency": null,
                "requestedOn": null,
                "applyPayment": null,
                "paymentMethod": null
            },
            {
                "key": "custom",
                "value": {
                    "id": "f426fa1d-5efa-4faf-8724-5b598a952e6c",
                    "name": "Cat Fee",
                    "amount": 5000,
                    "description": null
                },
                "applyOn": "tcvPercentage",
                "enabled": true,
                "frequency": "biMonthly",
                "requestedOn": "signingContract",
                "applyPayment": "underCertainConditions",
                "paymentMethod": "payThroughSpotahome"
            }
        ],
        "metadata": {
            "occurredOn": {
                "date": "2025-08-19 12:59:05.286734",
                "timezone": "+00:00",
                "timezone_type": 1
            }
        }
    }
}
CityDiscountWasCreated
{
    "id" : 1,
    "type_name": "SAH\Pricing\Domain\City\Events\CityDiscountWasCreated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": 1,
        "cityId": "02904801-7c0c-46cb-8769-efea9132dead",
        "discountConditions": [
            {
                "id": "cond-id"
                "type": "propertyType",
                "value": "room"
            }
        ],
        "discountValue": 100,
        "discountValueType": "fixed",
        "dateStart": "2019-06-01",
        "dateEnd": "2019-08-01",
        "metadata": {
            "userId": "02904801-7c0c-46cb-8769-efea9132dead",
            "occurredOn": {
                "date": "2018-05-18 14:34:14.216743",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
CityDiscountWasDeleted
{
    "id" : 1,
    "type_name": "SAH\Pricing\Domain\City\Events\CityDiscountWasDeleted",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "02904801-7c0c-46cb-8769-efea9132dead",
        "metadata": {
            "userId": "02904801-7c0c-46cb-8769-efea9132dead",
            "occurredOn": {
                "date": "2018-05-30 11:22:50.780300",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
CityPricingWasUpdated
{
    "id" : 1,
    "type_name": "SAH\Pricing\Domain\City\CityPricingWasUpdated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "02904801-7c0c-46cb-8769-efea9132dead",
        "cityId": "02904801-7c0c-46cb-8769-efea9132dead",
        "city": "madrid",
        "countryRefCode": "spain",
        "customerFee": "0.07",
        "capServiceFeeMin": "0",
        "capServiceFeeMax": "5",
        "downpaymentMaxCapType": "week",
        "downpaymentMaxCapValue": "1",
        "metadata": {
            "userId": "02904801-7c0c-46cb-8769-efea9132dead",
            "occurredOn": {
                "date": "2018-05-18 14:34:14.216743",
                "timezone": "UTC",
                "timezone_type": 3
            }
        }
    }
}
CityPricingWasCreated
{
    "id" : 1,
    "type_name": "Sah\Pricing\Domain\City\CityPricingWasCreated",
    "occurred_on": "2021-04-14 15:12:24",
    "event_body":
    {
        {
          "id": "13e46be9-06f4-4f4b-8ef8-ecc2455fe4bb",
          "userId": "a6cc4c6f-b89b-4d8b-bdfe-1f66c3c66518",
          "metadata": {
            "executedBy": "a6cc4c6f-b89b-4d8b-bdfe-1f66c3c66518",
            "occurredOn": {
              "date": "2021-04-14 15:12:24.569628",
              "timezone": "+00:00",
              "timezone_type": 1
            }
          },
          "cityRefCode": "seville",
          "customerFee": 0.09,
          "countryRefCode": "spain",
          "capServiceFeeMax": 36300,
          "capServiceFeeMin": 9900,
          "adminFeeMaxCapType": "notDefined",
          "adminFeeMaxCapValue": null,
          "downpaymentMaxCapType": "notDefined",
          "downpaymentMaxCapValue": null,
          "securityDepositMaxCapType": "notDefined",
          "securityDepositMaxCapValue": null
        }
    }
}
OfferWasCreated
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\OfferWasCreated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "landlordId": "31ab7b5d-a9ee-4520-84e2-4fca64d6b3c2",
        "discountType": "percentage",
        "discountValue": 10,
        "minLengthStay": 30,
        "maxLengthStay": 120,
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
OfferWasUpdated
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\OfferWasUpdated",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "landlordId": "31ab7b5d-a9ee-4520-84e2-4fca64d6b3c2",
        "discountType": "percentage",
        "discountValue": 10,
        "minLengthStay": 30,
        "maxLengthStay": 120,
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
OfferWasDeleted
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\OfferWasDeleted",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
OfferWasDisabled
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\OfferWasDisabled",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
OfferWasEnabled
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\OfferWasEnabled",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "id": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
ListingWasAttachedToOffer
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\ListingWasAttachedToOffer",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "offerId": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "listingId": "31ab7b5d-a9ee-4520-84e2-4fca64d6b3c2",
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}
ListingWasDetachedFromOffer
{
    "_id" : 1,
    "type_name": "Sah\Pricing\Domain\Offer\Events\ListingWasDetachedFromOffer",
    "occurred_on": "2018-08-02T16:09:54.000Z",
    "event_body":
    {
        "offerId": "eebd65ec-5825-414d-8a62-7e84d737bc1d",
        "listingId": "31ab7b5d-a9ee-4520-84e2-4fca64d6b3c2",
        "occurredOn" : {
            "date" : "2020-06-02 08:52:48.526072",
            "timezone" : "UTC",
            "timezone_type" : 3
        }
    }
}

Generated by aglio on 04 Dec 2025