POST
/
api
/
external
/
v2
/
quotes
Create a quote
curl --request POST \
  --url https://app.pennylane.com/api/external/v2/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "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",
  "currency": "EUR",
  "special_mention": "Additional details",
  "language": "fr_FR",
  "discount": {
    "type": "absolute",
    "value": "25"
  },
  "invoice_line_sections": [
    {
      "title": "Consulting Services",
      "description": "Consulting for August",
      "rank": 1
    }
  ],
  "external_reference": "FR123",
  "invoice_lines": [
    {
      "label": "Consulting fees",
      "quantity": 2,
      "section_rank": 1,
      "discount": {
        "type": "absolute",
        "value": "10"
      },
      "ledger_account_id": 1255,
      "raw_currency_unit_price": "33.333334",
      "unit": "piece",
      "vat_rate": "FR_200",
      "description": "Consulting services for August",
      "product_id": 42
    }
  ]
}'
{
  "id": 42,
  "label": "Quote label",
  "quote_number": "PLERYGTXYOIMZZ",
  "currency": "EUR",
  "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",
  "language": "fr_FR",
  "status": "pending",
  "discount": {
    "type": "absolute",
    "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",
  "quote_template": {
    "id": 123
  },
  "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"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Response

201
application/json

Renders the created quote

The response is of type object.