### Get All Products Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve the complete product catalog with pricing, availability, and metadata. Supports pagination and filtering. ```APIDOC ## Get All Products ### Description Retrieve the complete product catalog with pricing, availability, and metadata. Products include game keys for various platforms like Steam, PlayStation, Xbox, and others. Supports pagination and filtering. ### Method GET ### Endpoint `/v3/products` ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **pageSize** (integer) - Optional - The number of items per page. - **filter** (string) - Optional - Filtering criteria (e.g., platform, genre). ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/products?page=1&pageSize=50' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - An array of product objects. - **productId** (string) - Unique identifier for the product. - **name** (string) - Name of the product. - **platform** (string) - The platform the product is for (e.g., STEAM, PLAYSTATION). - **regions** (array of strings) - Supported regions. - **languages** (array of strings) - Supported languages. - **price** (number) - The price of the product. - **inStock** (boolean) - Availability status. - **releaseDate** (string) - Release date of the product. - **totalItems** (integer) - Total number of products available. - **page** (integer) - The current page number. #### Response Example ```json { "items": [ { "productId": "abc123", "name": "Game Title", "platform": "STEAM", "regions": ["EUROPE", "NORTH_AMERICA"], "languages": ["EN", "ES", "FR"], "price": 29.99, "inStock": true, "releaseDate": "2024-01-15" } ], "totalItems": 5000, "page": 1 } ``` ``` -------------------------------- ### Get Product Description Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve detailed product description including game overview, system requirements, features, and marketing content. ```APIDOC ## Get Product Description ### Description Retrieve detailed product description including game overview, system requirements, features, and marketing content. Descriptions are typically rich HTML or markdown text. ### Method GET ### Endpoint `/v3/products/{productId}/description` ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/products/abc123/description' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **productId** (string) - Unique identifier for the product. - **description** (string) - The product description content. - **systemRequirements** (object) - System requirements for the product. - **minimum** (string) - Minimum system requirements. - **recommended** (string) - Recommended system requirements. - **features** (array of strings) - List of product features. #### Response Example ```json { "productId": "abc123", "description": "

An open-world action-adventure story...

