Get started
API Endpoint
The TwinBp API provides
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/addItemsImport-save/49c02559d80c45c221cf81f9894c451ba2c53d8807d193082201f9665f94f1cda8b278c583904270' \
--form 'hardware_id="175"' \
--form 'hardware_item_document=@"/C:/Users/ravin/Downloads/Hardware Items ex.xlsx"'
To get characters you need to make a POST call to the following url
:
https://app.twinbp.com/api/addItemsImport-save/49c02559d80c45c221cf81f9894c451ba2c53d8807d193082201f9665f94f1cda8b278c583904270
Result example :
{
"status": "success",
"status_code": 140,
"message": "Items imported successfully!",
"data": [
{
"id": 3,
"hardware_id": "175",
"category_id": "1",
"sub_category_id": "1",
"category_name": null,
"sub_category_name": null,
"name": "Dulux Weathershield Extra - Water Base",
"code": null,
"brand_id": "1",
"brand_name": null,
"pack_size": "20 L",
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 4,
"hardware_id": "175",
"category_id": "1",
"sub_category_id": null,
"category_name": null,
"sub_category_name": "Interior Paint",
"name": "Dulux easy care - Water base",
"code": null,
"brand_id": "1",
"brand_name": null,
"pack_size": "4 L",
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 5,
"hardware_id": "175",
"category_id": "1",
"sub_category_id": "2",
"category_name": null,
"sub_category_name": null,
"name": "J Chem -Water base",
"code": null,
"brand_id": "2",
"brand_name": null,
"pack_size": "1 L",
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 8,
"hardware_id": "175",
"category_id": "2",
"sub_category_id": "4",
"category_name": null,
"sub_category_name": null,
"name": "Akoya (1 Gang / 2 way)",
"code": null,
"brand_id": "5",
"brand_name": null,
"pack_size": null,
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 9,
"hardware_id": "175",
"category_id": "2",
"sub_category_id": "4",
"category_name": null,
"sub_category_name": null,
"name": "Bell Switch - Brass",
"code": null,
"brand_id": "6",
"brand_name": null,
"pack_size": null,
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 10,
"hardware_id": "175",
"category_id": "2",
"sub_category_id": "5",
"category_name": null,
"sub_category_name": null,
"name": "Switch sockets - 13A with USB",
"code": null,
"brand_id": "7",
"brand_name": null,
"pack_size": null,
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
},
{
"id": 11,
"hardware_id": "175",
"category_id": "3",
"sub_category_id": "6",
"category_name": null,
"sub_category_name": null,
"name": "6\" Angle grinder - Brushless",
"code": null,
"brand_id": "8",
"brand_name": null,
"pack_size": null,
"status": "pending",
"is_active": "1",
"is_deleted": "0",
"created_at": "2024-10-13T23:30:16.000000Z",
"updated_at": "2024-10-13T23:30:16.000000Z"
}
}
Input Data
| Field | Type | Description |
|---|---|---|
| hardware_id | Integer | Login Hardware Id. |
| hardware_item_document | String | Selected Item Excell Document |
Errors
The Items Import Save API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 1000 | Validation Message |
| 403 | Refresh token has expired |
| 405 | Refresh token Not Valid |
| 1050 | Excel data does not match the required format! |
| 1010 | Hardware Not Exsist |