G-Starlink Hub Partner API -- Test Data Reference
This document provides test ICCID prefixes, sample request/response payloads, webhook examples, error scenarios, and curl commands for testing the Partner API.
Base URL: https://api.gstarlink.com
Table of Contents
- Test ICCID Prefixes and Carrier Mapping
- Sample Activation Requests
- Sample Order Requests
- Sample Webhook Payloads
- Common Error Responses
- Sandbox Testing Script (curl)
1. Test ICCID Prefixes and Carrier Mapping
The system auto-detects the carrier from the ICCID prefix.
Currently supported carriers for API activation: Lycamobile AU and Optus AU.
Submitting an ICCID for any other carrier returns 422 Carrier Not Supported (see section 2.3).
| Prefix | Carrier | Region | KYC Required | Required KYC Fields |
|---|---|---|---|---|
896103 | Lycamobile AU | Australia | Yes | first_name, last_name, passport_no, passport_country, passport_expiry, date_of_birth, address, sim_last4, puk |
58 | Optus AU | Australia | Yes | first_name, last_name, passport_no, passport_country, passport_expiry, date_of_birth, address, title |
Example ICCIDs for Testing
| Scenario | Example ICCID | Notes |
|---|---|---|
| Lycamobile AU | 8961030000012345678 | 19 digits, starts with 896103 |
| Optus AU | 5825004421406 | 13 digits, starts with 58 |
| Unsupported | 9900000000001 | No supported prefix -- returns 422 |
Support for additional carriers will be announced in the changelog; the API surface (KYC fields, statuses, webhooks) will not change when they are added.
2. Sample Activation Requests
2.1 Lycamobile AU (KYC Required)
{
"iccid": "8961030000012345678",
"activation_date": "2026-04-14",
"first_name": "Wei",
"last_name": "Zhang",
"date_of_birth": "1990-03-15",
"passport_no": "E12345678",
"passport_country": "CN",
"passport_expiry": "2030-06-20",
"address": "45 George St",
"suburb": "Sydney",
"state": "NSW",
"postcode": "2000",
"sim_last4": "5678",
"puk": "12345678",
"customer_email": "wei.zhang@example.com",
"customer_phone": "+8613800138000",
"plan_name": "Lycamobile Prepaid",
"note": "Customer arriving on morning flight"
}
Successful Response (201):
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"iccid": "8961030000012345678",
"carrier": "Lycamobile",
"activation_date": "2026-04-14",
"customer_name": "Wei Zhang",
"status": "pending",
"processing_status": "pending",
"processing_mode": "scheduled",
"message": "Activation scheduled for 2026-04-14. It will be processed automatically at 00:10 (Sydney time).",
"created_at": "2026-04-13T08:30:00.000Z"
}
2.2 Optus AU (KYC Required)
{
"iccid": "5825004421406",
"activation_date": "2026-04-13",
"first_name": "John",
"last_name": "Smith",
"title": "Mr",
"date_of_birth": "1985-07-22",
"passport_no": "PA7654321",
"passport_country": "GB",
"passport_expiry": "2029-11-30",
"address": "10 Bourke St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"customer_email": "john.smith@example.com",
"customer_phone": "+447700900123"
}
Successful Response (201) -- immediate processing:
{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"iccid": "5825004421406",
"carrier": "Optus",
"activation_date": "2026-04-13",
"customer_name": "John Smith",
"status": "pending",
"processing_status": "pending",
"processing_mode": "immediate",
"message": "Optus activation submitted. Processing will begin within 30 seconds.",
"created_at": "2026-04-13T02:15:00.000Z"
}
2.3 Unsupported Carrier (422)
Submitting an ICCID for a carrier that is not yet supported:
{
"iccid": "8200012345678",
"activation_date": "2026-04-13",
"first_name": "Yuki",
"last_name": "Tanaka"
}
Response (422):
{
"type": "https://docs.gstarlink.com/errors/carrier_not_supported",
"title": "Carrier Not Supported",
"status": 422,
"detail": "Telstra activation is not yet available via the Partner API. Currently supported: Lycamobile, Optus.",
"carrier": "Telstra",
"supported_carriers": ["Lycamobile", "Optus"]
}
2.4 Date Conflict Override
When a pending activation already exists for the same ICCID with a different date, set confirm_date_change: true to cancel the old one and create a new request:
{
"iccid": "8961030000012345678",
"activation_date": "2026-04-16",
"confirm_date_change": true,
"first_name": "Wei",
"last_name": "Zhang",
"date_of_birth": "1990-03-15",
"passport_no": "E12345678",
"passport_country": "CN",
"passport_expiry": "2030-06-20",
"address": "45 George St",
"suburb": "Sydney",
"state": "NSW",
"postcode": "2000",
"sim_last4": "5678",
"puk": "12345678"
}
3. Sample Order Requests
3.1 Single Order (Basic)
{
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 5
}
]
}
Successful Response (201):
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"partner_id": "770e8400-e29b-41d4-a716-446655440002",
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"product_sku": "ESIM-JP-7D-3GB",
"quantity": 5,
"unit_price_cents": 800,
"total_price_cents": 4000,
"currency": "USD",
"status": "pending_payment",
"created_at": "2026-04-13T08:00:00.000Z",
"updated_at": "2026-04-13T08:00:00.000Z"
}
3.2 Single Order with Scheduled Activation
For products that require scheduled delivery (e.g., esim_eid_push), include activation_requests:
{
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
],
"activation_requests": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"customer_email": "alice@example.com",
"customer_name": "Alice Wang",
"customer_phone": "+8613900139000",
"activation_date": "2026-04-15",
"timezone": "Asia/Shanghai"
},
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"customer_email": "bob@example.com",
"customer_name": "Bob Chen",
"eid_number": "89049032004008882600033510100628",
"activation_date": "2026-04-16",
"timezone": "Asia/Tokyo"
}
],
"metadata": {
"source": "shopify",
"shopify_order_id": "SH-98765"
}
}
3.3 Bulk Order Creation
POST /api/v1/orders/bulk
{
"orders": [
{
"external_order_id": "SHOP-001",
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 1
}
],
"customer": {
"email": "customer1@example.com",
"name": "Customer One",
"phone": "+61400111222"
},
"metadata": {
"channel": "website"
}
},
{
"external_order_id": "SHOP-002",
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 3
},
{
"product_id": "660e8400-e29b-41d4-a716-446655440099",
"quantity": 2
}
],
"customer": {
"email": "customer2@example.com",
"name": "Customer Two"
}
},
{
"external_order_id": "SHOP-003",
"line_items": [
{
"product_id": "00000000-0000-0000-0000-000000000000",
"quantity": 1
}
],
"customer": {
"email": "customer3@example.com",
"name": "Customer Three"
}
}
]
}
Successful Response (200) -- partial success:
{
"results": [
{
"external_order_id": "SHOP-001",
"gstarlink_order_id": "aa111111-bbbb-cccc-dddd-eeeeeeeeee01",
"status": "success"
},
{
"external_order_id": "SHOP-002",
"gstarlink_order_id": "aa111111-bbbb-cccc-dddd-eeeeeeeeee02",
"status": "success"
},
{
"external_order_id": "SHOP-003",
"gstarlink_order_id": null,
"status": "failed",
"error": {
"code": "product_not_found",
"message": "Product 00000000-0000-0000-0000-000000000000 not found"
}
}
],
"summary": {
"total": 3,
"successful": 2,
"failed": 1
}
}
4. Sample Webhook Payloads
All webhook deliveries share a common envelope and include the X-Webhook-Signature header for verification:
X-Webhook-Signature: t=1681382400,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd
Signature Verification (pseudocode)
payload_to_sign = timestamp + "." + raw_request_body
expected_signature = HMAC-SHA256(webhook_secret, payload_to_sign)
compare(expected_signature, v1_value)
4.1 order.created
{
"event": "order.created",
"event_id": "evt_ord_created_001",
"timestamp": "2026-04-13T08:00:00Z",
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"partner_id": "770e8400-e29b-41d4-a716-446655440002",
"status": "pending_payment",
"total_price_cents": 4000,
"currency": "USD",
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"product_sku": "ESIM-JP-7D-3GB",
"quantity": 5,
"unit_price_cents": 800
}
],
"created_at": "2026-04-13T08:00:00Z"
}
}
4.2 order.fulfilled
{
"event": "order.fulfilled",
"event_id": "evt_ord_fulfilled_001",
"timestamp": "2026-04-13T08:05:00Z",
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"status": "fulfilled",
"esims": [
{
"iccid": "8901234567890123456",
"activation_code": "LPA:1$smdp.example.com$MATCHING_ID_001",
"qr_code_url": "https://api.gstarlink.com/api/v1/esims/8901234567890123456/qr"
},
{
"iccid": "8901234567890123457",
"activation_code": "LPA:1$smdp.example.com$MATCHING_ID_002",
"qr_code_url": "https://api.gstarlink.com/api/v1/esims/8901234567890123457/qr"
}
],
"fulfilled_at": "2026-04-13T08:05:00Z"
}
}
4.3 order.cancelled
{
"event": "order.cancelled",
"event_id": "evt_ord_cancelled_001",
"timestamp": "2026-04-13T09:00:00Z",
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"status": "cancelled",
"cancellation_reason": "Customer requested cancellation",
"cancelled_at": "2026-04-13T09:00:00Z"
}
}
4.4 esim.activated
{
"event": "esim.activated",
"event_id": "evt_esim_activated_001",
"timestamp": "2026-04-14T02:30:00Z",
"data": {
"iccid": "8901234567890123456",
"order_id": "660e8400-e29b-41d4-a716-446655440001",
"status": "active",
"activated_at": "2026-04-14T02:30:00Z",
"product": {
"name": "Japan 7-Day 3GB",
"sku": "ESIM-JP-7D-3GB",
"validity_days": 7
},
"expires_at": "2026-04-21T02:30:00Z"
}
}
4.5 esim.expired
{
"event": "esim.expired",
"event_id": "evt_esim_expired_001",
"timestamp": "2026-04-21T02:30:00Z",
"data": {
"iccid": "8901234567890123456",
"order_id": "660e8400-e29b-41d4-a716-446655440001",
"status": "expired",
"expired_at": "2026-04-21T02:30:00Z",
"data_usage": {
"total_mb": 3072,
"used_mb": 2150,
"remaining_mb": 922
}
}
}
4.6 payment.completed
{
"event": "payment.completed",
"event_id": "evt_pay_completed_001",
"timestamp": "2026-04-13T08:01:00Z",
"data": {
"order_id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"amount_cents": 4000,
"currency": "USD",
"payment_method": "wallet",
"transaction_id": "txn_abc123def456",
"completed_at": "2026-04-13T08:01:00Z"
}
}
4.7 payment.failed
{
"event": "payment.failed",
"event_id": "evt_pay_failed_001",
"timestamp": "2026-04-13T08:01:00Z",
"data": {
"order_id": "660e8400-e29b-41d4-a716-446655440001",
"order_number": "ORD-20260413-A1B2C",
"amount_cents": 4000,
"currency": "USD",
"failure_reason": "Insufficient wallet balance",
"failed_at": "2026-04-13T08:01:00Z"
}
}
4.8 activation.submitted
Fired when a physical SIM activation request enters carrier processing.
{
"event": "activation.submitted",
"event_id": "evt_act_submitted_001",
"timestamp": "2026-04-13T14:10:00Z",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"iccid": "8961030000012345678",
"carrier": "Lycamobile",
"activation_date": "2026-04-13",
"customer_name": "John Smith",
"status": "processing",
"processing_status": "processing",
"submitted_at": "2026-04-13T14:10:00Z"
}
}
4.9 activation.confirmed
Fired when the carrier confirms the activation is in progress (accepted by the carrier, waiting for network provisioning).
{
"event": "activation.confirmed",
"event_id": "evt_act_confirmed_001",
"timestamp": "2026-04-13T14:12:00Z",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"iccid": "8961030000012345678",
"carrier": "Lycamobile",
"activation_date": "2026-04-13",
"customer_name": "John Smith",
"status": "processing",
"processing_status": "confirmed",
"confirmation_number": "LYC-2026-987654",
"confirmed_at": "2026-04-13T14:12:00Z"
}
}
4.10 activation.activated
Fired when the SIM is fully activated and a mobile number is assigned.
{
"event": "activation.activated",
"event_id": "evt_act_activated_001",
"timestamp": "2026-04-13T14:15:00Z",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"iccid": "8961030000012345678",
"carrier": "Lycamobile",
"activation_date": "2026-04-13",
"customer_name": "John Smith",
"status": "completed",
"processing_status": "completed",
"mobile_number": "0402033268",
"confirmation_number": "LYC-2026-987654",
"activated_at": "2026-04-13T14:15:00Z"
}
}
4.11 activation.failed
Fired when carrier processing encounters an unrecoverable error.
{
"event": "activation.failed",
"event_id": "evt_act_failed_001",
"timestamp": "2026-04-13T14:20:00Z",
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"iccid": "8961030000012345678",
"carrier": "Lycamobile",
"activation_date": "2026-04-13",
"customer_name": "John Smith",
"status": "failed",
"processing_status": "failed",
"error_type": "carrier_error",
"error_message": "SIM number not recognized by the carrier. Please verify the ICCID.",
"failed_at": "2026-04-13T14:20:00Z"
}
}
5. Common Error Responses
All errors follow the RFC 7807 Problem Details format.
5.1 Authentication Errors
Missing Authorization header (401):
{
"type": "https://docs.gstarlink.com/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "Missing or invalid authorization header. Use: Authorization: Bearer <access_token>"
}
Expired token (401):
{
"type": "https://docs.gstarlink.com/errors/token_expired",
"title": "Token Expired",
"status": 401,
"detail": "Access token has expired. Request a new token via POST /api/v1/oauth/token"
}
Invalid OAuth credentials (401):
{
"error": "invalid_client",
"error_description": "Client credentials are invalid"
}
Suspended partner (403):
{
"error": "unauthorized_client",
"error_description": "Partner account has been suspended"
}
5.2 Validation Errors
Invalid JSON body (400):
{
"type": "https://docs.gstarlink.com/errors/invalid_request",
"title": "Invalid Request",
"status": 400,
"detail": "Invalid JSON body"
}
Missing/invalid fields (400):
{
"type": "https://docs.gstarlink.com/errors/validation",
"title": "Validation Error",
"status": 400,
"detail": "Invalid request parameters",
"errors": {
"iccid": ["SIM number must be 13-20 digits"],
"activation_date": ["Must be YYYY-MM-DD format"]
}
}
Missing KYC fields for Australian carrier (400):
{
"type": "https://docs.gstarlink.com/errors/missing_kyc",
"title": "Missing KYC Fields",
"status": 400,
"detail": "Missing required KYC fields for Lycamobile: sim_last4, puk",
"carrier": "Lycamobile",
"region": "australia",
"required_fields": [
"first_name",
"last_name",
"passport_no",
"passport_country",
"passport_expiry",
"date_of_birth",
"address",
"title"
]
}
Past activation date (400):
{
"type": "https://docs.gstarlink.com/errors/invalid_activation_date",
"title": "Invalid Activation Date",
"status": 400,
"detail": "Activation date cannot be in the past (Sydney timezone)."
}
Invalid calendar date (400):
{
"type": "https://docs.gstarlink.com/errors/invalid_activation_date",
"title": "Invalid Date",
"status": 400,
"detail": "Invalid calendar date: 2026-02-30"
}
5.3 Conflict Errors
Duplicate ICCID (409):
{
"type": "https://docs.gstarlink.com/errors/duplicate",
"title": "Duplicate Activation",
"status": 409,
"detail": "This ICCID has already been submitted for activation."
}
Activation date conflict (409):
{
"type": "https://docs.gstarlink.com/errors/date_conflict",
"title": "Activation Date Conflict",
"status": 409,
"detail": "This SIM (5825004421406) already has a pending activation for 2026-04-14. Set confirm_date_change: true to override.",
"existing_date": "2026-04-14",
"existing_request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
5.4 Rate Limiting (429)
{
"type": "https://docs.gstarlink.com/errors/rate_limit_exceeded",
"title": "Rate Limit Exceeded",
"status": 429,
"detail": "Too many requests. Please try again later."
}
Response headers:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1681382460
5.5 Not Found (404)
{
"type": "https://docs.gstarlink.com/errors/not_found",
"title": "Not Found",
"status": 404,
"detail": "Resource not found"
}
5.6 Server Error (500)
{
"type": "https://docs.gstarlink.com/errors/internal",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred"
}
6. Sandbox Testing Script (curl)
Replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and YOUR_ACCESS_TOKEN with your actual credentials.
6.1 Obtain Access Token
curl -s -X POST https://api.gstarlink.com/api/v1/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET",
"scope": "read:products write:orders read:orders read:esims write:webhooks read:webhooks"
}'
Expected response:
{
"access_token": "eyJhbGciOiJIUzI1NiIs...",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "read:products write:orders read:orders read:esims write:webhooks read:webhooks"
}
Save the token:
export TOKEN="eyJhbGciOiJIUzI1NiIs..."
6.2 List Products
curl -s https://api.gstarlink.com/api/v1/products?limit=5 \
-H "Authorization: Bearer $TOKEN"
6.3 Get Product Details
curl -s https://api.gstarlink.com/api/v1/products/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer $TOKEN"
6.4 Check Inventory
curl -s "https://api.gstarlink.com/api/v1/inventory/status?region=Asia" \
-H "Authorization: Bearer $TOKEN"
6.5 Create a Single Order
curl -s -X POST https://api.gstarlink.com/api/v1/orders \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-order-$(date +%s)" \
-d '{
"line_items": [
{
"product_id": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
]
}'
6.6 Create Bulk Orders
curl -s -X POST https://api.gstarlink.com/api/v1/orders/bulk \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"orders": [
{
"external_order_id": "TEST-BULK-001",
"line_items": [{"product_id": "550e8400-e29b-41d4-a716-446655440000", "quantity": 1}],
"customer": {"email": "test1@example.com", "name": "Test User 1"}
},
{
"external_order_id": "TEST-BULK-002",
"line_items": [{"product_id": "550e8400-e29b-41d4-a716-446655440000", "quantity": 3}],
"customer": {"email": "test2@example.com", "name": "Test User 2"}
}
]
}'
6.7 List Orders
curl -s "https://api.gstarlink.com/api/v1/orders?limit=10&status=pending" \
-H "Authorization: Bearer $TOKEN"
6.8 Get Order Details with Fulfillment
curl -s https://api.gstarlink.com/api/v1/orders/660e8400-e29b-41d4-a716-446655440001 \
-H "Authorization: Bearer $TOKEN"
6.9 Get eSIMs for an Order
curl -s https://api.gstarlink.com/api/v1/orders/660e8400-e29b-41d4-a716-446655440001/esims \
-H "Authorization: Bearer $TOKEN"
6.10 Submit Lycamobile Activation (Full KYC + PUK)
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "8961030000012345678",
"activation_date": "2026-04-14",
"first_name": "Wei",
"last_name": "Zhang",
"date_of_birth": "1990-03-15",
"passport_no": "E12345678",
"passport_country": "CN",
"passport_expiry": "2030-06-20",
"address": "45 George St",
"suburb": "Sydney",
"state": "NSW",
"postcode": "2000",
"sim_last4": "5678",
"puk": "12345678",
"customer_email": "wei.zhang@example.com"
}'
6.11 Submit Optus Activation (Full KYC)
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "5825004421406",
"activation_date": "2026-04-14",
"first_name": "John",
"last_name": "Smith",
"title": "Mr",
"date_of_birth": "1985-07-22",
"passport_no": "PA7654321",
"passport_country": "GB",
"passport_expiry": "2029-11-30",
"address": "10 Bourke St",
"suburb": "Melbourne",
"state": "VIC",
"postcode": "3000",
"customer_email": "john.smith@example.com"
}'
6.12 Unsupported Carrier (expect 422)
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "89010012345678901",
"activation_date": "2026-04-14",
"first_name": "Maria",
"last_name": "Garcia"
}'
6.13 List Activations
# All activations
curl -s "https://api.gstarlink.com/api/v1/activations?limit=20" \
-H "Authorization: Bearer $TOKEN"
# Filter by ICCID
curl -s "https://api.gstarlink.com/api/v1/activations?iccid=8961030000012345678" \
-H "Authorization: Bearer $TOKEN"
# Filter by status
curl -s "https://api.gstarlink.com/api/v1/activations?status=pending" \
-H "Authorization: Bearer $TOKEN"
6.14 Get Single Activation Detail
curl -s https://api.gstarlink.com/api/v1/activations/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer $TOKEN"
6.15 Check eSIM Status
curl -s https://api.gstarlink.com/api/v1/esims/8901234567890123456/status \
-H "Authorization: Bearer $TOKEN"
6.16 Register a Webhook
curl -s -X POST https://api.gstarlink.com/api/v1/webhooks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.example.com/webhooks/esim-atlas",
"events": [
"order.created",
"order.fulfilled",
"activation.submitted",
"activation.activated",
"activation.failed"
],
"environment": "sandbox",
"description": "Development webhook for order and activation events"
}'
6.17 List Webhooks
curl -s "https://api.gstarlink.com/api/v1/webhooks?environment=sandbox" \
-H "Authorization: Bearer $TOKEN"
6.18 Delete a Webhook
curl -s -X DELETE https://api.gstarlink.com/api/v1/webhooks/WEBHOOK_ID \
-H "Authorization: Bearer $TOKEN"
6.19 Sync Product Catalog
# Generic format with 30% markup (default)
curl -s "https://api.gstarlink.com/api/v1/catalog/sync?format=generic" \
-H "Authorization: Bearer $TOKEN"
# Shopify format with custom markup
curl -s "https://api.gstarlink.com/api/v1/catalog/sync?format=shopify&markup=25®ion=Asia" \
-H "Authorization: Bearer $TOKEN"
6.20 Test Error Cases
Missing KYC fields (expect 400):
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "8961030000012345678",
"activation_date": "2026-04-14",
"first_name": "John",
"last_name": "Smith"
}'
Invalid ICCID format (expect 400):
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "ABC123",
"activation_date": "2026-04-14"
}'
Past activation date (expect 400):
curl -s -X POST https://api.gstarlink.com/api/v1/activations \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"iccid": "89010012345678901",
"activation_date": "2025-01-01"
}'
Missing Authorization header (expect 401):
curl -s https://api.gstarlink.com/api/v1/products
Missing Idempotency-Key on order creation (expect 400):
curl -s -X POST https://api.gstarlink.com/api/v1/orders \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"line_items": [{"product_id": "550e8400-e29b-41d4-a716-446655440000", "quantity": 1}]
}'