Dokumentasi API : Lookup – Shop

Pada halaman ini, akan dijelaskan penggunaaan API untuk berinterakasi dengan tabel lookup Shop.


API List

Method ini digunakan untuk mendapatkan data shop yang tersedia.

Request

METHODURL
GEThttp://apiv2.mitrabunso.com/public/shop/shops/list/{id_user}/{offsite}/{limit}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 character id user
GEToffsiteYAintoffsite data
GETlimitYAintlimit data
HEADAuthorizationYABearer TokenBearer Token Login
GETqTIDAKSTRINGParameter untuk pencarian
GETorderByTIDAKSTRINGParameter untuk pengurutan berdasarkan data

Response

{
    "message": "Data retrieved successfully",
    "show": "1",
    "total": 76,
    "data": [
        {
            "deleted_at": null,
            "id": "01a2f6a5-6761-4421-ac7d-7d09eb80fdf6",
            "name": "VBB AKSESORIS",
            "marketplace": "Whatsapp",
            "marketplace_id": "04b43ffd-f27b-46c2-87d9-89a4237330b1",
            "status": "1",
            "created": {
                "date": "2022-05-05 14:08:22.000000",
                "timezone_type": 3,
                "timezone": "Asia/Bangkok"
            },
            "updated": {
                "date": "2022-05-05 14:08:22.000000",
                "timezone_type": 3,
                "timezone": "Asia/Bangkok"
            },
            "createdBy": "4c8eaf2f-ec3b-4e5a-93cc-549047c863ee",
            "updatedBy": "",
            "createdByName": "Henni Pertiwi",
            "updatedByName": null
        }
    ]
}

API Create

Method ini digunakan untuk memasukan data shop.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/shop/shops/create/{id_user}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 charakter id user
HEADAuthorizationYABearer TokenBearer Token Login
POSTnameYASTRINGNama untuk shop
POSTmarketplace_idYASTRING36 charakter id marketplace

Response

{
    "message": "Data added successfully",
    "data": {
        "deleted_at": null,
        "id": "611ff233-61a9-43d3-ad34-37cf774576ba",
        "name": "Shop Test 1",
        "marketplace": null,
        "marketplace_id": "be012dfe-afad-4f78-a95e-723364fb8529",
        "status": "1",
        "created": {
            "date": "2022-10-10 09:53:27.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-10-10 09:53:27.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "createdBy": "2888cc3b-0478-4e85-be41-7baf74fedf36",
        "updatedBy": "",
        "createdByName": null,
        "updatedByName": null
    }
}

API Update

Method ini digunakan untuk mengubah data shop.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/shop/shops/update/{id_user}/{id_shop}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 character id user
GETid_shopYASTRING36 character id shop
HEADAuthorizationYABearer TokenBearer Token Login
POSTnameYASTRINGNama untuk shop
POSTmarketplace_idYASTRING36 charakter id marketplace

Response

{
    "message": "Data updated successfully",
    "data": {
        "deleted_at": null,
        "id": "611ff233-61a9-43d3-ad34-37cf774576ba",
        "name": "Shop Test 1 edited",
        "marketplace": null,
        "marketplace_id": "be012dfe-afad-4f78-a95e-723364fb8529",
        "status": "1",
        "created": {
            "date": "2022-10-10 09:53:27.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-10-10 09:54:33.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "createdBy": "2888cc3b-0478-4e85-be41-7baf74fedf36",
        "updatedBy": "2888cc3b-0478-4e85-be41-7baf74fedf36",
        "createdByName": null,
        "updatedByName": null
    }
}

API Details

Method ini digunakan untuk mendapatkan data details shop.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/shop/shops/details/{id_user}/{id_shop}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 character id user
GETid_shopYASTRING36 character id shop
HEADAuthorizationYABearer TokenBearer Token Login

Response

{
    "message": "Data retrieved successfully",
    "data": {
        "deleted_at": null,
        "id": "611ff233-61a9-43d3-ad34-37cf774576ba",
        "name": "Shop Test 1",
        "marketplace": "Shopee",
        "marketplace_id": "be012dfe-afad-4f78-a95e-723364fb8529",
        "status": "1",
        "created": {
            "date": "2022-10-10 09:53:27.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-10-10 09:53:27.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "createdBy": "2888cc3b-0478-4e85-be41-7baf74fedf36",
        "updatedBy": "",
        "createdByName": "Andika Pratama",
        "updatedByName": null
    }
}

API Delete

Method ini digunakan untuk menghapus data shop.

Request

METHODURL
DELETEhttp://apiv2.mitrabunso.com/public/shop/shops/delete/{id_user}/{id_shop}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 character id user
GETid_shopYASTRING36 character id shop
HEADAuthorizationYABearer TokenBearer Token Login

Response

{
    "message": "data deleted successfully"
}

Leave a Reply