Pre-deliver Pdf

Pre-deliver Pdf

post

Pre-deliver Pdf

This API allows an authenticated seller to upload the PDF files to a listing, so that the listing displays as 'Instant Download' when buyer purchases the tickets.

Resource URL

https://api.stubhub.com/sellers /listings/pdf/v3/{listingId}

Header Parameters


Name Values Description
Authorization
(required)

To generate an access token, use the [generateToken API](https://developer.stubhub.com/oauth/apis/post/accesstoken). Note that you will need to add a 'Bearer ' prefix to your access token. Otherwise, you'll get an 'Invalid Access Token' error

Content-Type
(required)

multipart/form-data

Content-Disposition
(required)

This header indicates the data that is passed in the HTTP request for each subpart of the multipart/form-data. In this API call, there are two subparts. - The first subpart contains data in JSON format about the listing itself: 1. The ticket row/seat numbers. 2. The name of the PDF file for each ticket in the listing. Each PDF file is a ticket that contains complete information about the Section, Row, Seat, and the type of the ticket. Before uploading the PDF file, the pre-delivery service validates the seller and PDF file. After all tickets for the listing are delivered, the listing is marked as pre-delivered. - The second subpart references the PDF file object for each ticket that is uploaded to the listing. **Note**: This API allows the user to upload multiple files at one time. **Example 1:** Pre-delivering PDF for a ticket with seat numbers The following sample code in this request contains these headers: - The required header `Content-Type: multipart/form-data` means the request is composed of multiple subparts. In this example, the first subpart contains data in JSON format about the 'listing' itself (the row/seat for the ticket and the PDF file object, file1, to upload for the seat in the listing). - The required header `Content-Disposition: form-data; name="name"` indicates the each subpart, referencing either the 'listing' json or the reference to the PDF file object that is going to be uploaded to the listing. ``` POST /sellers/listings/pdf/v3/12345 HTTP/1.1 Host: api.stubhub.com Authorization: Bearer your-access-token Accept: application/json Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW Cache-Control: no-cache ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="listing" { "listing":{ "tickets":[ { "row":"X", "seat":"201", "name":"file1.pdf" }, { "row":"X", "seat":"202", "name":"file2.pdf" } ] } } ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file1.pdf" Content-Type: application/pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file2.pdf" Content-Type: application/pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW-- ``` **Example 2:** Pre-delivering PDF for a GA listing For a General Admission (GA) listing, everything is same as a regular listing except you do not have row and seat attributes in the JSON payload. ``` POST /sellers/listings/pdf/v3/12345 HTTP/1.1 Host: api.stubhub.com Authorization: Bearer your-access-token Accept: application/json Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW Cache-Control: no-cache ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="listing" { "listing":{ "tickets":[ { "row":"NA", "seat":"", "name":"file1.pdf" } ] } } ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file1.pdf" Content-Type: application/pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW ```

Body Parameters


Name Values Description
listing
(required)

Attachments


Name Value Description
fileName

Name of PDF file(s) to upload for the seat(s)

Request Body

A listing object specifying products in listing and their associated pdf filenames. Example: { 'tickets': [{ 'row': '1', 'seat': '1', 'name': 'fieldNameForPDF' }] }

listingId The StubHub listing ID to pre-deliver null true

HTTP Basic

OAuth 2.0

API Key

Reset

Make a request and see the response.

Make a request and see the response.

Make a request and see the response.

Response Error Details

  • HTTP Code
    Error Code
    Description
  • 400
    400

    Bad Request

  • 401
    401

    Invalid Access Token. You'll get this error if your access token expired or you didn't add the 'Bearer ' prefix to your token If your token expired, use the [refreshToken API](https://developer.stubhub.com/oauth/apis/post/refresh_accesstoken) to get a new access token.

  • 403
    403

    Forbidden

  • 404
    404

    Not Found

  • 500
    500

    inventory.listings.systemError

Resource Summary

Security

Content Type

multipart/form-data

Category

Predeliver Listing

Working...