REST DocumentationTicketsPOST Create a ticket

Create a ticket

Creates a ticket via the ticket API service and returns it. Requires either a creator username or a customer contact person.

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

Request

POST /api/v1/tickets
curl --request POST \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/tickets' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}' \
     --header 'Content-Type: application/json' \
     --data '{
       "status": 1,
       "project_id": 16,
       "project_task_id": 1,
       "priority": 3,
       "subject": "Fehler in der Benutzeroberfläche beheben",
       "planned_hours": 1.5,
       "creator_username": "max.mustermann",
       "receipt_date": "2024-11-15",
       "processor_username": "frank",
       "start_date": "2024-01-15T00:00:00.000000Z",
       "deadline": "2024-11-20",
       "from_mail": "string",
       "external_ticket_number": "string",
       "notify_of_completion": true,
       "prevent_overbooking": 0,
       "customer_contact_person": "max.mustermann@example.com",
       "customer_reference": "string",
       "keywords": "modi",
       "categories": [
         "string"
       ]
     }'

Request body

  • Name
    status
    Type
    integer, required
    Description

    The ticket’s target lifecycle status.

    One of: 1, 2, 3, 4, 5, 8

  • Name
    project_id
    Type
    integer, required
    Description

    The id of the project this ticket is booked against.

  • Name
    project_task_id
    Type
    integer, required
    Description

    The id of the project task (PSP element) this ticket is booked against.

  • Name
    priority
    Type
    integer, required
    Description

    The ticket’s priority, from 1 (highest) to 5 (lowest).

  • Name
    subject
    Type
    string, required
    Description

    The ticket’s subject line.

  • Name
    planned_hours
    Type
    number, nullable
    Description

    The number of hours planned for this ticket.

  • Name
    creator_username
    Type
    string, nullable
    Description

    The username of the employee who created the ticket. Required unless a customer contact person is given instead.

  • Name
    receipt_date
    Type
    string (date-time), nullable
    Description

    The date the underlying request was received.

  • Name
    processor_username
    Type
    string, nullable
    Description

    The username of the employee currently processing the ticket.

  • Name
    start_date
    Type
    string (date-time), nullable
    Description

    The date work on the ticket is planned to start.

  • Name
    deadline
    Type
    string (date-time), nullable
    Description

    The date by which the ticket should be completed.

  • Name
    from_mail
    Type
    string, nullable
    Description

    The sender e-mail address, if the ticket is created from an incoming e-mail — usually extracted automatically, see \CreateMailTicketsTask::createTicket.

  • Name
    external_ticket_number
    Type
    string, nullable
    Description

    A ticket number from an external system this ticket corresponds to.

  • Name
    notify_of_completion
    Type
    boolean, nullable
    Description

    Whether the ticket creator is notified by e-mail when the ticket is marked done.

  • Name
    prevent_overbooking
    Type
    integer, nullable
    Description

    Whether recorded time for this ticket may exceed its planned hours, and for which time types.

    One of: 0, 1, 2, 3, 4

  • Name
    customer_contact_person
    Type
    string (email), nullable
    Description

    The e-mail address of the customer contact person raising this ticket. Required unless a creator username is given instead.

  • Name
    customer_reference
    Type
    string, nullable
    Description

    A free-text reference number supplied by the customer for this ticket.

  • Name
    keywords
    Type
    string, nullable
    Description

    Free-text, comma-separated keywords for searching and filtering tickets.

  • Name
    categories
    Type
    array of string, nullable
    Description

    The ids of the categories to assign to the ticket.

Response

