Skip to content

Acknowledging a project

POST /projects/{project_id}/acknowledgements records your ERP/CRM import outcome on the project — the project-keyed sibling of the tender/order acknowledgements. Use it when your integration creates the Mercura project as an object/document in your own system and you want to report the result (and your document number) back without a PATCH round-trip — for example when your middleware cannot issue the PATCH verb, or when all you hold at creation time is your own document number.

Body fields:

  • status (required) — SUCCESS or FAILED.
  • external_id — your own id for the created record (e.g. the ERP document number). Typically sent on SUCCESS.
  • message — free-text note; required on FAILED as the failure reason, optional on SUCCESS.
  • metadata — optional extra references echoed back verbatim for traceability.

Semantics:

  • Latest-wins. A later acknowledgement overwrites status, message and metadata; external_id is kept once provided (an id-less follow-up ack never clears it).
  • external_id also sets object_number. When you send one it is written to the project's object_number (the Objektnummer) as well — the same field PATCH /projects/{project_id} writes, and the one Mercura sends back to you as erp_object_id on every later tender/order export. One POST therefore both reports the outcome and establishes the identifier both sides reconcile on; you do not need the PATCH for it. Your value wins over an Objektnummer that came from a GAEB file or from a Mercura user, and an acknowledgement without an external_id leaves the existing one untouched. Because object_number also groups projects (see Reading projects), rewriting it moves this project into that number's group.
  • Otherwise recording-only. The project's lifecycle status is never changed and no export is re-triggered. The acknowledged outcome (including external_id) is returned on every GET /projects read as the acknowledgement field.
  • The write advances the project's updated_at, so a modified_since delta-sync surfaces acknowledged projects.
POST /projects/90/acknowledgements HTTP/1.1
Authorization: Bearer <your-api-key>
Content-Type: application/json

{
  "status": "SUCCESS",
  "external_id": "4500012345",
  "metadata": { "erp_client": "100" }
}

The response is the recorded acknowledgement (not the whole project): resolved status, the sticky-aware external_id, message, metadata, and the server-side acknowledged_at timestamp.