NAV
shell

Introduction

Welcome to the Kittn API! You can use our API to access Kittn API endpoints, which can get information on various cats, kittens, and breeds in our database.

We have language bindings in Shell, Ruby, Python, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

This example API documentation page was created with Slate. Feel free to edit it and use it as a base for your own API's documentation.

Authentication

To authorize, use this code: shell curl "api_endpoint_here" -H "Authorization: meowmeowmeow"

Make sure to replace meowmeowmeow with your API key.

Kittn uses API keys to allow access to the API. You can register a new Kittn API key at our developer portal.

Kittn expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: meowmeowmeow

Products

Get All Products

curl --location 'https://market-dev.etentech.co/api/dashboard/product' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "limit": 1,
  "page": 1,
  "category_id": 0,
  "q": "",
  "harga_terendah": 1,
  "harga_tertinggi": 0,
  "urutan": "",
  "rekomendasi": false,
  "latitude": 0,
  "longitude": 0
}'

The above command returns JSON structured like this:

{
    "status": true,
    "code": 200,
    "message": "success",
    "pagination": {
        "current_page": 1,
        "next_page": 2,
        "prev_page": 1,
        "total_pages": 9,
        "total_count": 8
    },
    "data": [
        {
            "product_id": 31,
            "shop_id": 13,
            "variant_id": 39,
            "sku": "mantap-gookil",
            "name": "Ayam Enak",
            "jarak": "- km",
            "kota": "East Jakarta City",
            "rating": 5,
            "additional": "- Terjual",
            "price": "Rp 12.240",
            "price_float": 12240,
            "is_discount": false,
            "discount": "",
            "normal_price": "Rp 12.240",
            "thumbnail": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/register%2Fthumbnail-2%2F2024-01-27_4ac7183b-7dc5-4353-bd13-07c0cf925b49..jpg?generation=1706323138247391&alt=media",
            "is_out_of_stock": false,
            "variant": "Ayam Enak",
            "variants": "",
            "default_variant": "ayam-enak",
            "min_pesan": 1,
            "max_pesan": 0,
            "location": {
                "lat": 0,
                "lng": 0
            },
            "shop_name": "eten-technology",
            "line_text_engine": "",
            "is_can_tempo": false,
            "link_share_product": "",
            "link_share_supplier": ""
        }
    ]
}

This endpoint retrieves all kittens.

HTTP Request

POST /api/dashboard/product

Query Parameters

Parameter Default Description
include_cats false If set to true, the result will also include cats.
available true If set to false, the result will include kittens that have already been adopted.

Get a Specific Products

curl --location 'https://market-dev.etentech.co/api/product/detail/mantap-gookil/ayam-enak' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": {
        "product": {
            "product_id": 31,
            "shop_id": 13,
            "variant_id": 39,
            "sku": "mantap-gookil",
            "name": "Ayam Enak",
            "jarak": "4.72 km",
            "kota": "East Jakarta City",
            "rating": 0,
            "additional": "209 Terjual",
            "price": "Rp 12.240",
            "price_float": 0,
            "is_discount": false,
            "discount": "",
            "normal_price": "Rp 12.240",
            "thumbnail": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/register%2Fthumbnail-2%2F2024-01-27_4ac7183b-7dc5-4353-bd13-07c0cf925b49..jpg?generation=1706323138247391&alt=media",
            "is_out_of_stock": false,
            "variant": "Ayam Enak",
            "variants": "",
            "default_variant": "",
            "min_pesan": 1,
            "max_pesan": 0,
            "location": {
                "lat": 0,
                "lng": 0
            },
            "shop_name": "",
            "line_text_engine": "",
            "is_can_tempo": false,
            "link_share_product": "https://links.etentech.co/product/mantap-gookil/ayam-enak",
            "link_share_supplier": "https://links.etentech.co/supplier/11"
        },
        "banners": [
            "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/register%2Fthumbnail-1%2F2024-01-27_4a170697-7ee7-4b83-adff-d9ff5f324e5f..jpg?generation=1706323134385647&alt=media",
            "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/register%2Fthumbnail-2%2F2024-01-27_4ac7183b-7dc5-4353-bd13-07c0cf925b49..jpg?generation=1706323138247391&alt=media"
        ],
        "variants": [
            {
                "name": "Ayam Enak",
                "value": "ayam-enak",
                "is_selected": true
            }
        ],
        "additional_info": [
            {
                "name": "Berat",
                "value": "10 KG"
            },
            {
                "name": "Kondisi",
                "value": "SEGAR"
            },
            {
                "name": "Category",
                "value": "Ayams"
            }
        ],
        "supplier": {
            "ID": 11,
            "name": "eten-technology",
            "Image": "-",
            "City": "East Jakarta City",
            "Rating": 5
        },
        "proses_time": "-",
        "description": "Mantap Asics"
    }
}

This endpoint retrieves a specific kitten.

HTTP Request

GET /api/product/detail/<SKU>/<DEFAULT_VARIANT>

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Carts

Get List Cart

