# Perbaikan HT

## Introduction

* Purpose: API ini digunakan untuk rubah data HT
* Overview: Proses rubah data HT mensyaratkan 2 object data dalam bentuk form yaitu Header dan Detail

## Path API

<mark style="color:green;">`POST`</mark> `{API_URL}/portal/ck4/perbaikan-ht`

## Authorization

<table><thead><tr><th width="181">Name</th><th width="126">Type </th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td>String</td><td>Bearer Token yang didapatkan dari hasil otorisasi</td></tr></tbody></table>

## Parameter

Endpoint ini menerima parameter berikut dalam form data:

### Header Section

<table><thead><tr><th width="257">Parameter Name</th><th width="107">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>idCk4Header</td><td>String</td><td>ID unik CK4 Header</td><td>4034d080-db3c-45a5-8c08-ef5b8b3e04e6</td></tr><tr><td>nomorPemberitahuan</td><td>String</td><td>Nomor pemberitahuan</td><td>98987</td></tr><tr><td>totalJumlahKemasan</td><td>Integer</td><td>Total jumlah kemasan</td><td>100</td></tr><tr><td>totalJumlahKemasanDilekatiPita</td><td>Integer</td><td>Total jumlah kemasan yang dilekati pita cukai</td><td>300</td></tr><tr><td>totalJumlahProduksiHtBtg</td><td>Integer</td><td>Total jumlah produksi dalam satuan batang</td><td>100</td></tr><tr><td>totalJumlahProduksiHtGr</td><td>Integer</td><td>Total jumlah produksi dalam satuan gram</td><td>0</td></tr><tr><td>totalJumlahProduksiHtMl</td><td>Integer</td><td>Total jumlah produksi dalam satuan mililiter</td><td>0</td></tr><tr><td>dokumen</td><td>Binary</td><td>Dokumen terkait (dalam bentuk binary)</td><td>(binary)</td></tr><tr><td>nomorSurat</td><td>String</td><td>Nomor surat terkait laporan CK4</td><td>tes</td></tr><tr><td>tanggalSurat</td><td>Date</td><td>Tanggal surat terkait laporan CK4</td><td>2024-08-14</td></tr></tbody></table>

### Detail Section

<table><thead><tr><th width="243">Parameter Name</th><th width="108">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>details[0].idCk4Detail</td><td>String</td><td>ID unik CK4 Detail</td><td>ed00d5f0-382f-461c-9f2a-e7f78b025dda</td></tr><tr><td>details[0].bahanKemasan</td><td>String</td><td>Jenis bahan kemasan yang digunakan</td><td>Kertas dan Sejenisnya</td></tr><tr><td>details[0].hje</td><td>Integer</td><td>Harga Jual Eceran per kemasan</td><td>3000</td></tr><tr><td>details[0].idMerkHt</td><td>String</td><td>ID unik merk HT (Hasil Tembakau)</td><td>51e196c3-5e72-4c76-825b-52b69a1d7ddf</td></tr><tr><td>details[0].isiPerKemasan</td><td>Integer</td><td>Jumlah isi per kemasan</td><td>1</td></tr><tr><td>details[0].jenisProduksiHt</td><td>String</td><td>Jenis produksi hasil tembakau</td><td>SKT - III</td></tr><tr><td>details[0].jumlahKemasan</td><td>Integer</td><td>Jumlah kemasan yang diproduksi</td><td>100</td></tr><tr><td>details[0].jumlahKemasanDilekatiPita</td><td>Integer</td><td>Jumlah kemasan yang dilekati pita cukai</td><td>300</td></tr><tr><td>details[0].jumlahProduksi</td><td>Integer</td><td>Jumlah total produksi</td><td>100</td></tr><tr><td>details[0].nomorProduksi</td><td>String</td><td>Nomor produksi terkait</td><td>545454</td></tr><tr><td>details[0].tanggalProduksi</td><td>Date</td><td>Tanggal produksi</td><td>2024-08-01</td></tr><tr><td>details[0].tarif</td><td>Integer</td><td>Tarif cukai</td><td>122</td></tr><tr><td>details[0].namaMerkHt</td><td>String</td><td>Nama merk hasil tembakau</td><td>Kretek0909</td></tr><tr><td>details[0].kodeSatuan</td><td>String</td><td>Kode satuan barang</td><td>btg</td></tr></tbody></table>

