gamp API Documentation
  • Welcome! 😎
  • API Doc
    • Getting Started πŸƒπŸΎβ€β™‚οΈ
      • Signup 🎊
      • API Dashboard πŸ–₯
      • Setup Business Profile πŸ“‡
      • Profile Verification βœ…
    • Introduction
    • Environments βš™οΈ
    • Products 🎁
      • Device Protection Plan πŸ’»
        • Custom Plan
      • Screen Protection Plan πŸ“± (to be deprecated)
      • Repairs πŸ› οΈ
    • Definitions πŸ“’
  • Reference
    • API Reference
      • Authentication πŸ”
      • Error ⚠️
      • Endpoints
        • Plans πŸ›’
        • Protected Devices πŸ“±
        • ClaimsπŸ‘¨πŸ½β€πŸ”§
        • Repairs πŸ› οΈ
    • πŸ“ƒAPI Change Log
Powered by GitBook
On this page
  • Creating A Plan
  • Fetch Plan Pricing
  • Create Plan
  • Fetch Plans
  • Fetch Plan
  • List Plans
  1. Reference
  2. API Reference
  3. Endpoints

Plans πŸ›’

This page details all the endpoints required to create a plan for a list of devices and fetch plans created.

Creating A Plan

Fetch Plan Pricing

GET https://api.getgamp.com/v1/plan/pricing/check

Fetch the pricing for the plan to be purchased

Query Parameters

Name
Type
Description

product*

String

The type of product to be purchased. Available products include "device_protection_plan" and "screen_protection_plan"

deviceType*

String

"phone" or "laptop". Kindly note that tablets are still classified under phones.

duration*

String

"6" or "12" months

numOfDevices

String

Number of devices to be protected

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

{
    "success": true,
    "message": "Pricing Fetched Successfully",
    "data": {
        "price": 6000,
        "product": "device_protection_plan",
        "planType": "basic",
        "deviceType": "phone",
        "duration": 12,
        "numOfDevices": 1
    },
    "statusCode": 200
}

curl --request GET 'https://api.getgamp.com/v1/plan/pricing/check
?product=device_protection_plan&deviceType=phone&duration=12
--header 'Authorization: Bearer SECRET_KEY'
{
    "success": true,
    "message": "Pricing Fetched Successfully",
    "data": {
        "price": 6000,
        "product": "device_protection_plan",
        "planType": "basic",
        "deviceType": "phone",
        "duration": 12,
        "numOfDevices": 1
    },
    "statusCode": 200
}

Create Plan

POST https://api.getgamp.com/v1/plan/create

Create a new plan

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

Request Body

Name
Type
Description

product*

String

The type of product being purchased. Available products include "device_protection_plan". "screen_protection_plan" will be deprecated.

planType*

String

This refers to available tiers of the products. Available plan types include "basic", "premium" and "custom"

deviceType

String

The type of device being protected. It can be set as either 'phone' or 'laptop'.

duration*

Number

The duration of the plan in months. Accepted durations include 6 & 12

metadata

Object

JSON object of custom data. The custom data can be determined by the developer and will be available on the plan document/instance for reference.

customer*

Object

JSON object of customer data containing the customer's email and phoneNumber keys.

uniqueDeviceNumber

String

The IMEI/Serial number of device to be covered by the plan

pricePerDevice

String

The price per 6 months protection that the user needs to pay to access X10 of coverage through custom protection. It is needed for creating custom (flexible) protection plans.

notifyCustomer

Boolean

true if you want your customers to receive sms notifications from gamp and false if not.

{
    "success": true,
    "message": "Plan Created Successfully",
    "data": {
        "uid": "vxp7uuw120211129184515",
        "planId": "dpp8802992022022475737",
        "reference": "wr0qey220220224757",
        "clientId": "um8d2022dxqxnn6a0219",
        "businessId": "bus9076412022027132655",
        "product": "device_protection_plan",
        "planType": "basic",
        "token": "007m2022022475737",
        "createdAt": "2022-02-24T06:57:36.856Z",
        "expiryDate": "2022-08-24T06:57:36.856Z",
        "duration": 6,
        "activatedDevices": 0,
        "claimedDevices": 0,
        "price": 5000,
        "totalClaims": 0,
        "totalClaimsProcessed": 0,
        "history": [
            {
                "action": "Plan Purchased through API",
                "actionBy": "t+a291121@getgamp.com",
                "reason": "",
                "uid": "vxp7uuw120211129184515",
                "createdAt": "2022-02-24T06:57:37.038Z"
            }
        ],
        "pricePerLaptop": 5000,
        "pricePerDevice": 5000,
        "numOfLaptops": 1
    },
    "statusCode": 200
}

