Dokumentasi API : Inventory – Space

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


API List

Method ini digunakan untuk mendapatkan data space yang tersedia.

Request

METHODURL
GEThttp://apiv2.mitrabunso.com/public/inventory/space/list/{id_user}/{offsite}/{limit}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 digit 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": 283,
    "data": [
        {
            "deleted_at": null,
            "storage_code": "GD29",
            "id": "0102f7ee-d457-46d0-9cc5-58dd5c059c9b",
            "code": "LT 2 - 2CE400",
            "name": "2CE400",
            "s_id": "408a40ac-6060-42d1-9ab3-7e5c7151339b",
            "storage": "Gudang D29 Kapuk",
            "created": {
                "date": "2022-05-01 10:01:52.000000",
                "timezone_type": 3,
                "timezone": "Asia/Bangkok"
            },
            "updated": {
                "date": "2022-05-01 10:01:52.000000",
                "timezone_type": 3,
                "timezone": "Asia/Bangkok"
            },
            "createdBy": "5dff9be2-c24d-41dc-8078-1ebf9e3448f6",
            "updatedBy": "",
            "createdByName": "Albert Sebastian",
            "updatedByName": null
        }
    ]
}

API Create

Method ini digunakan untuk memasukan data space.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/inventory/space/create/{id_user}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 digit id user
HEADAuthorizationYABearer TokenBearer Token Login
POSTnameYASTRINGNama untuk space
POSTcodeYASTRINGCode untuk space
POSTs_idYASTRING36 digit id storage

Response

{
    "message": "Data added successfully",
    "data": {
        "deleted_at": null,
        "id": "e9f9621e-277f-40b6-9fc5-0821e139066a",
        "code": "ST1",
        "name": "Space Test 1",
        "s_id": "408a40ac-6060-42d1-9ab3-7e5c7151339b",
        "storage": null,
        "created": {
            "date": "2022-10-09 10:08:41.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-10-09 10:08:41.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 space.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/inventory/space/update/{id_user}/{id_space}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 digit id user
GETid_spaceYASTRING36 digit id space
HEADAuthorizationYABearer TokenBearer Token Login
POSTnameYASTRINGNama untuk space
POSTcodeYASTRINGCode untuk space
POSTs_idYASTRING36 digit id storage

Response

{
    "message": "Data updated successfully",
    "data": {
        "deleted_at": null,
        "id": "e9f9621e-277f-40b6-9fc5-0821e139066a",
        "code": "ST11",
        "name": "Space Test 1",
        "s_id": "408a40ac-6060-42d1-9ab3-7e5c7151339b",
        "storage": null,
        "created": {
            "date": "2022-10-09 10:08:41.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-10-09 10:09:45.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 space.

Request

METHODURL
POSThttp://apiv2.mitrabunso.com/public/inventory/space/details/{id_user}/{id_space}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 digit id user
GETid_spaceYASTRING36 digit id space
HEADAuthorizationYABearer TokenBearer Token Login

Response

{
    "message": "Data retrieved successfully",
    "data": {
        "deleted_at": null,
        "storage_code": "GD29",
        "id": "e9f9621e-277f-40b6-9fc5-0821e139066a",
        "code": "ST1",
        "name": "Space Test 1",
        "s_id": "408a40ac-6060-42d1-9ab3-7e5c7151339b",
        "storage": "Gudang D29 Kapuk",
        "created": {
            "date": "2022-05-01 10:01:52.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "updated": {
            "date": "2022-05-01 10:01:52.000000",
            "timezone_type": 3,
            "timezone": "Asia/Bangkok"
        },
        "createdBy": "5dff9be2-c24d-41dc-8078-1ebf9e3448f6",
        "updatedBy": "",
        "createdByName": "Andika Pratama",
        "updatedByName": null
    }
}

API Delete

Method ini digunakan untuk menghapus data space.

Request

METHODURL
DELETEhttp://apiv2.mitrabunso.com/public/inventory/space/delete/{id_user}/{id_space}

Parameter yang digunakan pada method ini adalah sebagai berikut:

METHODParameterWajibTipeKeterangan
GETid_userYASTRING36 digit id user
GETid_spaceYASTRING36 digit id space
HEADAuthorizationYABearer TokenBearer Token Login

Response

{
    "message": "data deleted successfully"
}

Leave a Reply