Create or update a customer

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/customers/code:{customerCode}

Creates a new customer if the customerCode provided does not exist, else updates the existing customer.

Rate limit range : Standard

Path parameters

  • customerCode string Required

    Requested customer code, case insensitive.

application/json

Body Required

  • name string Required

    Customer name.

    Minimum length is 1, maximum length is 10000.

  • parentCustomerCode string | null

    Parent customer code. Case insensitive.

    Maximum length is 10000.

  • officeCode string

    Office code. Case insensitive. If the property is not filled in

    • if the parent customer code is filled in, the parent customer office will be applied
    • if the parent customer code is not filled in, the office of the OAuth2.0 application will be applied

    Minimum length is 1, maximum length is 10000.

  • contact object | null

    Customer contact details.

    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.

  • addressDetails object Required

    Customer address details.

    Hide addressDetails attributes Show addressDetails attributes object
    • address string | null

      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

    Customer description of any.

    Maximum length is 10000.

  • customFields object

    Map of custom fields of a customer.

Responses

  • 201 application/json

    Customer created.

  • 204 application/json

    Customer 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/customers/code:{customerCode}
curl \
 --request PUT 'https://ws-eu1.praxedo.com/eTech/rest/ws/referentials/v1/customers/code:customer-123456' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "name": "New Customer",
  "addressDetails": {
    "address": "28 Rue de Mogador",
    "zipCode": "75009",
    "city": "Paris",
    "country": "FR"
  },
  "contact": {
    "name": "Jean Du Jardin",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+608012601"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "john.doe@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": "987654321"
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "New Customer 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 Customer",
  "addressDetails": {
    "address": "28 Rue de Mogador",
    "zipCode": "75009",
    "city": "Paris",
    "country": "FR"
  },
  "contact": {
    "name": "Jean Du Jardin",
    "details": [
      {
        "type": "Mobile",
        "description": "Personal mobile number",
        "value": "+608012601"
      },
      {
        "type": "Email",
        "description": "Work email",
        "value": "john.doe@company.com"
      },
      {
        "type": "Phone",
        "description": "",
        "value": "987654321"
      },
      {
        "type": "Fax",
        "description": "Office fax",
        "value": "+1122334455"
      }
    ]
  },
  "description": "New Customer 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 Customer",
  "addressDetails": {
    "city": "Paris"
  },
  "officeCode": "ac81fde",
  "customFields": {
    "mandatoryTextCustomFieldCode": {
      "textValue": "I am a text field"
    }
  }
}
{
  "name": "Customer to update",
  "addressDetails": {
    "address": "1 Rue d'Aubervilliers",
    "zipCode": "75019",
    "city": "Paris",
    "country": "FR"
  },
  "contact": {
    "name": "Jean Du Jardin",
    "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 customer 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": "Customer name to update",
  "addressDetails": {
    "city": "Paris"
  },
  "officeCode": "ac81fde",
  "customFields": {
    "mandatoryTextCustomFieldCode": {
      "textValue": "I am a text field"
    }
  }
}
{
  "name": "New sub customer",
  "parentCustomerCode": "a56tgj89",
  "addressDetails": {
    "address": "87 rue Assas",
    "zipCode": "75006",
    "city": "Paris",
    "country": "FR"
  },
  "contact": {
    "name": "Louis Julien",
    "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 customer 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.customer.addressdetails.mandatory",
      "message": "Property addressDetails is required."
    }
  ],
  "errorReference": "88Hb11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.city.mandatory",
      "message": "Property city is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.code.mandatory",
      "message": "Missing code in path."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.name.mandatory",
      "message": "Property name is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.custom.field.mandatory",
      "message": "Custom field 'custom_foo_bar' is required."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.invalid.json",
      "message": "Invalid Json format."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.invalid.json",
      "message": "Duplicate field 'name'."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.field.unknown",
      "message": "The field 'foo_bar' is unknown. Please correct your JSON request."
    }
  ],
  "errorReference": "d3c79ddca4f9413cad99dc934cc7d0aa"
}
{
  "errors": [
    {
      "code": "referentials.customer.office.unknown",
      "message": "The organizational unit 'DUMMY' is unknown."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.parent.unknown",
      "message": "The parent customer 'DUMMY' is unknown."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.parent.identical",
      "message": "The customer cannot be its own parent."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.office.hierarchy.error",
      "message": "The customer parent is also a child of the customer."
    }
  ],
  "errorReference": "669b11d0ae8145aa9b106b049091b371"
}
{
  "errors": [
    {
      "code": "referentials.customer.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"
}