# GENERATE AIRWAYBILL (CREATE SHIPMENT)

##### Endpoint

<table border="1" id="bkmrk-endpoint-method-auth" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col><col style="width: 33.3333%;"></col></colgroup><tbody><tr><td>**Endpoint**</td><td>**Method**  
</td><td>**Authentication**</td></tr><tr><td>http://apiv2.jne.co.id:10102/tracing/api/generatecnote</td><td>POST</td><td>- no (test environment)

</td></tr></tbody></table>

##### Authentication

<table border="1" id="bkmrk-endpoint-method-serv" style="border-collapse: collapse; width: 100%; height: 59.757px;"><colgroup><col style="width: 29.5467%;"></col><col style="width: 45.5054%;"></col><col style="width: 24.9617%;"></col></colgroup><tbody><tr style="height: 29.8785px;"><td style="height: 29.8785px;">**Type**  
</td><td style="height: 29.8785px;">**Token source**  
</td><td style="height: 29.8785px;">**Server**  
</td></tr><tr style="height: 29.8785px;"><td style="height: 29.8785px;"> </td><td style="height: 29.8785px;"> </td><td style="height: 29.8785px;"> </td></tr></tbody></table>

##### Header

<table border="1" id="bkmrk-parameter-value-%C2%A0" style="border-collapse: collapse; width: 100%; height: 59.757px;"><colgroup><col style="width: 64.5241%;"></col><col style="width: 35.4759%;"></col></colgroup><tbody><tr style="height: 29.8785px;"><td style="height: 29.8785px;">**Parameter**  
</td><td style="height: 29.8785px;">**Value**  
</td></tr><tr style="height: 29.8785px;"><td>Content-Type</td><td>application/x-www-form-urlencoded</td></tr></tbody></table>

##### Body request

<p class="callout info">Type: x-www-form-urlencoded</p>

```json
{
  "username": "TESTAPI",
  "api_key": "25c898a9faea1a100859ecd9ef674548",
  "OLSHOP_BRANCH": "CGK000",
  "OLSHOP_CUST": "TESTAKUN",
  "OLSHOP_ORDERID": "20240705002",
  "OLSHOP_SHIPPER_NAME": "ALI",
  "OLSHOP_SHIPPER_ADDR1": "JAKARTA NO 44",
  "OLSHOP_SHIPPER_ADDR2": "KALIBATA",
  "OLSHOP_SHIPPER_ADDR3": "KALIBATA",
  "OLSHOP_SHIPPER_CITY": "JAKARTA",
  "OLSHOP_SHIPPER_REGION": "JAKARTA",
  "OLSHOP_SHIPPER_ZIP": "12345",
  "OLSHOP_SHIPPER_PHONE": "+6289876543212",
  "OLSHOP_RECEIVER_NAME": "ANA",
  "OLSHOP_RECEIVER_ADDR1": "BANDUNG NO 12",
  "OLSHOP_RECEIVER_ADDR2": "CIBIRU",
  "OLSHOP_RECEIVER_ADDR3": "BANDUNG",
  "OLSHOP_RECEIVER_CITY": "BANDUNG",
  "OLSHOP_RECEIVER_REGION": "JAWA BARAT",
  "OLSHOP_RECEIVER_ZIP": "12365",
  "OLSHOP_RECEIVER_PHONE": "+6285789065432",
  "OLSHOP_QTY": "1",
  "OLSHOP_WEIGHT": "1",
  "OLSHOP_GOODSDESC": "TEST",
  "OLSHOP_GOODSVALUE": "1000",
  "OLSHOP_GOODSTYPE": "1",
  "OLSHOP_INST": "TEST",
  "OLSHOP_INS_FLAG": "N",
  "OLSHOP_ORIG": "CGK10000",
  "OLSHOP_DEST": "BDO10000",
  "OLSHOP_SERVICE": "REG",
  "OLSHOP_COD_FLAG": "N",
  "OLSHOP_COD_AMOUNT": "0" 
}
```

