Kirim Foto X-RAY (In Development)

This documentation provides details about the APIs for sending X-RAY photos of CN document from PJT to Customs.

Development Base Path https://apisdev-gw.beacukai.go.id/kirim-cn-pibk-barkir-public/kirim-cn-pibk-barkir OR https://apisdev-gw.beacukai.go.id/openapi/cnpibk

If you use {URL_API}/nle-oauth/v1/user/login to get token, then use ttps://apisdev-gw.beacukai.go.id/openapi/cnpibk for the base path API

Base URL

https://apisdev-gw.beacukai.go.id/openapi/cnpibk


1

Kirim Foto X-Ray

This endpoint is used to submit new X-Ray photos for a specific customs declaration.

  • URL: /kirim-foto-xray

  • Method: POST

  • Content-Type: multipart/form-data

Headers

  • Authorization: Bearer <your_token> (Required)

Request Parts

  • data (Required) - application/json

    • nomorAju (String, Required): The customs declaration number you get after sending document.

    • nomorBlAwb (String, Required): The Bill of Lading / Air Waybill number.

    • tanggalBlAwb (String, Required): The date of the BL/AWB in yyyy-MM-dd format.

    • kodeKantor (String, Required): The customs office code.

  • images (Required) - image/*

    • An array of image files to be uploaded.

Example Request

curl -X POST \
  https://apisdev-gw.beacukai.go.id/openapi/cnpibk/xray/kirim-foto-xray \
  -H 'Authorization: Bearer <your_token>' \
  -H 'Content-Type: multipart/form-data' \
  -F 'data={
        "kodeKantor": "009000",
        "nomorBlAwb": "CNTESTXRAY3",
        "tanggalBlAwb": "2025-09-30",
        "nomorAju":"012345678901234500000020250930CNTESTXRAY3CN1"
      };type=application/json' \
  -F 'images=@/path/to/your/image1.jpg' \
  -F 'images=@/path/to/your/image2.png'

Responses

  • 200 OK (Success) - HTTP 200

{
    "success": true,
    "data": {
        "nomorAju": "012345678901234500000020250930CNTESTXRAY3CN1",
        "nomorBlAwb": "CNTESTXRAY3",
        "tanggalBlAwb": "2025-09-30",
        "kodeKantor": "009000",
        "npwpPemberitahu": "0123456789012345000000",
        "jumlahFotoTerupload": 2,
        "keterangan": "Sukses Upload Foto"
    },
    "timestamp": "2023-10-27 10:00:00",
    "code": 200,
    "message": "Sukses Kirim Foto Xray"
}
  • 404 Not Found (BL/AWB Not Found) - HTTP 200

{
    "success": false,
    "data": null,
    "timestamp": "2023-10-27 10:00:00",
    "code": 404,
    "message": "Gagal Kirim Foto Xray, Data BL/AWB CN tidak ditemukan"
}
  • 401 Unauthorized - HTTP 401

{
    "success": false,
    "data": null,
    "timestamp": "2023-10-27 10:00:00",
    "code": 401,
    "message": "Invalid Authorization Token"
}
  • 409 Conflict (Data Already Exists) - HTTP 409

{
    "success": false,
    "data": null,
    "timestamp": "2023-10-27 10:00:00",
    "code": 409,
    "message": "Data X-Ray sudah ada, silahkan gunakan API add untuk menambah foto"
}
2

Add Foto X-Ray

This endpoint is used to add more X-Ray photos to an existing customs declaration.

  • URL: /add-foto-xray

  • Method: POST

  • Content-Type: multipart/form-data

Headers

  • Authorization: Bearer <your_token> (Required)

Request Parts

(Same as /kirim-foto-xray)

Example Request

(Same as /kirim-foto-xray)

Responses

  • 200 OK (Success) - HTTP 200

{
    "success": true,
    "data": {
        "nomorAju": "012345678901234500000020250930CNTESTXRAY3CN1",
        "nomorBlAwb": "CNTESTXRAY3",
        "tanggalBlAwb": "2025-09-30",
        "kodeKantor": "009000",
        "npwpPemberitahu": "0123456789012345000000",
        "jumlahFotoTerupload": 1,
        "keterangan": "Sukses Upload Foto"
    },
    "timestamp": "2023-10-27 10:00:00",
    "code": 200,
    "message": "Sukses Menambah Foto Xray"
}
  • 404 Not Found (Data Not Found) - HTTP 200

{
    "success": false,
    "data": null,
    "timestamp": "2023-10-27 10:00:00",
    "code": 404,
    "message": "Data Foto Xray tidak ditemukan"
}
  • 401 Unauthorized - HTTP 401 (Same as /kirim-foto-xray)

3

Get Foto X-Ray

This endpoint is used to retrieve the details of X-Ray photos for a specific customs declaration.

  • URL: /get-foto-xray

  • Method: GET

Headers

  • Authorization: Bearer <your_token> (Required)

Query Parameters

You can identify the declaration by either nomorAju or the combination of nomorBlAwb, tanggalBlAwb, and kodeKantor.

  • nomorAju (String, Optional): The customs declaration number you get after sending document.

  • nomorBlAwb (String, Optional): The Bill of Lading / Air Waybill number.

  • tanggalBlAwb (String, Optional): The date of the BL/AWB in yyyy-MM-dd format.

  • kodeKantor (String, Optional): The customs office code.

Example Request

By nomorAju:

curl -X GET \
  'https://apisdev-gw.beacukai.go.id/openapi/cnpibk/xray/get-foto-xray?nomorAju=012345678901234500000020250930CNTESTXRAY3CN1' \
  -H 'Authorization: Bearer <your_token>'

By BL/AWB details:

curl -X GET \
  'https://apisdev-gw.beacukai.go.id/openapi/cnpibk/xray/get-foto-xray?nomorBlAwb=CNTESTXRAY3&tanggalBlAwb=2025-09-30&kodeKantor=009000' \
  -H 'Authorization: Bearer <your_token>'

Responses

  • 200 OK (Success) - HTTP 200

{
    "success": true,
    "data": {
        "nomorAju": "012345678901234500000020250930CNTESTXRAY3CN1",
        "nomorBlAwb": "CNTESTXRAY3",
        "tanggalBlAwb": "2025-09-30",
        "kodeKantor": "009000",
        "npwpPemberitahu": "0123456789012345000000",
        "totalFotoTerupload": 2,
        "keterangan": null,
        "detail": [
            {
                "namaFile": "image1.jpg",
                "waktuRekam": "2023-10-27 10:00:00"
            },
            {
                "namaFile": "image2.png",
                "waktuRekam": "2023-10-27 10:00:05"
            }
        ]
    },
    "timestamp": "2023-10-27 10:01:00",
    "code": 200,
    "message": "Sukses Mengambil Data Foto X-Ray"
}
  • 404 Not Found - HTTP 404

{
    "success": false,
    "data": null,
    "timestamp": "2023-10-27 10:01:00",
    "code": 404,
    "message": "Data Foto Xray tidak ditemukan atas request yang diminta"
}
  • 401 Unauthorized - HTTP 401 (Same as /kirim-foto-xray)

Last updated