### Get Alerts Response (JSON) Source: https://apidocs.cheapshark.com/ This is an example JSON response when successfully retrieving price alerts. It lists the price, game title, and game ID for each alert. ```json [ { "price": "20.00", "game": "Cyberpunk 2077: Phantom Liberty", "gameID": "264414" }, { "price": "15.00", "game": "Moss: Book II", "gameID": "252354" }, { "price": "5.00", "game": "The Talos Principle", "gameID": "135790" }, { "price": "15.00", "game": "Total War: PHARAOH", "gameID": "261052" } ] ``` -------------------------------- ### GET /alerts Source: https://apidocs.cheapshark.com/ Sets or deletes a price alert for a specific game based on the provided email, gameID, and price. ```APIDOC ## GET /alerts ### Description Set or delete a price alert. When setting, returns true for valid email / gameID / price, otherwise false. When deleting, returns true for valid email / gameID, otherwise false. ### Method GET ### Endpoint https://www.cheapshark.com/api/1.0/alerts ### Parameters #### Query Parameters - **action** (string) - Required - The action to take on the price alert (set or delete). - **email** (string) - Required - Any valid email address. - **gameID** (integer) - Required - An existing gameID. - **price** (decimal) - Required (for set) - The price to wait for. ### Request Example curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=set&email=someone@example.org&gameID=59&price=14.99' ### Response #### Success Response (200) - **result** (boolean) - Returns true if the operation was successful, otherwise false. #### Response Example true ``` -------------------------------- ### GET /stores Source: https://apidocs.cheapshark.com/ Retrieves a mapping of storeIDs to their last update or change time in Unix Timestamp format. ```APIDOC ## GET /stores ### Description Including the lastChange parameter on the Stores endpoint will return an object with a mapping of storeIDs to the last update / change time for that store (in Unix Timestamp format). This can be useful to know for reducing the number of API requests for deals or games. ### Method GET ### Endpoint https://www.cheapshark.com/api/1.0/stores ### Parameters #### Query Parameters - **lastChange** (string) - Required - The parameter to trigger the return of store update timestamps. ### Request Example curl --location 'https://www.cheapshark.com/api/1.0/stores?lastChange=' ### Response #### Success Response (200) - **storeID** (string) - The key represents the store ID, and the value is the Unix Timestamp of the last change. #### Response Example { "1": "1687194696", "2": "1687192946", "3": "1687195550" } ``` -------------------------------- ### Get Alerts Request (cURL) Source: https://apidocs.cheapshark.com/ Use this cURL command to retrieve all existing price alerts. A 'key' obtained from the manage alerts email is required. ```bash curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=get&key=valid-key-with-alerts' ``` -------------------------------- ### Get Alerts API Source: https://apidocs.cheapshark.com/ Retrieve all existing price alerts associated with a given key. This key is obtained from the 'Manage Alerts' email. ```APIDOC ## GET /api/1.0/alerts?action=get ### Description This endpoint will return all your existing alerts. It requires a `key` which you can retrieve from the link sent to your email when using the `Manage Alerts` endpoint. ### Method GET ### Endpoint https://www.cheapshark.com/api/1.0/alerts ### Query Parameters - **action** (string) - Required - The action to take on the price alert. Must be 'get'. - **key** (string) - Required - The key parameter from your manage link (received via email). ### Request Example ```curl curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=get&key=example-key-value' ``` ### Response #### Success Response (200) - **Body** (json) - An array of alert objects, each containing price, game name, and gameID. #### Response Example ```json [ { "price": "20.00", "game": "Cyberpunk 2077: Phantom Liberty", "gameID": "264414" }, { "price": "15.00", "game": "Moss: Book II", "gameID": "252354" } ] ``` ``` -------------------------------- ### Manage Alerts Request (cURL) Source: https://apidocs.cheapshark.com/ Use this cURL command to send an email containing a link to manage your price alerts. Ensure the email address provided has existing alerts. ```bash curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=manage&email=valid-address-with-alerts%40example.org' ``` -------------------------------- ### Manage Alerts API Source: https://apidocs.cheapshark.com/ Send an email containing a link to manage your alerts. This is the first step in setting up or managing price alerts. ```APIDOC ## GET /api/1.0/alerts?action=manage ### Description Send an email containing a link to manage your alerts. ### Method GET ### Endpoint https://www.cheapshark.com/api/1.0/alerts ### Query Parameters - **action** (string) - Required - The action to take on the price alert. Must be 'manage'. - **email** (string) - Required - Any valid email address with existing alerts. ### Request Example ```curl curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=manage&email=address-with-alerts@example.org' ``` ### Response #### Success Response (200) - **Body** (html) - Confirmation message indicating the link has been sent. #### Response Example ```html Link sent to email ``` ``` -------------------------------- ### Retrieve Store Last Change Timestamps Source: https://apidocs.cheapshark.com/ Fetches a mapping of store IDs to their last update time in Unix timestamp format. ```curl curl --location 'https://www.cheapshark.com/api/1.0/stores?lastChange=' ``` ```json { "1": "1687194696", "2": "1687192946", "3": "1687195550", "7": "1687194216", "8": "1687192703", "11": "1687192630", "13": "1687192395", "15": "1687194986", "21": "1687195460", "23": "1687195017", "24": "1687195029", "25": "1687193047", "27": "1687194841", "28": "1687195460", "29": "1687195267", "30": "1687193808", "31": "1687192468", "33": "1687195753", "34": "1687195631", "35": "1687195735" } ``` -------------------------------- ### Edit Price Alert Source: https://apidocs.cheapshark.com/ Sets or deletes a price alert for a specific game and email address. Returns a boolean indicating success. ```curl curl --location 'https://www.cheapshark.com/api/1.0/alerts?action=set&email=someone%40example.org&gameID=59&price=14.99' ``` ```html true ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.