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 Repair Request
  • Create Repair Request
  • Fetch Repairs
  • Fetch Repairs
  • List Repairs
  1. Reference
  2. API Reference
  3. Endpoints

Repairs πŸ› οΈ

This details all endpoints for creating and fetching repair requests

Creating A Repair Request

Create Repair Request

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

Create a new plan

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

Request Body

Name
Type
Description

cuid

String

The unique ID you ascribe to the customer on your database

deviceType*

String

"phone", "laptop" or "desktop"

deviceBrand*

String

"The brand of the device manufacturer e.g samsung etc"

deviceModel*

String

The model of the device

customer*

Object

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

description

String

A detailed description

issue*

String

The description

metadata

Object

JSON object of custom data. The custom data can be determined by the developer and will be available on the repair doc for reference.

reference

String

Your unique reference for the repair request. If not assigned, we will assign a reference by default.

{
    "success": true,
    "message": "Repair Request Submitted Successfully",
    "data": {
        "businessId": "bus9076412022027132655",
        "clientId": "um8d2022dxqxnn6a0219",
        "cuid": "reu93kbp2022022541553",
        "uid": "vqlyhe0e2022022541553",
        "repairId": "rep5542892022022555748",
        "reference": "847g538pdsfindfd",
        "createdAt": "2022-02-25T04:57:48.515Z",
        "status": "pending",
        "statusMsg": "Awaiting Estimate",
        "statusNo": "1",
        "deviceType": "phone",
        "deviceBrand": "LG",
        "deviceModel": "Z5",
        "issue": "screen damaged",
        "description": "Fell from a building",
        "customer": {
            "email": "t+238483@getgamp.com",
            "phoneNumber": "080407485857"
        },
        "metadata": {},
        "pickupAddress": "",
        "pickupState": "",
        "channel": "API",
        "priceDecision": "pending",
        "amountPaid": 0,
        "paid": false
    },
    "statusCode": 200
}
{
    "statusCode": 401,
    "message": "Unauthorized"
}
curl --request POST 'https://api.getgamp.com/v1/repair/create' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    
    "customer": {
                    "email": "t+238483@getgamp.com",
                    "phoneNumber": "080407485857"
                },
    "issue": "screen damaged", 
    "description": "Fell from a building",  
    "deviceType": "phone",
    "deviceBrand": "LG",
    "deviceModel": "Z5",
    "reference": "847g538pdsfindfd"
}'
{
    "success": true,
    "message": "Repair Request Submitted Successfully",
    "data": {
        "businessId": "bus9076412022027132655",
        "clientId": "um8d2022dxqxnn6a0219",
        "cuid": "reu93kbp2022022541553",
        "uid": "vqlyhe0e2022022541553",
        "repairId": "rep5542892022022555748",
        "reference": "847g538pdsfindfd",
        "createdAt": "2022-02-25T04:57:48.515Z",
        "status": "pending",
        "statusMsg": "Awaiting Estimate",
        "statusNo": "1",
        "deviceType": "phone",
        "deviceBrand": "LG",
        "deviceModel": "Z5",
        "issue": "screen damaged",
        "description": "Fell from a building",
        "customer": {
            "email": "t+238483@getgamp.com",
            "phoneNumber": "080407485857"
        },
        "metadata": {},
        "pickupAddress": "",
        "pickupState": "",
        "channel": "API",
        "priceDecision": "pending",
        "amountPaid": 0,
        "paid": false
    },
    "statusCode": 200
}

Fetch Repairs

Fetch Repairs

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

Fetch a plan

Path Parameters

Name
Type
Description

reference*

String

The reference you generated for that repair request

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

