REST DocumentationReceiptsPATCH Update an existing receipt

Update an existing receipt

Fields left out of the payload keep their current value; receiptAmounts left out keeps the receipt’s current amount lines.

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

PUT is accepted as an alias of PATCH for this operation.

Request

PATCH /api/v1/receipts/{id}
curl --request PATCH \
     --url 'https://www.zep-online.de/zepinstanz/next/api/v1/receipts/{id}' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {token}' \
     --header 'Content-Type: application/json' \
     --data '{
       "id": 1,
       "employee_id": "max.mustermann",
       "date": "2024-07-20T00:00:00.000000Z",
       "performance_date": "2024-11-15",
       "receipt_type_id": "Fahrkarte",
       "project_id": 16,
       "project_task_id": 1,
       "payment_method": "privat",
       "currency": "EUR",
       "is_amount_net": false,
       "is_invoice_amount_net": false,
       "note": "Familienurlaub",
       "receiptAmounts": [
         {
           "tax": 12.5,
           "quantity": 12.5,
           "amount": 12.5,
           "private_share": 12.5,
           "invoicing_share": 12.5
         }
       ]
     }'

Path parameters

  • Name
    id
    Type
    integer
    Description

    The receipt ID

Request body

  • Name
    id
    Type
    integer, nullable
    Description

    The receipt being updated; omitted when creating a new one.

  • Name
    employee_id
    Type
    string, nullable
    Description

    The username of the employee this receipt is booked for.

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

    The date the expense was recorded.

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

    The date the underlying service or expense actually occurred, if it differs from the booking date.

  • Name
    receipt_type_id
    Type
    string, required
    Description

    The receipt type this expense is booked under, e.g. travel or meal.

  • Name
    project_id
    Type
    integer, required
    Description

    The project this receipt is booked against.

  • Name
    project_task_id
    Type
    integer, nullable
    Description

    The project task this receipt is booked against; must belong to the given project.

  • Name
    payment_method
    Type
    string, required
    Description

    How the expense was paid — e.g. cash, company card or invoice.

  • Name
    currency
    Type
    string, required
    Description

    The three-letter currency code the amount fields below are stated in.

  • Name
    is_amount_net
    Type
    boolean, required
    Description

    Whether the amounts in receiptAmounts are net of tax rather than gross.

  • Name
    is_invoice_amount_net
    Type
    boolean, nullable
    Description

    Whether the invoiceable amount is net of tax; required once any line carries an invoicing_share.

  • Name
    note
    Type
    string, nullable
    Description

    A free-text note attached to the receipt.

  • Name
    receiptAmounts
    Type
    array of object, required
    Description

    The tax-rate-and-amount breakdown for this receipt: one entry per VAT rate the amount is split across.

  • Name
    receiptAmounts.tax
    Type
    number, required
    Description

    The VAT rate of this line, in percent. Must be one of the tax rates the receipt type allows.

  • Name
    receiptAmounts.quantity
    Type
    number, required
    Description

    How many units this line covers.

  • Name
    receiptAmounts.amount
    Type
    number, required
    Description

    The line’s amount, at the VAT rate above.

  • Name
    receiptAmounts.private_share
    Type
    number, nullable
    Description

    The part of the amount borne privately and not reimbursed.

  • Name
    receiptAmounts.invoicing_share
    Type
    number, nullable
    Description

    The part of the amount passed on to the customer. Ignored unless the project allows receipts to be invoiced.

Response

{
  "data": {
    "id": 1,
    "employee_id": "max.mustermann",
    "date": "2024-07-20T00:00:00.000000Z",
    "receipt_type_id": "Fahrkarte",
    "currency": "EUR",
    "invoice_amount_currency": "string",
    "note": "Familienurlaub",
    "payment_method": "privat",
    "breakfast": "string",
    "lunch_or_dinner": "string",
    "location": "D",
    "is_amount_net": false,
    "is_invoice_amount_net": false,
    "billing_status": {
      "id": 1,
      "name": "beliebig"
    },
    "performance_date": "2024-11-15",
    "client_id": 1,
    "created": "2024-07-20T11:30:00.000000Z",
    "modified": "2024-07-20T12:30:00.000000Z",
    "invoice_item_id": 1,
    "project_id": 16,
    "project_task_id": 1,
    "ticket_id": 1234,
    "subtask_id": 1,
    "filename": "Allgemeine_Geschaeftsbedingungen.pdf"
  }
}

Response fields

  • Name
    id
    Type
    integer
    Description

    The receipt’s unique identifier.

  • Name
    employee_id
    Type
    string, nullable
    Description

    The username of the employee who submitted this receipt.

  • Name
    date
    Type
    string, nullable
    Description

    The date the expense was recorded.

  • Name
    receipt_type_id
    Type
    string
    Description

    The receipt type this expense is booked under, e.g. travel or meal.

  • Name
    currency
    Type
    string
    Description

    The three-letter currency code the receipt’s amounts are stated in.

  • Name
    invoice_amount_currency
    Type
    string
    Description

    The currency of the invoiceable travel-expense amount, when it differs from the booking currency.

  • Name
    note
    Type
    string, nullable
    Description

    A free-text note attached to the receipt.

  • Name
    payment_method
    Type
    string
    Description

    How the expense was paid — e.g. cash, company card or invoice.

  • Name
    breakfast
    Type
    string
    Description

    The amount deducted from the per-diem allowance because breakfast was provided, in the receipt’s currency; 0 if none was.

  • Name
    lunch_or_dinner
    Type
    string
    Description

    The amount deducted from the per-diem allowance because a lunch or dinner was provided, in the receipt’s currency; 0 if none was.

  • Name
    location
    Type
    string, nullable
    Description

    The location the expense was incurred at, used for per-diem rate lookups.

  • Name
    is_amount_net
    Type
    boolean
    Description

    Whether the receipt’s amounts are net of tax rather than gross.

  • Name
    is_invoice_amount_net
    Type
    boolean
    Description

    Whether the invoiceable amount is net of tax rather than gross.

  • Name
    billing_status
    Type
    object, nullable
    Description

    The receipt’s billing status — whether it still needs to be invoiced, is included in an invoice, or has been billed.

  • Name
    billing_status.id
    Type
    integer
    Description

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

  • Name
    billing_status.name
    Type
    string
    Description

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

    One of: "beliebig", "Not billed", "Freigegebene", "Billed"

  • Name
    performance_date
    Type
    string, nullable
    Description

    The date the underlying service or expense actually occurred, if it differs from the booking date.

  • Name
    client_id
    Type
    integer, nullable
    Description

    A client-generated id the mobile app assigns when it creates this receipt offline, used server-side to detect and skip duplicate submissions during app sync. Not a reference to a customer or contact.

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

    When the receipt record was first created.

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

    When the receipt record was last changed.

  • Name
    invoice_item_id
    Type
    integer, nullable
    Description

    The invoice position this receipt has been billed through, once it has been billed.

  • Name
    project_id
    Type
    integer
    Description

    The project this receipt is booked against.

  • Name
    project_task_id
    Type
    integer, nullable
    Description

    The project task this receipt is booked against, if the project uses tasks.

  • Name
    ticket_id
    Type
    integer, nullable
    Description

    The ticket this receipt is booked against, if it originates from a ticket.

  • Name
    subtask_id
    Type
    integer, nullable
    Description

    The ticket subtask this receipt is booked against, if it originates from one.

  • Name
    filename
    Type
    string, nullable
    Description

    The uploaded receipt file’s name, present only once a file has been attached.

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