Invoices

Import Invoice

This endpoint can be used to create or update (if externalId already exists) an invoice.

It cannot be used when using a native integration as invoices are only created by the native integration in that case.

post/invoices

Request

  • Base URL
    https://api.upflow.io/v1
  • Auth
    API key in header X-Api-Key and API key in header X-Api-Secret

Request body

customIdstring required

Invoice custom identifier.

externalIdstring

Invoice external identifier.

issuedAtstring date-time required

The date at which the invoice was issued (ISO 8601 format).

dueDatestring date-time required

The date when the invoice is due (ISO 8601 format).

namestring

The invoice name or description.

currency'EUR' | 'CHF' | 'USD' | 'CAD' | 'GBP' required

ISO 4217 Currency Code

grossAmountinteger required

Amount including taxes (in cents).

netAmountinteger required

Amount net of taxes (in cents).

dunningPlanIdstring uuid nullable

Dunning plan ID associated with the invoice.

Example request

{
  "customId": "FAC123",
  "externalId": "54654321",
  "issuedAt": "2015-05-05T12:30:00Z",
  "dueDate": "2015-05-05T12:30:00Z",
  "name": "Facture couvrant les prestations de service de Decembre",
  "currency": "EUR",
  "grossAmount": 2200,
  "netAmount": 2000,
  "customer": {
    "id": "00a70b35-2be3-4c43-aefb-397190134655",
    "externalId": "1a2c3b"
  },
  "customFields": [
    {
      "id": "00a70b35-2be3-4c43-aefb-397190134655",
      "externalId": "AEGaaZD"
    }
  ],
  "promiseToPay": {
    "date": "2023-08-30",
    "comment": "Customer confirmed payment will be sent next week."
  },
  "dunningPlanId": "00a70b35-2be3-4c43-aefb-397190134655"
}

Response

Invoice Created or Updated

externalIdstring

Invoice external identifier.

issuedAtstring date-time

The date at which the invoice was issued (ISO 8601 format).

dueDatestring date-time

The date when the invoice is due (ISO 8601 format).

namestring

The invoice name or description.

currency'EUR' | 'CHF' | 'USD' | 'CAD' | 'GBP' required

ISO 4217 Currency Code

grossAmountinteger required

Amount including taxes (in cents).

netAmountinteger required

Amount net of taxes (in cents).

amountOutstandinginteger required

Amount currently outstanding on the invoice (in cents).

dunningPlanIdstring uuid nullable

Dunning plan ID associated with the invoice.

idstring uuid required

The Invoice ID.

customerIdstring uuid nullable

Customer ID associated with the invoice.

pdfUrlstring uri nullable

URL to the invoice PDF.

state'DUE' | 'OVERDUE' | 'PAID' | 'WRITTEN_OFF' | 'DISPUTED' required

Status of the invoice.

dunningPausedboolean

Whether dunning is currently paused for this invoice.

dunningPausedUntilstring date nullable

The date until which dunning is paused (YYYY-MM-DD), or null if not paused.

dunningPausedCommentstring nullable

Comment provided when dunning was paused, or null if none.

dunningPausedByUserIdstring uuid nullable

The ID of the user who paused dunning, or null if not paused.

createdAtstring date-time

The date at which the invoice was created (ISO 8601 format).

updatedAtstring date-time

The date at which the invoice was last updated (ISO 8601 format).

Example response

{
  "externalId": "FAC123",
  "issuedAt": "2015-05-05T12:30:00Z",
  "dueDate": "2015-05-05T12:30:00Z",
  "name": "Facture couvrant les prestations de service de Decembre",
  "currency": "EUR",
  "grossAmount": 2200,
  "netAmount": 2000,
  "amountOutstanding": 500,
  "dunningPlanId": "00a70b35-2be3-4c43-aefb-397190134655",
  "id": "00a70b35-2be3-4c43-aefb-397190134655",
  "customerId": "a1b2c3",
  "payments": [
    {
      "id": "00a70b35-2be3-4c43-aefb-397190134655",
      "amount": 1700,
      "linkedAmount": 1700,
      "executedAt": "2015-05-05T12:30:00Z"
    }
  ],
  "pdfUrl": "http://example.com/invoice.pdf",
  "customFields": [],
  "dunningPausedUntil": "2024-06-01",
  "dunningPausedComment": "Customer requested delay until end of month.",
  "dunningPausedByUserId": "00a70b35-2be3-4c43-aefb-397190134655",
  "promiseToPay": {
    "expectedDate": "2023-08-30",
    "comment": "Customer confirmed payment will be sent next week.",
    "isActive": true,
    "createdAt": "2015-05-05T12:30:00Z"
  },
  "createdAt": "2015-05-05T12:30:00Z",
  "updatedAt": "2015-05-05T12:30:00Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.