List Product

Untuk mengambil Daftar Produk yang ada di apivouchergame anda bisa melihat contoh berikut.

Cara Integrasi ke API apivouchergame

URL Endpoint :
{$base_url}/product

Method Endpoint: GET

 

Variable :

$base_url = https://apivouchergame.com/api

Request Endpoint :
Headers: {
        Authorization : “Bearer  {$personal_access_token}”
}

Params: {
        search={$key_word}
}

Variable :

$personal_access_token = (Token api yang di di generate pada panel) 

Untuk generate token api bisa lihat dokumentasi berikut: https://apivouchergame.com/panduan/generate-token-api

$key_word = ‘mobile legend’ (kata kunci dari pencarian produk)

Response Endpoint :
{
    "success": true,
    "data": {
        "service": [
            {
                "name": "Free Fire",
                "slug": "free-fire",
                "category": "service",
                "url_image": "$url_image"
            },
        ],
        "voucher": [
            {
                "name": "Steam Wallet (ID)",
                "slug": "steam-wallet-(id)",
                "category": "voucher",
                "url_image": "$url_image"
            },
            {
                "name": "Google Play Card ( ID )",
                "slug": "g-play-card",
                "category": "voucher",
                "url_image": "$url_image"
            },
        ]
    }
}

Code Status :

200 Success = Berhasil

204 No content = Data tidak ada (tidak ada hasil pencarian)

401 Unauthorization = Token Invalid (expired token atau token belum dimasukkan)

500 Internal server error = Sedang terjadi kesalahan pada server apivoucher game