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 it is displayed as instantly downloadable to buyers on StubHub. **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" { "products": [ { "row": "E", "seat": "151", "name":"file1.pdf" }, { "row": "E", "seat": "152", "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 can just specify 'GA' for 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" { "products": [ { "row":"GA", "seat":"GA", "name":"file1.pdf" } ] } ------WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="file1.pdf" Content-Type: application/pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW ```

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.

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...