{
  "data": {
    "id": 1,
    "subject": "Fehler in der Benutzeroberfläche beheben",
    "priority": 3,
    "status": {
      "id": 1,
      "name": "neu"
    },
    "creator_username": "max.mustermann",
    "processor_username": "frank",
    "date": "2024-07-20T00:00:00.000000Z",
    "receipt_date": "2024-11-15",
    "start_date": "2024-01-15T00:00:00.000000Z",
    "deadline": "2024-11-20",
    "processing_date": "2024-02-28 14:09:38",
    "done_date": "2024-02-28 14:11:38",
    "approved_date": "2024-03-12 08:23:54",
    "rejected_date": "2026-01-31T09:00:00.000000Z",
    "billed_date": "2024-05-31T00:00:00.000000Z",
    "planned_hours": 1.5,
    "prevent_overbooking": 0,
    "history_modified": "2024-03-12 08:23:54",
    "project_id": 16,
    "project_task_id": 1,
    "notify_of_completion": true,
    "customer_contact_person_id": 1,
    "history_creator_username": "max.mustermann",
    "customer_reference": "string",
    "external_ticket_number": "string",
    "from_mail": "string",
    "created": "2024-07-20T11:30:00.000000Z",
    "modified": "2024-07-20T12:30:00.000000Z",
    "keywords": {},
    "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 ticket’s unique identifier.

  • Name
    subject
    Type
    string
    Description

    The ticket’s subject line.

  • Name
    priority
    Type
    integer
    Description

    The ticket’s priority, an integer from 1 to 5. Instances may define custom designations for these values, so no fixed meaning per number is guaranteed.

  • Name
    status
    Type
    object
    Description

    The ticket’s lifecycle status (e.g. new, in process, done).

  • Name
    status.id
    Type
    integer
    Description

    The stored value. Compare against this, not against name.

  • Name
    status.name
    Type
    string
    Description

    The human-readable label, delivered in the tenant’s language. Do not parse it.

    One of: "neu", "in Bearbeitung", "fertig", "abgelehnt", "bewilligt", "billed"

  • Name
    creator_username
    Type
    string, nullable
    Description

    The username of the employee who created the ticket.

  • Name
    processor_username
    Type
    string, nullable
    Description

    The username of the employee currently processing the ticket.

  • Name
    date
    Type
    string (date-time), nullable
    Description

    The date the ticket was raised.

  • Name
    receipt_date
    Type
    string (date-time), nullable
    Description

    The date the underlying request was received (e.g. by mail).

  • Name
    start_date
    Type
    string (date-time), nullable
    Description

    The date work on the ticket is planned to start.

  • Name
    deadline
    Type
    string (date-time), nullable
    Description

    The date by which the ticket should be completed.

  • Name
    processing_date
    Type
    string (date-time), nullable
    Description

    The date the ticket moved into processing.

  • Name
    done_date
    Type
    string (date-time), nullable
    Description

    The date the ticket was marked done.

  • Name
    approved_date
    Type
    string (date-time), nullable
    Description

    The date the ticket was approved.

  • Name
    rejected_date
    Type
    string (date-time), nullable
    Description

    The date the ticket was rejected.

  • Name
    billed_date
    Type
    string (date-time), nullable
    Description

    The date the ticket was billed.

  • Name
    planned_hours
    Type
    number, nullable
    Description

    The number of hours planned for this ticket.

  • Name
    prevent_overbooking
    Type
    integer
    Description

    Whether recorded time for this ticket may exceed its planned hours, and for which time types.

    One of: 0, 1, 2, 3, 4

  • Name
    history_modified
    Type
    string (date-time), nullable
    Description

    When the ticket’s most recent activity entry (comment or status change) was recorded.

  • Name
    project_id
    Type
    integer
    Description

    The id of the project this ticket belongs to.

  • Name
    project_task_id
    Type
    integer
    Description

    The id of the project task (PSP element) this ticket is booked against.

  • Name
    notify_of_completion
    Type
    boolean, nullable
    Description

    Whether the ticket creator is notified by e-mail when the ticket is marked done.

  • Name
    customer_contact_person_id
    Type
    integer, nullable
    Description

    The id of the customer contact this ticket was raised by or for.

  • Name
    history_creator_username
    Type
    string, nullable
    Description

    The username of the employee who created the ticket’s first history entry.

  • Name
    customer_reference
    Type
    string, nullable
    Description

    A free-text reference number supplied by the customer for this ticket.

  • Name
    external_ticket_number
    Type
    string, nullable
    Description

    A ticket number from an external system this ticket corresponds to.

  • Name
    from_mail
    Type
    string, nullable
    Description

    The sender e-mail address, if the ticket was created from an incoming e-mail.

  • Name
    created
    Type
    string (date-time), nullable
    Description

    When the ticket record was created.

  • Name
    modified
    Type
    string (date-time), nullable
    Description

    When the ticket record was last modified.

  • Name
    keywords
    Type
    object, nullable
    Description

    Free-text, comma-separated keywords for searching and filtering tickets.

  • Name
    categories
    Type
    array of Category
    Description

    The categories assigned to this ticket. Present only on GET /tickets/{ticket}; absent on the list endpoint GET /tickets.

  • 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.