# Rekam Draft CK-6

## Introduction

* Purpose: API ini digunakan untuk rekam draft CK-6
* Overview: Proses rekam draft CK-6 mensyaratkan 2 object data dalam bentuk form yaitu Header dan Detail



## Path API

<mark style="color:green;">`POST`</mark> `{API_URL}/portal/ck6/rekam-draft-dokumen`



## 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="231">Parameter Name</th><th width="101">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>kodeKantor</td><td>String</td><td>Kode kantor</td><td>150300</td></tr><tr><td>nomorAju</td><td>String</td><td>Nomor aju</td><td>1212</td></tr><tr><td>tanggalAju</td><td>Date</td><td>Tanggal aju</td><td>2024-08-15</td></tr><tr><td>nomorCk6</td><td>String</td><td>Nomor CK6</td><td>XS-90</td></tr><tr><td>tanggalCk6</td><td>Date</td><td>Tanggal CK6</td><td>2024-08-15</td></tr><tr><td>idJenisBkc</td><td>Integer</td><td>ID jenis BKC</td><td>2</td></tr><tr><td>namaJenisBkc</td><td>String</td><td>Nama jenis BKC</td><td>MMEA</td></tr><tr><td>idStatusCukai</td><td>Integer</td><td>ID status cukai</td><td>2</td></tr><tr><td>statusCukai</td><td>String</td><td>Status cukai</td><td>Sudah Dilunasi</td></tr><tr><td>idJenisIdentitasPemasok</td><td>Integer</td><td>ID jenis identitas pemasok</td><td>1</td></tr><tr><td>jenisIdentitasPemasok</td><td>String</td><td>Jenis identitas pemasok</td><td>NPPBKC</td></tr><tr><td>idStatusPemasok</td><td>Integer</td><td>ID status pemasok</td><td>5</td></tr><tr><td>statusPemasok</td><td>String</td><td>Status pemasok</td><td>Penyalur</td></tr><tr><td>nomorIdentitasPemasok</td><td>String</td><td>Nomor identitas pemasok</td><td>0024143463056000150352</td></tr><tr><td>namaPemasok</td><td>String</td><td>Nama pemasok</td><td>MULTI BINTANG INDONESIA NIAGA, PT</td></tr><tr><td>kodeKantorPemasok</td><td>String</td><td>Kode kantor pemasok</td><td>150300</td></tr><tr><td>namaKantorPemasok</td><td>String</td><td>Nama kantor pemasok</td><td>KPPBC TANGERANG</td></tr><tr><td>alamatPemasok</td><td>String</td><td>Alamat pemasok</td><td>JL. MARGA WARTA NO.3, RT.003 RW.03, KEL. BATUCEPER, KEC. BATUCEPER, TANGERANG, BANTEN</td></tr><tr><td>idJenisIdentitasTujuan</td><td>Integer</td><td>ID jenis identitas tujuan</td><td>1</td></tr><tr><td>jenisIdentitasTujuan</td><td>String</td><td>Jenis identitas tujuan</td><td>NPPBKC</td></tr><tr><td>idStatusTujuan</td><td>Integer</td><td>ID status tujuan</td><td>5</td></tr><tr><td>statusTujuan</td><td>String</td><td>Status tujuan</td><td>Penyalur</td></tr><tr><td>nomorIdentitasTujuan</td><td>String</td><td>Nomor identitas tujuan</td><td>0705844892654000070652</td></tr><tr><td>namaTujuan</td><td>String</td><td>Nama tujuan</td><td>UD SUMBER MAKMUR</td></tr><tr><td>kodeKantorTujuan</td><td>String</td><td>Kode kantor tujuan</td><td>70600</td></tr><tr><td>namaKantorTujuan</td><td>String</td><td>Nama kantor tujuan</td><td>KPPBC TMC MALANG</td></tr><tr><td>alamatTujuan</td><td>String</td><td>Alamat tujuan</td><td>DESA TUMPANGREJO RT. 003 RW. 005 KEL. KEBOBANG, KEC. WONOSARI, KABUPATEN MALANG</td></tr><tr><td>flagTransaksi</td><td>String</td><td>Flag transaksi</td><td>N</td></tr><tr><td>nilaiTransaksi</td><td>Integer</td><td>Nilai transaksi</td><td>0</td></tr><tr><td>rencanaTanggalPengangkutan</td><td>Date</td><td>Rencana tanggal pengangkutan</td><td>2024-08-15</td></tr><tr><td>namaPemberitahu</td><td>String</td><td>Nama pemberitahu</td><td>saaas</td></tr><tr><td>noIdentitasPemberitahu</td><td>String</td><td>Nomor identitas pemberitahu</td><td>121</td></tr><tr><td>tanggalPemberitahuan</td><td>Date</td><td>Tanggal pemberitahuan</td><td>2024-08-15</td></tr><tr><td>alamatPemberitahu</td><td>String</td><td>Alamat pemberitahu</td><td>ssasaa</td></tr><tr><td>tanggalSuratJalan</td><td>Date</td><td>Tanggal surat jalan</td><td>2024-08-15</td></tr><tr><td>nomorSuratJalan</td><td>String</td><td>Nomor surat jalan</td><td>12</td></tr></tbody></table>

