---
# System prepended metadata

title: Untitled

---

## Req 125

### Thay đổi về body của API `orders/create-from-task` và `orders/create-from-user`:

#### Tạo travel orders:

```json
{
    "taskId": "9990IU",
    "orderList": [
        {
            "orderType": "travel",
            "locationList": [
                {
                    "address": "22/6A Trương Quốc Dung, Phường 10, Phú Nhuận, Thành phố Hồ Chí Minh, Vietnam",
                    "position": {
                        "latitude": 10.794749,
                        "longitude": 106.671977
                    }
                },
                {
                    "address": "Trị An Lake-Trị An Lake, Dong Nai, Vietnam",
                    "position": {
                        "latitude": 11.2202888,
                        "longitude": 107.172085
                    }
                }
            ],
            "forDriverAccountType": "fourSeaterCar",
            "note": null,
            "editedFee": null,
            "staticMapUrl": "https://maps.googleapis.com/maps/api/staticmap?size=600x600&scale=1&format=png&maptype=roadmap&key=AIzaSyCNB3gNHtNTq837mt8_oRlvpOjEtqpHB3w&&path=enc:yj{`AojajS}AiB{FWyAGUq@zDsH`C{EfIqPtI_Q~A}@t@`@LKeBcBcCmEm@iFj@iGC_Au@o@mAVkD~DmHfA_DFgC{A]mDtA}B|FwBnA}AmCaGUmDWwDd@mEtCoEDgBm@_G~AyAfEWFcDg@uH`@aO`@_D\\{AA[Qd@}@_@c@ByLgK}ScTwDqHsAiF{@yFO{Hj@sInA{F`Ng\\nBsJiEwb@}Dc`@iM_iAFmHa@eCwBgIaBwIoDaJeLkNmMiHeUkEkMqA_d@mFaSiDiIwDcq@e[myA{r@}JsH}IyLsHaOkVof@iVmf@i\\gp@eNyWqDkEyMgLmI}FqXuQeOwJeq@wc@ij@q^qJmJ}DqGyQqn@wQus@sEuOiFuJ_KqLes@ss@ud@ae@{FyF_KaGiRuEqu@k@_[QmSQwHs@cIgBuFiCuPoKuNeKcl@aj@mV{U_U}[yGqJ{AeDq@wFv@kGdAaE|Ik[vB_JGuFwB{TbC{WtBuTjFol@nBqUw@cOiAiVRwCpAaLhC{JfLqd@xIme@oKoA_JmEkVwMgQuMuSmOiKsFuMgHkOoKsTsR_SeMcM{DkDuDu@wDBaGR{H[wEsAaEgKyT}MeXyGoHmBwFaByCwRaF{PkC_F{@aGaCoE{DcR}Pe`@e^{}@wz@ms@mq@wG{DuXkIii@iOemAa]{iA}RaZcF{L}FaGcF_JiGiIeBmSa@aIw@yDkAIGO?KXMt@aGrPwC~EqUjOmJvEmHjDmWxAcE_@_DkGuBeHgCwAqMnBkEp@mBw@gGmIs@sEiCuAeKWrAiN|CeYp@gh@bEaY|Fgd@r@kHYUqGJkj@`@gQ?yo@b@sNh@sKvCo[hJ}TvH{QpHoHhCqIv@wQnAou@zFiYxAkTwEaQoEqFoAgFWyOjE{RpEeW~CgDBkJcBuG_BkFwByTmWmGuG{IuBkL_CmMcFsLqIiC}BcBmDoEyNgImViCgFsCiDeEmEkEsBiQwFeRgFq_@pAaM|BkJxCsJfBcOuCa`@cXmCo@kFTuYrB}cAlIqYzC{Gt@}BTDm@FoAb@wFFs@^mCzD{ERsAiCqK{@mDhBkJrIyd@pBcNgFuRk]qlAc]io@wJkQkJaUaVcp@uHmHwZgUuW{R{EkDsJeBgj@}Gop@{IeGkEtMiPtEsEpStEzV[`M_@rA]dAyAdHwK~JmPfIsRhHwCvF}B`@y@QaFxDUjGD`BcF|BcTxDsCbEgAtEiB|Ew@lBkA`@}@zF]~GSrEyBjAo@lAJjGx@jD?jBKf@i@HyA|EVvS~AlEj@"
        }
    ],
    "shouldBypassUserConfirm": false
}
```

#### Tạo goods delivery orders:

```json
{
    "taskId": "9990IU",
    "orderList": [
        {
            "orderType": "goodsDelivery",
            "locationList": [
                {
                    "address": "22/6A Trương Quốc Dung, Phường 10, Phú Nhuận, Thành phố Hồ Chí Minh, Vietnam",
                    "position": {
                        "latitude": 10.794749,
                        "longitude": 106.671977
                    }
                }
            ],
            "receiver": {
                "name": "Nguyen Van B",
                "phoneNumber": "+84123456789"
            },
            "goodsType": "food",
            "goodsWeight": "light",
            "goodsPrice": null,
            "payBySender": true,
            "note": null,
            "editedFee": 10000,
            "staticMapUrl": "https://maps.googleapis.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yNgImViCgFsCiDeEmEkEsBiQwFeRgFq_@pAaM|BkJxCsJfBcOuCa`@cXmCo@kFTuYrB}cAlIqYzC{Gt@}BTDm@FoAb@wFFs@^mCzD{ERsAiCqK{@mDhBkJrIyd@pBcNgFuRk]qlAc]io@wJkQkJaUaVcp@uHmHwZgUuW{R{EkDsJeBgj@}Gop@{IeGkEtMiPtEsEpStEzV[`M_@rA]dAyAdHwK~JmPfIsRhHwCvF}B`@y@QaFxDUjGD`BcF|BcTxDsCbEgAtEiB|Ew@lBkA`@}@zF]~GSrEyBjAo@lAJjGx@jD?jBKf@i@HyA|EVvS~AlEj@"
        }
    ],
    "shouldBypassUserConfirm": false
}
```

**💡 Chú thích:**

```typescript
export const goodsTypeList = [
  'food',
  'clothes',
  'medicine',
  'book',
  'other',
] as const;
export type GoodsType = typeof goodsTypeList[number];


export const goodsWeightList = ['light', 'medium', 'heavy'] as const;
export type GoodsWeight = typeof goodsWeightList[number];
```
