> ## Documentation Index
> Fetch the complete documentation index at: https://easybroker-staging.readme.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a property integration

Updates the property integration status on EasyBroker for a given property to sync with the listing status on your website.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "1.0",
    "title": "App Integration API",
    "description": "API for EasyBroker's partners. To get started click the Authorize button below and enter your API key."
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.stagingeb.com/v1/integration_partners",
      "description": "API URL"
    }
  ],
  "paths": {
    "/properties/{property_id}/property_integration": {
      "parameters": [
        {
          "$ref": "#/components/parameters/country_code"
        },
        {
          "name": "property_id",
          "in": "path",
          "required": true,
          "description": "The EasyBroker property id related to the listing on your website",
          "schema": {
            "type": "string"
          }
        }
      ],
      "patch": {
        "tags": [
          "Property Integration"
        ],
        "summary": "Update a property integration",
        "description": "Updates the property integration status on EasyBroker for a given property to sync with the listing status on your website.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PropertyIntegrationBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The property integration status was successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "successful"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedError"
          },
          "404": {
            "description": "A property linked to your website with the given property id could not be found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "example": {
                        "property_integrations": [
                          "a property linked to your website with the given property id could not be found"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "The property integration status couldn't be updated because at least any param is missing or invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "object",
                      "example": {
                        "property_id": [
                          "can't be blank"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "responses": {
      "UnauthorizedError": {
        "description": "API key is missing or invalid, or a restricted country was selected",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "error": {
                  "type": "string",
                  "example": "Your API key is invalid."
                }
              }
            }
          }
        }
      }
    },
    "parameters": {
      "country_code": {
        "name": "Country-Code",
        "in": "header",
        "required": true,
        "description": "This header is mandatory and will be used to filter the resources",
        "schema": {
          "type": "string",
          "enum": [
            "MX",
            "CL",
            "DO",
            "GT",
            "AR",
            "BR",
            "CO",
            "UY",
            "AF",
            "AL",
            "DZ",
            "AS",
            "AD",
            "AO",
            "AI",
            "AG",
            "AM",
            "AW",
            "AU",
            "AT",
            "AZ",
            "BS",
            "BH",
            "BD",
            "BB",
            "BY",
            "BE",
            "BZ",
            "BJ",
            "BM",
            "BT",
            "BO",
            "BA",
            "BW",
            "BV",
            "IO",
            "VG",
            "BN",
            "BG",
            "BF",
            "BI",
            "KH",
            "CM",
            "CA",
            "CV",
            "KY",
            "CF",
            "TD",
            "CN",
            "CX",
            "CC",
            "KM",
            "CD",
            "CG",
            "CK",
            "CR",
            "CI",
            "CU",
            "CY",
            "CZ",
            "DK",
            "DJ",
            "DM",
            "EC",
            "EG",
            "SV",
            "GQ",
            "ER",
            "EE",
            "ET",
            "FO",
            "FK",
            "FJ",
            "FI",
            "FR",
            "GF",
            "PF",
            "TF",
            "GA",
            "GM",
            "GE",
            "DE",
            "GH",
            "GI",
            "GR",
            "GL",
            "GD",
            "GP",
            "GU",
            "GN",
            "GW",
            "GY",
            "HT",
            "HM",
            "VA",
            "HN",
            "HK",
            "HR",
            "HU",
            "IS",
            "IN",
            "ID",
            "IR",
            "IQ",
            "IE",
            "IL",
            "IT",
            "JM",
            "JP",
            "JO",
            "KZ",
            "KE",
            "KI",
            "KP",
            "KR",
            "KW",
            "KG",
            "LA",
            "LV",
            "LB",
            "LS",
            "LR",
            "LY",
            "LI",
            "LT",
            "LU",
            "MO",
            "MK",
            "MG",
            "MW",
            "MY",
            "MV",
            "ML",
            "MT",
            "MH",
            "MQ",
            "MR",
            "MU",
            "YT",
            "FM",
            "MD",
            "MC",
            "MN",
            "ME",
            "MS",
            "MA",
            "MZ",
            "MM",
            "NA",
            "NR",
            "NP",
            "NL",
            "AN",
            "NC",
            "NZ",
            "NI",
            "NE",
            "NG",
            "NU",
            "NF",
            "MP",
            "NO",
            "OM",
            "PK",
            "PW",
            "PS",
            "PA",
            "PG",
            "PY",
            "PE",
            "PH",
            "PN",
            "PL",
            "PT",
            "PR",
            "QA",
            "RE",
            "RO",
            "RU",
            "RW",
            "WS",
            "SM",
            "ST",
            "SA",
            "SN",
            "RS",
            "SC",
            "SL",
            "SG",
            "SK",
            "SI",
            "SB",
            "SO",
            "ZA",
            "ES",
            "LK",
            "SH",
            "KN",
            "LC",
            "PM",
            "VC",
            "SD",
            "SR",
            "SJ",
            "SZ",
            "SE",
            "CH",
            "SY",
            "TW",
            "TJ",
            "TZ",
            "TH",
            "TL",
            "TG",
            "TK",
            "TO",
            "TT",
            "TN",
            "TR",
            "TM",
            "TC",
            "TV",
            "VI",
            "UG",
            "UA",
            "AE",
            "GB",
            "UM",
            "US",
            "UZ",
            "VU",
            "VE",
            "VN",
            "WF",
            "EH",
            "YE",
            "ZM",
            "ZW"
          ],
          "example": "MX"
        }
      }
    },
    "schemas": {
      "PropertyIntegrationBody": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "successful",
              "failed"
            ],
            "example": "successful",
            "description": "The status of the listing on your website. Pending if the listing is being processed. Successful if published/updated without errors. Failed if it could not be published/updated"
          },
          "listing_url": {
            "type": "string",
            "example": "https://www.yourwebsite.com/EB-XXXX01",
            "description": "Required if the status is successful. The listing url on your website."
          },
          "error_message": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "The property has an invalid currency",
              "The property is missing required fields"
            ],
            "description": "Required if the status is failed. An array of error messages explaining the reasons preventing the listing from being published/updated."
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Authorization",
        "description": "Keys for this API are only available for our partners."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 99,
      "1": 137,
      "2": 61,
      "3": 110,
      "4": 171,
      "5": 138,
      "6": 160,
      "7": 0,
      "8": 29,
      "9": 31,
      "10": 125,
      "11": 97
    }
  }
}
```