### Detail Section

<table><thead><tr><th width="236">Parameter Name</th><th width="100">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>details[0].idJenisKoli</td><td>Integer</td><td>ID jenis koli</td><td>1</td></tr><tr><td>details[0].namaJenisKoli</td><td>String</td><td>Nama jenis koli</td><td>Drum</td></tr><tr><td>details[0].jumlahKoli</td><td>Integer</td><td>Jumlah koli</td><td>10</td></tr><tr><td>details[0].idMerk</td><td>String</td><td>ID merk</td><td>69554847-9a8f-43e7-8e20-12e9d87e5f56</td></tr><tr><td>details[0].namaMerk</td><td>String</td><td>Nama merk</td><td>Merek(3)</td></tr><tr><td>details[0].satuanBarang</td><td>String</td><td>Satuan barang</td><td>liter</td></tr><tr><td>details[0].tarifCukai</td><td>Integer</td><td>Tarif cukai</td><td>8000000</td></tr><tr><td>details[0].uraian</td><td>String</td><td>Uraian barang</td><td>Merek(3); 200 ml; Gol MMEA GOLONGAN A</td></tr><tr><td>details[0].jumlahKemasan</td><td>Integer</td><td>Jumlah kemasan</td><td>10</td></tr><tr><td>details[0].idJenisKemasan</td><td>Integer</td><td>ID jenis kemasan</td><td>2</td></tr><tr><td>details[0].namaJenisKemasan</td><td>String</td><td>Nama jenis kemasan</td><td>Botol</td></tr><tr><td>details[0].jumlahBarang</td><td>Integer</td><td>Jumlah barang</td><td>2</td></tr><tr><td>details[0].jumlahCukai</td><td>Integer</td><td>Jumlah cukai</td><td>16000000</td></tr><tr><td>details[0].keterangan</td><td>String</td><td>Keterangan tambahan</td><td>121</td></tr></tbody></table>

