Add/Edit
RESO Web API Add/Edit is used to create, update, or delete records.
Supported Resources
- Property
Create Draft
To create a draft of a new record, send a POST request to the resource endpoint with the record data in the request body. The response will contain the new record.
Request
POST /odata/Property
Content-Type: application/json
Authorization: Bearer your-access-token-goes-here
{
"ListAgentKey": "123456",
"ListOfficeKey": "7890",
"PropertyType": "Residential",
"StreetNumber": "123",
"StreetName": "Main St",
"City": "Springfield"
}
- Note: The
ListAgentKey
andListOfficeKey
values are required, and must be valid keys from theMember
resource. - PropertyType, StreetNumber, StreetName, and City are required fields.
Response
{
"@odata.context": "$metadata#Property",
"City": "Springfield",
"ContractStatus": "Draft",
"ListAgentKey": "123456",
"ListingKey": "Draft654321",
"ListOfficeKey": "7890",
"MlsStatus": "Draft",
"ModificationTimestamp": "2024-10-09T19:34:45Z",
"OriginatingSystemName": "Example",
"PropertyType": "Residential",
"StandardStatus": "Incomplete",
"StreetName": "Main St",
"StreetNumber": "123"
}
Update Draft
To update an existing draft, send a PATCH request to the resource endpoint with the record key and the updated data in the request body.
PATCH /odata/Property('654321')
Content-Type: application/json
Authorization: Bearer your-access-token-goes-here
{
"ListPrice": 110000,
"ChangedByMemberKey": "123456"
}
- Note: The
ChangedByMemberKey
value is required and must be a valid key from theMember
resource.
Update Draft to Active
To publish a draft, send a PATCH request to the resource endpoint with the record key.
PATCH /odata/Property('654321')
Content-Type: application/json
Authorization: Bearer your-access-token-goes-here
{
"StandardStatus": "Active",
"ChangedByMemberKey": "123456"
}
- Note: The
ChangedByMemberKey
value is required and must be a valid key from theMember
resource.
Update Active
To update an existing record, send a PATCH request to the resource endpoint with the record key and the updated data in the request body.
PATCH /odata/Property('654321')
Content-Type: application/json
Authorization: Bearer your-access-token-goes-here
{
"StandardStatus": "Sold",
"SoldPrice": 110000,
"ChangedByMemberKey": "123456"
}
- Note: The
ChangedByMemberKey
value is required and must be a valid key from theMember
resource.
Delete
To delete a record, send a DELETE request to the resource endpoint with the record ID.
DELETE /odata/Property('654321')
Error Response
OData "4.01" specification defines the structure of an error response body:
The representation of an error response body is format-specific. It consists at least of the following information:
· code: required non-null, non-empty, language-independent string. Its value is a service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
· message: required non-null, non-empty, language-dependent, human-readable string describing the error. The Content-Language header MUST contain the language code from [RFC5646] corresponding to the language in which the value for message is written.
· target: optional nullable, potentially empty string indicating the target of the error, for example, the name of the property in error.
· details: optional, potentially empty collection of structured instances with code, message, and target following the rules above.
· innererror: optional structured instance with service-defined content.
Service implementations SHOULD carefully consider which information to include in production environments to guard against potential security concerns around information disclosure.
Example Error Response
HTTP/1.1 400 Bad Request
{
"error": {
"code": "1111",
"message": "Property not saved due to bad data..",
"details": [
{
"code": "1105",
"message": "Value [foobar] is not valid for the field [Standard Status]. Field name [StandardStatus].",
"target": "StandardStatus"
}
]
}
}