If any part of an order request doesn't pass validation the order will not be created and a 400 code error response will be returned. In addition, a list of validation errors will be included in the body. Each error list item includes two properties: an attribute and message. The attribute specifies which part of the order request body did not pass validation, and the message indicates what was wrong with the specified attribute that caused the order request to fail validation.
{
"code": 400,
"status": "validation-error",
"errors": [
{
"attr": "external_property_id",
"message": "missing"
},
{
"attr": "billing_entity_slug",
"message": "unrecognized"
}
]
}
Validation Error Definitions
Attribute | Message | Description |
---|---|---|
api_key | missing | An api_key was not defined. |
api_key | unauthorized | Not an authorized api_key. Must be a valid api_key. |
external_property_id | missing | An external_property_id was not defined. |
external_property_id | empty | The external_property_id was set to an empty string. Cannot be an empty string. |
billing_entity_slug | missing | A billing_entity_slug was not defined. |
billing_entity_slug | unauthorized | Not an authorized billing_entity_slug. Must be a valid billing_entity_slug that is associated with the api_key. |
property{} | missing | A property object was not defined. |
property.location{} | missing | A property.location object was not defined. |
property.location.street | missing | A property.location.street was not defined. |
property.location.street | empty | The property.location.street was set to an empty. Cannot be an empty string. |
property.location.city | missing | A property.location.city was not defined. |
property.location.city | empty | The property.location.city was set to an empty string. Cannot be an empty string. |
property.location.state | missing | A property.location.state was not defined. |
property.location.state | unrecognized | Not a valid property.location.state. Must be a valid two-letter US state abbreviation. |
property.location.postal_code | missing | A property.location.postal_code was not defined. |
property.location.postal_code | unrecognized | Not a valid property.location.postal_code. Must be a valid five-digit US zip code. |
property.property_type | missing | A property.property_type was not defined. |
property.property_type | unrecognized | Not a valid property.property_type. Must be a valid property type supported by PlanOmatic. |
services[] | missing | A services[] array was not defined. |
services[] | empty | The services[] array was set to an empty array. A minimum of one service list item is required. |
services[].slug | missing | A services[].slug was not defined for at least one service list item. |
services[].slug | unrecognized | At least one service list item has an invalid services[].slug. Must be a valid slug corresponding to a service provided by PlanOmatic. |
services[].slug | duplicate | Two or more service list items have the same services[].slug. Duplicate services are not accepted. |
services[].slug | invalid | Incompatible services ordered together. Certain services cannot be ordered together. Contact your CSM for more info. |
services[].quantity | missing | A services[].slug was not defined for at least one service list item. |
services[].quantity | invalid | At least one service list item has an invalid services[].quantity. Must be a valid quantity corresponding to the service_slug. |
property_access{} | missing | A property_access{} was not defined. |
property_access.vacant | missing | A property_access.vacant was not defined. |
property_access.vacant | unrecognized | The property_access.vacant was not a boolean value (true or false). |
property_access.method_of_access | missing | A property_access.method_of_access was not defined. |
property_access.method_of_access | unrecognized | Not a valid property_access.method_of_access. Must be a valid method of access supported by PlanOmatic. |
property_access.access_code | missing | The property_access.method_of_access was set to "lockbox_code" or "keypad" and a property_access.access_code was not defined. A property_access.access_code is required when the property_access.method_of_access is set to "lockbox_code" or "keypad" |
property_access.access_code | empty | The property_access.method_of_access was set to "lockbox_code" or "keypad" and the property_access.access_code was set to an empty string. Cannot be an empty string when the property_access.method_of_access is set to "lockbox_code" or "keypad". |
property_access.lockbox_location | missing | The property_access.method_of_access was set to "lockbox_code" or "keypad" and a property_access.lockbox_location was not defined. Required when the property_access.method_of_access is set to "lockbox_code" or "keypad" |
property_access.lockbox_location | empty | The property_access.method_of_access was set to "lockbox_code" or "keypad" and the property_access.lockbox_location was set to an empty string. Cannot be an empty string when the property_access.method_of_access is set to "lockbox_code" or "keypad". |
property_access.preferred_date | unrecognized | The property_access.preferred_date was not formatted properly. Must be YYYY-MM-DD. |
property_access.preferred_date | invalid | The property_access.preferred_date was too soon. Must be at least one day in the future. |
property_access.onsite_contact_name | missing | A property_access.onsite_contact_name was not defined. |
property_access.onsite_contact_name | empty | The property_access.onsite_contact_name was set to an empty string. Cannot be an empty string. |
property_access.onsite_contact_phone | missing | A property_access.onsite_contact_phone was not defined. |
property_access.onsite_contact_phone | invalid | The property_access.onsite_contact_phone was not a valid phone number. Must be a valid US phone number with 10-11 digits. |