## JSONSchema Rekam Draft CK-6

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "Schema Rekam Draft CK-6",
  "properties": {
    "kodeKantor": {
      "type": "string",
      "description": "Kode kantor"
    },
    "nomorAju": {
      "type": "string",
      "description": "Nomor pengajuan"
    },
    "tanggalAju": {
      "type": "string",
      "format": "date",
      "description": "Tanggal pengajuan"
    },
    "nomorCk6": {
      "type": "string",
      "description": "Nomor CK6"
    },
    "tanggalCk6": {
      "type": "string",
      "format": "date",
      "description": "Tanggal CK6"
    },
    "idJenisBkc": {
      "type": "string",
      "description": "ID jenis BKC"
    },
    "namaJenisBkc": {
      "type": "string",
      "description": "Nama jenis BKC"
    },
    "idStatusCukai": {
      "type": "string",
      "description": "ID status cukai"
    },
    "statusCukai": {
      "type": "string",
      "description": "Status cukai"
    },
    "idJenisIdentitasPemasok": {
      "type": "string",
      "description": "ID jenis identitas pemasok"
    },
    "jenisIdentitasPemasok": {
      "type": "string",
      "description": "Jenis identitas pemasok"
    },
    "idStatusPemasok": {
      "type": "string",
      "description": "ID status pemasok"
    },
    "statusPemasok": {
      "type": "string",
      "description": "Status pemasok"
    },
    "nomorIdentitasPemasok": {
      "type": "string",
      "description": "Nomor identitas pemasok"
    },
    "namaPemasok": {
      "type": "string",
      "description": "Nama pemasok"
    },
    "kodeKantorPemasok": {
      "type": "string",
      "description": "Kode kantor pemasok"
    },
    "namaKantorPemasok": {
      "type": "string",
      "description": "Nama kantor pemasok"
    },
    "alamatPemasok": {
      "type": "string",
      "description": "Alamat pemasok"
    },
    "idJenisIdentitasTujuan": {
      "type": "string",
      "description": "ID jenis identitas tujuan"
    },
    "jenisIdentitasTujuan": {
      "type": "string",
      "description": "Jenis identitas tujuan"
    },
    "idStatusTujuan": {
      "type": "string",
      "description": "ID status tujuan"
    },
    "statusTujuan": {
      "type": "string",
      "description": "Status tujuan"
    },
    "nomorIdentitasTujuan": {
      "type": "string",
      "description": "Nomor identitas tujuan"
    },
    "namaTujuan": {
      "type": "string",
      "description": "Nama tujuan"
    },
    "kodeKantorTujuan": {
      "type": "string",
      "description": "Kode kantor tujuan"
    },
    "namaKantorTujuan": {
      "type": "string",
      "description": "Nama kantor tujuan"
    },
    "alamatTujuan": {
      "type": "string",
      "description": "Alamat tujuan"
    },
    "flagTransaksi": {
      "type": "string",
      "description": "Flag transaksi"
    },
    "nilaiTransaksi": {
      "type": "number",
      "description": "Nilai transaksi"
    },
    "rencanaTanggalPengangkutan": {
      "type": "string",
      "format": "date",
      "description": "Rencana tanggal pengangkutan"
    },
    "namaPemberitahu": {
      "type": "string",
      "description": "Nama pemberitahu"
    },
    "noIdentitasPemberitahu": {
      "type": "string",
      "description": "Nomor identitas pemberitahu"
    },
    "tanggalPemberitahuan": {
      "type": "string",
      "format": "date",
      "description": "Tanggal pemberitahuan"
    },
    "alamatPemberitahu": {
      "type": "string",
      "description": "Alamat pemberitahu"
    },
    "tanggalSuratJalan": {
      "type": "string",
      "format": "date",
      "description": "Tanggal surat jalan"
    },
    "nomorSuratJalan": {
      "type": "string",
      "description": "Nomor surat jalan"
    },
    "details": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "idJenisKoli": {
            "type": "string",
            "description": "ID jenis koli"
          },
          "namaJenisKoli": {
            "type": "string",
            "description": "Nama jenis koli"
          },
          "jumlahKoli": {
            "type": "number",
            "description": "Jumlah koli"
          },
          "idMerk": {
            "type": "string",
            "format": "uuid",
            "description": "UUID merk"
          },
          "namaMerk": {
            "type": "string",
            "description": "Nama merk"
          },
          "satuanBarang": {
            "type": "string",
            "description": "Satuan barang"
          },
          "tarifCukai": {
            "type": "number",
            "description": "Tarif cukai"
          },
          "uraian": {
            "type": "string",
            "description": "Uraian barang"
          },
          "jumlahKemasan": {
            "type": "number",
            "description": "Jumlah kemasan"
          },
          "idJenisKemasan": {
            "type": "string",
            "description": "ID jenis kemasan"
          },
          "namaJenisKemasan": {
            "type": "string",
            "description": "Nama jenis kemasan"
          },
          "jumlahBarang": {
            "type": "number",
            "description": "Jumlah barang"
          },
          "jumlahCukai": {
            "type": "number",
            "description": "Jumlah cukai"
          },
          "keterangan": {
            "type": "string",
            "description": "Keterangan"
          }
        },
        "required": [
          "idJenisKoli", 
          "namaJenisKoli", 
          "jumlahKoli", 
          "idMerk", 
          "namaMerk",
          "satuanBarang", 
          "tarifCukai", 
          "uraian", 
          "jumlahKemasan",
          "idJenisKemasan", 
          "namaJenisKemasan", 
          "jumlahBarang", 
          "jumlahCukai", 
          "keterangan"
        ]
      }
    }
  },
  "required": [
    "kodeKantor", 
    "nomorAju", 
    "tanggalAju", 
    "nomorCk6", 
    "tanggalCk6", 
    "idJenisBkc", 
    "namaJenisBkc", 
    "idStatusCukai", 
    "statusCukai", 
    "idJenisIdentitasPemasok", 
    "jenisIdentitasPemasok", 
    "idStatusPemasok", 
    "statusPemasok", 
    "nomorIdentitasPemasok", 
    "namaPemasok", 
    "kodeKantorPemasok", 
    "namaKantorPemasok", 
    "alamatPemasok", 
    "idJenisIdentitasTujuan", 
    "jenisIdentitasTujuan", 
    "idStatusTujuan", 
    "statusTujuan", 
    "nomorIdentitasTujuan", 
    "namaTujuan", 
    "kodeKantorTujuan", 
    "namaKantorTujuan", 
    "alamatTujuan", 
    "flagTransaksi", 
    "nilaiTransaksi", 
    "rencanaTanggalPengangkutan", 
    "namaPemberitahu", 
    "noIdentitasPemberitahu", 
    "tanggalPemberitahuan", 
    "alamatPemberitahu", 
    "tanggalSuratJalan", 
    "nomorSuratJalan", 
    "details"
  ]
}

