Skip to content

Items API Reference

Overview

Manage your item catalog with our comprehensive Items API. Create, update, delete, and retrieve item information with full support for single or bundling items, images, and inventory tracking.

Authentication

All API requests require authentication using token and tenant identification:

  • Authorization: YOUR_API_KEY
  • X-Tenant-Id: YOUR_TENANT_ID

Endpoints

MethodEndpointDescription
GET/api/partner/v1/items/categoriesList item categories
GET/api/partner/v1/itemsList items
GET/api/partner/v1/items/:idItem detail
GET/api/partner/v1/items/:id/stocksItem stocks
POST/api/partner/v1/itemsCreate Item
PUT/api/partner/v1/itemsUpdate Item

1. Get Category List

Retrieve a paginated list of categories.

Endpoint: GET /api/partner/v1/items/categories

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)

Query Parameters:

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoItems per page (default: 20, max: 100)

Example Request:

bash
curl -X GET "{{url}}/api/partner/v1/items/categories?page=1&per_page=10" \
  -H "Authorization: {token}" \
  -H "X-Tenant-Id: {tenant_id}"

Example Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "categories": [
      {
        "category_id": 12,
        "name": "Laptop & Komputer",
        "description": "Laptop, desktop, dan komponen komputer",
        "parent_id": 1,
        "sort_order": 2,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 13,
        "name": "Elektronik Rumah Tangga",
        "description": "Peralatan elektronik untuk rumah tangga",
        "parent_id": 1,
        "sort_order": 3,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 11,
        "name": "Smartphone & Tablet",
        "description": "Handphone, tablet, dan aksesorisnya",
        "parent_id": 1,
        "sort_order": 1,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 5,
        "name": "Olahraga & Outdoor",
        "description": "Peralatan olahraga dan aktivitas outdoor",
        "parent_id": null,
        "sort_order": 5,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 6,
        "name": "Otomotif",
        "description": "Suku cadang dan aksesoris kendaraan",
        "parent_id": null,
        "sort_order": 6,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 7,
        "name": "Buku & Media",
        "description": "Buku, majalah, dan media pembelajaran",
        "parent_id": null,
        "sort_order": 7,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 8,
        "name": "Mainan & Hobi",
        "description": "Mainan anak dan koleksi hobi",
        "parent_id": null,
        "sort_order": 8,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 9,
        "name": "Makanan & Minuman",
        "description": "Produk makanan dan minuman",
        "parent_id": null,
        "sort_order": 9,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 10,
        "name": "Ibu & Bayi",
        "description": "Perlengkapan ibu hamil dan bayi",
        "parent_id": null,
        "sort_order": 10,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      },
      {
        "category_id": 14,
        "name": "Audio & Video",
        "description": "Speaker, headphone, kamera, dan peralatan audio video",
        "parent_id": 1,
        "sort_order": 4,
        "created_at": "2025-08-25T03:26:56.000000Z",
        "updated_at": "2025-08-25T03:26:56.000000Z"
      }
    ],
    "pagination": {
      "total": 45,
      "per_page": 10,
      "current_page": 1,
      "last_page": 5,
      "from": 1,
      "to": 10
    }
  },
  "errors": null,
  "request_id": "7eb25b1c-be67-4522-9c5b-55ee5bf9e76a"
}

2. Create Item

Create a new item with type single or bundling and images.

Endpoint: POST /api/partner/v1/items

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)

Request Parameters:

ParameterTypeRequiredDescription
namestringYesProduct name (max 255 characters)
skustringYesUnique product SKU (max 100 characters, unique per tenant)
barcodestringNoProduct barcode (max 100 characters)
descriptionstringYesProduct description
category_idintegerYesCategory ID (must exist in tenant categories)
brandstringNoProduct brand (max 100 characters)
supplierstringNoSupplier name (max 100 characters)
product_typestringYesProduct type (physical, digital)
statusstringYesProduct status (published, draft, archived)
is_bundlebooleanConditionalRequired if product_type = physical
weightnumberConditionalRequired if product_type = physical (min 0)
widthnumberConditionalRequired if product_type = physical (min 0)
heightnumberConditionalRequired if product_type = physical (min 0)
lengthnumberConditionalRequired if product_type = physical (min 0)
published_pricenumberYesSelling price (min 0)
cost_pricenumberYesCost price (min 0)
is_managed_by_fulfillmentbooleanConditionalRequired if product_type = physical
fulfillment_manage_bystringConditionalRequired if is_managed_by_fulfillment = true (fifo, fefo)
outbound_expiredintegerNoOutbound expiration threshold (min 0)
inbound_expiredintegerNoInbound expiration threshold (min 0)
outer_barcodestringNoOuter packaging barcode (max 100 characters)
advance_qcbooleanNoEnable advance quality control
production_batchbooleanNoEnable production batch tracking
cold_storagebooleanNoRequires cold storage
is_fakebooleanNoMark as fake/dummy product
is_pre_orderbooleanNoEnable pre-order
pre_order_rulesstringNoPre-order rules description
featured_image_uuidstringNoFeatured image UUID (UUID format)
additional_imagesarrayNoArray of additional image UUIDs (max 5 items)
additional_images[]stringNoAdditional image UUID (UUID format)
product_video_uuidstringNoProduct video UUID (UUID format)
bundle_itemsarrayConditionalRequired if is_bundle = true (minimum 1 item)
bundle_items[].sku_idintegerYesProduct ID included in bundle (must exist in tenant)
bundle_items[].quantityintegerYesQuantity per bundle (min 1)

