Create or update a site

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://developers.praxedo.com/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "public-rest-apis MCP server": {
    "url": "https://developers.praxedo.com/mcp"
  }
}

Close
PUT /eTech/rest/ws/referentials/v1/sites/code:{siteCode}

Creates a new site if the siteCode provided does not exist, else updates the existing site.

Rate limit range : Standard

Path parameters

  • siteCode string Required

    Requested site code, case insensitive.

application/json

Body Required

  • name string Required

    Site name.

    Minimum length is 1, maximum length is 10000.

  • customerCode string Required

    Related customer code. Case insensitive.

    Minimum length is 1, maximum length is 10000.

  • parentSiteCode string | null

    Parent site code if any. Case insensitive.

    Maximum length is 10000.

  • officeCode string Required

    Site office code. Case insensitive.

    Minimum length is 1, maximum length is 10000.

  • contact object | null

    Site contacts.

    Hide contact attributes Show contact attributes object | null
    • name string

      Customer contact name.

      Maximum length is 10000.

    • details array[object]

      Array of contact details.

      At least 0 but not more than 15 elements.

      Hide details attributes Show details attributes object

      Contact detail of the customer.

      • type string

        Contact detail type.

        Values are Mobile, Fax, Email, or Phone. Default value is Phone.

      • description string | null

        Description of the contact detail.

        Maximum length is 200.

      • value string Required

        Value of the contact.

        Maximum length is 100.

  • location object Required

    Location details of the site.

    Hide location attributes Show location attributes object
    • geolocation object | null
      Hide geolocation attributes Show geolocation attributes object | null
      • latitude number(double)

        Latitude of the site's coordinates. If the latitude property is set, the longitude property needs to be also set. After 16 decimal places, the accuracy of the latitude will be truncated.

      • longitude number(double)

        Longitude of the site's coordinates. If the longitude property is set, the latitude property needs to be also set. After 16 decimal places, the accuracy of the longitude will be truncated.

    • addressDetails object Required

      Site address details.

      Hide addressDetails attributes Show addressDetails attributes object
      • address string Required

        Maximum length is 10000.

      • zipCode string | null

        Maximum length is 20.

      • city string Required

        Minimum length is 1, maximum length is 256.

      • country string | null

        If filled in, it should be a valid ISO 3166-1 Alpha-2 country code

        Minimum length is 2, maximum length is 2. Format should match the following pattern: ^[A-Z]{2}$.

  • description string | null

    Site description if any.

    Maximum length is 8192.

  • customFields object

    Map of custom fields of a site.

Responses

  • 201 application/json

    Site created.

  • 204 application/json

    Site updated.

  • 400 application/json

    Bad Request - validation errors

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 401 application/json

    Unauthorized - authentication issue.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 403 application/json

    Forbidden - not enough rights.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 429 application/json

    Too Many Requests.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

  • 500 application/json

    Internal server error.

    Hide response attributes Show response attributes object
    • errors array[object]

      Array of errors. Contains at least one element.

      Hide errors attributes Show errors attributes object

      Contains code and message for error.

      • code string Required
      • message string Required
    • errorReference string Required

      Error unique reference. Communicated to support, this will help to locate the issue.

      Format should match the following pattern: [0-1a-z].