curl --location 'https://market-dev.etentech.co/api/transaction/cart/UID015/all' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
  "status": true,
  "message": "success",
  "data": [
    {
      "shop_id": 15,
      "shop_name": "eten",
      "total": 11322,
      "total_string": "Rp 11.322",
      "minimal": 500000,
      "minimal_string": "Rp 500.000",
      "kurang": 488678,
      "kurang_string": "Rp 488.678",
      "is_can_proses": false,
      "can_tempo": false,
      "products": [
        {
          "id": 215,
          "product_id": 38,
          "supplier_name": "eten",
          "product_variant_id": 41,
          "supplier_id": 15,
          "quantity": 10,
          "product": "Ayam",
          "variant": "Ayam",
          "harga_float": 11322,
          "is_discount": false,
          "is_sold_out": false,
          "harga_normal": "Rp 11.322",
          "thumbnail": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/register%2Fthumbnail-1%2F2024-01-28_bcaae2a8-4d21-42d2-a1e9-35dae681fb8f..png?generation=1706436586471356&alt=media",
          "harga": "Rp 11.322",
          "notes": "",
          "raw_product_id": 0,
          "can_tempo": false
        }
      ]
    }
  ]
}

This endpoint retrieves a specific kitten.

HTTP Request

GET /api/transaction/cart/<REFERENCE_USER_PARTNER>/all

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Add to Cart

curl --location 'https://market-dev.etentech.co/api/transaction/cart/UID015/add' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "product_id": 37,
  "product_variant_id": 40,
  "shop_id": 13,
  "quantity": 2,
  "catatan": ""
}'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": null
}

This endpoint retrieves a specific kitten.

HTTP Request

GET '/api/transaction/cart/<REFERENCE_USER_PARTNER>/add

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Delete to Cart

curl --location --request DELETE 'https://market-dev.etentech.co/api/transaction/cart/UID05/delete/3' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": null
}

This endpoint retrieves a specific kitten.

HTTP Request

GET '/api/transaction/cart/<REFERENCE_USER_PARTNER>/delete/<ID>

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Update to Cart

curl --location 'https://market-dev.etentech.co/api/transaction/cart/UID015/update/10' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "product_id": 37,
  "product_variant_id": 40,
  "shop_id": 13,
  "quantity": 2,
  "catatan": ""
}'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": null
}

This endpoint retrieves a specific kitten.

HTTP Request

GET '/api/transaction/cart/<REFERENCE_USER_PARTNER>/update/<ID>

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Transactions

Get Delivery Fee

curl --location 'https://market-dev.etentech.co/api/transaction/checkout/delivery' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "alamat_lenglap": "Jauh Disana",
    "latitude": -6.123132,
    "longitude": 103.0000,
    "catatan_alamat": "",
    "cart_id": [215]
}'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": [
        {
            "available": [
                {
                    "courir_id": "2990735526627402069",
                    "label": "Lalamove",
                    "amount": "Rp 30.800",
                    "is_lalamove": true
                }
            ],
            "shop_id": 15
        }
    ]
}

This endpoint retrieves a specific kitten.

HTTP Request

GET 'api/transaction/checkout/delivery

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Get Fee Summary

curl --location 'https://market-dev.etentech.co/api/transaction/checkout/fee' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "alamat_lenglap": "Jauh Disana",
  "latitude": -6.123132,
  "longitude": 103,
  "catatan_alamat": "",
  "cart_id": [
    {
      "supplier_id": 24,
      "cart_id": [
        924,
        923
      ],
      "courir_id": "",
      "is_lalamove": false
    }
  ],
  "tanggal_pengiriman": "2024-05-27",
  "kode_promo": ""
}'

The above command returns JSON structured like this:

{
  "status": true,
  "message": "success",
  "data": {
    "amount_float": 113220,
    "grand_total": "Rp 113.220",
    "grand_total_float": 113220,
    "ongkos_kirim": 0,
    "diskon": 0,
    "valid": true,
    "valid_amount": true,
    "description": "",
    "tempo": {
      "tanggal_pembelian": "",
      "waktu_tempo": "",
      "batas_tempo": "",
      "batas_tempo_timestamp": "0001-01-01T00:00:00Z",
      "saldo_pos": "Rp 10.193.640",
      "use_tempo": false
    },
    "code_promo": {
      "is_pelanggan": false,
      "id": 0,
      "code_availabilty": false,
      "keterangan": "",
      "keterangan_color": ""
    },
    "summarys": [
      {
        "data": "Total Belanja (1)",
        "value": "Rp 113.220",
        "type": "normal",
        "color": "#404040",
        "coret": false
      },
      {
        "data": "Total Ongkos Kirim (1)",
        "value": "Rp 0",
        "type": "normal",
        "color": "#404040",
        "coret": true
      },
      {
        "data": "Diskon",
        "value": "Rp 0",
        "type": "normal",
        "color": "#34D399",
        "coret": false
      },
      {
        "data": "Total Belanja",
        "value": "Rp 113.220",
        "type": "bold",
        "color": "#404040",
        "coret": false
      }
    ],
    "shops": [
      {
        "shop_id": 15,
        "total": 113220,
        "ongkir": 50000,
        "keterangan": "Pembelian Minimal Rp 5.000. Tambahkan Rp 6.780 untuk mendapatkan ongkir Rp 25.000",
        "keterangan_color": "#34D399",
        "surpass_minimum": true,
        "can_tempo": false,
        "is_lalamove": false,
        "courir_id": "",
        "stop_id": null
      }
    ]
  }
}