curl --request POST 'https://api.getgamp.com/v1/plan/create' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "product": "device_protection_plan",
    "planType": "basic",
    "deviceType": "laptop",
    "deviceModel": "A50",
    "deviceBrand": "samsung",
    "uniqueDeviceNumber": "slbfvuhhg39gh39rh39",
    "duration": 6,
    "customer": {
        "email": "tadeolu1030@gmail.com",
        "phoneNumber": "08036000000"
    },
    "metadata": {
        "uid": "3248485930593583"
    }
}'
{
    "success": true,
    "message": "Plan Created Successfully",
    "data": {
        "uid": "vxp7uuw120211129184515",
        "planId": "dpp8802992022022475737",
        "reference": "wr0qey220220224757",
        "clientId": "um8d2022dxqxnn6a0219",
        "businessId": "bus9076412022027132655",
        "product": "device_protection_plan",
        "planType": "basic",
        "token": "007m2022022475737",
        "createdAt": "2022-02-24T06:57:36.856Z",
        "expiryDate": "2022-08-24T06:57:36.856Z",
        "duration": 6,
        "activatedDevices": 0,
        "claimedDevices": 0,
        "price": 5000,
        "totalClaims": 0,
        "totalClaimsProcessed": 0,
        "history": [
            {
                "action": "Plan Purchased through API",
                "actionBy": "t+a291121@getgamp.com",
                "reason": "",
                "uid": "vxp7uuw120211129184515",
                "createdAt": "2022-02-24T06:57:37.038Z"
            }
        ],
        "pricePerLaptop": 5000,
        "pricePerDevice": 5000,
        "numOfLaptops": 1
    },
    "statusCode": 200
}

Fetch Plans

Fetch Plan

GET https://api.getgamp.com/v1/plan/:reference

Fetch a plan

Path Parameters

Name
Type
Description

reference*

String

The reference linked to the plan

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

{
    "success": true,
    "message": "Plan Fetched Successfully",
    "data": {
        "_id": "6217c05bd02733af3938aed3",
        "uid": "srykawzs20220224182857",
        "businessId": "bus9076412022027132655",
        "planId": "dpp27774620220224182859",
        "reference": "s21h1fr202202241828",
        "product": "device_protection_plan",
        "planType": "basic",
        "token": "o23i20220224182859",
        "createdAt": "2022-02-24T17:28:57.504Z",
        "expiryDate": "2023-02-24T17:28:57.504Z",
        "duration": 12,
        "numOfDevices": 1,
        "activatedDevices": 0,
        "pricePerDevice": 6000,
        "price": 6000,
        "devicesVerified": false,
        "totalClaims": 0,
        "totalClaimsProcessed": 0,
        "__v": 0
    },
    "statusCode": 200
}
curl --request GET 'https://api.getgamp.com/v1/plan/s21h1fr202202241828' \
--header 'Authorization: Bearer SECRET_KEY'
{
    "success": true,
    "message": "Plan Fetched Successfully",
    "data": {
        "_id": "6217c05bd02733af3938aed3",
        "uid": "srykawzs20220224182857",
        "businessId": "bus9076412022027132655",
        "planId": "dpp27774620220224182859",
        "reference": "s21h1fr202202241828",
        "product": "device_protection_plan",
        "planType": "basic",
        "token": "o23i20220224182859",
        "createdAt": "2022-02-24T17:28:57.504Z",
        "expiryDate": "2023-02-24T17:28:57.504Z",
        "duration": 12,
        "numOfDevices": 1,
        "activatedDevices": 0,
        "pricePerDevice": 6000,
        "price": 6000,
        "devicesVerified": false,
        "totalClaims": 0,
        "totalClaimsProcessed": 0,
        "__v": 0
    },
    "statusCode": 200
}

List Plans

GET https://api.getgamp.com/v1/plan

Fetch a list of plans

Query Parameters

Name
Type
Description

reference

String

The reference you specified or we assigned to the plan

planId

String

The ID we assigned to the plan.

cuid

String

The unique ID you specified for or we assigned to the customer's profile

email

String

The user's email address

product

String

"device_protection_plan" or "screen_protection_plan"

planType*

String

"basic" or "premium" or "custom"

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