Request Body:

json
{
  "category_id": 2,
  "name": "Off Mercy Sample 3",
  "sku": "MASKIV-SAMPLE 3",
  "barcode": "MASKIV-SAMPLE 3",
  "brand": "Maternal",
  "description": "White 16s cotton long sleeve T-shirts, open-end yarn, 100% cotton, tubular fit, seamless double needle 2cm collar, taped neck and shoulders, satin & cotton label, rib cuffs, double needle bottom hem, multi color plastisol ink screen printing.",
  "product_type": "physical",
  "published_price": 200000.00,
  "cost_price": 199000.00,
  "weight": 10.00,
  "width": 10.00,
  "height": 10.00,
  "length": 10.00,
  "status": "published",
  "is_bundle": false,
  "is_managed_by_fulfillment": false,
  "fulfillment_manage_by": null,
  "outbound_expired": 0,
  "inbound_expired": 0,
  "outer_barcode": null,
  "advance_qc": false,
  "production_batch": false,
  "cold_storage": false,
  "created_by": "maternal",
  "updated_by": "maternal",
  "deleted_by": null,
  "deleted_at": null,
  "created_at": "2025-10-10 06:42:04",
  "updated_at": "2025-10-10 06:43:11",
  "is_fake": false,
  "is_pre_order": null,
  "pre_order_rules": null
}

Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
      "product_id": 12,
      "sku": "MASKIV-SAMPLE 3",
      "name": "Off Mercy Sample 3",
      "description": "White 16s cotton long sleeve T-shirts, open-end yarn, 100% cotton, tubular fit, seamless double needle 2cm collar, taped neckand shoulders, satin & cotton label, rib cuffs, double needle bottom hem, multi color plastisol ink screen printing.",
      "published_price": "200000.00",
      "cost_price": "199000.00",
      "weight": "10.00",
      "width": "10.00",
      "height": "10.00",
      "length": "10.00",
      "status": "published",
      "is_bundle": false,
      "category_id": 2,
      "category_name": "Fashion",
      "volume": 1000,
      "media": []
  },
  "errors": null,
  "request_id": "70603908-05fd-4601-b5db-0105a369bdd3"
}

3. Update Item

Update an existing item's information.

Endpoint: PUT /api/partner/v1/items/{item}

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)
  • Content-Type: multipart/form-data (required)

Request Body:

ParameterTypeRequiredDescription
namestringYesProduct name (max 255 characters)
skustringYesUnique product SKU (max 100 characters, unique per tenant, excluding current product)
barcodestringNoUnique product barcode (max 100 characters, unique per tenant, excluding current product, cannot duplicate non-null barcode)
descriptionstringYesProduct description
category_idintegerYesCategory ID (must exist in tenant categories)
brandstringNoProduct brand (max 100 characters)
supplierstringNoSupplier name (max 100 characters)
product_typestringYesProduct type (physical, digital)
statusstringYesProduct status (published, draft, archived)
is_bundlebooleanYesDefine whether product is a bundle
weightnumberConditionalRequired if product_type = physical (min 0)
widthnumberConditionalRequired if product_type = physical (min 0)
heightnumberConditionalRequired if product_type = physical (min 0)
lengthnumberConditionalRequired if product_type = physical (min 0)
published_pricenumberYesSelling price (min 0)
cost_pricenumberYesCost price (min 0)
is_managed_by_fulfillmentbooleanYesWhether product is managed by fulfillment
fulfillment_manage_bystringConditionalRequired if is_managed_by_fulfillment = true (fifo, fefo)
outbound_expiredintegerNoOutbound expiration threshold (min 0)
inbound_expiredintegerNoInbound expiration threshold (min 0)
outer_barcodestringNoOuter packaging barcode (max 100 characters)
advance_qcbooleanYesEnable advance quality control
production_batchbooleanYesEnable production batch tracking
cold_storagebooleanYesRequires cold storage
is_fakebooleanNoMark as fake/dummy product
is_pre_orderbooleanNoEnable pre-order
pre_order_rulesstringNoPre-order rules description
featured_image_uuidstringNoFeatured image UUID (UUID format)
additional_imagesarrayNoArray of additional image UUIDs
additional_images[].uuidstringNoAdditional image UUID (UUID format)
product_video_uuidstringNoProduct video UUID (UUID format)
remove_featured_imagebooleanNoRemove current featured image if true
remove_additional_imagesbooleanNoRemove all additional images if true
remove_product_videobooleanNoRemove current product video if true
bundle_itemsarrayConditionalRequired if is_bundle = true
bundle_items[].sku_idintegerYesProduct ID included in bundle (must exist in tenant)
bundle_items[].quantityintegerYesQuantity per bundle (min 1)

