-
Notifications
You must be signed in to change notification settings - Fork 0
Inventory API
##(THIS API IS IN DEVELOPMENT...)
##Overview
The Inventory API allows partners to manage inventory on ScoreBig.com in real-time.
Please note that any inventory that is added via the API will get overwritten if a CSV import is performed.
To request access to the Inventory API, please contact ScoreBig.
##Objects
###Object: TicketBlock
| Field | Type | Description |
|---|---|---|
| ticket_id | string | Your unique ID for this ticket |
| event_id | string | ScoreBig event ID |
| section | string | |
| row | string | |
| quantity | string | |
| start_seat | string | |
| end_seat | string | |
| odd_even | bool | Indicates odd/even seating (e.g. "1,3,5" or "2,4,6") |
| electronic | bool | Indicates whether or not eTickets are available for this TicketBlock |
| ga | bool | Indicates whether or not the tickets are general admission |
| splits | string | Indicates valid splits for this TicketBlock (up to 8) |
| face_value | decimal | Face value of the ticket |
| price | decimal | Your price for the ticket |
| rating | int | the rating for this ticket |
| rating_display | string | the user-friendly name of the seat rating |
| notes | string | |
| in_hand_date | date | Indicates when tickets will be available for delivery |
| expiration_datetime | datetime | Indicates when tickets will be taken off ScoreBig |
###Object: TicketResult
| Field | Type | Description |
|---|---|---|
| ticket_id | string | Your unique ID for this ticket |
| success | bool | Indicates whether or not operation succeeded |
| message | string | Message associated with ticket |
##Methods
###Method: GetTicketBlock
######Description
Returns TicketBlock identified by ticket_id
######URI
GET /tickets/:ticket_id
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| ticket_id | string | Y | Your unique ID for this ticket. |
######Sample Request
GET http://api.developer.scorebig.com/1/tickets/777?api_key=abcde
GET http://api.developer.scorebig.com/1/tickets?api_key=abcde&ticket_id=777
######Sample Response
{
"type": "TicketBlock",
"count": 1,
"results": [
{
"ticket_id": "777",
"event_id": "00000000-0000-0000-0000-000000000001",
"section": "MEZ",
"row": "A",
"quantity": 4,
"start_seat": "20",
"end_seat": "23",
"odd_even": false,
"ga": false,
"electronic": false,
"splits": "1,2,3,4",
"face_value": 30,
"price": 21,
"rating": 4,
"rating_display": "FourStar",
"notes": null,
"in_hand_date": null,
"expiration_datetime": "1/1/2020 12:00:00 AM"
}
]
}###Method: GetTicketBlocksForEvent
######Description
Returns an array of TicketBlock objects for specific Event
######URI
GET /tickets/?event_id=:event_id
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| event_id | guid | Y | ScoreBig event ID. |
######Sample Request
GET http://api.developer.scorebig.com/1/tickets?api_key=abcde&event_id=2234533
######Sample Response
{
"type": "TicketBlock",
"count": 3,
"results": [
{
"ticket_id": "777",
"event_id": "00000000-0000-0000-0000-000000000001",
"section": "MEZ",
"row": "A",
"quantity": 4,
"start_seat": "20",
"end_seat": "23",
"odd_even": false,
"ga": false,
"electronic": false,
"splits": "1,2,3,4",
"face_value": 30,
"price": 21,
"rating": 4,
"rating_display": "FourStar",
"notes": null,
"in_hand_date": null,
"expiration_datetime": "1/1/2020 12:00:00 AM"
},
{
"ticket_id": "888",
"event_id": "00000000-0000-0000-0000-000000000001",
"section": "MEZ",
"row": "B",
"quantity": 6,
"start_seat": "20",
"end_seat": "25",
"odd_even": false,
"ga": false,
"electronic": false,
"splits": "1,2,3,4,5,6",
"face_value": 30,
"price": 21,
"rating": 4,
"rating_display": "FourStar",
"notes": null,
"in_hand_date": null,
"expiration_datetime": "1/1/2020 12:00:00 AM"
},
{
"ticket_id": "999",
"event_id": "00000000-0000-0000-0000-000000000001",
"section": "MEZ",
"row": "C",
"quantity": 8,
"start_seat": "20",
"end_seat": "27",
"odd_even": false,
"ga": false,
"electronic": false,
"splits": "1,2,3,4,5,6,7,8",
"face_value": 30,
"price": 21,
"rating": 4,
"rating_display": "FourStar",
"notes": null,
"in_hand_date": null,
"expiration_datetime": "1/1/2020 12:00:00 AM"
}
]
}##Methods for Managing Inventory
The following methods allow you to insert or update inventory on ScoreBig.com.
This is not a differencing system, so new blocks will be added and existing blocks will be updated. If you delete a block on your side, please make sure to call the Delete Inventory method to remove it from our system so we don't sell it. Merely excluding it from a future import will not remove it from our system.
######Event Matching
One of the requirements is that the ticket is matched to an existing event in our system. If an event_id is provided, the system will verify that the event_id exists in our system. If there is no event_id, it will attempt to identify the event based on the event_date_time and the venue. If not suitable match is found based on the information given, then an error will be returned in the response.
###Method: InsertOrUpdateTicketBlock
######Description
Inserts new TicketBlock or updates if it already exists.
If the ticket already exists, then only the fields that were passed in the request will get updated. If the ticket does not currently exist, then the request will be validated to ensure that you have supplied all the required fields.
######URI
PUT /tickets/:ticket_id
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| ticket_id | string | Y | Your unique ID for this ticket. | |
| event_id | guid | ScoreBig event ID. | ||
| event_date_time | string | Y | Local event date time, in the format of MM-dd-yyyy hh:mm zz | |
| venue | string | Y | Venue name. | |
| venue_address | string | Can improve event matching if provided. | ||
| venue_city | string | Can improve event matching if provided. | ||
| venue_state | string | Can improve event matching if provided. | ||
| section | string | Y | ||
| row | string | Y | ||
| quantity | int | Y | ||
| start_seat | string | Y | ||
| end_seat | string | Y | ||
| odd_even | bool | Specifies if seats are odd/even (e.g. 1,3,5 or 2,4,6). default is FALSE | ||
| splits | string | Comma-separated list of valid splits, i.e. 2,3,4,6,8. Max split is 8. | ||
| price | decimal | Y | Your price for the ticket | |
| electronic | bool | Whether or not e-tickets are available. default is FALSE | ||
| in_hand_date | string | The date the listing can be shipped | ||
| notes | string | Any notes or comments associated with this ticket |
NOTE: for update requests, only ticket_id is required
####Example #1 - Insert TicketBlock
######Sample Request (json)
PUT http://api.developer.scorebig.com/1/tickets/222
Content-Type: application/json; charset=utf-8
{
"ticket_id": "222",
"event_id": "00000000-0000-0000-0000-000000000001",
"section": "MEZ",
"row": "B",
"quantity": 4,
"start_seat": "20",
"end_seat": "23",
"odd_even": false,
"price": "21"
}######Sample Request (alternate)
PUT http://api.developer.scorebig.com/1/tickets/222
Content-Type: application/x-www-form-urlencoded
event_id=00000000-0000-0000-0000-000000000001§ion=MEZ&row=B&quantity=4&start_seat=20&end_seat=23&odd_even=false&price=21
######Sample Response
{
"type" : "TicketResult",
"count" : 1,
"results" : [{
"ticket_id" : "222",
"success" : true,
"message" : "New ticket added to queue."
}
]
}####Example #2 - Update TicketBlock
######Sample Request (json)
PUT http://api.developer.scorebig.com/1/tickets/222
Content-Type: application/json; charset=utf-8
{
"ticket_id": "222",
"quantity": 2,
"start_seat": "20",
"end_seat": "21",
"price": "16"
}######Sample Request (alternate)
PUT http://api.developer.scorebig.com/1/tickets/222
Content-Type: application/x-www-form-urlencoded
quantity=2&start_seat=20&end_seat=21&price=16
######Sample Response
{
"type" : "TicketResult",
"count" : 1,
"results" : [{
"ticket_id" : "222",
"success" : true,
"message" : "Ticket update added to queue."
}
]
}###Method: BulkInsertOrUpdateTicketBlocks
######Description
Bulk inserts or updates ticket blocks.
######URI
POST /tickets
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| tickets | array of tickets | Y | Array of JSON objects representing each ticket request. |
######Sample Request
POST http://api.developer.scorebig.com/1/tickets
Content-Type: application/json; charset=utf-8
{
"tickets": [
{
"ticket_id": "777",
"event_id": "00000000-0000-0000-0000-000000000001",
"event_name": "Test - Developer Testing Event",
"event_date_time": "1/2/2020 8:00:00 AM",
"venue": "Staples Center",
"section": "MEZ",
"row": "A",
"quantity": 6,
"start_seat": "20",
"end_seat": "25",
"electronic": false,
"odd_even": false,
"price": "22"
},
{
"ticket_id": "666",
"event_id": "00000000-0000-0000-0000-000000000001",
"event_name": "Test - Developer Testing Event",
"event_date_time": "1/2/2020 8:00:00 AM",
"venue": "Staples Center",
"section": "MEZ",
"row": "23",
"quantity": 1,
"start_seat": "20",
"end_seat": "20",
"electronic": false,
"odd_even": false,
"price": "22"
},
{
"ticket_id": "555",
"event_name": "Test - Developer Testing Event",
"event_date_time": "1/2/2020 8:00:00 AM",
"venue": "Staples Center",
"section": "MEZ",
"row": "23",
"quantity": 1,
"start_seat": "20",
"end_seat": "20",
"electronic": false,
"odd_even": false,
"price": "22"
}
]
}######Sample Response
{
"type" : "TicketResult",
"count" : 3,
"results" : [{
"ticket_id" : "777",
"success" : true,
"message" : "New ticket added to queue."
}, {
"ticket_id" : "666",
"success" : true,
"message" : "New ticket added to queue."
}, {
"ticket_id" : "555",
"success" : false,
"message" : "More than one event was detected. Try using an explicit Event ID in your request."
}
]
}###Method: DeleteTicketBlock
######Description
Deletes the TicketBlock identified by ticket_id.
######URI
DELETE /tickets/:ticket_id
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| ticket_id | string | Y | ticket_id to be deleted. |
######Sample Request
DELETE http://api.developer.scorebig.com/1/tickets/222?api_key=abcde
######Sample Response
{
"type" : "Result",
"count" : 1,
"results" : ["Successfully deleted 1 of 1 ticket block(s)."]
}###Method: BulkDeleteTicketBlocks
######Description
Deletes TicketBlocks identified by the list of ticket_ids.
######URI
POST /tickets/delete
######Parameters
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| api_key | guid | Y | Your unique API key. | |
| ticket_id | array of string | Y | list of ticket_ids to be deleted. |
######Sample Request
POST http://api.developer.scorebig.com/1/tickets/delete
Content-Type: application/json; charset=utf-8
{
"ticket_id": [
"777",
"888"
]
}######Sample Response
{
"type" : "Result",
"count" : 1,
"results" : ["Successfully deleted 2 of 2 ticket block(s)."]
}