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

 Event Inventory (v1)

Inventory unit price per rental block.

HTTP Methods and URLs

This endpoint uses the following HTTP methods and urls:

GET Used for retrieving all prices of a single inventory item https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing
GET Used for retrieving a single inventory price https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{id:int}
POST Used for creating an inventory price https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing
PUT Used for updating an inventory price https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{id:int}
DELETE Used for deleting an inventory price https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{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 /v1/inventory/{inventoryId:int}/pricing 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 prices of a single inventory item

GET https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing

Parameter(s)

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

Request Body

NONE

Response

{
    "data": [
        {
            "id": 949,
            "inventoryId": 2,
            "rentalBlockId": 10,
            "price": 13.75,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing"
                }
            ]
        },
        {
            "id": 901,
            "inventoryId": 2,
            "rentalBlockId": 654,
            "price": 15.99,</snipped for brevity>
                                            

Retrieve a single inventory price

GET https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{id:int}

Parameter(s)

Field Description Data Type Comments
inventoryId the identifier of the object to address integer Use values from Inventory 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": 949,
            "inventoryId": 2,
            "rentalBlockId": 10,
            "price": 0,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/949"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing"
                }
            ]
        }
    ]
}
                                            

Add an inventory price

POST https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing

Parameter(s)

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

Request Body Fields

Field Description Data Type Comments
inventoryId integer Use values from Inventory Endpoint Required
rentalBlockId integer Use values from Rental Blocks Endpoint Required
price Unit price decimal Required, greater than or equal to zero

Request Body Example

{ 
    "inventoryId": 2,
    "rentalBlockId": 3,
    "price": 14.49
}
                                            

Response

{
    "data": [
        {
            "id": 34,
            "inventoryId": 2,
            "rentalBlockId": 3,
            "price": 14.49,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing"
                }
            ]
        }
    ]
}
                                            

Update a price for an inventory item

PUT https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{id:int}

Parameter(s)

Field Description Data Type Comments
inventoryId the identifier of the object to address integer Use values from Inventory 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
inventoryId integer Use values from Inventory Endpoint Required
rentalBlockId integer Use values from Rental Blocks Endpoint Required
price Unit price decimal Required, greater than or equal to zero

Request Body Example

{
    "id": 34,
    "inventoryId": 2,
    "rentalBlockId": 3,
    "price": 15.49
}
                                            

Response

{
    "data": [
        {
            "id": 34,
            "inventoryId": 2,
            "rentalBlockId": 3,
            "price": 15.49,
            "Links": [
                {
                    "rel": "self",
                    "method": "GET",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "edit",
                    "method": "PUT",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "delete",
                    "method": "DELETE",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing/34"
                },
                {
                    "rel": "add",
                    "method": "POST",
                    "href": "https://api.equipcalendar.com/v1/inventory/2/pricing"
                }
            ]
        }
    ]
}
                                            

Delete an inventory price

DELETE https://api.equipcalendar.com/v1/inventory/{inventoryId:int}/pricing/{id:int}

Parameter(s)

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

Request Body

NONE

Response

{
    "id": 1467
}

© 2024 EQPD, LLC