---
# System prepended metadata

title: Bukoli-PUDO Services

---

# Bukoli-PUDO Services


## LOGIN

Bukoli tarafına ait api servisindeki login endpointi ile alınan token requestlerde X-Auth-Token olarak headera eklenerek istek atılacaktır.

`Endpoint` :arrow_right: `POST /api​/auth​/login`

### Request:
```json=
{
  "userName": "string",
  "password": "string"
}
```

### Response:
```json=
{
  "userId": 360,
  "expireTime": 1631947498,
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRlcnZpcy5nZWxtZXpAcGF0aC5jb20udHIiLCJlbWFpbCI6ImRlcnZpcy5nZWxtZXpAcGF0aC5jb20udHIiLCJuYW1lIjoiREVSVklTIEdFTE1FWiIsImV4cGlyZVRpbWUiOjE2MTU3MjQ2OTd9.La8MaeJzMwe75tmoOl2mHSCAyiJXRfLmmIlWIJw1456",
  "refreshToken": "15f5a8000d495a3d78fd5061f4dd6cba58119f8f6f3fb20e05352c29c19ccd7a",
  "customer": []
}
```

## Create_Delivery

Aras kargo gönderisine ait shipmentın bukoli tarafında oluşması sağlar.

`Endpoint` :arrow_right: `POST /api/arascargo/orders/create-delivery`

### Request:
```json=
{
  "orderNumber": "string",
  "totalPackageCount": 0,
  "estimatedDeliveryDate": "string",
  "deliveryCodes": [
    "string"
  ],
  "notifications": true,
  "poiId": 0,
  "estimatedPackageDesi": "string",
  "name": "string",
  "surname": "string",
  "contactPhone": "string",
  "phoneNumber": "string",
  "contactTcNo": "string"
}
```
### Response:
```json=
{
  "id": integer,
  "orderNumber": "string",
  "contactName": "string",
  "contactPhone": "string",
  "contactTcNo": "string",
  "totalPackageCount": "integer",
  "estimatedTotalDesi": "integer",
  "transition": "string",
  "state": "string",
  "lastStateUpdatedAt": "2021-09-14T11:35:23+03:00",
  "packages": [
    {
      "barcode": "string"
    }
  ],
  "receiver": [],
  "poiApprovedDelivery": "2021-09-14T11:35:23+03:00",
  "createdAt": "2021-09-14T11:35:23+03:00",
  "lastActionUser": "string"
}
```

### Return_Delivery

İade olan gönderilerin nedeni ile beraber bukoli tarafına bildirmek için kullanılacak endpoint.

`Endpoint` :arrow_right: `POST /api​/arascargo/order​/deliver​/return​/{orderNumber`

### Request:

```json=
{
  "reason": "string",
  "operationDate": "string",
  "deliveryBarcode": "string"
}
```

### Response:
```json=
{
    "reason": "cancel",
    "type": "return",
    "createdAt": "2021-09-29T14:34:29+03:00"
}
```

### Cancel_Delivery

İptal olan gönderiyi bukoli tarafına bildirmek için kullanılacak endpoint.

`Endpoint` :arrow_right: `POST /api​/arascargo/order​/deliver​/cancel​/{orderNumber}` 

### Request:

```json=
{
  "reason": "string",
  "operationDate": "string",
  "deliveryBarcode": "string"
}
```

### Response:

```json=
{
  "id": integer,
  "orderNumber": "string",
  "contactName": "string",
  "contactPhone": "string",
  "contactTcNo": "string",
  "totalPackageCount": "integer",
  "estimatedTotalDesi": "integer",
  "transition": "string",
  "state": "string",
  "lastStateUpdatedAt": "2021-09-14T11:35:23+03:00",
  "packages": [
    {
      "barcode": "string"
    }
  ],
  "receiver": [],
  "poiApprovedDelivery": "2021-09-14T11:35:23+03:00",
  "createdAt": "2021-09-14T11:35:23+03:00",
  "lastActionUser": "string"
}
```