{"templateId":"openapi_docs","versions":[{"version":"v2_1_0","label":"2.1.0","link":"/apis/openapi","default":true,"active":false,"folderId":"58c9a61d"},{"version":"v2_0_0","label":"2.0.0","link":"/apis/v2_0_0/openapi","default":false,"active":true,"folderId":"58c9a61d"},{"version":"v1_3_2","label":"1.3.2","link":"/apis/v1_3_2/openapi","default":false,"active":false,"folderId":"58c9a61d"},{"version":"v1_3_1","label":"1.3.1","link":"/apis/v1_3_1/openapi","default":false,"active":false,"folderId":"58c9a61d"},{"version":"v1_3_0","label":"1.3.0","link":"/apis/v1_3_0/openapi","default":false,"active":false,"folderId":"58c9a61d"},{"version":"v1_2_0","label":"1.2.0","link":"/apis/v1_2_0/openapi","default":false,"active":false,"folderId":"58c9a61d"}],"sharedDataIds":{"openAPIDocsStore":"oas-apis/@v2_0_0/openapi.yaml","sidebar":"sidebar-sidebar.yaml__apis_v2_0_0_openapi"},"props":{"definitionId":"apis/@v2_0_0/openapi.yaml","dynamicMarkdocComponents":[],"baseSlug":"/apis/v2_0_0/openapi","seo":{"title":"Hubby API","keywords":"hubby, esim, api, travel, integration, documentation"},"itemId":"","disableAutoScroll":true,"metadata":{"type":"openapi","title":"Hubby API","description":"Welcome to the Hubby API documentation. This API enables partners to seamlessly integrate eSIM booking and management capabilities into their applications.\n\nKey Features:\n- Create and manage eSIM bookings for your customers\n- Access our global package catalog with country-specific offerings\n- Track booking statuses and package activations\n- Support for multiple package types (starter, data-limited, unlimited, time-limited)\n\n## Package Types\n\nThe API supports four types of packages:\n\n- **Starter packages**: Hybrid packages that are both data and time limited. They provide a small data allowance within a short time period (default: 2 days). Perfect for first-time users and trials.\n\n- **Data-limited packages**: Traditional packages with a specific data allowance that expires after a certain period (default: 365 days). This is the primary package type and the default for most use cases.\n\n- **Unlimited packages**: Packages that provide unrestricted data usage for a specified duration. Subject to fair use policy. Ideal for heavy data users and digital nomads.\n\n- **Time-limited packages**: Packages that provide a fixed data allowance for a specific duration with full-speed access. These packages expire when either the data limit or time limit is reached.\n\n**Note**: Top-ups are always data-limited packages, regardless of the original package type.\n\nAuthentication:\nAll API requests must include the following headers:\n- x-api-key: Your public API key\n- x-timestamp: Current Unix timestamp in milliseconds\n- x-signature: HMAC-SHA256 signature\n\nThe HMAC signature must be generated for each request using:\n1. Concatenate: timestamp + HTTP method + request path\n   Example: \"1678901234GET/bookings\"\n2. Generate HMAC-SHA256 using your secret key\n3. Convert to hex string\n\nNote: Swagger UI cannot be used to test the API directly as each request requires a unique HMAC signature.\nPlease implement the authentication in your client application.\n\nExample Node.js Implementation:\n```javascript\nconst cryptoJs = require('crypto-js');\n\n// Configuration values that would normally come from environment\nconst secretKey = \"YOUR_API_SECRET\";\nconst publicKey = \"YOUR_API_KEY\";\nconst baseUrl = \"YOUR_BASE_URL\";\n\n// Function to generate headers for API request\nfunction generateApiHeaders(method, path) {\n    //Timestamp is in milliseconds e.g. 1715558400000\n    const timestamp = Math.floor(Date.now()).toString();\n\n    // Ensure url is a string\n    let path = String(url);\n\n    // Remove baseUrl from the url if present\n    path = processedUrl.replace(baseUrl, '');\n\n    // Create query string if needed\n    const queryString = new URL(url).search;\n    if (queryString) {\n        processedUrl += queryString;\n    }\n\n    // Validate public key\n    if (!publicKey) {\n        throw new Error(\"Public key is required\");\n    }\n\n    // Create the payload\n    // Sample payload: 1715558400000GET/bookings?bookingId=1234567890\n    const payload = timestamp + method + path;\n\n    // Generate the HMAC signature\n    const signature = cryptoJs.HmacSHA256(payload, secretKey).toString(cryptoJs.enc.Hex);\n\n    // Return headers object\n    return {\n        'x-timestamp': timestamp,\n        'x-signature': signature,\n        'x-api-key': publicKey,\n        'Accept': 'application/json'\n    };\n}\n```\n\nNeed Help?\n- Technical Support: support@hubbyesim.com\n"},"compilationErrors":[],"markdown":{"partials":{},"variables":{"rbac":{"teams":["anonymous"]},"user":{},"headers":{"accept":"*/*","accept-encoding":"br,gzip","host":"docs.hubbyesim.com","user-agent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","via":"2.0 Caddy, 2.0 2af44885a7fc4faf5a3444e606d6c02c.cloudfront.net (CloudFront), 1.1 Caddy","x-amz-cf-id":"fUzMSc92DWgL3zkvXokud0bEPu07YOWH3YKLB5dVjFakUv52FGg8sw==","x-forwarded-for":"216.73.216.105, 44.206.14.241, 64.252.67.195","x-forwarded-host":"docs.hubbyesim.com","x-forwarded-proto":"https","x-request-id":"cds-e6b34bff-4ee6-47c3-ad9e-c86ba9f79264"},"remoteAddr":{"hostname":"::ffff:10.0.1.161","port":32924},"lang":"default_locale"}},"pagePropGetterError":{"message":"","name":""}},"slug":"/apis/v2_0_0/openapi","userData":{"isAuthenticated":false,"teams":["anonymous"]}}