# Rekam CK-2 Asal PBCK-7

## Introduction

* Purpose: API ini digunakan untuk rekam CK-2 berasal dari PBCK-7
* Overview: Proses rekam CK-2 mensyaratkan 2 object data dalam bentuk JSON yaitu Header dan Detail

## Path API

<mark style="color:green;">`POST`</mark> `{API_URL}/ck2/portal/saveCk2AsalPbck7`

## 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>

## Request Structure

Top-Level Object: Struktur data Dalam Bentuk Top Level JSON Schema

```
{
  "header": { ... },
  "details": [ ... ]
}
```

### Header Section

<table><thead><tr><th width="204">Parameter Name</th><th width="115">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>alamatPerusahaan</td><td>String</td><td>Alamat lengkap perusahaan</td><td>Malang</td></tr><tr><td>asalDokumenCk2</td><td>String</td><td>Asal dokumen CK2</td><td>string</td></tr><tr><td>idJenisBkc</td><td>Integer</td><td>Identifikasi jenis BKC</td><td>2</td></tr><tr><td>idNppbkc</td><td>UUID</td><td>Identifikasi unik untuk NPPBKC</td><td>fe3c9197-de80-05e6-e054-0021f60abd54</td></tr><tr><td>kodeKantor</td><td>String</td><td>Kode kantor yang terkait dengan permintaan</td><td>11500</td></tr><tr><td>komentar</td><td>String</td><td>Komentar tambahan untuk permintaan</td><td>test</td></tr><tr><td>namaJenisBkc</td><td>String</td><td>Nama jenis BKC</td><td>HT</td></tr><tr><td>namaKantor</td><td>String</td><td>Nama kantor yang memproses permintaan</td><td>KPPBC TELUK BAYUR</td></tr><tr><td>namaPerusahaan</td><td>String</td><td>Nama perusahaan</td><td>JATI BAGUS PT 01</td></tr><tr><td>nomorPBCK7</td><td>String</td><td>Nomor PBCK7</td><td>1233</td></tr><tr><td>nppbkc</td><td>String</td><td>Nomor pokok perusahaan dan BKC</td><td>12360822651000</td></tr><tr><td>npwp</td><td>String</td><td>Nomor pokok wajib pajak perusahaan</td><td>12360822651000</td></tr><tr><td>tanggalPBCK7</td><td>Date</td><td>Tanggal dokumen PBCK7</td><td>2023-02-02</td></tr></tbody></table>

### Detail Section

<table><thead><tr><th width="220">Parameter Name</th><th width="108">Type</th><th>Description</th><th>Example Value</th></tr></thead><tbody><tr><td>cukaiDiberitahukan</td><td>Integer</td><td>Jumlah cukai yang diberitahukan</td><td>0</td></tr><tr><td>cukaiPbck7</td><td>Integer</td><td>Jumlah cukai PBCK7</td><td>0</td></tr><tr><td>hje</td><td>Integer</td><td>Harga Jual Eceran (HJE)</td><td>0</td></tr><tr><td>idGolonganBkc</td><td>Integer</td><td>Identifikasi golongan BKC</td><td>0</td></tr><tr><td>idJenisProduksiBkc</td><td>Integer</td><td>Identifikasi jenis produksi BKC</td><td>1</td></tr><tr><td>idMerk</td><td>UUID</td><td>Identifikasi unik untuk merek</td><td>05390e9b-ca9f-6c00-e064-0021f60abd54</td></tr><tr><td>idSeripita</td><td>Integer</td><td>Identifikasi seripita</td><td>2</td></tr><tr><td>idTarifMerkDetail</td><td>UUID</td><td>Identifikasi tarif detail merek</td><td>05390e9b-cad1-6c00-e064-0021f60abd53</td></tr><tr><td>isiVolume</td><td>Integer</td><td>Volume isi dalam mililiter</td><td>275</td></tr><tr><td>jumlahKemasanPbck7</td><td>Integer</td><td>Jumlah kemasan dalam PBCK7</td><td>0</td></tr><tr><td>jumlahKepingDiberitahukan</td><td>Integer</td><td>Jumlah keping yang diberitahukan</td><td>0</td></tr><tr><td>keterangan</td><td>String</td><td>Keterangan tambahan untuk detail</td><td>test</td></tr><tr><td>kodeJenisProduksiBkc</td><td>String</td><td>Kode jenis produksi BKC</td><td>SKM</td></tr><tr><td>namaGolonganBkc</td><td>String</td><td>Nama golongan BKC</td><td>III</td></tr><tr><td>namaMerk</td><td>String</td><td>Nama merek</td><td>btg</td></tr><tr><td>namaSeripita</td><td>String</td><td>Nama seripita</td><td>III</td></tr><tr><td>tahunPita</td><td>Integer</td><td>Tahun pita cukai</td><td>2023</td></tr><tr><td>tarif</td><td>Integer</td><td>Tarif cukai per unit</td><td>0</td></tr></tbody></table>

