v1

latestOpenAPI 3.0.12026-07-141671231.8 MB
Quotes

Create a quote

This endpoint allows you to create a quote

ℹ️ This endpoint requires the following scope: quotes:all

post/api/external/v2/quotes

Request body

datestring date required

Quote date (ISO 8601)

deadlinestring date required

Quote validity deadline (ISO 8601)

customer_idinteger required

Customer identifier

quote_template_idinteger

The quote template ID

pdf_invoice_free_textstring nullable

For example, the contact details of the person to contact

pdf_invoice_subjectstring nullable

Quote title

pdf_descriptionstring nullable

Quote description

currency'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' | 'CHE' | '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' | 'MRU' | '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' | 'SLE' | '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'
special_mentionstring nullable

Additional details

language'fr_FR' | 'en_GB' | 'de_DE'

The local default is based on the thirdparty (customer / supplier ) billing_language . In case the customer is not present, we will default to the company locale.

external_referencestring

A unique external reference you can provide to track this quote. If not provided, Pennylane will generate an identifier for you.

Example request

{
  "date": "2023-08-30",
  "deadline": "2023-09-02",
  "customer_id": 42,
  "quote_template_id": 42,
  "pdf_invoice_free_text": "Additional free field",
  "pdf_invoice_subject": "Invoice title",
  "pdf_description": "Invoice description",
  "special_mention": "Additional details",
  "discount": {
    "value": "25"
  },
  "invoice_line_sections": [
    {
      "title": "Consulting Services",
      "description": "Consulting for August",
      "rank": 1
    }
  ],
  "external_reference": "FR123",
  "invoice_lines": [
    {
      "product_id": 42,
      "quantity": 2,
      "label": "Consulting fees",
      "ledger_account_id": 1255,
      "raw_currency_unit_price": "33.333334",
      "unit": "piece",
      "vat_rate": "FR_200",
      "description": "Consulting services for August",
      "section_rank": 1,
      "discount": {
        "value": "10"
      }
    }
  ]
}

Response

Renders the created quote

idinteger required

Quote identifier

labelstring nullable required
quote_numberstring required
currency'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' | 'CHE' | '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' | 'MRU' | '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' | 'SLE' | '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' required
amountstring required

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

currency_amountstring required

Quote currency amount (total value of the quote in the currency of the quote)

currency_amount_before_taxstring required

Quote currency amount before tax (total value before tax of the quote in the currency of the quote)

exchange_ratestring required

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

datestring date nullable required

Quote issue date (ISO 8601)

deadlinestring date nullable required

Quote expiration deadline (ISO 8601)

currency_taxstring required

Quote taxable amount (in quote currency)

taxstring required

Quote taxable amount (in quote currency)

language'fr_FR' | 'en_GB' | 'de_DE' required

The local default is based on the thirdparty (customer / supplier ) billing_language . In case the customer is not present, we will default to the company locale.

status'pending' | 'accepted' | 'denied' | 'invoiced' | 'expired' required
  • accepted: quote has been accepted
  • denied: quote has been denied
  • expired: quote has expired
  • invoiced: quote has been invoiced
  • pending: quote to be denied or accepted
public_file_urlstring nullable required

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

filenamestring nullable required

Name of the file attached to the quote

special_mentionstring nullable required

Additional details

pdf_invoice_free_textstring required
pdf_invoice_subjectstring required
pdf_descriptionstring nullable required
external_referencestring required

The unique external reference that was assigned during creation either by you or Pennylane. (Same attribute as external_id in the API v1)

archived_atstring date-time nullable required

The time the quote has been archived

created_atstring date-time required

The time the quote has been created

updated_atstring date-time required

The last time the quote has been updated

Example response

{
  "id": 42,
  "label": "Quote label",
  "quote_number": "PLERYGTXYOIMZZ",
  "amount": "230.32",
  "currency_amount": "230.32",
  "currency_amount_before_tax": "196.32",
  "exchange_rate": "1.0",
  "date": "2020-01-01",
  "deadline": "2020-12-31",
  "currency_tax": "34.0",
  "tax": "34.0",
  "discount": {
    "value": "25"
  },
  "public_file_url": "https://app.pennylane.com/public/quote/pdf?encrypted_id=bzjoVJe...3D%3D",
  "filename": "my_file.pdf",
  "special_mention": "Additional details",
  "customer": {
    "id": 42,
    "url": "https://app.pennylane.com/api/external/v2/customers/42"
  },
  "invoice_line_sections": {
    "url": "https://app.pennylane.com/api/external/v2/quotes/42/invoice_line_sections"
  },
  "invoice_lines": {
    "url": "https://app.pennylane.com/api/external/v2/quotes/42/invoice_lines"
  },
  "linked_invoices": {
    "url": "https://app.pennylane.com/api/external/v2/customer_invoices?filter=%5B%7B%22field%22%3A%22quote_id%22%2C%22operator%22%3A%22eq%22%2C%22value%22%3A1927271459%7D%5D"
  },
  "pdf_invoice_free_text": "Quote details",
  "pdf_invoice_subject": "Quote subject",
  "pdf_description": "Quote description",
  "appendices": {
    "url": "https://app.pennylane.com/api/external/v2/quotes/42/appendices"
  },
  "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"
}