## JSONSchema Perbaikan HT

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "Schema Perbaikan HT",
  "description": "JSON Schema untuk Perbaikan HT.",
  "properties": {
    "idCk4Header": {
      "type": "string",
      "format": "uuid",
      "description": "ID CK4 Header."
    },
    "nomorPemberitahuan": {
      "type": "string",
      "description": "Nomor pemberitahuan."
    },
    "totalJumlahKemasan": {
      "type": "integer",
      "description": "Total jumlah kemasan."
    },
    "totalJumlahKemasanDilekatiPita": {
      "type": "integer",
      "description": "Total jumlah kemasan yang dilekati pita."
    },
    "totalJumlahProduksiHtBtg": {
      "type": "integer",
      "description": "Total jumlah produksi HT Botol."
    },
    "totalJumlahProduksiHtGr": {
      "type": "integer",
      "description": "Total jumlah produksi HT Gelas."
    },
    "totalJumlahProduksiHtMl": {
      "type": "integer",
      "description": "Total jumlah produksi HT Mill."
    },
    "dokumen": {
      "type": "string",
      "format": "binary",
      "description": "Dokumen."
    },
    "nomorSurat": {
      "type": "string",
      "description": "Nomor surat."
    },
    "tanggalSurat": {
      "type": "string",
      "format": "date",
      "description": "Tanggal surat."
    },
    "details": {
      "type": "array",
      "description": "Data detail produksi.",
      "items": {
        "type": "object",
        "properties": {
          "idCk4Detail": {
            "type": "string",
            "format": "uuid",
            "description": "ID detail CK4."
          },
          "bahanKemasan": {
            "type": "string",
            "description": "Bahan kemasan."
          },
          "hje": {
            "type": "integer",
            "description": "Harga Jual Eceran."
          },
          "idMerkHt": {
            "type": "string",
            "format": "uuid",
            "description": "ID merk HT."
          },
          "isiPerKemasan": {
            "type": "integer",
            "description": "Isi per kemasan."
          },
          "jenisProduksiHt": {
            "type": "string",
            "description": "Jenis produksi HT."
          },
          "jumlahKemasan": {
            "type": "integer",
            "description": "Jumlah kemasan."
          },
          "jumlahKemasanDilekatiPita": {
            "type": "integer",
            "description": "Jumlah kemasan yang dilekati pita."
          },
          "jumlahProduksi": {
            "type": "integer",
            "description": "Jumlah produksi."
          },
          "nomorProduksi": {
            "type": "string",
            "description": "Nomor produksi."
          },
          "tanggalProduksi": {
            "type": "string",
            "format": "date",
            "description": "Tanggal produksi."
          }
        },
        "required": [
          "idCk4Detail",
          "bahanKemasan",
          "hje",
          "idMerkHt",
          "isiPerKemasan",
          "jenisProduksiHt",
          "jumlahKemasan",
          "jumlahKemasanDilekatiPita",
          "jumlahProduksi",
          "nomorProduksi",
          "tanggalProduksi"
        ]
      }
    }
  },
  "required": [
    "idCk4Header",
    "nomorPemberitahuan",
    "totalJumlahKemasan",
    "totalJumlahKemasanDilekatiPita",
    "totalJumlahProduksiHtBtg",
    "totalJumlahProduksiHtGr",
    "totalJumlahProduksiHtMl",
    "dokumen",
    "nomorSurat",
    "tanggalSurat",
    "details"
  ]
}

```

## Example Request  : Perbaikan HT

```
--boundary
Content-Disposition: form-data; name="idCk4Header"

4034d080-db3c-45a5-8c08-ef5b8b3e04e6
--boundary
Content-Disposition: form-data; name="nomorPemberitahuan"

98987
--boundary
Content-Disposition: form-data; name="totalJumlahKemasan"

100
--boundary
Content-Disposition: form-data; name="totalJumlahKemasanDilekatiPita"

300
--boundary
Content-Disposition: form-data; name="totalJumlahProduksiHtBtg"

100
--boundary
Content-Disposition: form-data; name="totalJumlahProduksiHtGr"

0
--boundary
Content-Disposition: form-data; name="totalJumlahProduksiHtMl"

0
--boundary
Content-Disposition: form-data; name="dokumen"

(binary)
--boundary
Content-Disposition: form-data; name="nomorSurat"

tes
--boundary
Content-Disposition: form-data; name="tanggalSurat"

2024-08-14
--boundary
Content-Disposition: form-data; name="details[0].idCk4Detail"

ed00d5f0-382f-461c-9f2a-e7f78b025dda
--boundary
Content-Disposition: form-data; name="details[0].bahanKemasan"

Kertas dan Sejenisnya
--boundary
Content-Disposition: form-data; name="details[0].hje"

3000
--boundary
Content-Disposition: form-data; name="details[0].idMerkHt"

51e196c3-5e72-4c76-825b-52b69a1d7ddf
--boundary
Content-Disposition: form-data; name="details[0].isiPerKemasan"

1
--boundary
Content-Disposition: form-data; name="details[0].jenisProduksiHt"

SKT - III
--boundary
Content-Disposition: form-data; name="details[0].jumlahKemasan"

100
--boundary
Content-Disposition: form-data; name="details[0].jumlahKemasanDilekatiPita"

300
--boundary
Content-Disposition: form-data; name="details[0].jumlahProduksi"

100
--boundary
Content-Disposition: form-data; name="details[0].nomorProduksi"

545454
--boundary
Content-Disposition: form-data; name="details[0].tanggalProduksi"

2024-08-14

```

## Validation Rules

## Response

{% tabs %}
{% tab title="200" %}

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

{% endtab %}
{% endtabs %}

## Potential Error

<table><thead><tr><th width="189">Status Code</th><th width="213">Description</th><th>Reason</th></tr></thead><tbody><tr><td>400 Bad Request</td><td>Permintaan tidak valid</td><td>Parameter tidak lengkap atau format tidak sesuai</td></tr><tr><td>401 Unauthorized</td><td>Otentikasi gagal</td><td>Bearer Token tidak valid atau tidak disertakan dalam header permintaan</td></tr><tr><td>404 Not Found</td><td>Dokumen tidak ditemukan</td><td>Data tidak ditemukan berdasarkan parameter yang diberikan</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ceisa40.gitbook.io/pia-ceisa40/api-service-cukai/produksi/perbaikan-ht.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
