REST DocumentationCustomersPOST Create a customer contact

Create a customer contact

Creates a contact person for the given customer and returns it with its categories loaded.

Availability: Full version only — a Clock instance answers 404 for this endpoint.

Request

POST /api/v1/customers/{customer_number}/contacts
curl --request POST \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/customers/{customer_number}/contacts' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}' \
     --header 'Content-Type: application/json' \
     --data '{
       "customer_number": "K-12345",
       "salutation": "Frau",
       "first_name": "Erika",
       "last_name": "Mustermann",
       "email": "erika.mustermann@acme-corp.de",
       "phone": "+49 30 12345678",
       "fax": "+1-555-0124",
       "mobile": "+49 170 1234567",
       "primary": "prim",
       "department": "Einkauf",
       "job_title": "Leiterin Einkauf",
       "language": "de",
       "inactive": false,
       "title": "Dr.",
       "username": "max.mustermann",
       "password": "1234",
       "categories": [
         "string"
       ]
     }'

Path parameters

  • Name
    customer_number
    Type
    string
    Description

    The customer customer number

Request body

  • Name
    customer_number
    Type
    string, required
    Description

    The customer number this contact belongs to — set automatically from the URL, any value provided in the request body is ignored.

  • Name
    salutation
    Type
    string, nullable
    Description

    The contact’s salutation (e.g. Mr./Ms.), used in correspondence.

  • Name
    first_name
    Type
    string, required
    Description

    The contact’s first name.

  • Name
    last_name
    Type
    string, required
    Description

    The contact’s last name.

  • Name
    email
    Type
    string (email), nullable
    Description

    The contact’s e-mail address.

  • Name
    phone
    Type
    string, nullable
    Description

    The contact’s phone number.

  • Name
    fax
    Type
    string, nullable
    Description

    The contact’s fax number.

  • Name
    mobile
    Type
    string, nullable
    Description

    The contact’s mobile phone number.

  • Name
    primary
    Type
    string, nullable
    Description

    Whether this contact should become the customer’s primary contact.

    One of: "prim", "sec"

  • Name
    department
    Type
    string, nullable
    Description

    Free-text department name for this contact — unrelated to the department module.

  • Name
    job_title
    Type
    string, nullable
    Description

    The contact’s job title at the customer.

  • Name
    language
    Type
    string, nullable
    Description

    The contact’s preferred language, used for translated content.

  • Name
    inactive
    Type
    boolean, nullable
    Description

    Whether this contact should be marked inactive.

  • Name
    title
    Type
    string, nullable
    Description

    The contact’s academic title (e.g. Dr.).

  • Name
    username
    Type
    string, nullable
    Description

    The username to create a portal login for this contact, if any.

  • Name
    password
    Type
    string, nullable
    Description

    The password for the contact’s portal login, if a username is set.

  • Name
    categories
    Type
    array of string, nullable
    Description

    The ids of the categories to assign to the contact.

Response

{
  "data": {
    "id": 1,
    "first_name": "Erika",
    "last_name": "Mustermann",
    "salutation": "Frau",
    "title": "Dr.",
    "phone": "+49 30 12345678",
    "mobile": "+49 170 1234567",
    "fax": "+1-555-0124",
    "email": "erika.mustermann@acme-corp.de",
    "primary": true,
    "job_title": "Leiterin Einkauf",
    "department": "Einkauf",
    "language": "de",
    "inactive": false,
    "categories": [
      {
        "name": "EU",
        "description": {
          "de": "string",
          "en": "string",
          "fr": "string",
          "es": "string",
          "pl": "string"
        },
        "type": {
          "id": "string",
          "name": "Mitarbeiter/in"
        }
      }
    ]
  }
}

Response fields

  • Name
    id
    Type
    integer
    Description

    The contact’s unique identifier.

  • Name
    first_name
    Type
    string
    Description

    The contact’s first name.

  • Name
    last_name
    Type
    string
    Description

    The contact’s last name.

  • Name
    salutation
    Type
    string, nullable
    Description

    The contact’s salutation (e.g. Mr./Ms.), used in correspondence.

  • Name
    title
    Type
    string, nullable
    Description

    The contact’s academic title (e.g. Dr.).

  • Name
    phone
    Type
    string, nullable
    Description

    The contact’s phone number.

  • Name
    mobile
    Type
    string, nullable
    Description

    The contact’s mobile phone number.

  • Name
    fax
    Type
    string, nullable
    Description

    The contact’s fax number.

  • Name
    email
    Type
    string, nullable
    Description

    The contact’s e-mail address.

  • Name
    primary
    Type
    boolean
    Description

    Whether this is the customer’s primary contact.

  • Name
    job_title
    Type
    string, nullable
    Description

    The contact’s job title at the customer.

  • Name
    department
    Type
    string, nullable
    Description

    Free-text department name for this contact — unrelated to the department module.

  • Name
    language
    Type
    string, nullable
    Description

    The contact’s preferred language, used for translated content.

  • Name
    inactive
    Type
    boolean
    Description

    Whether this contact is inactive and no longer active.

  • Name
    categories
    Type
    array of Category
    Description

    The categories assigned to this contact. Present on GET /customers/{customer}/contacts/{contact}, POST …/contacts and PUT …/contacts/{contact}; absent on the list endpoint GET /customers/{customer}/contacts.

  • Name
    categories.name
    Type
    string
    Description

    Name of the category, shown wherever an entity is tagged with it.

  • Name
    categories.description
    Type
    object
    Description

    Longer explanation of what this category should be used for.

  • Name
    categories.type
    Type
    object
    Description

    The kind of entity this category can be attached to, e.g. employee, project or customer.

Generated from the OpenAPI specification — edit the source code, not this page.