", "systemRequirements": { "minimum": "OS: Windows 10, CPU: Intel Core i5...", "recommended": "OS: Windows 10, CPU: Intel Core i7..." }, "features": ["Single Player", "Achievements", "Cloud Saves"] } ``` ``` -------------------------------- ### Get Product Images Source: https://context7.com/context7/codeswholesale/llms.txt Access product cover art, screenshots, and promotional images. Returns image metadata and URLs for different resolutions. ```APIDOC ## Get Product Images ### Description Access product cover art, screenshots, and promotional images. Returns image metadata and URLs for different resolutions. ### Method GET ### Endpoint `/v3/productImages/{productId}` ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/productImages/abc123' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **productId** (string) - Unique identifier for the product. - **images** (array) - An array of image objects. - **type** (string) - Type of image (e.g., 'cover', 'screenshot'). - **url** (string) - URL to the image. - **width** (integer) - Image width in pixels. - **height** (integer) - Image height in pixels. #### Response Example ```json { "productId": "abc123", "images": [ { "type": "cover", "url": "https://cdn.codeswholesale.com/images/abc123_cover.jpg", "width": 600, "height": 900 }, { "type": "screenshot", "url": "https://cdn.codeswholesale.com/images/abc123_ss1.jpg", "width": 1920, "height": 1080 } ] } ``` ``` -------------------------------- ### Get Single Product Source: https://context7.com/context7/codeswholesale/llms.txt Fetch detailed information about a specific product using its unique identifier. ```APIDOC ## Get Single Product ### Description Fetch detailed information about a specific product using its unique identifier. Returns comprehensive product data including pricing, stock status, supported regions, languages, and associated images. ### Method GET ### Endpoint `/v3/products/{productId}` ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier of the product. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/products/abc123' \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **productId** (string) - Unique identifier for the product. - **name** (string) - Name of the product. - **platform** (string) - The platform the product is for. - **regions** (array of strings) - Supported regions. - **languages** (array of strings) - Supported languages. - **price** (number) - The price of the product. - **inStock** (boolean) - Availability status. - **releaseDate** (string) - Release date of the product. - **descriptionUrl** (string) - URL to fetch the product description. - **imagesUrl** (string) - URL to fetch product images. #### Response Example ```json { "productId": "abc123", "name": "Cyberpunk 2077", "platform": "STEAM", "regions": ["WORLDWIDE"], "languages": ["EN", "ES", "FR", "DE"], "price": 49.99, "inStock": true, "releaseDate": "2020-12-10", "descriptionUrl": "/v3/products/abc123/description", "imagesUrl": "/v3/productImages/abc123" } ``` ``` -------------------------------- ### Get Product Description - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve a detailed product description, which may include game overviews, system requirements, features, and marketing content in HTML or markdown format. An access token is necessary for this request. ```bash curl 'https://sandbox.codeswholesale.com/v3/products/abc123/description' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Platforms (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Lists all supported gaming platforms available through Codeswholesale. Requires an API key. Useful for filtering products and building platform-specific catalogs. ```bash curl 'https://sandbox.codeswholesale.com/v3/platforms' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### GET /v3/codes/{codeId} Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve the actual redemption code and instructions after purchasing. This is the final step to deliver digital content to your customers. ```APIDOC ## GET /v3/codes/{codeId} ### Description Retrieve the actual redemption code and instructions after purchasing. This is the final step to deliver digital content to your customers. ### Method GET ### Endpoint /v3/codes/{codeId} ### Parameters #### Path Parameters - **codeId** (string) - Required - The unique identifier for the code. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/codes/code-001' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **codeId** (string) - The unique identifier for the code. - **code** (string) - The actual redemption code. - **type** (string) - The type of the code (e.g., text). - **productId** (string) - The unique identifier for the product. - **productName** (string) - The name of the product. - **platform** (string) - The platform for which the code is valid (e.g., STEAM). - **region** (string) - The region for which the code is valid (e.g., WORLDWIDE). - **instructions** (string) - Instructions on how to redeem the code. - **expirationDate** (string or null) - The expiration date of the code, or null if not applicable. - **isPreorder** (boolean) - Indicates if the code is for a pre-order. #### Response Example ```json { "codeId": "code-001", "code": "XXXXX-XXXXX-XXXXX-XXXXX", "type": "text", "productId": "abc123", "productName": "Cyberpunk 2077", "platform": "STEAM", "region": "WORLDWIDE", "instructions": "Redeem on Steam: 1. Open Steam client 2. Click 'Add a Game'...", "expirationDate": null, "isPreorder": false } ``` ``` -------------------------------- ### Get All Products - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve the entire product catalog, including pricing and availability details for various game keys. This endpoint supports pagination and filtering to manage large datasets efficiently. An access token is required for authentication. ```bash curl 'https://sandbox.codeswholesale.com/v3/products' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Orders API Source: https://codeswholesale.com/documentation/index Manage orders, including fetching order history, creating new orders, retrieving specific orders, and getting invoices. ```APIDOC ## GET /v3/orders ### Description Retrieves the order history for the account. ### Method GET ### Endpoint /v3/orders ### Response #### Success Response (200) - (array) - A list of order objects. ## POST /v3/orders ### Description Creates a new order. ### Method POST ### Endpoint /v3/orders ### Parameters #### Request Body - **productId** (string) - Required - The ID of the product to order. - **quantity** (integer) - Required - The quantity of the product. ### Request Example ```json { "productId": "prod123", "quantity": 2 } ``` ### Response #### Success Response (200) - (object) - Details of the created order. ## GET /v3/orders/{orderId} ### Description Fetches details of a specific order using its Order Identifier. ### Method GET ### Endpoint /v3/orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier for the order. ### Response #### Success Response (200) - (object) - Details of the specified order. ## GET /v3/orders/{orderId}/invoice ### Description Retrieves the invoice for a specific order using its Order Identifier. ### Method GET ### Endpoint /v3/orders/{orderId}/invoice ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier for the order. ### Response #### Success Response (200) - (object) - Invoice details for the order. ``` ``` -------------------------------- ### Get Product Images - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Access product images, including cover art and screenshots, with metadata such as resolution and URLs. This endpoint requires an authenticated request using an access token. ```bash curl 'https://sandbox.codeswholesale.com/v3/productImages/abc123' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Territory Information (API) Source: https://context7.com/context7/codeswholesale/llms.txt Provides territory information necessary for legal and distribution purposes, specifying where products can be sold and activated according to publisher restrictions. ```bash curl 'https://sandbox.codeswholesale.com/v3/territory' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Supported Game Languages (API) Source: https://context7.com/context7/codeswholesale/llms.txt Lists all supported game languages, enabling customers to find games in their preferred language and facilitating the creation of language-filtered game catalogs. ```bash curl 'https://sandbox.codeswholesale.com/v3/languages' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### GET /v3/languages Source: https://context7.com/context7/codeswholesale/llms.txt List all supported game languages. This helps customers find games in their preferred language and allows for building language-filtered catalogs. ```APIDOC ## GET /v3/languages ### Description List all supported game languages. Helps customers find games in their preferred language and build language-filtered catalogs. ### Method GET ### Endpoint /v3/languages ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/languages' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - A list of language objects. - **code** (string) - The unique code for the language. - **name** (string) - The human-readable name of the language. #### Response Example ```json { "items": [ {"code": "EN", "name": "English"}, {"code": "ES", "name": "Spanish"}, {"code": "FR", "name": "French"}, {"code": "DE", "name": "German"}, {"code": "IT", "name": "Italian"}, {"code": "PL", "name": "Polish"}, {"code": "RU", "name": "Russian"}, {"code": "ZH", "name": "Chinese"} ] } ``` ``` -------------------------------- ### GET /v3/orders/{orderId} Source: https://context7.com/context7/codeswholesale/llms.txt Fetch complete details of a specific order including all purchased codes and their redemption information. ```APIDOC ## GET /v3/orders/{orderId} ### Description Fetch complete details of a specific order including all purchased codes and their redemption information. ### Method GET ### Endpoint /v3/orders/{orderId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **orderId** (string) - The unique identifier for the order. - **status** (string) - The current status of the order. - **totalPrice** (number) - The total price of the order. - **createdAt** (string) - The timestamp when the order was created. - **items** (array) - An array of items within the order. - **productId** (string) - The unique identifier for the product. - **productName** (string) - The name of the product. - **quantity** (integer) - The quantity of this product ordered. - **unitPrice** (number) - The price per unit of the product. - **codes** (array) - An array of codes associated with this item. - **codeId** (string) - The unique identifier for the code. - **url** (string) - The URL to retrieve the redemption code details. #### Response Example ```json { "orderId": "order-789xyz", "status": "COMPLETED", "totalPrice": 129.97, "createdAt": "2024-03-15T10:30:00Z", "items": [ { "productId": "abc123", "productName": "Cyberpunk 2077", "quantity": 2, "unitPrice": 49.99, "codes": [ {"codeId": "code-001", "url": "/v3/codes/code-001"}, {"codeId": "code-002", "url": "/v3/codes/code-002"} ] } ] } ``` ``` -------------------------------- ### Get Single Product Details - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Fetch detailed information for a specific product using its unique identifier. This includes comprehensive data such as pricing, stock status, supported regions, languages, and URLs for associated images and descriptions. Requires an access token. ```bash curl 'https://sandbox.codeswholesale.com/v3/products/abc123' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### GET /v3/orders Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve all past orders with filtering and pagination options. Useful for order management, reconciliation, and customer service. ```APIDOC ## GET /v3/orders ### Description Retrieve all past orders with filtering and pagination options. Useful for order management, reconciliation, and customer service. ### Method GET ### Endpoint /v3/orders ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **limit** (integer) - Optional - The number of items to return per page. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/orders?page=1&limit=50' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - An array of order objects. - **orderId** (string) - The unique identifier for the order. - **status** (string) - The current status of the order (e.g., COMPLETED). - **totalPrice** (number) - The total price of the order. - **createdAt** (string) - The timestamp when the order was created. - **totalItems** (integer) - The total number of items across all pages. - **page** (integer) - The current page number. #### Response Example ```json { "items": [ { "orderId": "order-789xyz", "status": "COMPLETED", "totalPrice": 129.97, "createdAt": "2024-03-15T10:30:00Z" }, { "orderId": "order-456abc", "status": "COMPLETED", "totalPrice": 59.99, "createdAt": "2024-03-14T15:20:00Z" } ], "totalItems": 234, "page": 1 } ``` ``` -------------------------------- ### Get Single Order Details (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Fetches comprehensive details for a specific order, including product information and associated codes. Requires the order ID and an API key. Returns detailed order information. ```bash curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Code Details (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Retrieves the actual redemption code and instructions for a purchased item. Requires the code ID and an API key. This is the final step for delivering digital goods. ```bash curl 'https://sandbox.codeswholesale.com/v3/codes/code-001' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Account Details (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Fetches current account information, including balance, credit limit, and status. Requires an API key. Essential for monitoring account activity and funds. ```bash curl 'https://sandbox.codeswholesale.com/v3/accounts/current' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### GET /v3/accounts/current Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve current account information including balance, credit limit, and account settings. Essential for monitoring spending and available funds. ```APIDOC ## GET /v3/accounts/current ### Description Retrieve current account information including balance, credit limit, and account settings. Essential for monitoring spending and available funds. ### Method GET ### Endpoint /v3/accounts/current ### Parameters None ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/accounts/current' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **accountId** (string) - The unique identifier for the account. - **email** (string) - The email address associated with the account. - **balance** (number) - The current balance of the account. - **currency** (string) - The currency of the account balance. - **creditLimit** (number) - The credit limit for the account. - **availableCredit** (number) - The amount of credit currently available. - **status** (string) - The status of the account (e.g., ACTIVE). - **createdAt** (string) - The timestamp when the account was created. - **totalOrders** (integer) - The total number of orders placed by the account. - **totalSpent** (number) - The total amount spent by the account. #### Response Example ```json { "accountId": "acc-12345", "email": "partner@example.com", "balance": 5432.10, "currency": "USD", "creditLimit": 10000.00, "availableCredit": 4567.90, "status": "ACTIVE", "createdAt": "2023-01-15T09:00:00Z", "totalOrders": 1523, "totalSpent": 245678.90 } ``` ``` -------------------------------- ### Get Order History (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Retrieves a list of past orders with options for filtering and pagination. Requires an API key for authentication. Returns order summaries. ```bash curl 'https://sandbox.codeswholesale.com/v3/orders?page=1&limit=50' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get Supported Geographic Regions (API) Source: https://context7.com/context7/codeswholesale/llms.txt Retrieves a list of all supported geographic regions and their corresponding codes. This is essential for verifying product compatibility with customer locations. ```bash curl 'https://sandbox.codeswholesale.com/v3/regions' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### GET /v3/territory Source: https://context7.com/context7/codeswholesale/llms.txt Access territory information for legal and distribution purposes. Territories define where products can be sold and activated based on publisher restrictions. ```APIDOC ## GET /v3/territory ### Description Access territory information for legal and distribution purposes. Territories define where products can be sold and activated based on publisher restrictions. ### Method GET ### Endpoint /v3/territory ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/territory' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - A list of territory objects. - **code** (string) - The unique code for the territory. - **name** (string) - The human-readable name of the territory. - **countries** (array) - A list of country codes included in this territory. #### Response Example ```json { "items": [ { "code": "EU1", "name": "European Union Territory 1", "countries": ["DE", "FR", "IT", "ES", "NL", "BE"] }, { "code": "NA1", "name": "North America Territory 1", "countries": ["US", "CA"] } ] } ``` ``` -------------------------------- ### GET /v3/platforms Source: https://context7.com/context7/codeswholesale/llms.txt List all supported gaming platforms like Steam, PlayStation Network, Xbox Live, Origin, Uplay, and others. Useful for filtering products and building platform-specific catalogs. ```APIDOC ## GET /v3/platforms ### Description List all supported gaming platforms like Steam, PlayStation Network, Xbox Live, Origin, Uplay, and others. Useful for filtering products and building platform-specific catalogs. ### Method GET ### Endpoint /v3/platforms ### Parameters None ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/platforms' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - An array of platform objects. - **code** (string) - The internal code representing the platform (e.g., STEAM). - **name** (string) - The display name of the platform (e.g., Steam). #### Response Example ```json { "items": [ {"code": "STEAM", "name": "Steam"}, {"code": "PSN", "name": "PlayStation Network"}, {"code": "XBOX", "name": "Xbox Live"}, {"code": "ORIGIN", "name": "Origin"}, {"code": "UPLAY", "name": "Ubisoft Connect"}, {"code": "GOG", "name": "GOG.com"}, {"code": "EPIC", "name": "Epic Games Store"} ] } ``` ``` -------------------------------- ### GET /v3/regions Source: https://context7.com/context7/codeswholesale/llms.txt Retrieve all supported geographic regions and their codes. This data is essential for ensuring compatibility with customer locations, as products may be region-locked. ```APIDOC ## GET /v3/regions ### Description Retrieve all supported geographic regions and their codes. Products may be region-locked, so this data is essential for ensuring compatibility with customer locations. ### Method GET ### Endpoint /v3/regions ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/regions' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **items** (array) - A list of region objects. - **code** (string) - The unique code for the region. - **name** (string) - The human-readable name of the region. #### Response Example ```json { "items": [ {"code": "WORLDWIDE", "name": "Worldwide"}, {"code": "EU", "name": "Europe"}, {"code": "NA", "name": "North America"}, {"code": "UK", "name": "United Kingdom"}, {"code": "DE", "name": "Germany"}, {"code": "RU", "name": "Russia"}, {"code": "ASIA", "name": "Asia"} ] } ``` ``` -------------------------------- ### Authorization - Get Access Token Source: https://codeswholesale.com/documentation/index Obtain an access token using OAuth 2.0 for API authentication. This token is required for all subsequent API requests. ```APIDOC ## POST /oauth/token ### Description Fetches an access token for API authentication using client credentials. ### Method POST ### Endpoint /oauth/token ### Parameters #### Request Body - **grant_type** (string) - Required - Must be 'client_credentials'. - **client_id** (string) - Required - Your application's client ID. - **client_secret** (string) - Required - Your application's client secret. ### Request Example ```json { "grant_type": "client_credentials", "client_id": "YOUR_CLIENT_ID", "client_secret": "YOUR_CLIENT_SECRET" } ``` ### Response #### Success Response (200) - **access_token** (string) - The unique access token. - **token_type** (string) - The type of token, usually 'bearer'. - **expires_in** (integer) - The token's expiration time in seconds. #### Response Example ```json { "access_token": "d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc", "token_type": "bearer", "expires_in": 1158 } ``` ``` -------------------------------- ### GET /v3/orders/{orderId}/invoice Source: https://context7.com/context7/codeswholesale/llms.txt Download invoice for accounting and tax purposes. Returns invoice in PDF or structured JSON format with all order line items and tax information. ```APIDOC ## GET /v3/orders/{orderId}/invoice ### Description Download invoice for accounting and tax purposes. Returns invoice in PDF or structured JSON format with all order line items and tax information. ### Method GET ### Endpoint /v3/orders/{orderId}/invoice ### Parameters #### Path Parameters - **orderId** (string) - Required - The unique identifier of the order. ### Request Example #### PDF Invoice ```bash curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz/invoice' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/pdf' \ --output invoice.pdf ``` #### JSON Invoice Data ```bash curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz/invoice' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Accept: application/json' ``` ### Response #### Success Response (200) - **invoiceNumber** (string) - The unique identifier for the invoice. - **orderId** (string) - The order ID associated with this invoice. - **issueDate** (string) - The date the invoice was issued. - **totalAmount** (number) - The total amount of the invoice. - **currency** (string) - The currency of the invoice. - **items** (array) - An array of items included in the invoice. - **pdfUrl** (string) - A URL to download the PDF version of the invoice (if requested). #### Response Example (JSON) ```json { "invoiceNumber": "INV-2024-001234", "orderId": "order-789xyz", "issueDate": "2024-03-15", "totalAmount": 129.97, "currency": "USD", "items": [...], "pdfUrl": "https://invoices.codeswholesale.com/INV-2024-001234.pdf" } ``` ``` -------------------------------- ### Get Order Invoice (curl) Source: https://context7.com/context7/codeswholesale/llms.txt Downloads an invoice for a specific order, either as a PDF or in JSON format. Requires the order ID and an API key. Useful for financial record-keeping. ```bash curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz/invoice' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/pdf' \ --output invoice.pdf # Or get JSON invoice data: curl 'https://sandbox.codeswholesale.com/v3/orders/order-789xyz/invoice' \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Accept: application/json' ``` -------------------------------- ### Get OAuth Token - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Obtain an OAuth 2.0 access token using the client credentials flow. This token is required for authenticating subsequent API requests and has a limited validity period. Ensure to cache and refresh the token automatically. ```bash curl 'https://sandbox.codeswholesale.com/oauth/token' \ --data 'grant_type=client_credentials&client_id=ff72ce315d1259e822f47d87d02d261e&client_secret=$2a$10$E2jVWDADFA5gh6zlRVcrlOOX01Q/HJoT6hXuDMJxek.YEo.lkO2T6' ``` -------------------------------- ### Create Order - Bash Source: https://context7.com/context7/codeswholesale/llms.txt Place an order for one or more products by sending a POST request with product IDs and quantities. The response includes an order ID for tracking and code retrieval. This operation requires an authenticated session and will deduct from your account balance. ```bash curl 'https://sandbox.codeswholesale.com/v3/orders' \ -X POST \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "items": [ { "productId": "abc123", "quantity": 2 }, { "productId": "def456", "quantity": 1 } ] }' ``` -------------------------------- ### Platforms API Source: https://codeswholesale.com/documentation/index Retrieve a list of available platforms. ```APIDOC ## GET /v3/platforms ### Description Fetches a list of all available platforms. ### Method GET ### Endpoint /v3/platforms ### Response #### Success Response (200) - (array) - A list of platform objects. #### Response Example ```json [ { "id": 1, "name": "Platform Name" } ] ``` ``` -------------------------------- ### Product Descriptions API Source: https://codeswholesale.com/documentation/index Fetch detailed product descriptions using the product identifier. ```APIDOC ## GET /v3/products/{productId}/description ### Description Retrieves the description for a specific product using its Product Identifier. ### Method GET ### Endpoint /v3/products/{productId}/description ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier for the product. ### Response #### Success Response (200) - **description** (string) - The detailed description of the product. #### Response Example ```json { "productId": "prod123", "description": "This is a detailed description of the product." } ``` ``` -------------------------------- ### Create Order Source: https://context7.com/context7/codeswholesale/llms.txt Place an order for one or more products. Returns order confirmation with order ID that can be used to retrieve the purchased codes. ```APIDOC ## Create Order ### Description Place an order for one or more products. Returns order confirmation with order ID that can be used to retrieve the purchased codes. Deducts from account balance or available credit. ### Method POST ### Endpoint `/v3/orders` ### Parameters #### Request Body - **items** (array) - Required - An array of items to order. - **productId** (string) - Required - The unique identifier of the product. - **quantity** (integer) - Required - The quantity of the product to order. ### Request Example ```bash curl 'https://sandbox.codeswholesale.com/v3/orders' \ -X POST \ -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "items": [ { "productId": "abc123", "quantity": 2 }, { "productId": "def456", "quantity": 1 } ] }' ``` ### Response #### Success Response (201 Created) - **orderId** (string) - The unique identifier for the created order. #### Response Example ```json { "orderId": "order-789xyz" } ``` ``` -------------------------------- ### Territory API Source: https://codeswholesale.com/documentation/index Retrieve a list of all available territories. ```APIDOC ## GET /v3/territory ### Description Fetches a list of all available territories. ### Method GET ### Endpoint /v3/territory ### Response #### Success Response (200) - (array) - A list of territory objects. #### Response Example ```json [ { "id": 1, "name": "Territory Name" } ] ``` ``` -------------------------------- ### Languages API Source: https://codeswholesale.com/documentation/index Fetch a list of supported languages. ```APIDOC ## GET /v3/languages ### Description Fetches a list of all supported languages. ### Method GET ### Endpoint /v3/languages ### Response #### Success Response (200) - (array) - A list of language objects. #### Response Example ```json [ { "id": "en", "name": "English" } ] ``` ``` -------------------------------- ### Products API Source: https://codeswholesale.com/documentation/index Access information about all products or a specific product by its ID. ```APIDOC ## GET /v3/products ### Description Retrieves a list of all available products with important information. ### Method GET ### Endpoint /v3/products ### Response #### Success Response (200) - (array) - A list of product objects. #### Response Example ```json [ { "id": "prod123", "name": "Sample Product", "price": 10.00 } ] ``` ## GET /v3/products/{productId} ### Description Retrieves details for a single product using its unique Product Identifier. ### Method GET ### Endpoint /v3/products/{productId} ### Parameters #### Path Parameters - **productId** (string) - Required - The unique identifier for the product. ### Response #### Success Response (200) - (object) - Details of the specified product. #### Response Example ```json { "id": "prod123", "name": "Sample Product", "price": 10.00, "description": "Detailed product info." } ``` ``` -------------------------------- ### Product Images API Source: https://codeswholesale.com/documentation/index Retrieve specific product images using product and image identifiers. ```APIDOC ## GET /v3/productImages/{id} ### Description Retrieves a specific product image by its Product Identifier and Image Identifier. ### Method GET ### Endpoint /v3/productImages/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The identifier for the product image. ### Response #### Success Response (200) - (object) - Details of the product image. #### Response Example ```json { "url": "http://example.com/image.jpg", "productId": "prod123", "imageId": "img456" } ``` ``` -------------------------------- ### Accounts API Source: https://codeswholesale.com/documentation/index Retrieve detailed information about your account, including balance and credit. ```APIDOC ## GET /v3/accounts/current ### Description Fetches comprehensive details about the current user's account, including name, balance, and credit limit. ### Method GET ### Endpoint /v3/accounts/current ### Response #### Success Response (200) - (object) - Account details. #### Response Example ```json { "accountId": "acc987", "name": "User Name", "balance": 100.50, "credit": 500.00 } ``` ``` -------------------------------- ### Security API Source: https://codeswholesale.com/documentation/index Perform security checks using this endpoint. ```APIDOC ## POST /v3/security ### Description Performs a security check. The exact functionality requires further details on the request/response structure. ### Method POST ### Endpoint /v3/security ### Response #### Success Response (200) - (object) - The result of the security check. #### Response Example ```json { "status": "success", "message": "Security check passed." } ``` ``` -------------------------------- ### Regions API Source: https://codeswholesale.com/documentation/index Retrieve a list of available regions. ```APIDOC ## GET /v3/regions ### Description Fetches a list of all available regions. ### Method GET ### Endpoint /v3/regions ### Response #### Success Response (200) - (array) - A list of region objects. #### Response Example ```json [ { "id": 1, "name": "Region Name" } ] ``` ``` -------------------------------- ### Perform Security Check (API) Source: https://context7.com/context7/codeswholesale/llms.txt Validates codes, checks for fraud, or verifies order authenticity. This endpoint is crucial for preventing chargebacks and ensuring secure transactions. ```bash curl 'https://sandbox.codeswholesale.com/v3/security' \ -X POST \ -H 'Authorization: Bearer d95f6f0c-28e1-464e-8d9f-96fc0e4f63fc' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -d '{ "orderId": "order-789xyz", "codeId": "code-001", "checkType": "FRAUD_DETECTION" }' ```