---
title: "Submit draft synchronization results"
method: POST
path: "/api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized"
tags: ["App: Custom Invoicing"]
---

# Submit draft synchronization results

`POST /api/v1/apps/custom-invoicing/{invoiceId}/draft/synchronized`

## Path parameters

- `invoiceId` string, required

## Request body

- CustomInvoicingDraftSynchronizedRequest — Information to finalize the draft details of an invoice.
  - `invoicing` CustomInvoicingSyncResult — Information to synchronize the invoice. Can be used to store external app's IDs on the invoice or lines.
    - `invoiceNumber` string — InvoiceNumber is a unique identifier for the invoice, generated by the invoicing app. The uniqueness depends on a lot of factors: - app setting (unique per app or unique per customer) - multiple app scenarios (multiple apps generating invoices with the same prefix)
    - `externalId` string — If set the invoice's invoicing external ID will be set to this value.
    - `lineExternalIds` CustomInvoicingLineExternalIdMapping[] — If set the invoice's line external IDs will be set to this value. This can be used to reference the external system's entities in the invoice.
      - `lineId` string, required — The line ID.
      - `externalId` string, required — The external ID (e.g. custom invoicing system's ID).
    - `lineDiscountExternalIds` CustomInvoicingLineDiscountExternalIdMapping[] — If set the invoice's line discount external IDs will be set to this value. This can be used to reference the external system's entities in the invoice.
      - `lineDiscountId` string, required — The line discount ID.
      - `externalId` string, required — The external ID (e.g. custom invoicing system's ID).

## Response `204`

There is no content to send for this request, but the headers may be useful.

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
- `401` — The request has not been applied because it lacks valid authentication credentials for the target resource.
- `403` — The server understood the request but refuses to authorize it.
- `412` — One or more conditions given in the request header fields evaluated to false when tested on the server.
- `500` — The server encountered an unexpected condition that prevented it from fulfilling the request.
- `503` — The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/openmeterio/apis/openmeter-api.md) · [All operations](https://skmtc.net/openmeterio/apis/openmeter-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmeterio/openmeter-api/revisions/1cd97f063f4a/schema)
