Skip to content

Update Invoice

Rejected invoices

PUT/api/v1/invoices/{id}

When an invoice has been rejected by the recipient in a way that the invoice can still be updated, the Seller can update and correct the invoice details and resend the invoice for processing. The update is done by sending a PUT request to the invoice endpoint with the corrected details.

The full invoice data must be provided in the PUT request, even if only a few fields are being updated. This method replaces the existing invoice data with the new data provided in the request.

Below is an example concerning the full update of a rejected invoice. Please ensure to replace {id} with the actual invoice ID and {token} with your authentication token.

The data placeholder represents the JSON payload containing the updated invoice details and is the same as the one used during invoice creation.

bash
curl -X PUT https://sandbox-peppol.oxygen.gr/api/v1/invoices/{id} \
  -H "Authorization: Bearer {token}" \
  -d '{{ data }}'
json
{
  "id": "xgQQXg3hrtjh7AvZ",
  "contact_id": "WAz8eIbvDR60rouK",
  "group_id": null,
  "pinned_message_id": null,
  "is_pinned": false,
  "is_muted": false,
  "last_active_at": null,
  "last_opened_at": null,
  "created_at": 692233200,
  "archived_at": null
}

Soft-rejected invoices (Greece)

PATCH/api/v1/invoices/{id}

Greek Peppol Authority uses the term of soft-reject for invoices to indicate minor issues that do not prevent the processing of the invoice but require additional corrections.

In the case of a soft-rejected invoice, the Seller is allowed to update only specific fields of the invoice by using the PATCH method.

TIP

Oxygen PEPPOL API uses the status_code = 417 in the Invoice and the Transmission models to indicate a soft-rejected invoice.

Allowed fields for soft-rejected invoices

Field NameDescription
buyer_referenceBuyer reference. Required if order_reference.id is not provided.
project_referenceProject reference (Κωδικός ΑΔΑ / ΠΔΕ). Required for invoice type 380, prohibited otherwise.
contract_document_referenceContract document reference (Κωδικός ΑΔΑΜ).
order_reference.idOrder reference ID. Required if buyer_reference is not provided.
buyer.identification.*.idBuyer identification.

Example Request

bash
curl -X PATCH https://sandbox-peppol.oxygen.gr/api/v1/invoices/:id \
  -H "Authorization: Bearer {token}" \
  -d '{{ data }}'
json
{
  "buyer_reference": "New Buyer Reference",
  "project_reference": "New Project Reference",
  "contract_document_reference": "New Contract Document Reference",
  "order_reference": {
    "id": "New Order Reference ID"
  },
  "buyer": {
    "identification": [
      { "id": "New Buyer Identification" }
    ]
  }
}

DANGER

If a field does not need to be updated, it must be either omitted from the PATCH request or have the same existing value.

Providing a field with a null value or an empty string will override the existing value. In such cases, the invoice may be rejected again.

Definitively Rejected Invoices (Greece)

If an invoice is definitively rejected by the final recipient (corner C4) in Greece, no further status updates are permitted for that invoice.

In such cases, the Seller must issue a credit note that explicitly references the rejected invoice. If the transaction needs to proceed, the Seller must then issue a new invoice with a new invoice_id.

TIP

Oxygen Peppol API uses status_code = 406 in the Invoice and Transmission models to indicate a finally rejected invoice.

Learn more about transmissions and their status codes

Released under the MIT License.