Insert Items

    API Endpoint
                

Insert new items to the TwinBP

To use this API, you need an API key. Please contact us at https://app.twinbp.com to get your own API key.

get characters


        curl --location 'https://app.twinbp.com/api/insertItems/enter_your_refresh_token' \
        --header 'Content-Type: application/json' \
        --data '{
            "items": [
                {
                    "itemName": "Kalani Plug Point 30A",
                    "packSize": "100 pieces",
                    "hardware_id": 175,
                    "categoryName": "Electric Items",
                    "subCategoryName": "Multi Plug Point",
                    "brandName": "Kalani"
                },
                {
                    "itemName": "Asizena Roofing Sheet 14\" x 14\"",
                    "packSize": "500 pieces",
                    "hardware_id": 176,
                    "categoryName": "Sheets",
                    "subCategoryName": "Large Roofing Sheets",
                    "brandName": "Asizena"
                }
            ]
        }'
                

To get characters you need to make a POST call to the following url :
https://app.twinbp.com/api/insertItems/enter_your_refresh_token



Result example :

            {
                "status": "success",
                "status_code": 200,
                "message": "Items Added successfully!",
                "data": [
                    {
                        "hardware_id": 175,
                        "category_name": "Electric Items",
                        "sub_category_name": "Multi Plug Point",
                        "brand_name": "Kalani",
                        "name": "Kalani Plug Point 30A",
                        "code": "kalani-plug-point-30a",
                        "pack_size": "100 pieces",
                        "status": "pending",
                        "is_active": 1,
                        "is_deleted": 0,
                        "updated_at": "2024-10-31T05:30:10.000000Z",
                        "created_at": "2024-10-31T05:30:10.000000Z",
                        "id": 124
                    },
                    {
                        "hardware_id": 175,
                        "category_name": "Sheets",
                        "sub_category_name": "Large Roofing Sheets",
                        "brand_name": "Asizena",
                        "name": "Asizena Roofing Sheet 14\" x 14\"",
                        "code": "asizena-roofing-sheet-14-x-14",
                        "pack_size": "500 pieces",
                        "status": "pending",
                        "is_active": 1,
                        "is_deleted": 0,
                        "updated_at": "2024-10-31T05:30:10.000000Z",
                        "created_at": "2024-10-31T05:30:10.000000Z",
                        "id": 125
                    }
                ]
            }
                

Input Data

Field Type Description
hardware_id Integer Login User Id.
itemName String Enter Item Name
packSize String Enter Pack Size
categoryName String Enter Category Name
subCategoryName String Enter Sub Category Name
brandName String Enter Brand Name

Errors

The Added Input Item API uses the following error codes:

Error Code Meaning
1000 Validation Message
403 Refresh token has expired
405 Refresh token Not Valid
1010 Hardware Not Exsist