This is an open BETA version of the software and is intended only for experienced users of EquipCalendar.

 Event Inventory

Inventory booked or rented for a specific event.

HTTP Methods and URLs

This endpoint uses the following HTTP methods and urls:

GET Used for retrieving all inventory of a single event https://api.equipcalendar.com/v2/events/{eventId:int}/inventory
GET Used for retrieving a single events inventory https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}
POST Used for creating event inventory https://api.equipcalendar.com/v2/events/{eventId:int}/inventory
PUT Used for updating an events inventory https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}
DELETE Used for deleting event inventory https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}

All requests to this endpoint must contain an access_token (encoded using base64) in the Authorization HTTP Header. See the Authentication endpoint for more details.

Request Header (Example)
GET /v2/events/{eventId:int}/inventory HTTP/1.1
Host: https://api.equipcalendar.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 Chrome/43.0.2357.124 Safari/537.36
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Authorization: bearer MmViNDg0OGEtNDk1ZS00NDQ2LWE0MjEtYjBiOTYwM2E1Mno5Omd1aWQ=

Retrieving all inventory for an event

GET https://api.equipcalendar.com/v2/events/{eventId:int}/inventory

Parameter(s)

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required

Request Body

NONE

Response

{
    "data": [
        {
            "id": 140,
            "eventId": 161,
            "inventoryId": 73,
            "quantity": 20,
            "price": 3.25,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory"
                }
            ]
        },
        {
            "id": 143,
            "eventId": 161,
            "inventoryId": 289,
            "quantity": 20,
            "price": 3.00,</snipped for brevity>
                                            

Retrieve a single inventory item for an event

GET https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}

Parameter(s)

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required
id the identifier of the object to address integer 2^31-1 (2,147,483,647) Required

Request Body

NONE

Response

{
    "data": [
        {
            "id": 140,
            "eventId": 161,
            "inventoryId": 73,
            "quantity": 20,
            "price": 3.25,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/140"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory"
                }
            ]
        }
    ]
}
                                            

Add inventory to an event

POST https://api.equipcalendar.com/v2/events/{eventId:int}/inventory

Parameter(s)

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required

Request Body Fields

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required
inventoryId integer Use values from Inventory Endpoint Required
quantity Total units rented integer 2^31-1 (2,147,483,647) Required, greater than or equal to zero
price Unit price decimal Required, greater than or equal to zero

Request Body Example

{
  "eventId":"161",
  "inventoryId":542,
  "quantity":"20",
  "price":"4.25"
}
                                            

Response

{
    "data": [
        {
            "id": 146,
            "eventId": 161,
            "inventoryId": 542,
            "quantity": 20,
            "price": 4.25,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory"
                }
            ]
        }
    ]
}
                                            

Update an inventory item for an event

PUT https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}

Parameter(s)

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required
id the identifier of the object to address integer 2^31-1 (2,147,483,647) Required

Request Body Fields

Field Description Data Type Comments
id Object identifier integer 2^31-1 (2,147,483,647) Required
eventId the identifier of the object to address integer Use values from Events Endpoint Required
inventoryId integer Use values from Inventory Endpoint Required
quantity Total units rented integer 2^31-1 (2,147,483,647) Required, greater than or equal to zero
price Unit price decimal Required, greater than or equal to zero

Request Body Example

{
  "id":"146",
  "eventId":"161",
  "inventoryId":542,
  "quantity":"15",
  "price":"3.75"
}
                                            

Response

{
    "data": [
        {
            "id": 146,
            "eventId": 161,
            "inventoryId": 542,
            "quantity": 15,
            "price": 3.75,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory/146"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v2/events/161/inventory"
                }
            ]
        }
    ]
}
                                            

Delete inventory from an event

DELETE https://api.equipcalendar.com/v2/events/{eventId:int}/inventory/{id:int}

Parameter(s)

Field Description Data Type Comments
eventId the identifier of the object to address integer Use values from Events Endpoint Required
id the identifier of the object to address integer 2^31-1 (2,147,483,647) Required

Request Body

NONE

Response

{
    "id": 146
}

© 2024 EQPD, LLC