{
    "success": true,
    "message": "Plans Fetched Successfully",
    "data": {
        "docs": [
            {
                "_id": "6217c05bd02733af3938aed3",
                "uid": "srykawzs20220224182857",
                "businessId": "bus9076412022027132655",
                "planId": "dpp27774620220224182859",
                "reference": "s21h1fr202202241828",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "o23i20220224182859",
                "createdAt": "2022-02-24T17:28:57.504Z",
                "expiryDate": "2023-02-24T17:28:57.504Z",
                "duration": 12,
                "numOfPhones": 1,
                "pricePerPhone": 6000,
                "price": 6000,
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "__v": 0
            },
            {
                "_id": "62172c6128656e2d2159a4b1",
                "uid": "vxp7uuw120211129184515",
                "businessId": "bus9076412022027132655",
                "planId": "dpp8802992022022475737",
                "reference": "wr0qey220220224757",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "007m2022022475737",
                "createdAt": "2022-02-24T06:57:36.856Z",
                "expiryDate": "2022-08-24T06:57:36.856Z",
                "duration": 6,
                "numOfLaptops": 1,
                "pricePerLaptop": 5000,
                "price": 5000,
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "__v": 0
            },
            {
                "_id": "621532d6fa0b490016912d94",
                "uid": "dqplw95h20220222131556",
                "planId": "dpp7529572022022219038",
                "reference": "jqtyy8w20220222190",
                "product": "device_protection_plan",
                "planType": "premium",
                "token": "rlrk2022022219038",
                "createdAt": "2022-02-22T19:00:15.020Z",
                "expiryDate": "2022-08-22T19:00:15.020Z",
                "duration": 6,
                "contact": "2467990876543",
                "numOfPhones": 1,
                "numOfLaptops": 0,
                "pricePerPhone": 9000,
                "pricePerLaptop": 15000,
                "activatedPhones": 0,
                "activatedLaptops": 0,
                "claimedPhones": 0,
                "claimedLaptops": 0,
                "price": 9000,
                "paymentReference": "gamp_ref_t5gqjfh5uwj02022022219015",
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "businessId": "bus9076412022027132655",
                "__v": 0
            },
            {
                "_id": "620deff1bfc86453cdf423c2",
                "uid": "a29mearj20220120184414",
                "planId": "dpp7045522022021774921",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "lkek2022021774921",
                "createdAt": "2022-02-17T06:49:15.382Z",
                "expiryDate": "2023-02-17T06:49:15.382Z",
                "duration": 12,
                "contact": "2348178837585930000",
                "numOfPhones": 1,
                "numOfLaptops": 1,
                "pricePerPhone": 6000,
                "pricePerLaptop": 10000,
                "activatedPhones": 0,
                "activatedLaptops": 0,
                "claimedPhones": 0,
                "claimedLaptops": 0,
                "price": 16000,
                "paymentReference": "gamp_ref_70h0vd8i25rl2022021774918",
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "businessId": "bus9076412022027132655",
                "__v": 0
            },
        ]
    },
    "statusCode": 200
}
curl --request GET 'https://api.getgamp.com/v1/plan' \
--header 'Authorization: Bearer SECRET_KEY'
{
    "success": true,
    "message": "Plans Fetched Successfully",
    "data": {
        "docs": [
            {
                "_id": "6217c05bd02733af3938aed3",
                "uid": "srykawzs20220224182857",
                "businessId": "bus9076412022027132655",
                "planId": "dpp27774620220224182859",
                "reference": "s21h1fr202202241828",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "o23i20220224182859",
                "createdAt": "2022-02-24T17:28:57.504Z",
                "expiryDate": "2023-02-24T17:28:57.504Z",
                "duration": 12,
                "numOfPhones": 1,
                "pricePerPhone": 6000,
                "price": 6000,
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "__v": 0
            },
            {
                "_id": "62172c6128656e2d2159a4b1",
                "uid": "vxp7uuw120211129184515",
                "businessId": "bus9076412022027132655",
                "planId": "dpp8802992022022475737",
                "reference": "wr0qey220220224757",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "007m2022022475737",
                "createdAt": "2022-02-24T06:57:36.856Z",
                "expiryDate": "2022-08-24T06:57:36.856Z",
                "duration": 6,
                "numOfLaptops": 1,
                "pricePerLaptop": 5000,
                "price": 5000,
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "__v": 0
            },
            {
                "_id": "621532d6fa0b490016912d94",
                "uid": "dqplw95h20220222131556",
                "planId": "dpp7529572022022219038",
                "reference": "jqtyy8w20220222190",
                "product": "device_protection_plan",
                "planType": "premium",
                "token": "rlrk2022022219038",
                "createdAt": "2022-02-22T19:00:15.020Z",
                "expiryDate": "2022-08-22T19:00:15.020Z",
                "duration": 6,
                "contact": "2467990876543",
                "numOfPhones": 1,
                "numOfLaptops": 0,
                "pricePerPhone": 9000,
                "pricePerLaptop": 15000,
                "activatedPhones": 0,
                "activatedLaptops": 0,
                "claimedPhones": 0,
                "claimedLaptops": 0,
                "price": 9000,
                "paymentReference": "gamp_ref_t5gqjfh5uwj02022022219015",
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "businessId": "bus9076412022027132655",
                "__v": 0
            },
            {
                "_id": "620deff1bfc86453cdf423c2",
                "uid": "a29mearj20220120184414",
                "planId": "dpp7045522022021774921",
                "product": "device_protection_plan",
                "planType": "basic",
                "token": "lkek2022021774921",
                "createdAt": "2022-02-17T06:49:15.382Z",
                "expiryDate": "2023-02-17T06:49:15.382Z",
                "duration": 12,
                "contact": "2348178837585930000",
                "numOfPhones": 1,
                "numOfLaptops": 1,
                "pricePerPhone": 6000,
                "pricePerLaptop": 10000,
                "activatedPhones": 0,
                "activatedLaptops": 0,
                "claimedPhones": 0,
                "claimedLaptops": 0,
                "price": 16000,
                "paymentReference": "gamp_ref_70h0vd8i25rl2022021774918",
                "totalClaims": 0,
                "totalClaimsProcessed": 0,
                "businessId": "bus9076412022027132655",
                "__v": 0
            },
        ]
    },
    "statusCode": 200
}
PreviousEndpointsNextProtected Devices πŸ“±

Last updated 1 year ago