This endpoint retrieves a specific kitten.

HTTP Request

GET 'api/transaction/checkout/fee

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Get Payment List

curl --location 'https://market-dev.etentech.co/api/transaction/checkout/payment-list' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": [
        {
            "id": 4,
            "name": "Virtual Account",
            "payment_methods": [
                {
                    "id": 2,
                    "name": "Mandiri",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_7cbac797-e4bd-40c8-a348-3161637ce1b1..png?generation=1710748462397260&alt=media",
                    "description": ""
                },
                {
                    "id": 5,
                    "name": "CIMB Niaga",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_e9191873-c63a-4853-8b61-5c233ed0b34b..png?generation=1710748629190609&alt=media",
                    "description": ""
                },
                {
                    "id": 6,
                    "name": "Permata",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_323caf30-b28d-4491-b5e7-6be2600c3d3d..png?generation=1710748812589626&alt=media",
                    "description": ""
                },
                {
                    "id": 4,
                    "name": "BNI",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_f78e8b98-054e-4e6d-ac19-a1c25b86277b..png?generation=1710748901686896&alt=media",
                    "description": ""
                },
                {
                    "id": 1,
                    "name": "BCA",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_9bfd5fae-5bd4-4ca2-9e97-eeaf10bf5623..png?generation=1710748039573095&alt=media",
                    "description": ""
                },
                {
                    "id": 3,
                    "name": "BRI",
                    "icon": "https://storage.googleapis.com/download/storage/v1/b/cdn-sg.etentech.co/o/uploads%2F0%2Fimage%2Ficon%2F2024-03-18_ebd77816-afff-4d56-b45f-5f365d9f93c9..png?generation=1710748293430405&alt=media",
                    "description": ""
                }
            ]
        },
        {
            "id": 2,
            "name": "Ewallet",
            "payment_methods": [
                {
                    "id": 10,
                    "name": "Dana",
                    "icon": "https://storage.googleapis.com/cdn-sg.etentech.co/uploads/0/image/image/2024-02-28_aea616d9-b85d-4f2f-bd9d-c7e5ce424f06..png",
                    "description": ""
                },
                {
                    "id": 9,
                    "name": "OVO",
                    "icon": "https://storage.googleapis.com/cdn-sg.etentech.co/uploads/0/image/image/2024-02-28_3872097f-2919-49ec-825c-a8f32a5afaed..png",
                    "description": ""
                }
            ]
        }
    ]
}

This endpoint retrieves a specific kitten.

HTTP Request

GET 'api/transaction/checkout/payment-list

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Process Transaction

curl --location 'https://market-api.etentech.co/api/transaction/checkout/payment' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{  
  "alamat_lenglap": "Jauh Disana",
  "latitude": -6.123132,
  "longitude": 103,
  "catatan_alamat": "",
  "payment_id": 9,
  "cart_id": [
    {
      "supplier_id": 15,
      "cart_id": [
        247
      ],
      "courir_id": "kurir_supplier",
      "is_lalamove": false
    }
  ],
  "tanggal_pengiriman": "2024-06-13",
  "kode_promo": ""
}'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "success",
    "data": {
        "payment_id": "",
        "transaction_id": "TRXID20240617213140",
        "expired_payment_at": "2024-06-18 07:31:40",
        "payment_name": "DANA",
        "payment_logo": "",
        "nomor_va": "",
        "redirect_url": "https://ewallet-mock-connector.xendit.co/v1/ewallet_connector/checkouts?token=cpo4hj6nratj1001rb2g",
        "type_pembayaran": "EWALLET",
        "total": "Rp 113.220",
        "total_float": 113220,
        "is_tempo": false
    }
}

This endpoint retrieves a specific kitten.

HTTP Request

GET 'api/transaction/checkout/payment

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Check Status Payment Virtual Account

curl --location 'https://market-dev.etentech.co/api/transaction/checkout/status/TRXID20240222232156' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Success",
    "data": null
}

This endpoint retrieves a specific kitten.

HTTP Request

GET '/api/transaction/checkout/status/<Transaction ID>

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Check Status Payment Ewallet

curl --location 'https://market-dev.etentech.co/api/transaction/checkout/status/TRXID20240222232156/ewallet' \
--header 'Authorization: ••••••'

The above command returns JSON structured like this:

{
    "status": true,
    "message": "Success",
    "data": null
}

This endpoint retrieves a specific kitten.

HTTP Request

GET '/api/transaction/checkout/status/<Transaction ID>/ewallet

URL Parameters

Parameter Description
ID The ID of the kitten to retrieve

Errors

The Kittn API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The kitten requested is hidden for administrators only.
404 Not Found -- The specified kitten could not be found.
405 Method Not Allowed -- You tried to access a kitten with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The kitten requested has been removed from our servers.
418 I'm a teapot.
429 Too Many Requests -- You're requesting too many kittens! Slow down!
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.