Example Request:

json
{
  "category_id": 2,
  "name": "Off Mercy Sample 3",
  "sku": "MASKIV-SAMPLE 3",
  "barcode": "MASKIV-SAMPLE 3",
  "brand": "Maternal",
  "description": "White 16s cotton long sleeve T-shirts, open-end yarn, 100% cotton, tubular fit, seamless double needle 2cm collar, taped neck and shoulders, satin & cotton label, rib cuffs, double needle bottom hem, multi color plastisol ink screen printing.",
  "product_type": "physical",
  "published_price": 200000.00,
  "cost_price": 199000.00,
  "weight": 10.00,
  "width": 10.00,
  "height": 10.00,
  "length": 10.00,
  "status": "published",
  "is_bundle": false,
  "is_managed_by_fulfillment": false,
  "fulfillment_manage_by": null,
  "outbound_expired": 0,
  "inbound_expired": 0,
  "outer_barcode": null,
  "advance_qc": false,
  "production_batch": false,
  "cold_storage": false,
  "created_by": "maternal",
  "updated_by": "maternal",
  "deleted_by": null,
  "deleted_at": null,
  "created_at": "2025-10-10 06:42:04",
  "updated_at": "2025-10-10 06:43:11",
  "is_fake": false,
  "is_pre_order": null,
  "pre_order_rules": null
}

Example Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
      "product_id": 12,
      "sku": "MASKIV-SAMPLE 3",
      "name": "Off Mercy Sample 3",
      "description": "White 16s cotton long sleeve T-shirts, open-end yarn, 100% cotton, tubular fit, seamless double needle 2cm collar, taped neckand shoulders, satin & cotton label, rib cuffs, double needle bottom hem, multi color plastisol ink screen printing.",
      "published_price": "200000.00",
      "cost_price": "199000.00",
      "weight": "10.00",
      "width": "10.00",
      "height": "10.00",
      "length": "10.00",
      "status": "published",
      "is_bundle": false,
      "category_id": 2,
      "category_name": "Fashion",
      "volume": 1000,
      "media": []
  },
  "errors": null,
  "request_id": "70603908-05fd-4601-b5db-0105a369bdd3"
}

4. Get List of Items

Retrieve a paginated list of your items.

Endpoint: GET /api/partner/v1/items

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)

Query Parameters:

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
per_pageintegerNoItems per page (default: 10, max: 100)
searchstringNoSearch by item name or SKU
categorystringNoFilter by category
statusstringNoFilter by status (published, draft)
sort_bystringNoSort by (name, price, created_at, updated_at)
sort_orderstringNoSort order (asc, desc)

Example Request:

bash
curl -X GET "{{url}}/api/partner/v1/items?page=1&per_page=10" \
  -H "Authorization: {token}" \
  -H "X-Tenant-Id: {tenant_id}"

