GET/api/v1/delivery-notes/{uuid}/pdf

Download Delivery Note PDF

Downloads the PDF for a delivery note. The PDF is generated using the company's configured PDF template and includes all line items, client details, and delivery information.

GET /api/v1/delivery-notes/{uuid}/pdf

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token or API key for authentication
X-CompanystringYesCompany UUID to scope the request

Path Parameters

NameTypeRequiredDescription
uuidstringYesUUID of the delivery note

Request

cURL
curl https://api.storno.ro/api/v1/delivery-notes/7c9e6679-7425-40de-944b-e07fc1f90ae7/pdf \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Company: 550e8400-e29b-41d4-a716-446655440000" \
  -o aviz.pdf
JavaScript
const response = await fetch(
  'https://api.storno.ro/api/v1/delivery-notes/7c9e6679-7425-40de-944b-e07fc1f90ae7/pdf',
  {
    headers: {
      'Authorization': 'Bearer YOUR_TOKEN',
      'X-Company': '550e8400-e29b-41d4-a716-446655440000'
    }
  }
);

const blob = await response.blob();

Response

Returns the PDF file as binary data with appropriate headers.

Headers:

HeaderValue
Content-Typeapplication/pdf
Content-Dispositionattachment; filename="aviz-{number}.pdf"

Error Codes

CodeDescription
401Missing or invalid authentication token
403No access to the specified company
404Delivery note not found
500PDF generation failed