{
    "success": true,
    "message": "Repair Fetched Successfully",
    "data": {
        "_id": "621861ccda742de30322fb92",
        "uid": "vqlyhe0e2022022541553",
        "repairId": "rep5542892022022555748",
        "reference": "847g538pdsfindfd",
        "createdAt": "2022-02-25T04:57:48.515Z",
        "status": "pending",
        "statusMsg": "Awaiting Estimate",
        "statusNo": "1",
        "deviceType": "phone",
        "deviceModel": "Z5",
        "issue": "screen damaged",
        "description": "Fell from a building",
        "pickupAddress": "",
        "pickupState": "",
        "priceDecision": "pending",
        "amountPaid": 0,
        "paid": false,
        "__v": 0
    },
    "statusCode": 200
}
{
    "statusCode": 401,
    "message": "Unauthorized"
}
curl --request GET 'https://api.getgamp.com/v1/repair/847g538pdsfindfd' \
--header 'Authorization: Bearer SECRET_KEY'
{
    "success": true,
    "message": "Repair Fetched Successfully",
    "data": {
        "_id": "621861ccda742de30322fb92",
        "uid": "vqlyhe0e2022022541553",
        "repairId": "rep5542892022022555748",
        "reference": "847g538pdsfindfd",
        "createdAt": "2022-02-25T04:57:48.515Z",
        "status": "pending",
        "statusMsg": "Awaiting Estimate",
        "statusNo": "1",
        "deviceType": "phone",
        "deviceModel": "Z5",
        "issue": "screen damaged",
        "description": "Fell from a building",
        "pickupAddress": "",
        "pickupState": "",
        "priceDecision": "pending",
        "amountPaid": 0,
        "paid": false,
        "__v": 0
    },
    "statusCode": 200
}

List Repairs

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

Fetch a list of repairs

Query Parameters

Name
Type
Description

repairId

String

The unique ID of the repair request

reference

String

The unique reference linked to the repair request

cuid

String

The unique ID you specified for or we assigned to the profile of the customer linked to the claim

Headers

Name
Type
Description

Authorization*

String

Set value to Bearer SECRET_KEY

{
    "success": true,
    "message": "Repairs Fetched Successfully",
    "data": {
        "docs": [
            {
                "_id": "621861ccda742de30322fb92",
                "cuid": "hv8h4ggelyhe22022541553",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep5542892022022555748",
                "reference": "847g538pdsfindfd",
                "createdAt": "2022-02-25T04:57:48.515Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "Z5",
                "issue": "screen damaged",
                "description": "Fell from a building",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            },
            {
                "_id": "62185e8a845fe03606ab03a2",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep0118692022022554353",
                "reference": "mdfndjw848hffndfd",
                "createdAt": "2022-02-25T04:43:54.134Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "S20",
                "issue": "screen damaged",
                "description": "Fell from a building",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            },
            {
                "_id": "62185da81e597dab25a401d3",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep036829202202255408",
                "reference": "mdfndfiundjfndfd",
                "createdAt": "2022-02-25T04:40:08.812Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "S20",
                "issue": "liquid",
                "description": "Water",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            }
        ]
    },
    "statusCode": 200
}
{
    "statusCode": 401,
    "message": "Unauthorized"
}
curl --request GET 'https://api.getgamp.com/v1/repair' \
--header 'secretKey: sk_test_ocbj19czut28320zutt1sj02' \
--header 'Authorization: Bearer SECRET_KEY'
{
    "success": true,
    "message": "Repairs Fetched Successfully",
    "data": {
        "docs": [
            {
                "_id": "621861ccda742de30322fb92",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep5542892022022555748",
                "reference": "847g538pdsfindfd",
                "createdAt": "2022-02-25T04:57:48.515Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "Z5",
                "issue": "screen damaged",
                "description": "Fell from a building",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            },
            {
                "_id": "62185e8a845fe03606ab03a2",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep0118692022022554353",
                "reference": "mdfndjw848hffndfd",
                "createdAt": "2022-02-25T04:43:54.134Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "S20",
                "issue": "screen damaged",
                "description": "Fell from a building",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            },
            {
                "_id": "62185da81e597dab25a401d3",
                "uid": "vqlyhe0e2022022541553",
                "repairId": "rep036829202202255408",
                "reference": "mdfndfiundjfndfd",
                "createdAt": "2022-02-25T04:40:08.812Z",
                "status": "pending",
                "statusMsg": "Awaiting Estimate",
                "statusNo": "1",
                "deviceType": "phone",
                "deviceModel": "S20",
                "issue": "liquid",
                "description": "Water",
                "pickupAddress": "",
                "pickupState": "",
                "priceDecision": "pending",
                "amountPaid": 0,
                "paid": false,
                "__v": 0
            }
        ]
    },
    "statusCode": 200
}

PreviousClaimsπŸ‘¨πŸ½β€πŸ”§NextAPI Change Log

Last updated 3 years ago