<table border="1" id="bkmrk-properties-propertie" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 26.3288%;"></col><col style="width: 15.5748%;"></col><col style="width: 58.0964%;"></col></colgroup><tbody><tr><td>**Properties**  
</td><td>**Data type**</td><td>**Description**</td></tr><tr><td>**username\***</td><td>  
</td><td>  
</td></tr><tr><td>**api\_key\***</td><td>  
</td><td>  
</td></tr><tr><td>OLSHOP\_BRANCH\*</td><td>VARCHAR(10 BYTE)</td><td>Value of this Parameter is Branch code</td></tr><tr><td>OLSHOP\_CUST\*</td><td>VARCHAR(10 BYTE)</td><td>Values is your Cust no</td></tr><tr><td>OLSHOP\_ORDERID\*</td><td>VARCHAR(20 BYTE)</td><td>Value of this Parameter is Order Id of the goods</td></tr><tr><td>OLSHOP\_SHIPPER\_NAME\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Name of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_ADDR1\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 1 of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_ADDR2\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 2 of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_ADDR3</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 3 of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_CITY\*</td><td>VARCHAR(20 BYTE)</td><td>Value of this Parameter is City of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_REGION</td><td>VARCHAR(20 BYTE)</td><td>Value of this Parameter is Region of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_ZIP\*</td><td>VARCHAR(5 BYTE)</td><td>Value of this Parameter is zip of Shipper</td></tr><tr><td>OLSHOP\_SHIPPER\_PHONE\*</td><td>NUMBER (15 BYTE)</td><td>Value of this Parameter is Phone of Shipper</td></tr><tr><td>OLSHOP\_RECEIVER\_NAME\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Name of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_ADDR1\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 1 of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_ADDR2\*</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 2 of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_ADDR3</td><td>VARCHAR(30 BYTE)</td><td>Value of this Parameter is Address 3 of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_CITY\*</td><td>VARCHAR(20 BYTE)</td><td>Value of this Parameter is City of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_REGION</td><td>VARCHAR(20 BYTE)</td><td>Value of this Parameter is Region of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_ZIP\*</td><td>VARCHAR(5 BYTE)</td><td>Value of this Parameter is zip of Customer</td></tr><tr><td>OLSHOP\_RECEIVER\_PHONE\*</td><td>NUMBER (15 BYTE)</td><td>Value of this Parameter is Phone of Customer</td></tr><tr><td>OLSHOP\_QTY\*</td><td>NUMBER(5)</td><td>Value of this Parameter is Qty of the goods (Number)</td></tr><tr><td>OLSHOP\_WEIGHT\*</td><td>NUMBER(3)</td><td>Value of this Parameter is Weight of the goods (Number)</td></tr><tr><td>OLSHOP\_GOODSDESC\*</td><td>VARCHAR(60 BYTE)</td><td>Value of this Parameter is Description of the goods</td></tr><tr><td>OLSHOP\_GOODSVALUE\*</td><td>NUMBER(12 BYTE)</td><td>Value of this Parameter is Amount of the goods</td></tr><tr><td>OLSHOP\_GOODSTYPE\*</td><td>VARCHAR(1 BYTE)</td><td>Default value ???2??? (No quotes)</td></tr><tr><td>OLSHOP\_INST</td><td>VARCHAR(60 BYTE)</td><td>Value of this Parameter is Instruction of the goods</td></tr><tr><td>OLSHOP\_INS\_FLAG\*</td><td>VARCHAR (1 Byte)</td><td>Fill ???Y??? if insurance and fill ???N??? if not</td></tr><tr><td>OLSHOP\_ORIG\*</td><td>VARCHAR(10 BYTE)</td><td>Value of this Parameter is Origin of the resellers value is CGK10000</td></tr><tr><td>OLSHOP\_DEST\*</td><td>VARCHAR(10 BYTE)</td><td>Value of this Parameter is Destination of the goods (with Code)</td></tr><tr><td>OLSHOP\_SERVICE\*</td><td>VARCHAR(10 BYTE)</td><td>Value of this Parameter is Service of the goods (Value REG, YES, SS)</td></tr><tr><td>OLSHOP\_COD\_FLAG\*</td><td>VARCHAR (3 Byte)</td><td>Fill ???YES??? if COD and fill ???N??? if not</td></tr><tr><td>OLSHOP\_COD\_AMOUNT\*</td><td>NUMBER(12 BYTE)</td><td>Value of this Parameter is COD Amount of the goods</td></tr></tbody></table>

<details id="bkmrk-result-example-body-"><summary>Result example</summary>

<p class="callout info">200 OK</p>

```json
{
    "detail": [
        {
            "status": "sukses",
            "cnote_no": "010116240120789"
        }
    ]
}
```

</details><details id="bkmrk-error-example-body-r"><summary>Error example</summary>

<p class="callout danger">200 OK</p>

<p class="callout danger">Duplicate OLSHOP\_ORDERID</p>

```json
{
    "detail": [
        {
            "status": "Error",
            "reason": "Transaction no. already exists, please try with another",
            "cnote_no": "010116240120789"
        }
    ]
}
```

<p class="callout danger">200 OK</p>

<p class="callout danger">OLSHOP\_ORIG does not exist</p>

```json
{
    "detail": [
        {
            "status": "Error",
            "reason": "Origin Code CGK10100 Not Exists",
            "cnote_no": null
        }
    ]
}
```

<p class="callout danger">200 OK</p>

<p class="callout danger">wrong api\_key value</p>

```json
{
    "error": "Username Or API KEY Not Found.",
    "status": "false"
}
```

</details>