Dokumentasi API

Dokumentasi lengkap Magentod API

Produk

Products API

Kelola inventori dan katalog produk Anda dengan API yang powerful dan fleksibel.

Gambaran Umum

Products API memungkinkan Anda untuk mengelola seluruh katalog produk, termasuk membuat, membaca, mengupdate, dan menghapus produk. API ini mendukung berbagai atribut produk seperti SKU, kategori, harga, stok, dan metadata kustom.

5
Endpoints
100
Rate Limit/min
Max Products
REST
API Type

Available Endpoints

Daftar Produk
Mengambil daftar semua produk dengan pagination
GET
GET /v1/products
Supports filtering, sorting, and paginationView Details
Detail Produk
Mengambil detail produk tertentu berdasarkan ID
GET
GET /v1/products/{id}
Returns full product details and metadataView Details
Buat Produk
Menambahkan produk baru ke katalog
POST
POST /v1/products
Create product with SKU, pricing, and inventoryView Details
Update Produk
Memperbarui informasi produk yang sudah ada
PUT
PUT /v1/products/{id}
Update any product field or metadataView Details
Hapus Produk
Menghapus produk dari sistem (tidak dapat dibatalkan)
DELETE
DELETE /v1/products/{id}
Permanently removes product from catalogView Details

Quick Example

Contoh cepat cara membuat produk baru:

curl -X POST "https://api.magentod.com/v1/products" \
  -H "Authorization: Bearer mgd_live_sk_1234567890abcdef" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "iPhone 15 Pro",
    "sku": "IPHONE15PRO-128-BLACK",
    "description": "iPhone 15 Pro 128GB Black",
    "price": 15999000,
    "cost": 12000000,
    "category": "Electronics",
    "brand": "Apple",
    "weight": 187,
    "dimensions": {
      "length": 146.6,
      "width": 70.6,
      "height": 8.25
    },
    "stock": {
      "quantity": 50,
      "min_quantity": 10,
      "track_quantity": true
    },
    "status": "active"
  }'

Product Object Schema

FieldTypeRequiredDescription
idstringautoUnique product identifier
namestringProduct name
skustringStock Keeping Unit (must be unique)
descriptionstring-Product description
pricenumberSelling price (in cents)
costnumber-Cost price (in cents)
categorystring-Product category
brandstring-Product brand
stockobject-Stock information and tracking
statusenum-active, inactive, archived

Ready to Start?

Explore detailed documentation for each endpoint or try our interactive API explorer.