PUT
/
api
/
external
/
v2
/
supplier_invoices
/
{id}
Update a supplier invoice
curl --request PUT \
  --url https://app.pennylane.com/api/external/v2/supplier_invoices/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "supplier_id": 456,
  "date": "2021-01-30",
  "deadline": "2021-01-30",
  "invoice_number": "F20230001",
  "currency": "EUR",
  "currency_amount_before_tax": "100.00",
  "currency_amount": "120.00",
  "amount": "120.00",
  "currency_tax": "20.00",
  "tax": "20.00",
  "transaction_reference": {
    "banking_provider": "bank",
    "provider_field_name": "label",
    "provider_field_value": "invoice_number"
  },
  "invoice_lines": {
    "create": [
      {
        "label": "Demo label",
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor",
        "currency_amount": "120.00",
        "amount": "120.00",
        "currency_tax": "20.00",
        "tax": "20.00",
        "ledger_account_id": 1255,
        "vat_rate": "FR_200",
        "imputation_dates": {
          "start_date": "2020-06-30",
          "end_date": "2021-06-30"
        }
      }
    ],
    "update": [
      {
        "id": 123,
        "label": "Demo label",
        "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor",
        "currency_amount": "120.00",
        "amount": "120.00",
        "currency_tax": "20.00",
        "tax": "20.00",
        "ledger_account_id": 1255,
        "vat_rate": "FR_200",
        "imputation_dates": {
          "start_date": "2020-06-30",
          "end_date": "2021-06-30"
        }
      }
    ],
    "delete": [
      {
        "id": 123
      }
    ]
  },
  "external_reference": "FR123"
}'
{
  "id": 123,
  "label": "Demo label",
  "invoice_number": "F20230001",
  "currency": "EUR",
  "amount": "230.32",
  "currency_amount": "230.32",
  "currency_amount_before_tax": "196.32",
  "exchange_rate": "1.0",
  "date": "2023-08-30",
  "deadline": "2023-09-30",
  "currency_tax": "34.0",
  "tax": "34.0",
  "reconciled": false,
  "accounting_status": "draft",
  "filename": "my_file.pdf",
  "public_file_url": "https://app.pennylane.com/public/invoice/pdf?encrypted_id=bzjoVJe...3D%3D",
  "remaining_amount_with_tax": "20.0",
  "remaining_amount_without_tax": "16.0",
  "ledger_entry": {
    "id": 42003
  },
  "supplier": {
    "id": 456,
    "url": "https://app.pennylane.com/api/external/v2/suppliers/42"
  },
  "invoice_lines": {
    "url": "https://app.pennylane.com/api/external/v2/supplier_invoices/42/invoice_lines"
  },
  "categories": {
    "url": "https://app.pennylane.com/api/external/v2/supplier_invoices/42/categories"
  },
  "transaction_reference": {
    "banking_provider": "bank",
    "provider_field_name": "label",
    "provider_field_value": "invoice_number"
  },
  "payment_status": "to_be_processed",
  "payments": {
    "url": "https://app.pennylane.com/api/external/v2/supplier_invoices/42/payments"
  },
  "matched_transactions": {
    "url": "https://app.pennylane.com/api/external/v2/supplier_invoices/42/matched_transactions"
  },
  "external_reference": "FR123",
  "archived_at": "2023-08-30T10:08:08.146343Z",
  "created_at": "2023-08-30T10:08:08.146343Z",
  "updated_at": "2023-08-30T10:08:08.146343Z"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

id
integer
required

Supplier invoice identifier

Body

application/json
supplier_id
integer

The ID of the supplier to import the invoice for

Example:

456

date
string<date>

The date of the invoice (ISO 8601)

Example:

"2021-01-30"

deadline
string<date>

Invoice payment deadline (ISO 8601)

Example:

"2021-01-30"

invoice_number
string

The invoice number

Example:

"F20230001"

currency
enum<string>
default:EUR
Available options:
EUR,
USD,
GBP,
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BYR,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
FJD,
FKP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LTL,
LVL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STD,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMK,
ZMW,
ZWL
currency_amount_before_tax
string

Invoice currency amount before tax (total value before tax of the invoice in the currency of the invoice)

Example:

"100.00"

currency_amount
string

Invoice currency amount (total value of the invoice in the currency of the invoice)

Example:

"120.00"

amount
string

Invoice amount in euros (total value of the invoice in euros). If the currency is euro, currency_amount and amount are identical.

Example:

"120.00"

currency_tax
string

Invoice taxable amount (in invoice currency)

Example:

"20.00"

tax
string

Invoice taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

Example:

"20.00"

transaction_reference
object | null

By adding this field you can automatically reconcile the newly imported invoice with a transaction. See documentation about automatic payment matching.

invoice_lines
object

Add, update, delete invoice lines

external_reference
string

The unique external reference that was assigned during creation either by you or Pennylane.

Example:

"FR123"

Response

The updated supplier invoice

id
integer
required

The ID of the supplier invoice

Example:

123

label
string | null
required
Example:

"Demo label"

invoice_number
string
required
Example:

"F20230001"

currency
enum<string>
default:EUR
required
Available options:
EUR,
USD,
GBP,
AED,
AFN,
ALL,
AMD,
ANG,
AOA,
ARS,
AUD,
AWG,
AZN,
BAM,
BBD,
BDT,
BGN,
BHD,
BIF,
BMD,
BND,
BOB,
BRL,
BSD,
BTN,
BWP,
BYN,
BYR,
BZD,
CAD,
CDF,
CHF,
CLF,
CLP,
CNY,
COP,
CRC,
CUC,
CUP,
CVE,
CZK,
DJF,
DKK,
DOP,
DZD,
EGP,
ERN,
ETB,
FJD,
FKP,
GEL,
GGP,
GHS,
GIP,
GMD,
GNF,
GTQ,
GYD,
HKD,
HNL,
HRK,
HTG,
HUF,
IDR,
ILS,
IMP,
INR,
IQD,
IRR,
ISK,
JEP,
JMD,
JOD,
JPY,
KES,
KGS,
KHR,
KMF,
KPW,
KRW,
KWD,
KYD,
KZT,
LAK,
LBP,
LKR,
LRD,
LSL,
LTL,
LVL,
LYD,
MAD,
MDL,
MGA,
MKD,
MMK,
MNT,
MOP,
MRO,
MUR,
MVR,
MWK,
MXN,
MYR,
MZN,
NAD,
NGN,
NIO,
NOK,
NPR,
NZD,
OMR,
PAB,
PEN,
PGK,
PHP,
PKR,
PLN,
PYG,
QAR,
RON,
RSD,
RUB,
RWF,
SAR,
SBD,
SCR,
SDG,
SEK,
SGD,
SHP,
SLL,
SOS,
SRD,
STD,
SVC,
SYP,
SZL,
THB,
TJS,
TMT,
TND,
TOP,
TRY,
TTD,
TWD,
TZS,
UAH,
UGX,
UYU,
UZS,
VEF,
VND,
VUV,
WST,
XAF,
XCD,
XDR,
XOF,
XPF,
YER,
ZAR,
ZMK,
ZMW,
ZWL
amount
string
required

Invoice amount (total value of the invoice in euros). If the currency is euro, currency_amount and amount are identical.

Example:

"230.32"

currency_amount
string
required

Invoice currency amount (total value of the invoice in the currency of the invoice)

Example:

"230.32"

currency_amount_before_tax
string
required

Invoice currency amount before tax (total value before tax of the invoice in the currency of the invoice)

Example:

"196.32"

exchange_rate
string
required

Invoice exchange rate (used to convert the invoice to euros. If the invoice currency is euro it will be 1.0)

Example:

"1.0"

date
string | null
required

Invoice issue date (ISO 8601)

Example:

"2023-08-30"

deadline
string | null
required

Invoice payment deadline (ISO 8601)

Example:

"2023-09-30"

currency_tax
string
required

Invoice taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

Example:

"34.0"

tax
string
required

Invoice taxable amount (in invoice currency)

Example:

"34.0"

reconciled
boolean
required

Whether the invoice has been reconciled or not

Example:

false

accounting_status
enum<string>
required

The accounting state of the invoice.

  • draft: The invoice is not yet sent to the accountant.
  • archived: The invoice has been archived.
  • entry: The invoice is incomplete. Some information is missing on the invoice and needs to be completed by SME.
  • validation_needed: The invoice is sent to the accountant and needs validation.
  • complete: The invoice has been validated by the accountant.
Available options:
draft,
archived,
entry,
validation_needed,
complete
filename
string | null
required

Name of the file attached to the invoice

Example:

"my_file.pdf"

public_file_url
string | null
required

Public URL of the invoice file. The URL will expire after 30 minutes.

Example:

"https://app.pennylane.com/public/invoice/pdf?encrypted_id=bzjoVJe...3D%3D"

remaining_amount_with_tax
string | null
required

The remaining amount with VAT to pay for the invoice to be considered paid

Example:

"20.0"

remaining_amount_without_tax
string | null
required

The remaining amount without VAT to pay for the invoice to be considered paid

Example:

"16.0"

ledger_entry
object
required
supplier
object | null
required
invoice_lines
object
required
categories
object
required
transaction_reference
object | null
required

This reconciles the invoice with a transaction. See documentation about automatic payment matching.

payment_status
enum<string>
required
Available options:
to_be_processed,
to_be_paid,
partially_paid,
payment_error,
payment_scheduled,
payment_in_progress,
payment_emitted,
payment_found,
paid_offline,
fully_paid
payments
object
required
matched_transactions
object
required
external_reference
string
required

The unique external reference that was assigned during creation either by you or Pennylane

Example:

"FR123"

archived_at
string<date-time> | null
required

The time the invoice has been archived

Example:

"2023-08-30T10:08:08.146343Z"

created_at
string<date-time>
required

The time the invoice has been created

Example:

"2023-08-30T10:08:08.146343Z"

updated_at
string<date-time>
required

The last time the invoice has been updated

Example:

"2023-08-30T10:08:08.146343Z"