## JSONSchema Rekam CK-2 Asal PBCK-7

```json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "title": "Schema Rekam CK-2 Asal PBCK-7",
  "description": "JSON Schema untuk Rekam CK-2 Asal PBCK-7.",
  "properties": {
    "alamatPerusahaan": {
      "type": "string",
      "description": "Alamat perusahaan."
    },
    "asalDokumenCk2": {
      "type": "string",
      "description": "Asal dokumen CK2."
    },
    "details": {
      "type": "array",
      "description": "Data detail dokumen.",
      "items": {
        "type": "object",
        "properties": {
          "cukaiDiberitahukan": {
            "type": "number",
            "description": "Cukai diberitahukan."
          },
          "cukaiPbck7": {
            "type": "number",
            "description": "Cukai PBCK7."
          },
          "hje": {
            "type": "integer",
            "description": "HJE."
          },
          "idGolonganBkc": {
            "type": "integer",
            "description": "ID golongan BKC."
          },
          "idJenisProduksiBkc": {
            "type": "integer",
            "description": "ID jenis produksi BKC."
          },
          "idMerk": {
            "type": "string",
            "format": "uuid",
            "description": "ID merk."
          },
          "idSeripita": {
            "type": "integer",
            "description": "ID seripita."
          },
          "idTarifMerkDetail": {
            "type": "string",
            "format": "uuid",
            "description": "ID tarif merk detail."
          },
          "isiVolume": {
            "type": "integer",
            "description": "Isi volume."
          },
          "jumlahKemasanPbck7": {
            "type": "number",
            "description": "Jumlah kemasan PBCK7."
          },
          "jumlahKepingDiberitahukan": {
            "type": "number",
            "description": "Jumlah keping diberitahukan."
          },
          "keterangan": {
            "type": "string",
            "description": "Keterangan."
          },
          "kodeJenisProduksiBkc": {
            "type": "string",
            "description": "Kode jenis produksi BKC."
          },
          "namaGolonganBkc": {
            "type": "string",
            "description": "Nama golongan BKC."
          },
          "namaMerk": {
            "type": "string",
            "description": "Nama merk."
          },
          "namaSeripita": {
            "type": "string",
            "description": "Nama seripita."
          },
          "tahunPita": {
            "type": "integer",
            "description": "Tahun pita."
          },
          "tarif": {
            "type": "number",
            "description": "Tarif."
          }
        },
        "required": [
          "cukaiDiberitahukan",
          "cukaiPbck7",
          "hje",
          "idGolonganBkc",
          "idJenisProduksiBkc",
          "idMerk",
          "idSeripita",
          "idTarifMerkDetail",
          "isiVolume",
          "jumlahKemasanPbck7",
          "jumlahKepingDiberitahukan",
          "keterangan",
          "kodeJenisProduksiBkc",
          "namaGolonganBkc",
          "namaMerk",
          "namaSeripita",
          "tahunPita",
          "tarif"
        ],
        "message": {
          "required": "Wajib mengisi semua field pada details."
        }
      }
    },
    "idJenisBkc": {
      "type": "integer",
      "description": "ID jenis BKC."
    },
    "idNppbkc": {
      "type": "string",
      "format": "uuid",
      "description": "ID NPPBKC."
    },
    "kodeKantor": {
      "type": "string",
      "description": "Kode kantor."
    },
    "komentar": {
      "type": "string",
      "description": "Komentar."
    },
    "namaJenisBkc": {
      "type": "string",
      "description": "Nama jenis BKC."
    },
    "namaKantor": {
      "type": "string",
      "description": "Nama kantor."
    },
    "namaPerusahaan": {
      "type": "string",
      "description": "Nama perusahaan."
    },
    "nomorPBCK7": {
      "type": "string",
      "description": "Nomor PBCK7."
    },
    "nppbkc": {
      "type": "string",
      "description": "NPPBKC, harus terdiri dari 22 digit."
    },
    "npwp": {
      "type": "string",
      "description": "NPWP, harus terdiri dari 16 digit."
    },
    "tanggalPBCK7": {
      "type": "string",
      "format": "date",
      "description": "Tanggal PBCK7."
    }
  },
  "required": [
    "alamatPerusahaan",
    "asalDokumenCk2",
    "details",
    "idJenisBkc",
    "idNppbkc",
    "kodeKantor",
    "komentar",
    "namaJenisBkc",
    "namaKantor",
    "namaPerusahaan",
    "nomorPBCK7",
    "nppbkc",
    "npwp",
    "tanggalPBCK7"
  ],
  "message": {
    "required": "Wajib mengisi semua field pada header dan detail."
  }
}

```