```

## Example Request : Rekam Draft CK-6

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

150300
--boundary
Content-Disposition: form-data; name="nomorAju"

1212
--boundary
Content-Disposition: form-data; name="tanggalAju"

2024-08-15
--boundary
Content-Disposition: form-data; name="nomorCk6"

XS-90
--boundary
Content-Disposition: form-data; name="tanggalCk6"

2024-08-15
--boundary
Content-Disposition: form-data; name="idJenisBkc"

2
--boundary
Content-Disposition: form-data; name="namaJenisBkc"

MMEA
--boundary
Content-Disposition: form-data; name="idStatusCukai"

2
--boundary
Content-Disposition: form-data; name="statusCukai"

Sudah Dilunasi
--boundary
Content-Disposition: form-data; name="idJenisIdentitasPemasok"

1
--boundary
Content-Disposition: form-data; name="jenisIdentitasPemasok"

NPPBKC
--boundary
Content-Disposition: form-data; name="idStatusPemasok"

5
--boundary
Content-Disposition: form-data; name="statusPemasok"

Penyalur
--boundary
Content-Disposition: form-data; name="nomorIdentitasPemasok"

0024143463056000150352
--boundary
Content-Disposition: form-data; name="namaPemasok"

MULTI BINTANG INDONESIA NIAGA, PT
--boundary
Content-Disposition: form-data; name="kodeKantorPemasok"

150300
--boundary
Content-Disposition: form-data; name="namaKantorPemasok"

KPPBC TANGERANG
--boundary
Content-Disposition: form-data; name="alamatPemasok"

JL. MARGA WARTA NO.3, RT.003 RW.03, KEL. BATUCEPER, KEC. BATUCEPER, TANGERANG, BANTEN
--boundary
Content-Disposition: form-data; name="idJenisIdentitasTujuan"

1
--boundary
Content-Disposition: form-data; name="jenisIdentitasTujuan"

NPPBKC
--boundary
Content-Disposition: form-data; name="idStatusTujuan"

5
--boundary
Content-Disposition: form-data; name="statusTujuan"

Penyalur
--boundary
Content-Disposition: form-data; name="nomorIdentitasTujuan"

0705844892654000070652
--boundary
Content-Disposition: form-data; name="namaTujuan"

UD SUMBER MAKMUR
--boundary
Content-Disposition: form-data; name="kodeKantorTujuan"

070600
--boundary
Content-Disposition: form-data; name="namaKantorTujuan"

KPPBC TMC MALANG
--boundary
Content-Disposition: form-data; name="alamatTujuan"

DESA TUMPANGREJO RT. 003 RW. 005 KEL. KEBOBANG, KEC. WONOSARI, KABUPATEN MALANG
--boundary
Content-Disposition: form-data; name="flagTransaksi"

N
--boundary
Content-Disposition: form-data; name="nilaiTransaksi"

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

2024-08-15
--boundary
Content-Disposition: form-data; name="namaPemberitahu"

saaas
--boundary
Content-Disposition: form-data; name="noIdentitasPemberitahu"

121
--boundary
Content-Disposition: form-data; name="tanggalPemberitahuan"

2024-08-15
--boundary
Content-Disposition: form-data; name="alamatPemberitahu"

ssasaa
--boundary
Content-Disposition: form-data; name="tanggalSuratJalan"

2024-08-15
--boundary
Content-Disposition: form-data; name="nomorSuratJalan"

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

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

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

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

69554847-9a8f-43e7-8e20-12e9d87e5f56
--boundary
Content-Disposition: form-data; name="details[0].namaMerk"

Merek(3)
--boundary
Content-Disposition: form-data; name="details[0].satuanBarang"

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

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

Merek(3); 200 ml; Gol MMEA GOLONGAN A
--boundary
Content-Disposition: form-data; name="details[0].jumlahKemasan"

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

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

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

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

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

121
--boundary
```

## Validation Rules

