# Add delivery info API

### Adds delivery info for an escrow transaction.

<details>

<summary><strong>Supported PGs</strong></summary>

* KG INICIS
* NHN KCP
* PAYJOA (Daou)

</details>

## Adds delivery info for an escrow transaction.

<mark style="color:green;">`POST`</mark> `https://api.iamport.kr/escrows/logis/{imp_uid}`

The request body must be **2-depth JSON**.

[**Courier codes**](../../tips/code)

#### Path Parameters

| Name                                       | Type   | Description                                                |
| ------------------------------------------ | ------ | ---------------------------------------------------------- |
| imp\_uid<mark style="color:red;">\*</mark> | String | <mark style="color:red;">**i'mport transaction ID**</mark> |

#### Request Body

| Name                                       | Type | Description                                       |
| ------------------------------------------ | ---- | ------------------------------------------------- |
| sender<mark style="color:red;">\*</mark>   | Json | <mark style="color:red;">**Sender info**</mark>   |
| receiver<mark style="color:red;">\*</mark> | Json | <mark style="color:red;">**Receiver info**</mark> |
| logis<mark style="color:red;">\*</mark>    | Json | <mark style="color:red;">**Delivery info**</mark> |

{% tabs %}
{% tab title="200: OK Success" %}
{% tabs %}
{% tab title="EscrowLogisResponse" %}
**`code`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:purple;">**integer**</mark>

**Response code**

0: success, Not 0: check the message



**`message`** <mark style="color:red;">**\***</mark>**&#x20;**<mark style="color:green;">**string**</mark>

**Response message**

A non-zero code includes a message like 'Invalid payment info'.



**`response`**<mark style="color:red;">**`(EscrowLogisAnnotation, optional)`**</mark>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="EscrowLogisAnnotation" %}
**`company`** <mark style="color:red;">**`*`**</mark><mark style="color:green;">**`string`**</mark>

**`Courier code`**

&#x20;

**`invoice`**<mark style="color:red;">**`*`**</mark><mark style="color:green;">**`string`**</mark>

**`Tracking number`**

&#x20;

**`sent_at`**<mark style="color:red;">**`*`**</mark><mark style="color:orange;">**`integer`**</mark>

**`Sent at`** _**UNIX TIMESTAMP**_



**`applied_at`**_<mark style="color:red;">**`*`**</mark>_<mark style="color:orange;">**`integer`**</mark>

**`Delivery info created at`** _**UNIX TIMESTAMP**_
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400: Bad Request Missing parameter (varies by PG) or request not supported by specified PG" %}
```javascript
{
    // Response
}
```
{% endtab %}

{% tab title="401: Unauthorized Missing or invalid access token" %}
```javascript
{
    // Response
}
```
{% endtab %}

{% tab title="404: Not Found No result found" %}
```javascript
{
    // Response
}
```
{% endtab %}

{% tab title="500: Internal Server Error Server error" %}
```javascript
{
    // Response
}
```
{% endtab %}

{% tab title="409: Conflict Delivery info already exists or request cannot be completed" %}
```javascript
{
    // Response
}
```
{% endtab %}

{% tab title="405: Method Not Allowed Not a POST request" %}
```javascript
{
    // Response
}
```
{% endtab %}
{% endtabs %}

### **Key request parameter description**

> **`sender`**<mark style="color:red;">**`*`**</mark><mark style="color:blue;">**`Json`**</mark>
>
> **`Sender info`**

<details>

<summary>EscrowLogisSenderAnnotation</summary>

**`name (string, optional)`**

**`Sender's name (Required for: KG INICIS)`**&#x20;



**`tel (string, optional)`**

**`Sender's phone (Required for: KG INICIS)`**



**`addr (string, optional)`**

**`Sender's address (Required for: KG INICIS)`**



**`postcode (string, optional)`**

**`Sender's zip code (Required for: KG INICIS)`**



**`relationship (string, optional)`**

**`Relationship with sender (Required for: PAYJOA, Example: Self)`**

</details>

> **`receiver`**<mark style="color:red;">**`*`**</mark><mark style="color:blue;">**`Json`**</mark>
>
> **`Receiver info`**

<details>

<summary>EscrowLogisReceiverAnnotation</summary>

**`name (string, optional)`**

**`Receiver's name (Required for: KG INICIS)`**&#x20;



**`tel (string, optional)`**

**`Receiver's phone (Required for: KG INICIS)`**



**`addr (string, optional)`**

**`Receiver's address (Required for: KG INICIS)`**



**`postcode (string, optional)`**

**`Receiver's zip code (Required for: KG INICIS)`**

</details>

> **`logis`**<mark style="color:red;">**`*`**</mark><mark style="color:blue;">**`Json`**</mark>
>
> **`Delivery info`**&#x20;

<details>

<summary>EscrowLogisInfoAnnotation</summary>

**`company (string)`**

**`Courier code`**&#x20;



**`invoice (string)`**

**`Tracking number`**



**`sent_at (integer)`**

**`Sent at UNIX TIMESTAMP`**



**`receiving_at (string, optional)`**

**`Received at (Required for: PAYJOA / Example: YYYYMMDD)`**



**`address (string, optional)`**

**`Shipping address (Required for: PAYJOA)`**

</details>

### Response

<details>

<summary>Response Model Schema</summary>

```
{
  "code": 0,
  "message": "string",
  "response": {
    "company": "string",
    "invoice": "string",
    "sent_at": 0,
    "applied_at": 0
  }
}
```

</details>

{% hint style="success" %}
**Swagger Test Link**

[**https://api.iamport.kr/#!/escrow.logis/escrow\_logis\_save**](https://api.iamport.kr/#!/escrow.logis/escrow_logis_save)
{% endhint %}