Example Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "items": [
      {
        "product_id": 1,
        "sku": "ABC001",
        "name": "Produk Pertama",
        "description": "Lorem Ipsum",
        "published_price": "10000.00",
        "cost_price": "1000.00",
        "weight": "200.00",
        "width": "10.00",
        "height": "10.00",
        "length": "10.00",
        "status": "published",
        "is_bundle": false,
        "category_id": 4,
        "media_count": 1,
        "primary_image": "http://localhost:7000/minio/medio/tenantca539d2f-bc3f-4786-9362-6b1f7d0e8372/products/assets/fc95a4bf-3d31-4a7d-831f-2514fa40d002.jpeg",
        "category_name": "Kecantikan & Kesehatan",
        "media": [
          {
            "id": 1,
            "product_id": 1,
            "media_type": "image",
            "media_url": "http://localhost:7000/minio/medio/tenantca539d2f-bc3f-4786-9362-6b1f7d0e8372/products/assets/fc95a4bf-3d31-4a7d-831f-2514fa40d002.jpeg",
            "media_name": "bronze.jpeg",
            "media_description": null,
            "sort_order": 0,
            "is_primary": true,
            "metadata": "\"{\\\"uuid\\\":\\\"fc95a4bf-3d31-4a7d-831f-2514fa40d002\\\",\\\"file_size\\\":9676,\\\"file_path\\\":\\\"tenantca539d2f-bc3f-4786-9362-6b1f7d0e8372\\\\\\/products\\\\\\/assets\\\\\\/fc95a4bf-3d31-4a7d-831f-2514fa40d002.jpeg\\\"}\"",
            "deleted_at": null,
            "created_at": "2025-08-25T03:29:08.000000Z",
            "updated_at": "2025-08-25T03:29:08.000000Z"
          }
        ],
        "bundle_items": []
      }
    ],
    "pagination": {
      "current_page": 1,
      "per_page": 10,
      "total": 1,
      "last_page": 1,
      "from": 1,
      "to": 1
    }
  },
  "errors": null,
  "request_id": "c6e2b504-63c9-46b2-a037-9168fc8a4a04"
}

5. Get Item Details

Retrieve detailed information for a specific item.

Endpoint: GET /api/partner/v1/items/{item_id}

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)

Example Request:

bash
curl -X GET "{{url}}/api/partner/v1/items/item_123" \
  -H "Authorization: {token}" \
  -H "X-Tenant-Id: {tenant_id}"

Example Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "product_id": 1,
    "sku": "ABC001",
    "name": "Produk Pertama",
    "description": "Lorem Ipsum",
    "published_price": "10000.00",
    "cost_price": "1000.00",
    "weight": "200.00",
    "width": "10.00",
    "height": "10.00",
    "length": "10.00",
    "status": "published",
    "is_bundle": false,
    "category_id": 4,
    "category_name": "Kecantikan & Kesehatan",
    "volume": 1000,
    "media": [
      {
        "id": 1,
        "product_id": 1,
        "media_type": "image",
        "media_url": "http://localhost:7000/minio/medio/tenantca539d2f-bc3f-4786-9362-6b1f7d0e8372/products/assets/fc95a4bf-3d31-4a7d-831f-2514fa40d002.jpeg",
        "media_name": "bronze.jpeg",
        "media_description": null,
        "sort_order": 0,
        "is_primary": true,
        "metadata": "\"{\\\"uuid\\\":\\\"fc95a4bf-3d31-4a7d-831f-2514fa40d002\\\",\\\"file_size\\\":9676,\\\"file_path\\\":\\\"tenantca539d2f-bc3f-4786-9362-6b1f7d0e8372\\\\\\/products\\\\\\/assets\\\\\\/fc95a4bf-3d31-4a7d-831f-2514fa40d002.jpeg\\\"}\"",
        "deleted_at": null,
        "created_at": "2025-08-25T03:29:08.000000Z",
        "updated_at": "2025-08-25T03:29:08.000000Z"
      }
    ]
  },
  "errors": null,
  "request_id": "47406059-08af-402f-a8ba-36fb520a1090"
}

6. Get Item Stock

Retrieve stock information for items.

Endpoint: GET /api/partner/v1/items/:id/stocks

Headers:

  • Authorization: {token} (required)
  • X-Tenant-Id: {tenant_id} (required)

Query Parameters:

ParameterTypeRequiredDescription
idstringYesFilter by item ID

Example Request:

bash
curl -X GET "{{url}}/api/partner/v1/items/:id/stocks" \
  -H "Authorization: {token}" \
  -H "X-Tenant-Id: {tenant_id}"

Example Response:

json
{
  "status": 200,
  "message": "Ok",
  "data": {
    "product_id": "1",
    "sku": "ABC001",
    "name": "Produk Pertama",
    "available_stock": 29,
    "allocated_stock": 9,
    "damaged_stock": 0,
    "total_stock": 38,
    "stock_status": "in_stock",
    "last_updated": "2025-09-11T14:55:01.000000Z",
    "stock_details": [
      {
        "stock_id": 1,
        "location_id": 1,
        "location_name": "Warehouse Pusat",
        "grid_id": 1,
        "grid_name": "Grid 1",
        "onhand": 38,
        "available": 29,
        "allocated": 9,
        "damaged": 0,
        "is_freeze": false,
        "updated_at": "2025-09-11T14:55:01.000000Z"
      }
    ]
  },
  "errors": null,
  "request_id": "ea24507c-2737-406d-8759-2dbb82a08c81"
}