| Field                      | Rules                            |
| -------------------------- | -------------------------------- |
| tanggalAju                 | Harus dalam format YYYY-MM-DD    |
| tanggalCk6                 | Harus dalam format YYYY-MM-DD    |
| rencanaTanggalPengangkutan | Harus dalam format YYYY-MM-DD    |
| tanggalPemberitahuan       | Harus dalam format YYYY-MM-DD    |
| tanggalSuratJalan          | Harus dalam format YYYY-MM-DD    |
| details\[0].idMerk         | Harus merupakan UUID yang valid. |
| details\[0].tarifCukai     | Harus berupa angka positif       |
| details\[0].jumlahKemasan  | Harus berupa angka positif       |
| details\[0].jumlahBarang   | Harus berupa angka positif       |
| details\[0].jumlahCukai    | Harus berupa angka positif       |

## Response

{% tabs %}
{% tab title="200" %}
```json
{
    "message": "Success",
    "status": true,
    "data": {
        "idJenisIdentitasPemasok": 1,
        "jenisIdentitasPemasok": "NPPBKC",
        "nomorIdentitasPemasok": "0024143463056000150352",
        "namaPemasok": "MULTI BINTANG INDONESIA NIAGA, PT",
        "idCk6Header": "0e7d47e5-235a-4404-8e44-4a167323927e",
        "alamatPemasok": "JL. MARGA WARTA NO.3, RT.003 RW.03, KEL. BATUCEPER, KEC. BATUCEPER, TANGERANG, BANTEN",
        "kodeKantorPemasok": "150300",
        "namaKantorPemasok": "KPPBC TANGERANG",
        "statusPemasok": "Penyalur",
        "idJenisIdentitasTujuan": 1,
        "jenisIdentitasTujuan": "NPPBKC",
        "nomorIdentitasTujuan": "0705844892654000070652",
        "namaTujuan": "UD SUMBER MAKMUR",
        "alamatTujuan": "DESA TUMPANGREJO RT. 003 RW. 005 KEL. KEBOBANG, KEC. WONOSARI, KABUPATEN MALANG",
        "kodeKantorTujuan": "070600",
        "namaKantorTujuan": "KPPBC TMC MALANG",
        "statusTujuan": "Penyalur",
        "idJenisBkc": 2,
        "namaJenisBkc": "MMEA",
        "nomorInvoice": null,
        "tanggalInvoice": null,
        "idAlatAngkut": null,
        "namaAlatAngkut": null,
        "nomorAlatAngkut": null,
        "tanggalRencanaAngkut": null,
        "jangkaWaktuAngkut": null,
        "namaPemberitahu": "saaas",
        "tanggalPemberitahuan": "2024-08-15",
        "idKotaPemberitahu": null,
        "namaKotaPemberitahu": null,
        "nomorCk6": "XS-90",
        "nomorAju": "1212",
        "flagImpor": null,
        "kodeKantor": "150300",
        "caraPelunasan": null,
        "statusCukai": "Sudah Dilunasi",
        "lainnya": null,
        "noIdentitasPemberitahu": "121",
        "alamatPemberitahu": "ssasaa",
        "tanggalCk6": "2024-08-15",
        "tanggalAju": "2024-08-15",
        "rencanaTanggalPengangkutan": "2024-08-15",
        "idCaraPelunasan": null,
        "idStatusCukai": 2,
        "idStatusPemasok": 5,
        "idStatusTujuan": 5,
        "nilaiTransaksi": 0,
        "flagTransaksi": "N",
        "nomorSuratJalan": "12",
        "tanggalSuratJalan": "2024-08-15",
        "details": [
            {
                "idCk6Detail": "a69d0a86-87cd-4e7b-a6f4-4991d3e57b5e",
                "idMerk": "69554847-9a8f-43e7-8e20-12e9d87e5f56",
                "namaMerk": "Merek(3)",
                "seri": null,
                "idJenisKoli": 1,
                "namaJenisKoli": "Drum",
                "jumlahKoli": 10,
                "nomorKoli": null,
                "jumlahKemasan": 10,
                "jumlahBarang": 2,
                "hjePerKemasan": null,
                "uraian": "Merek(3); 200 ml; Gol MMEA GOLONGAN A",
                "keterangan": "121",
                "idJenisKemasan": 2,
                "namaJenisKemasan": "Botol",
                "satuanBarang": "liter",
                "tarifCukai": 8000000,
                "jumlahCukai": 16000000
            }
        ]
    }
}
```
{% 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>
