Skip to main content

Download PDF contract

GET 

/api/auction/contract/:serviceCode

Generate and download the PDF contract for a closed and signed auction.

Requirements:

  • Auction in 'closed' status with a valid serviceCode
  • Complete signatures (company and carrier)
  • User belongs to the owner company or is the winning carrier

Internal process:

  1. Validates auction status and signatures
  2. Generates PDF using the 'file_contract' template
  3. Includes data for:
    • Auction (origin, destination, dates)
    • Hiring company
    • Winning carrier
    • Terms and conditions
  4. Configures headers for direct download

Fields included in the contract:

  • Auction data (serviceCode - e.g., VIGMURnT4FN, dates, addresses)
  • Party information (names, contacts)
  • Agreed price and payment conditions
  • Country-specific legal terms

Usage example:

GET /api/auction/contract/ABC123

The response is a PDF stream with headers for automatic download.

Request

Responses

PDF contract successfully generated

Response Headers
    Content-Disposition

    Header for file download with filename.
    Format: attachment; filename=CONTRACT_{serviceCode}.pdf
    Example: attachment; filename=CONTRACT_ABC123.pdf

    Content-Type

    application/pdf