These docs are for v1.0. Click to read the latest docs for v2.0.
added

V2 - Quotes and Commercial Documents endpoints

We are happy to announce the introduction of the Quotes and Commercial Documents management endpoints. This outlines all the available endpoints in the Pennylane V2 API for managing quotes and commercial documents (shipping orders, purchase orders, and proformas).

💡In the V1, it corresponds to the Estimates endpoints. We renamed Estimates into Quotes, which is a more accurate naming of the type of invoices (🇫🇷 Devis).

Commercial Documents are the following types of invoices :

  • Proforma
  • Shipping Order (🇫🇷 Bon de livraison)
  • Purchase Order (🇫🇷 Bon de commande)

Authentication & Scopes

All endpoints require OAuth2 authentication or a developer token with appropriate scopes:

For Quotes:

  • Read Operations: quotes:all OR quotes:readonly
  • Write Operations: quotes:all (read-only scope insufficient)

For Commercial Documents:

  • Read Operations: commercial_documents:all OR commercial_documents:readonly
  • Write Operations: commercial_documents:all (read-only scope insufficient)

Quotes Endpoints

1. List Quotes

  • Route: GET /api/external/v2/quotes
  • Scopes: quotes:all OR quotes:readonly
  • Description: Retrieve a paginated list of quotes

2. Get Quote Details

  • Route: GET /api/external/v2/quotes/:id
  • Scopes: quotes:all OR quotes:readonly
  • Description: Retrieve details of a specific quote by ID

3. Create Quote

  • Route: POST /api/external/v2/quotes
  • Scopes: quotes:all
  • Description: Create a new quote

4. Update Quote

  • Route: PUT /api/external/v2/quotes/:id
  • Scopes: quotes:all
  • Description: Update an existing quote

5. Update Quote Status

  • Route: PUT /api/external/v2/quotes/:id/update_status
  • Scopes: quotes:all
  • Description: Update the status of a quote

6. Send Quote by Email

  • Route: POST /api/external/v2/quotes/:id/send_by_email
  • Scopes: quotes:all
  • Description: Send a quote by email

7. List Quote Invoice Lines

  • Route: GET /api/external/v2/quotes/:quote_id/invoice_lines
  • Scopes: quotes:all OR quotes:readonly
  • Description: Retrieve invoice lines for a quote

8. List Quote Invoice Line Sections

  • Route: GET /api/external/v2/quotes/:quote_id/invoice_line_sections
  • Scopes: quotes:all OR quotes:readonly
  • Description: Retrieve invoice line sections for a quote

9. List Quote Appendices

  • Route: GET /api/external/v2/quotes/:quote_id/appendices
  • Scopes: quotes:all OR quotes:readonly
  • Description: Retrieve appendices of a quote

10. Upload Quote Appendix

  • Route: POST /api/external/v2/quotes/:quote_id/appendices
  • Scopes: quotes:all
  • Description: Upload an appendix for a quote

Commercial Documents Endpoints

1. List Commercial Documents

  • Route: GET /api/external/v2/commercial_documents
  • Scopes: commercial_documents:all OR commercial_documents:readonly
  • Description: Retrieve a paginated list of commercial documents

2. Get Commercial Document Details

  • Route: GET /api/external/v2/commercial_documents/:id
  • Scopes: commercial_documents:all OR commercial_documents:readonly
  • Description: Retrieve details of a specific commercial document by ID

3. List Commercial Document Invoice Lines

  • Route: GET /api/external/v2/commercial_documents/:commercial_document_id/invoice_lines
  • Scopes: commercial_documents:all OR commercial_documents:readonly
  • Description: Retrieve invoice lines for a commercial document

4. List Commercial Document Invoice Line Sections

  • Route: GET /api/external/v2/commercial_documents/:commercial_document_id/invoice_line_sections
  • Scopes: commercial_documents:all OR commercial_documents:readonly
  • Description: Retrieve invoice line sections for a commercial document

5. List Commercial Document Appendices

  • Route: GET /api/external/v2/commercial_documents/:commercial_document_id/appendices
  • Scopes: commercial_documents:all OR commercial_documents:readonly
  • Description: Retrieve appendices of a commercial document

6. Upload Commercial Document Appendix

  • Route: POST /api/external/v2/commercial_documents/:commercial_document_id/appendices
  • Scopes: commercial_documents:all
  • Description: Upload an appendix for a commercial document

What's Next

We are currently working on a new endpoint in the customer invoices scope that will allow you to create customer invoices directly from quotes.