## JSON Example : Rekam CK-2 Asal PBCK-7

```json
{
"alamatPerusahaan": "Malang",
"asalDokumenCk2": "string",
"details": [
    {
    "cukaiDiberitahukan": 0,
    "cukaiPbck7": 0,
    "hje": 0,
    "idGolonganBkc": 0,
    "idJenisProduksiBkc": 1,
    "idMerk": "05390e9b-ca9f-6c00-e064-0021f60abd54",
    "idSeripita": 2,
    "idTarifMerkDetail": "05390e9b-cad1-6c00-e064-0021f60abd53",
    "isiVolume": 275,
    "jumlahKemasanPbck7": 0,
    "jumlahKepingDiberitahukan": 0,
    "keterangan": "test",
    "kodeJenisProduksiBkc": "SKM",
    "namaGolonganBkc": "III",
    "namaMerk": "btg",
    "namaSeripita": "III",
    "tahunPita": 2023,
    "tarif": 0
    }
    ],
"idJenisBkc": 2,
"idNppbkc": "fe3c9197-de80-05e6-e054-0021f60abd54",
"kodeKantor": "011500",
"komentar": "test",
"namaJenisBkc": "HT",
"namaKantor": "KPPBC TELUK BAYUR",
"namaPerusahaan": "JATI BAGUS PT 01",
"nomorPBCK7": "001233",
"nppbkc": "012360822651000",
"npwp": "012360822651000",
"tanggalPBCK7": "2023-02-02"
}
```

## Validation Rules

| Field                     | Rules                            |
| ------------------------- | -------------------------------- |
| idNppbkc                  | Harus merupakan UUID yang valid. |
| tanggalPBCK7              | Harus dalam format YYYY-MM-DD    |
| cukaiDiberitahukan        | Harus berupa angka positif       |
| cukaiPbck7                | Harus berupa angka positif       |
| idMerk                    | Harus merupakan UUID yang valid. |
| idTarifMerkDetail         | Harus merupakan UUID yang valid. |
| isiVolume                 | Harus berupa angka positif       |
| jumlahKemasanPbck7        | Harus berupa angka positif       |
| jumlahKepingDiberitahukan | Harus berupa angka positif       |
| tahunPita                 | Harus dalam format YYYY          |

## 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/pengembalian/rekam-ck-2-asal-pbck-7.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.
