### Example HTML with SDK Initialization Source: https://www.kinguin.net/dev-portal/guide Basic HTML structure including the Kinguin checkout SDK script and an example of initializing it on DOMContentLoaded. ```html Example HTML< /title> <script defer src="https://static.kinguin.net/checkout/sdk/sdk-1.3.0.min.js" >< /script> </head> <body> <div id="kinguinIframeWrapper"></div> <div class="productCard" data-product="https://www.kinguin.net/category/12345" > Product 1 </div> <div class="productCard" data-product="https://www.kinguin.net/category/67890" > Product 2 </div> <script> document.addEventListener('DOMContentLoaded', function () { window.kinguinCheckoutSDK.init({ productsSelector: '.productCard', }); }); < /script> </body> </html> ``` -------------------------------- ### Wholesale Offer Response Example Source: https://www.kinguin.net/dev-portal/guide This is an example of the response when an offer is configured with wholesale tiers. It shows the calculated prices and discounts for each level. ```json { "id": "660691850f65d000010da229", [ ... ] "priceIWTR": { "amount": 200, "currency": "EUR" }, "price": { "amount": 230, "currency": "EUR" }, "wholesale": { "name": "custom", "enabled": true, "tiers": [ { "discount": 3, "level": 1, "price": { "amount": 206, "currency": "EUR" }, "priceIWTR": { "amount": 194, "currency": "EUR" } }, { "discount": 4, "level": 2, "price": { "amount": 196, "currency": "EUR" }, "priceIWTR": { "amount": 192, "currency": "EUR" } }, { "discount": 5, "level": 3, "price": { "amount": 192, "currency": "EUR" }, "priceIWTR": { "amount": 190, "currency": "EUR" } }, { "discount": 7, "level": 4, "price": { "amount": 186, "currency": "EUR" }, "priceIWTR": { "amount": 186, "currency": "EUR" } } ] }, [ ... ] } ``` -------------------------------- ### Sandbox environment endpoint for creating offers Source: https://www.kinguin.net/dev-portal/guide Example of how to create an in-game offer using the sandbox environment gateway. ```APIDOC ## POST /sales-manager-api/api/v1/offers (Sandbox) ### Description Creates an in-game offer using the sandbox gateway. This is useful for testing purposes. ### Method POST ### Endpoint https://gateway.sandbox.kinguin.net/sales-manager-api/api/v1/offers ### Parameters #### Request Body - **productId** (String) - Required - The ID of the product for which the offer is to be created. - **price** (Object) - Required - The pricing details. - **amount** (Long) - Required - The price in cents. - **currency** (String) - Required - Currency, must be "EUR". ### Request Example ```bash curl -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ -d '{"productId": "${PRODUCT_ID}", "price": {"amount": 2, "currency": "EUR"}}' \ https://gateway.sandbox.kinguin.net/sales-manager-api/api/v1/offers ``` ``` -------------------------------- ### Create Offer in Sandbox Environment Source: https://www.kinguin.net/dev-portal/guide This example demonstrates creating an offer using the sandbox environment. Use the sandbox gateway URL for testing purposes before deploying to production. ```bash curl -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ -d '{"productId": "${PRODUCT_ID}", "price": {"amount": 2, "currency": "EUR"}}' \ https://gateway.sandbox.kinguin.net/sales-manager-api/api/v1/offers ``` -------------------------------- ### Get All Offers Source: https://www.kinguin.net/dev-portal/documentation Retrieves a list of offers with optional filtering and pagination. ```APIDOC ## GET /api/v1/offers ### Description Retrieves a list of offers based on the provided filter and pagination parameters. ### Method GET ### Endpoint /api/v1/offers ### Parameters #### Query Parameters - **filter** (OffersFilter) - Optional - Filter criteria for offers. - **page** (Pageable) - Optional - Pagination parameters. ### Response #### Success Response (200) - **content** (array) - An array of offer objects. - **metadata** (object) - Pagination metadata. - **summary** (object) - Summary statistics for the offers. #### Response Example ```json { "content": [ { "id": "string", "productId": "string", "name": "string", "sellerId": 0, "status": "string", "block": "string", "priceIWTR": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "ruleName": "string", "fixedAmount": 0, "percentValue": 0 }, "declaredStock": 0, "maxDeliveryDate": "2019-08-24T14:15:22Z", "declaredTextStock": 0, "reservedStock": 0, "availableStock": 0, "buyableStock": 0, "updatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "wholesale": { "name": "string", "enabled": true, "tiers": [ { "discount": 0, "level": 0, "price": { "amount": 0, "currency": "string" }, "priceIWTR": { "amount": 0, "currency": "string" } } ] }, "sold": 0, "productDetails": { "metacritic": 0, "region": { "id": 0, "name": "string" }, "platform": { "id": 0, "name": "string" }, "imageUrl": "string", "softwareMS": true, "productType": { "softwareMS": true, "prePaid": true, "skinsCSGO": true, "randomProduct": true, "indieValley": true, "nft": true, "businessStore": true }, "marketingProductType": "string" }, "preOrder": true, "sold1d": 0, "sold7d": 0, "sold30d": 0, "popularityBid": { "amount": 0, "currency": "string" }, "popularityPosition": 0, "popularity": 0, "buyButtonProbability": 0, "buyButtonBidEnabled": true, "hasBuyButtonDeal": true, "outOfStockIn1day": true, "merchantType": "string", "salesBoosterActivationDate": "2019-08-24T14:15:22Z", "salesBoosterRenewal": true, "spaActive": true, "favorite": true, "description": "string", "minQuantity": 0, "deliveryTime": "string", "deliveryMethods": "EMAIL", "productType": "string" } ], "metadata": { "page": 0, "size": 0, "totalElements": 0, "totalPages": 0 }, "summary": { "totalActive": 0, "totalActiveWithoutStock": 0, "totalInactive": 0, "totalBlock": 0, "totalManualVerification": 0, "totalPrePurchaseStock": 0, "OfferListSummaryBlock": { "total": 0, "totalBlock": 0, "totalManualVerification": 0, "totalTooManyReports24H": 0, "totalStockNotUploaded": 0 }, "totalSpaActive": 0, "totalFavorite": 0 } } ``` ``` -------------------------------- ### Get Wholesale Configuration Source: https://www.kinguin.net/dev-portal/documentation Retrieves the current wholesale configuration settings, including visibility and maximum stock display. ```APIDOC ## Get Wholesale Configuration ### Description Retrieves the current wholesale configuration settings, including visibility and maximum stock display. ### Method GET ### Endpoint /sales-manager-api/api/v1/wholesale/configuration ### Response #### Success Response (200) - **wholesaleVisibility** (string) - Indicates the visibility status of wholesale offers. - **maxWholesaleStockDisplay** (integer) - The maximum number of wholesale stock items to display. ``` -------------------------------- ### Offer Creation Response Structure Source: https://www.kinguin.net/dev-portal/guide This is an example response when an offer is successfully created. It includes details like the offer ID, product information, pricing, commission rules, and stock availability. ```json { "id": "660691850f65d000010da229", "productId": "60d990172adc85b8f1b1ee96", "name": "Forspoken EU PS5 CD Key", "sellerId": 1066100, "status": "ACTIVE", "block": null, "priceIWTR": { "amount": 1500, "currency": "EUR" }, "price": { "amount": 1660, "currency": "EUR" }, "commissionRule": { "id": "86656332-4494-4834-87f2-1214a69ce70e", "ruleName": "super-deal", "fixedAmount": 10, "percentValue": 10 }, "declaredStock": 0, "maxDeliveryDate": null, "declaredTextStock": 0, "reservedStock": 0, "availableStock": 0, "buyableStock": 0, "updatedAt": "2024-03-29T10:01:42.177+0000", "createdAt": "2024-03-29T10:01:41.733+0000", "wholesale": { "name": "Default", "enabled": true, "tiers": [ { "discount": 0, "level": 1, "price": { "amount": 1590, "currency": "EUR" }, "priceIWTR": { "amount": 1500, "currency": "EUR" } }, { "discount": 0, "level": 2, "price": { "amount": 1530, "currency": "EUR" }, "priceIWTR": { "amount": 1500, "currency": "EUR" } }, { "discount": 0, "level": 3, "price": { "amount": 1515, "currency": "EUR" }, "priceIWTR": { "amount": 1500, "currency": "EUR" } }, { "discount": 0, "level": 4, "price": { "amount": 1500, "currency": "EUR" }, "priceIWTR": { "amount": 1500, "currency": "EUR" } } ] }, "sold": 0, "productDetails": { "metacritic": null, "region": { "id": 3, "name": "Region Free" }, "platform": { "id": 13, "name": "Other" }, "imageUrl": "https://static.kinguin.net/media/images/products/_111.png", "softwareMS": null, "productType": { "softwareMS": false, "prePaid": true, "skinsCSGO": false, "randomProduct": false, "indieValley": false, "nft": false, "businessStore": false }, "marketingProductType": "GAME" }, "preOrder": false, "sold1d": 0, "sold7d": 0, "sold30d": 0, "popularityBid": { "amount": 0, "currency": "EUR" }, "popularityPosition": null, "popularity": 0.0, "buyButtonProbability": null, "buyButtonBidEnabled": true, "hasBuyButtonDeal": false, "outOfStockIn1day": null, "merchantType": "MERCHANT", "salesBoosterActivationDate": null, "salesBoosterRenewal": false, "spaActive": false, "favorite": null, "bestWholesaleOffer": null, "bestOffer": null } ``` -------------------------------- ### Get Block Reasons Source: https://www.kinguin.net/dev-portal/documentation Retrieves a list of reasons why offers might be blocked. ```APIDOC ## Get Block Reasons ##### Authorizations: _BearerAuth_ ### Responses **200** Successful **401** Unauthorized get/api/v1/offers/block-reasons Sandbox URL /sales-manager-api/api/v1/offers/block-reasons Production URL /sales-manager-api/api/v1/offers/block-reasons ### Response samples * 200 Content type application/json Copy Expand all Collapse all `[ * { * "blockReason": "ALLBLOCKED", * "count": 0 } ]` ``` -------------------------------- ### Stock Upload Response Example Source: https://www.kinguin.net/dev-portal/guide This is a sample response after successfully uploading stock. It includes the unique ID for the stock entry, product and offer IDs, seller ID, and the current status. ```json { "id":"f64e66d5-e26c-426a-ba8b-cfeb220972ff", "productId":"${PRODUCT_ID}", "offerId":"${OFFER_ID}", "sellerId":5005408, "status":"AVAILABLE" } ``` -------------------------------- ### Get Seller Response Sample Source: https://www.kinguin.net/dev-portal/documentation This JSON sample shows the response when retrieving seller information, indicating the seller type and status. ```json { "type": "C2C", "status": "string" } ``` -------------------------------- ### Get Wholesale Configuration Response Source: https://www.kinguin.net/dev-portal/documentation This JSON represents a successful response for retrieving wholesale configuration settings, including visibility and maximum stock display. ```json { "wholesaleVisibility": "VISIBLE", "maxWholesaleStockDisplay": 0 } ``` -------------------------------- ### Get All Offers Response Sample Source: https://www.kinguin.net/dev-portal/documentation This JSON structure represents a successful response when retrieving a list of offers. It includes offer details, pagination metadata, and a summary of offer statistics. ```json { "content": [ { "id": "string", "productId": "string", "name": "string", "sellerId": 0, "status": "string", "block": "string", "priceIWTR": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "ruleName": "string", "fixedAmount": 0, "percentValue": 0 }, "declaredStock": 0, "maxDeliveryDate": "2019-08-24T14:15:22Z", "declaredTextStock": 0, "reservedStock": 0, "availableStock": 0, "buyableStock": 0, "updatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "wholesale": { "name": "string", "enabled": true, "tiers": [ { "discount": 0, "level": 0, "price": { "amount": 0, "currency": "string" }, "priceIWTR": { "amount": 0, "currency": "string" } } ] }, "sold": 0, "productDetails": { "metacritic": 0, "region": { "id": 0, "name": "string" }, "platform": { "id": 0, "name": "string" }, "imageUrl": "string", "softwareMS": true, "productType": { "softwareMS": true, "prePaid": true, "skinsCSGO": true, "randomProduct": true, "indieValley": true, "nft": true, "businessStore": true }, "marketingProductType": "string" }, "preOrder": true, "sold1d": 0, "sold7d": 0, "sold30d": 0, "popularityBid": { "amount": 0, "currency": "string" }, "popularityPosition": 0, "popularity": 0, "buyButtonProbability": 0, "buyButtonBidEnabled": true, "hasBuyButtonDeal": true, "outOfStockIn1day": true, "merchantType": "string", "salesBoosterActivationDate": "2019-08-24T14:15:22Z", "salesBoosterRenewal": true, "spaActive": true, "favorite": true, "description": "string", "minQuantity": 0, "deliveryTime": "string", "deliveryMethods": "EMAIL", "productType": "string" } } ], "metadata": { "page": 0, "size": 0, "totalElements": 0, "totalPages": 0 }, "summary": { "totalActive": 0, "totalActiveWithoutStock": 0, "totalInactive": 0, "totalBlock": 0, "totalManualVerification": 0, "totalPrePurchaseStock": 0, "OfferListSummaryBlock": { "total": 0, "totalBlock": 0, "totalManualVerification": 0, "totalTooManyReports24H": 0, "totalStockNotUploaded": 0 }, "totalSpaActive": 0, "totalFavorite": 0 } } ``` -------------------------------- ### Get Block Reasons Response Sample Source: https://www.kinguin.net/dev-portal/documentation This sample shows the JSON response for retrieving block reasons. It lists different block reasons and their associated counts. ```json [ { "blockReason": "ALLBLOCKED", "count": 0 } ] ``` -------------------------------- ### Offer Position Response Sample Source: https://www.kinguin.net/dev-portal/documentation This is a sample JSON response for getting the position of an offer. It provides details about the current and new position, probabilities, and bidding information. ```json { "current": 0, "new": 0, "currentBuyButtonProbability": 0.1, "newBuyButtonProbability": 0.1, "buyButtonBidEnabled": true, "tier": { "from": 0, "maxDiff": 0.1, "entryFee": 0, "step": 0, "minBid": 0 }, "nextValidBid": 0 } ``` -------------------------------- ### Initialize SDK with Full Configuration Source: https://www.kinguin.net/dev-portal/guide Initialize the SDK with a comprehensive configuration object to customize various aspects of the checkout flow, including selectors, dimensions, translations, and more. ```javascript window.kinguinCheckoutSDK.init({ wrapperSelector: '#myIframeWrapper', productsSelector: '.myProductElement', productUrlAttribute: 'data-product-url', iframeId: 'myCheckoutIframe', iframeWidth: '80%', iframeHeight: '700px', popupWidth: 900, popupHeight: 1000, translations: { popupOpenFail: 'Window could not be opened, please try again.', }, discount: 'test123', language: 'de', currency: 'USD', email: 'test@test.com' }); ``` -------------------------------- ### Date Time Format Example Source: https://www.kinguin.net/dev-portal/guide Example of a date time field in the specified YYYY-MM-DDTHH:mm:ss.ms+0000 format, indicating GMT timezone. ```json "createDate": "2021-08-31T13:00:38.914+0000" ``` -------------------------------- ### Get Alerts Response Sample (JSON) Source: https://www.kinguin.net/dev-portal/documentation This is a sample JSON response for the 'Get Alerts' endpoint. It details the structure of alert objects, including their IDs, seller information, types, statuses, and associated source data. ```json { "content": [ { "id": "string", "sellerId": 0, "type": "STOCK_NOT_UPLOADED", "status": "string", "createdAt": "2019-08-24T14:15:22Z", "lastStatusCheck": "2019-08-24T14:15:22Z", "nextStatusCheck": "2019-08-24T14:15:22Z", "source": { "id": "string", "orderId": "string", "orderIncrementId": "string", "itemPrice": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "boughtPrice": { "amount": 0, "currency": "string" }, "popularityBid": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "name": "string", "fixedAmount": 0, "percentValue": 0, "updatedAt": null }, "sellerId": 0, "sellerName": "string", "customerId": 0, "offerId": "string", "productId": "string", "name": "string", "preorder": true, "rowNumber": 0, "createdDate": "2019-08-24T14:15:22Z", "toReleaseDate": "2019-08-24T14:15:22Z", "outOfStockDate": "2019-08-24T14:15:22Z", "nextAutoReleaseDate": "2019-08-24T14:15:22Z", "releasedDate": "2019-08-24T14:15:22Z", "releaseTryCount": 0, "releasedStockId": "string", "externalStockId": "string", "externalStockName": "string", "externalStockVendor": "string", "externalStockPrice": { "amount": 0, "currency": "string" }, "ktcId": "string", "status": "string", "orderItemId": "string", "requestedKeyType": "string", "errorMsg": "string", "replacedTo": "string", "replacedFrom": "string", "wholesaleProcess": true, "refundedInOrderAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "marketDetails": { "id": "string", "sku": "string", "name": "string", "brand": "string", "price": 0, "rulePrice": 0, "newPrice": 0, "rules": "string", "position": "string", "percentile": 0, "leadCompetitor": "string", "leadingCompetitorPrice": 0, "withTaxes": true }, "marketPriceDiff": 0, "marketPricePercent": 0, "lastKtcStatus": "string", "paymentStatus": "string", "productType": "string", "merchantType": "string", "restoredFromArchive": true, "maxDeliveryDate": "2019-08-24T14:15:22Z", "isRestocked": true, "orderPriceIwtr": { "amount": 0, "currency": "string" }, "orderBasePriceIwtr": { "amount": 0, "currency": "string" } }, "emailCount": 0, "ignored": true } ], "pageable": { "sort": { }, "pageSize": 0, "pageNumber": 0, "offset": 0, "unpaged": true, "paged": true }, "totalPages": 0, "totalElements": 0, "last": true, "size": 0, "number": 0, "sort": { "sorted": true, "unsorted": true, "empty": true } } ``` -------------------------------- ### Initialize SDK with Partial Configuration Source: https://www.kinguin.net/dev-portal/guide Initialize the SDK with a subset of configuration options, providing flexibility to override only specific settings like selectors and currency. ```javascript window.kinguinCheckoutSDK.init({ wrapperSelector: '#myIframeWrapper', productsSelector: '.myProductElement', productUrlAttribute: 'data-product-url', currency: 'USD', }); ``` -------------------------------- ### Get Seller Source: https://www.kinguin.net/dev-portal/documentation Retrieves information about the seller. ```APIDOC ## Get Seller ### Description Retrieves information about the seller. ### Method GET ### Endpoint /sales-manager-api/api/v1/merchants ### Response #### Success Response (200) - **type** (string) - The type of the seller (e.g., "C2C"). - **status** (string) - The status of the seller. ``` -------------------------------- ### Get Offer by ID Source: https://www.kinguin.net/dev-portal/documentation Retrieves a specific offer by its unique identifier. ```APIDOC ## GET /api/v1/offers/{offerId} ### Description Retrieves a specific offer using its unique ID. ### Method GET ### Endpoint /api/v1/offers/{offerId} ### Parameters #### Path Parameters - **offerId** (string) - Required - The unique identifier of the offer to retrieve. ### Response #### Success Response (200) - **content** (object) - The offer object details. #### Error Response (401) Unauthorized #### Error Response (404) Not found ``` -------------------------------- ### Initialize Kinguin Checkout SDK Source: https://www.kinguin.net/dev-portal/guide Initialize the SDK using this function after your product elements are ready in the DOM. This adds click handlers to product elements. ```javascript window.kinguinCheckoutSDK.init(); ``` -------------------------------- ### Create an In-Game Offer Source: https://www.kinguin.net/dev-portal/guide Use this endpoint to create a new in-game offer. Ensure all required parameters like productId, price, and delivery methods are correctly specified. The price is defined for the quantity specified in minQuantity. ```bash curl -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ -d '{ "productId": "66d8320d77a097501e74a356", "price": { "amount": 200, // price for the quantity specified in minQuantity "currency": "EUR" }, "declaredStock": 999999999, "status": "ACTIVE", "deliveryMethods": [ "FACE_TO_FACE" ], "minQuantity": 1000, // the price field corresponds to this quantity "description": "Short description.", "deliveryTime": "2h" }' \ https://gateway.kinguin.net/sales-manager-api/api/v1/offers ``` -------------------------------- ### Get Reservations Source: https://www.kinguin.net/dev-portal/documentation Retrieves a list of reservations with optional filtering and pagination. ```APIDOC ## GET /api/v1/reservations ### Description Retrieves a list of reservations. Supports filtering and pagination. ### Method GET ### Endpoint /sales-manager-api/api/v1/reservations ### Parameters #### Query Parameters - **filters** (ReservationsFilter) - Optional - Filter parameters for reservations. - **page** (Pageable) - Optional - Page parameters for pagination. ### Responses #### Success Response (200) - **content** (array) - List of reservations. - **pageable** (object) - Pagination information. - **totalPages** (integer) - Total number of pages. - **totalElements** (integer) - Total number of elements. - **last** (boolean) - Indicates if this is the last page. - **size** (integer) - Number of elements per page. - **number** (integer) - Current page number. - **sort** (object) - Sorting parameters. #### Response Example (200) ```json { "content": [ { "id": "string", "orderIncrementId": "string", "itemPrice": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "priceIWTR": { "amount": 0, "currency": "string" }, "popularityBid": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "ruleName": "string", "fixedAmount": 0, "percentValue": 0 }, "sellerId": 0, "sellerName": "string", "customerId": 0, "offerId": "string", "productId": "string", "name": "string", "rowNumber": 0, "createdDate": "2019-08-24T14:15:22Z", "toReleaseDate": "2019-08-24T14:15:22Z", "nextAutoReleaseDate": "2019-08-24T14:15:22Z", "releasedDate": "2019-08-24T14:15:22Z", "releaseTryCount": 0, "releasedStockId": "string", "releasedExternalStockId": "string", "status": "string", "orderItemId": "string", "maxDeliveryDate": "2019-08-24T14:15:22Z", "quantity": 0, "iwtrForMinQuantity": 0, "ingameAccountId": null, "deliveryMethod": null, "minQuantity": 0, "updatedAt": "2019-08-24T14:15:22Z" } ], "pageable": { "sort": {}, "pageSize": 0, "pageNumber": 0, "offset": 0, "unpaged": true, "paged": true }, "totalPages": 0, "totalElements": 0, "last": true, "size": 0, "number": 0, "sort": { "sorted": true, "unsorted": true, "empty": true } } ``` #### Error Response (401) Unauthorized ``` -------------------------------- ### Get Alert by ID Source: https://www.kinguin.net/dev-portal/documentation Retrieves a specific alert by its unique identifier. ```APIDOC ## GET /api/v1/alerts/{alertId} ### Description Retrieves a specific alert using its ID. ### Method GET ### Endpoint /sales-manager-api/api/v1/alerts/{alertId} ### Path Parameters - **alertId** (string) - Required - The unique identifier of the alert to retrieve. ### Responses #### Success Response (200) Returns the alert object matching the provided ID. #### Error Response (401) Unauthorized. #### Error Response (404) Alert not found. ``` -------------------------------- ### Initialize SDK with Auto-claim Flow Source: https://www.kinguin.net/dev-portal/guide Initializes the Kinguin checkout SDK with auto-claim enabled. Ensure tokenizedEmail and tokenizedData are correctly generated and provided. ```javascript window.kinguinCheckoutSDK.init({ wrapperSelector: '#myIframeWrapper', currency: 'EUR', discount: 'test123', autoClaimOptions: { autoClaim: true, emailConfirmed: true, tokenizedEmail: 'qtLHriIkq0KQdJgKlbHpQfuM1tFlJtCYXe-F2YitqQrh7UYF--77CxQ', tokenizedData: 'p--RdR6ON9h-4LwJFsWDRwecmlQpXKx3mjgVK3CUm1DRAapbUwKpqBD5_52T0WCWCkA6xx--LuceUvunwyQJkdY3UM1ZoupuwW7VPr_ALRCVX9G8WI2CS7oYIHR0qZqEGZei1zjul2w3Ubaphf62rDbcfbWPodnYCx6JW4TNxTo1W2zJfq3c' } }); ``` -------------------------------- ### Get Alerts Source: https://www.kinguin.net/dev-portal/documentation Retrieves a list of alerts with optional filtering and pagination. ```APIDOC ## GET /api/v1/alerts ### Description Retrieves a list of alerts. Supports filtering by alert type and pagination. ### Method GET ### Endpoint /sales-manager-api/api/v1/alerts ### Query Parameters - **filter** (object) - Optional - Filter parameters for alerts. Accepts an AlertsFilter object. - **page** (object) - Optional - Page parameters. Accepts a Pageable object. ### Responses #### Success Response (200) - **content** (array) - An array of alert objects. - **pageable** (object) - Pagination details. - **totalPages** (integer) - The total number of pages. - **totalElements** (integer) - The total number of elements. - **last** (boolean) - Indicates if this is the last page. - **size** (integer) - The number of elements per page. - **number** (integer) - The current page number. - **sort** (object) - Sorting information. ### Response Example (200) ```json { "content": [ { "id": "string", "sellerId": 0, "type": "STOCK_NOT_UPLOADED", "status": "string", "createdAt": "2019-08-24T14:15:22Z", "lastStatusCheck": "2019-08-24T14:15:22Z", "nextStatusCheck": "2019-08-24T14:15:22Z", "source": { "id": "string", "orderId": "string", "orderIncrementId": "string", "itemPrice": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "boughtPrice": { "amount": 0, "currency": "string" }, "popularityBid": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "name": "string", "fixedAmount": 0, "percentValue": 0, "updatedAt": null }, "sellerId": 0, "sellerName": "string", "customerId": 0, "offerId": "string", "productId": "string", "name": "string", "preorder": true, "rowNumber": 0, "createdDate": "2019-08-24T14:15:22Z", "toReleaseDate": "2019-08-24T14:15:22Z", "outOfStockDate": "2019-08-24T14:15:22Z", "nextAutoReleaseDate": "2019-08-24T14:15:22Z", "releasedDate": "2019-08-24T14:15:22Z", "releaseTryCount": 0, "releasedStockId": "string", "externalStockId": "string", "externalStockName": "string", "externalStockVendor": "string", "externalStockPrice": { "amount": 0, "currency": "string" }, "ktcId": "string", "status": "string", "orderItemId": "string", "requestedKeyType": "string", "errorMsg": "string", "replacedTo": "string", "replacedFrom": "string", "wholesaleProcess": true, "refundedInOrderAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "marketDetails": { "id": "string", "sku": "string", "name": "string", "brand": "string", "price": 0, "rulePrice": 0, "newPrice": 0, "rules": "string", "position": "string", "percentile": 0, "leadCompetitor": "string", "leadingCompetitorPrice": 0, "withTaxes": true }, "marketPriceDiff": 0, "marketPricePercent": 0, "lastKtcStatus": "string", "paymentStatus": "string", "productType": "string", "merchantType": "string", "restoredFromArchive": true, "maxDeliveryDate": "2019-08-24T14:15:22Z", "isRestocked": true, "orderPriceIwtr": { "amount": 0, "currency": "string" }, "orderBasePriceIwtr": { "amount": 0, "currency": "string" } }, "emailCount": 0, "ignored": true } ], "pageable": { "sort": {}, "pageSize": 0, "pageNumber": 0, "offset": 0, "unpaged": true, "paged": true }, "totalPages": 0, "totalElements": 0, "last": true, "size": 0, "number": 0, "sort": { "sorted": true, "unsorted": true, "empty": true } } ``` ``` -------------------------------- ### Create Offer using cURL Source: https://www.kinguin.net/dev-portal/guide Use this cURL command to create a new offer. Ensure you include the required productId and price fields. The price amount should be in the smallest currency unit (e.g., cents for USD). The status field is optional and defaults to ACTIVE. ```bash curl -X POST \ -H "Authorization: Bearer ${TOKEN}" \ -H "Content-Type: application/json" \ -d '{"productId": "${PRODUCT_ID}", "price": {"amount": 2, "currency": "EUR"}}' \ https://gateway.kinguin.net/sales-manager-api/api/v1/offers ``` -------------------------------- ### Get Reservations Stats Source: https://www.kinguin.net/dev-portal/documentation Retrieves statistics for reservations based on provided filters. ```APIDOC ## Get Reservations Stats ### Description Retrieves statistics for reservations based on provided filters. ### Method GET ### Endpoint /sales-manager-api/api/v1/reservations/stats ### Parameters #### Query Parameters - **filters** (object) - Optional - Filter parameters for reservations statistics. ### Responses #### Success Response (200) Returns a map of reservation statistics. ```json { "property1": { "dateToString": "string", "price": 0, "bid": 0, "count": 0 }, "property2": { "dateToString": "string", "price": 0, "bid": 0, "count": 0 } } ``` #### Error Response (401) Unauthorized. ``` -------------------------------- ### Offer Response Sample Source: https://www.kinguin.net/dev-portal/documentation This is a sample JSON response for an offer, detailing various attributes like pricing, stock, and product information. ```json { "id": "string", "productId": "string", "name": "string", "sellerId": 0, "status": "string", "block": "string", "priceIWTR": { "amount": 0, "currency": "string" }, "price": { "amount": 0, "currency": "string" }, "commissionRule": { "id": "string", "ruleName": "string", "fixedAmount": 0, "percentValue": 0 }, "declaredStock": 0, "maxDeliveryDate": "2019-08-24T14:15:22Z", "declaredTextStock": 0, "reservedStock": 0, "availableStock": 0, "buyableStock": 0, "updatedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "wholesale": { "name": "string", "enabled": true, "tiers": [ { "discount": 0, "level": 0, "price": { "amount": 0, "currency": "string" }, "priceIWTR": { "amount": 0, "currency": "string" } } ] }, "sold": 0, "productDetails": { "metacritic": 0, "region": { "id": 0, "name": "string" }, "platform": { "id": 0, "name": "string" }, "imageUrl": "string", "softwareMS": true, "productType": { "softwareMS": true, "prePaid": true, "skinsCSGO": true, "randomProduct": true, "indieValley": true, "nft": true, "businessStore": true }, "marketingProductType": "string" }, "preOrder": true, "sold1d": 0, "sold7d": 0, "sold30d": 0, "popularityBid": { "amount": 0, "currency": "string" }, "popularityPosition": 0, "popularity": 0, "buyButtonProbability": 0, "buyButtonBidEnabled": true, "hasBuyButtonDeal": true, "outOfStockIn1day": true, "merchantType": "string", "salesBoosterActivationDate": "2019-08-24T14:15:22Z", "salesBoosterRenewal": true, "spaActive": true, "favorite": true, "description": "string", "minQuantity": 0, "deliveryTime": "string", "deliveryMethods": "EMAIL", "productType": "string" } ```