PUT /eTech/rest/ws/referentials/v1/sites/code:{siteCode}
curl \
 --request PUT 'https://ws-eu1.praxedo.com/eTech/rest/ws/referentials/v1/sites/code:site-123456' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "name": "New Site",
  "customerCode": "CUSTOMER01",
  "location": {
    "addressDetails": {
      "address": "28 Rue de Mogador",
      "zipCode": "75009",
      "city": "Paris",
      "country": "FR"
    },
    "geolocation": {
      "latitude": 48.8567,
      "longitude": 2.3508
    }
  },
  "contact": {
    "name": "Jane Doe",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+7234567890"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "john.doe@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": 987654321
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "New Site Description",
  "officeCode": "ac81fde",
  "customFields": {
    "textCustomFieldCode": {
      "textValue": "I am a text field"
    },
    "checkBoxCustomFieldCode": {
      "booleanValue": true
    },
    "dateCustomFieldCode": {
      "dateValue": "2024-12-25"
    },
    "dateTimeCustomFieldCode": {
      "dateTimeValue": "2024-12-25T12:15"
    },
    "timeCustomFieldCode": {
      "timeValue": 44100
    },
    "dropDownCustomFieldCode": {
      "dropDownValue": "I am a drop down text"
    },
    "urlCustomFieldCode": {
      "urlValue": "https://www.praxedo.fr/"
    },
    "gpsCustomFieldCode": {
      "gpsValue": {
        "longitude": 48.8567,
        "latitude": 2.3508
      }
    }
  }
}'
Request examples
{
  "name": "New Site",
  "customerCode": "CUSTOMER01",
  "location": {
    "addressDetails": {
      "address": "28 Rue de Mogador",
      "zipCode": "75009",
      "city": "Paris",
      "country": "FR"
    },
    "geolocation": {
      "latitude": 48.8567,
      "longitude": 2.3508
    }
  },
  "contact": {
    "name": "Jane Doe",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+7234567890"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "john.doe@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": 987654321
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "New Site Description",
  "officeCode": "ac81fde",
  "customFields": {
    "textCustomFieldCode": {
      "textValue": "I am a text field"
    },
    "checkBoxCustomFieldCode": {
      "booleanValue": true
    },
    "dateCustomFieldCode": {
      "dateValue": "2024-12-25"
    },
    "dateTimeCustomFieldCode": {
      "dateTimeValue": "2024-12-25T12:15"
    },
    "timeCustomFieldCode": {
      "timeValue": 44100
    },
    "dropDownCustomFieldCode": {
      "dropDownValue": "I am a drop down text"
    },
    "urlCustomFieldCode": {
      "urlValue": "https://www.praxedo.fr/"
    },
    "gpsCustomFieldCode": {
      "gpsValue": {
        "longitude": 48.8567,
        "latitude": 2.3508
      }
    }
  }
}
{
  "name": "New Site",
  "customerCode": "CUSTOMER01",
  "location": {
    "addressDetails": {
      "address": "28 Rue de Mogador",
      "city": "Paris"
    }
  },
  "officeCode": "ac81fde",
  "customFields": {
    "mandatoryTextCustomFieldCode": {
      "textValue": "I am a text field"
    }
  }
}
{
  "name": "Site to update",
  "customerCode": "CUSTOMER01",
  "parentSiteCode": "SITE_0",
  "location": {
    "addressDetails": {
      "address": "89 rue de la Victoire",
      "zipCode": "75009",
      "city": "Paris",
      "country": "FR"
    },
    "geolocation": {
      "latitude": 0,
      "longitude": 0
    }
  },
  "contact": {
    "name": "Jane Doe",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+7234567890"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "john.doe@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": 987654321
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "Update Site Description",
  "officeCode": "ac81fde",
  "customFields": {
    "textCustomFieldCode": {
      "textValue": "I am a text field"
    },
    "checkBoxCustomFieldCode": {
      "booleanValue": true
    },
    "dateCustomFieldCode": {
      "dateValue": "2024-12-25"
    },
    "dateTimeCustomFieldCode": {
      "dateTimeValue": "2024-12-25T12:15"
    },
    "timeCustomFieldCode": {
      "timeValue": 44100
    },
    "dropDownCustomFieldCode": {
      "dropDownValue": "I am a drop down text"
    },
    "urlCustomFieldCode": {
      "urlValue": "https://www.praxedo.fr/"
    },
    "gpsCustomFieldCode": {
      "gpsValue": {
        "longitude": 48.8567,
        "latitude": 2.3508
      }
    }
  }
}
{
  "name": "New Site",
  "customerCode": "CUSTOMER02",
  "location": {
    "addressDetails": {
      "address": "89 rue de la Victoire",
      "city": "Paris"
    }
  },
  "officeCode": "ac81fde",
  "customFields": {
    "mandatoryTextCustomFieldCode": {
      "textValue": "I am a text field"
    }
  }
}
{
  "name": "New sub site",
  "customerCode": "CUSTOMER02",
  "parentSiteCode": "SITE_0",
  "location": {
    "addressDetails": {
      "address": "106 rue de la Fayette",
      "zipCode": "75010",
      "city": "Paris",
      "country": "FR"
    },
    "geolocation": {
      "latitude": 0,
      "longitude": 0
    }
  },
  "contact": {
    "name": "David Smith",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+7234567890"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "louis.julien@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": "0143263361"
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "New sub site description",
  "officeCode": "df89edd",
  "customFields": {
    "textCustomFieldCode": {
      "textValue": "I am a text field"
    },
    "checkBoxCustomFieldCode": {
      "booleanValue": true
    },
    "dateCustomFieldCode": {
      "dateValue": "2024-12-25"
    },
    "dateTimeCustomFieldCode": {
      "dateTimeValue": "2024-12-25T12:15"
    },
    "timeCustomFieldCode": {
      "timeValue": 44100
    },
    "dropDownCustomFieldCode": {
      "dropDownValue": "I am a drop down text"
    },
    "urlCustomFieldCode": {
      "urlValue": "https://www.praxedo.fr/"
    },
    "gpsCustomFieldCode": {
      "gpsValue": {
        "longitude": 48.8567,
        "latitude": 2.3508
      }
    }
  }
}
Response examples (201)
Response examples (204)
Response examples (400)
{
  "errors": [
    {
      "code": "referentials.site.addressdetails.mandatory",
      "message": "Property addressDetails is required."
    }
  ],
  "errorReference": "88Hb11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.city.mandatory",
      "message": "Property city is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.code.mandatory",
      "message": "Missing code in path"
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.name.mandatory",
      "message": "Property name is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.customer.mandatory",
      "message": "Property customer is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.custom.field.mandatory",
      "message": "Custom field 'custom_foo_bar' is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.invalid.json",
      "message": "Invalid Json format."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.invalid.json",
      "message": "Duplicate field 'name'."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.field.unknown",
      "message": "The field 'foo_bar' is unknown. Please correct your JSON request."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.site.office.unknown",
      "message": "The organizational unit 'DUMMY' is unknown."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.customer.unknown",
      "message": "The customer 'DUMMY' is unknown."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.parent.unknown",
      "message": "The parent site 'DUMMY' is unknown."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.parent.identical",
      "message": "The site cannot be its own parent."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.hierarchy.error",
      "message": "The site parent is also a child of the site."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.site.office.hierarchy.error",
      "message": "Hierarchy contains 10 or more levels."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
Response examples (401)
{
  "errors": [
    {
      "code": "unauthorized.nocredentials",
      "message": "No credentials."
    }
  ],
  "errorReference": "f939c6b8c15045c9a70f500fdb570555"
}
{
  "errors": [
    {
      "code": "unauthorized.badcredentials",
      "message": "Bad Credentials."
    }
  ],
  "errorReference": "f1028f99811b422eb21f5ff176664069"
}
Response examples (403)
{
  "errors": [
    {
      "code": "access.forbiden",
      "message": "You don't have the rights to access this resource."
    }
  ],
  "errorReference": "a745dc4c5a2b473aaf8ce94c9260aa8f"
}
Response examples (429)
{
  "errors": [
    {
      "code": "ratelimiter.toomanyrequest",
      "message": "Rejected because of the rate limit definition."
    }
  ],
  "errorReference": "973326230a3f44daba6cc34a5939b4fb"
}
Response examples (500)
{
  "errors": [
    {
      "code": "internal.server.error",
      "message": "Something went wrong."
    }
  ],
  "errorReference": "6377010431314bf6b0b95ec4d32ddae0"
}