> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate E-Way Bill PDF

> Generate a PDF for an E-Way Bill number and return a temporary download URL.



## OpenAPI

````yaml api-reference/gst/compliance/openapi.json GET /gst/compliance/e-way-bill/tax-payer/bill/{ewb_no}/pdf/generate
openapi: 3.0.1
info:
  title: in-co-sandbox-gst-compliance
  description: >-
    **GST Compliance API** enables businesses to automate compliance
    requirements like [Taxpayer
    verification](https://developer.sandbox.co.in/reference/search-gstin-api),
    [GSTR
    Filing](https://developer.sandbox.co.in/reference/gst-taxpayer-authentication),
    [Generating
    E-Invoices](https://developer.sandbox.co.in/reference/e-invoice-authentication-api),
    and [E-Way
    Bills](https://developer.sandbox.co.in/reference/e-way-bill-authentication-api).We
    provide these APIs from GSTN-authorised GST Suvidha Providers, handling the
    encryption-decryption and signing so you don't have to handle the
    complexities.
  version: 1.0.0
servers:
  - url: https://api.sandbox.co.in
  - url: https://test-api.sandbox.co.in
security: []
tags:
  - name: Public
  - name: Taxpayer
  - name: Taxpayer Auth
  - name: Returns
  - name: GSTR-1 Documents
  - name: File GSTR-1
  - name: GSTR-2A Documents
  - name: GSTR-2B Document
  - name: File GSTR-3B
  - name: GSTR-4
  - name: File GSTR-9
  - name: Invoice Management System
  - name: GSTR-1A Documents
  - name: File GSTR-1A
  - name: Ledgers
  - name: e-Invoice
  - name: Sales e-Invoices for return period
  - name: Purchase e-Invoices for return period
  - name: Front Office Notices
  - name: Front Office
  - name: AATO
  - name: e-Invoice1
  - name: Authentication
  - name: e-Invoice12
  - name: E-Way Bill
  - name: E-Way Bill1
  - name: Authentication1
  - name: Consignor
  - name: Consolidated E-Way Bill
  - name: Multi-Vehicle Movement
  - name: Consignee
  - name: Transporter
  - name: Consolidated E-Way Bill1
  - name: Multi-vehicle Movement
  - name: Common
paths:
  /gst/compliance/e-way-bill/tax-payer/bill/{ewb_no}/pdf/generate:
    get:
      tags:
        - E-Way Bill
      summary: Generate E-Way Bill PDF
      description: >-
        Generate the PDF for an E-Way Bill. Sandbox fetches the E-Way Bill from
        NIC using the supplied `ewb_no` and returns a temporary URL to the
        generated PDF. Download and persist the file if you need to retain it.
      operationId: generateEWayBillPdf
      parameters:
        - name: ewb_no
          in: path
          description: 12-digit E-Way Bill Number (EWB No.)
          required: true
          example: '131000026768'
          schema:
            type: string
            description: 12-digit E-Way Bill Number (EWB No.)
            pattern: ^[0-9]{12}$
            minLength: 12
            maxLength: 12
            example: '131000026768'
        - name: authorization
          in: header
          description: >-
            IRP access token shared by E-Invoice and E-Way Bill APIs. To create
            a session, see the [Generate E-Way Bill
            Session](/recipes/gst/authentication/generate_e_way_bill_session)
            recipe. Send the token in the authorization header.
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key that identifies your Sandbox account.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-source
          in: header
          description: 'Select the GST portal source: primary (default) or secondary.'
          required: false
          example: ''
          schema:
            type: string
            example: primary
        - name: x-proxy
          in: header
          description: >-
            Enables criss-cross operations by routing requests through the
            specified source (e.g., access primary via secondary if primary is
            unavailable)
          required: false
          example: ''
          schema:
            type: string
            example: secondary
        - name: x-api-version
          in: header
          description: API version
          required: false
          example: ''
          schema:
            type: string
            default: 1.0.0
      responses:
        '200':
          description: PDF generated or E-Way Bill data not available from NIC.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateEWayBillPdfResponse'
              examples:
                pdfGenerated:
                  summary: PDF generated
                  value:
                    code: 200
                    data:
                      '@entity': in.co.sandbox.gst.compliance.e-way-bill.pdf
                      e-way-bill_pdf_url: >-
                        https://in-co-sandbox-gst-test-storage.s3.ap-south-1.amazonaws.com/e-way-bill-pdf/57edecdc-7847-4816-891b-f77ae77eb767.pdf
                    timestamp: 1776921876217
                    transaction_id: 41bb8041-fb83-4654-8d75-85a19f329158
                eWayBillDataNotAvailable:
                  summary: E-Way Bill data not available
                  value:
                    code: 200
                    data:
                      error:
                        errorCodes: '357'
                      info: ''
                      status: '0'
                    timestamp: 1776921876217
                    transaction_id: 5a742c1b-de26-41fe-bf27-9becb16ed6f4
        '422':
          description: Invalid E-Way Bill Number.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EWayBillValidationErrorResponse'
              examples:
                invalidEWayBillNumber:
                  summary: Invalid E-Way Bill Number
                  value:
                    code: 422
                    message: Invalid E-Way Bill Number
                    timestamp: 1776921876217
                    transaction_id: c9aa55c6-a110-4460-9f38-1cb62e452c9f
components:
  schemas:
    GenerateEWayBillPdfResponse:
      oneOf:
        - $ref: '#/components/schemas/GenerateEWayBillPdfSuccessResponse'
        - $ref: '#/components/schemas/EWayBillBusinessErrorResponse'
      description: >-
        A generated-PDF success or NIC business-failure response. Both variants
        use HTTP 200.
    EWayBillValidationErrorResponse:
      type: object
      description: Request validation failure for an E-Way Bill request.
      required:
        - code
        - message
        - timestamp
        - transaction_id
      properties:
        code:
          type: integer
          description: HTTP status code returned for the validation error.
          enum:
            - 422
        message:
          type: string
          description: Request validation error message.
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp in milliseconds when the response was created.
        transaction_id:
          type: string
          format: uuid
          description: Unique identifier used to trace the request.
    GenerateEWayBillPdfSuccessResponse:
      allOf:
        - $ref: '#/components/schemas/EWayBillResponseMetadata'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/GenerateEWayBillPdfSuccessPayload'
      description: >-
        PDF generated by Sandbox. The PDF is rendered by Sandbox rather than
        returned by NIC, so `data` is not wrapped in a NIC `status`/`data`
        envelope.
    EWayBillBusinessErrorResponse:
      allOf:
        - $ref: '#/components/schemas/EWayBillResponseMetadata'
        - type: object
          required:
            - data
          properties:
            data:
              type: object
              required:
                - status
                - error
              properties:
                status:
                  type: string
                  enum:
                    - '0'
                  description: NIC sends "0" when it rejects a request.
                error:
                  $ref: '#/components/schemas/EWayBillBusinessError'
    EWayBillResponseMetadata:
      type: object
      description: Metadata returned with every E-Way Bill response.
      required:
        - code
        - timestamp
        - transaction_id
      properties:
        code:
          type: integer
          enum:
            - 200
          description: NIC response code.
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp.
        transaction_id:
          type: string
          description: Request transaction identifier.
    GenerateEWayBillPdfSuccessPayload:
      type: object
      description: Details of the generated E-Way Bill PDF.
      required:
        - '@entity'
        - e-way-bill_pdf_url
      properties:
        '@entity':
          type: string
          enum:
            - in.co.sandbox.gst.compliance.e-way-bill.pdf
          description: Entity name for the generated PDF.
        e-way-bill_pdf_url:
          type: string
          format: uri
          description: Temporary URL of the generated E-Way Bill PDF.
    EWayBillBusinessError:
      type: object
      description: Error data from NIC.
      required:
        - errorCodes
      properties:
        errorCodes:
          type: string
          description: >-
            NIC error code. See [E-Way Bill error
            codes](/api-reference/gst/annexures/e-way-bill-error-codes).

````