«

Thể hiện logic đơn nháp mua trọn gói, có thể tạo đơn nháp với sản phẩm mua trọn gói

  1. TH sản phẩm trọn gói được cấu hình "fix_price_all_sku = true"
  2. Các sku được đánh dấu "mua theo giá riêng của sku" thì response của sku trả về có price & weight lấy theo thông tin của sku
  3. Các sku không được đánh dấu "mua theo giá riêng của sku" thì response của sku trả về có price & weight lấy theo thông tin của sản phẩm
  4. TH sản phẩm trọn gói được cấu hình "fix_price_all_sku = false" và toàn bộ các sku được đánh dấu "mua theo giá riêng của sku" thì response của sku trả về có price & weight lấy theo thông tin của sku
    • Given Dịch vụ áp dụng biểu phí "Bieu_phi_ap_dung_ngay_09_03_2024"
    • And Tồn tại nhóm khách hàng có thông tin
      Mã nhómTỉ lệ cọcBộ cấu hình chính sách
      sabomall50Bieu_phi_ap_dung_ngay_09_03_2024
    • And Khách hàng "pamiuoi" đang thuộc nhóm khách hàng "sabomall"
    • And Tài khoản "pamiuoi" đã có danh sách địa chỉ nhận hàng
      addressIdcountryprovincecitydistrictwarddefault
      VN_01Việt NamThành phố Hà NộiQuận Hà ĐôngPhường Yên Nghĩatrue
      VN_02Việt NamThành phố Hà NộiQuận Thanh XuânPhường Khương Đình
      TQ_01中国大陆广东省广州市黄埔区云埔街道
    • And Khách hàng "pamiuoi" đang áp dụng bộ biểu phí có thông tin dịch vụ
      service_codeonlyStaffdomestic
      domestic_shippingfalsetrue
      inspection_advancefalsefalse
      standard_shippingtruefalse
      standard_shipping_6mtruefalse
      special_bubble_wrappingtruefalse
      special_packagingtruefalse
    • And Hệ thống đang hỗ trợ tỷ lệ đặt cọc có thông tin
      depositOnDemanddepositRateCode
      45rate45
      70rate70
      100rate100
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 200 và tạo đơn nháp thành công mua sản phẩm trọn gói với body gửi lên tỷ lệ cọc 100%

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId}"],
        "addressId": "<addressId>",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
          {
            "status": "DRAFT",
            "orderItems": [
              {
                  "itemId": "${product_01}",
                  "skuId": "${sku01}",
                  "sku": "${skusId}"
              }
            ],
            "addressId": "<addressId>",
            "depositOnDemand": 100
          }
        ]
      }

    Examples:

    addressId
    ${TQ_01}
    ${VN_01}
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 200 và tạo đơn nháp thành công mua sản phẩm trọn gói với body chỉ gửi thông tin depositOnDemand

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId}"],
        "addressId": "<addressId>",
        "depositOnDemand": <depositOnDemand>
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
          {
            "status": "DRAFT",
            "orderItems": [
              {
                  "itemId": "${product_01}",
                  "skuId": "${sku01}",
                  "sku": "${skusId}"
              }
            ],
            "addressId": "<addressId>",
            "depositOnDemand": 100
          }
        ]
      }

    Examples:

    depositOnDemand addressId
    100 ${VN_01}
    100.00 ${TQ_01}
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 400 khi tạo đơn nháp mà body gửi lên nhiều sku, trong đó có cả sku mua trọn gói và sku không mua trọn gói

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm thuộc marketplace "taobao" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSize
      merchant_01product_01sku_01skusId_01111
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_02product_02sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}", "${skusId}"],
        "addressId": "${VN_01}"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
        "title": "retail_sku_invalid"
      }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 400 khi tạo đơn nháp mua sản phẩm trọn gói với body không gửi lên tỷ lệ đặt cọc

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId}"],
        "addressId": "<addressId>"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
        "title": "retail_order_deposit_invalid",
        "detail": "deposit value of retail order must be 100"
      }

    Examples:

    addressId
    ${TQ_01}
    ${VN_01}
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 400 nếu đặt đơn nháp sản phẩm mua trọn gói nếu tỷ lệ cọc khác 100%

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId}"],
        "addressId": "<addressId>",
        "depositRateCode": "<rate>"
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
        "title": "retail_order_deposit_invalid",
        "detail": "deposit value of retail order must be 100"
      }

    Examples:

    rate addressId
    ${rate45} ${VN_01}
    ${rate70} ${TQ_01}
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả status 400 nếu đặt đơn nháp sản phẩm mua trọn gói nếu gửi depositOnDemand khác 100%

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId111104sku01 - 5 - 3
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId}"],
        "addressId": "<addressId>",
        "depositOnDemand": <depositOnDemand>
      }
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
      {
        "title": "retail_order_deposit_invalid",
        "detail": "deposit value of retail order must be 100"
      }

    Examples:

    depositOnDemand addressId
    45 ${VN_01}
    70 ${VN_01}
    50 ${TQ_01}
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330, @TNK-13313

    Tạm tính phí VCNĐ Việt Nam nếu sản phẩm có thông tin fixPriceAllSku = true

    • Nếu sku của sản phẩm được đánh dấu là mua theo giá riêng của sku, thì cân nặng tính phí sẽ lấy theo cân nặng riêng của sku
    • Given Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)fixPriceAllSku
      merchant_01product_01sku01skusId_01111104sku01 - 5 - 3true
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
            "orderViews": [
                {
                    "addressId": "${VN_01}",
                    "vietnamDomesticShippingFee": 3.75
                }
            ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Tạm tính phí VCNĐ Việt Nam nếu sản phẩm có thông tin fixPriceAllSku = true trong trường hợp

    • Nếu không có sku của sản phẩm được đánh dấu là mua theo giá riêng của sku, thì cân nặng tính phí sẽ lấy theo cân nặng của sản phẩm
    • Given Giỏ hàng "thường" của tài khoản "pamiuoi" đang trống
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngfixPriceAllSkuskus (sku - giá - cân nặng)
      merchant_01product_01sku01skusId_01111104true
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
            "orderViews": [
                {
                    "addressId": "${VN_01}",
                    "vietnamDomesticShippingFee": 4.65
                }
            ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Tạm tính phí VCNĐ Việt Nam nếu sản phẩm có thông tin fixPriceAllSku = false

    • Cân nặng tính phí sẽ lấy theo cân nặng riêng của sku được đánh dấu là mua theo giá riêng của sku
    • Given Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)fixPriceAllSku
      merchant_01product_01sku01skusId_01111104sku01 - 5 - 3false
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
            "orderViews": [
                {
                    "addressId": "${VN_01}",
                    "vietnamDomesticShippingFee": 3.75
                }
            ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Giá của sản phẩm có thông tin fixPriceAllSku = true khi lên đơn nháp:

    • Nếu sku của sản phẩm được đánh dấu là mua theo giá riêng của sku, thì giá khi lên đơn sẽ lấy theo giá riêng của sku
    • Given Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)fixPriceAllSku
      merchant_01product_01sku01skusId_01111104sku01 - 5 - 3true
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
            "orderViews": [
                {
                    "orderItems": [
                        {
                          "price": 5
                        }
                    ]
                }
            ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Giá của sản phẩm có thông tin fixPriceAllSku = true khi lên đơn nháp trong TH:

    • Nếu không có sku của sản phẩm được đánh dấu là mua theo giá riêng của sku, thì giá khi lên đơn sẽ lấy theo giá của sản phẩm
    • Given Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngfixPriceAllSku
      merchant_01product_01sku01skusId_01111104true
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
            "orderViews": [
                {
                    "orderItems": [
                        {
                          "price": 10
                        }
                    ]
                }
            ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Giá của sản phẩm có thông tin fixPriceAllSku = false khi lên đơn nháp

    • Giá khi lên đơn sẽ lấy theo giá của sku được đánh dấu là mua theo giá riêng của sku
    • Given Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitymarketplacebatchSizegiácân nặngskus (sku - giá - cân nặng)fixPriceAllSku
      merchant_01product_01sku01skusId_011116881104sku01 - 5 - 3false
    • And Có token của tài khoản "pamiuoi"
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "${VN_01}",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
          "orderViews": [
              {
                  "orderItems": [
                      {
                        "price": 5
                      }
                  ]
              }
          ]
      }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Có thể cập nhật coupon, ghi chú cho người bán trên đơn nháp mua trọn gói

    • Given Có token của tài khoản "pamiuoi"
    • And Request có header là
      X-Tenantm26
    • And Tồn tại coupon với thông tin
      codevalid_fromvalid_toapply_scopesdiscount_typeformulacustomer_limitlimitfee_itemconfigremaining
      coupon_01AA+10["ORDER"]PERCENT1025[{"fee": "domestic_shipping", "maxValue": "5000"}]{"single": true}5
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeremarkcouponCodeaddressIdservicesgiácân nặngskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01111<remark><couponCode>VN_01domestic_shipping101skuId_01 - 5 - 2
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            "services": ["domestic_shipping"],
            <content>
        }
      ]
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
            {
                "code": "${draft_01}",
                <content>
            }
        ]
      }

    Examples:

    remark couponCode content
    Đây là ghi chú cho người bán "remark": null
    "couponCode":"${coupon_01}" "couponCode": null
    "remark":"Đây là ghi chú cho người bán"
    "couponCode":"${coupon_01}"
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Trả về status 200 update cùng lúc nhiều đơn nháp mua trọn gói với thông tin hợp lệ

    • Given Có token của tài khoản "pamiuoi"
    • And Request có header là
      X-Tenantm26
    • And Tồn tại coupon với thông tin
      codevalid_fromvalid_toapply_scopesdiscount_typeformulacustomer_limitlimitfee_itemconfigremaining
      coupon_01AA+10["ORDER"]PERCENT1025[{"fee": "domestic_shipping", "maxValue": "5000"}]{"single": true}5
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeaddressIdservicesgiácân nặngskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01111VN_01inspection_advance101skuId_01 - 10 - 1
      draft_02merchant_02product_02skuId_02skusId_02111TQ_01domestic_shipping101skuId_02 - 10 - 1
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            "services": ["domestic_shipping"],
            <content_01>
        },
        {
            "code": "${draft_02}",
            "services": ["inspection_advance"],
            <content_02>
        }
      ]
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
            {
                "code": "${draft_01}",
                <content_01>
            },
            {
                "code": "${draft_02}",
                <content_02>
            }
        ]
      }

    Examples:

    content_01 content_02
    "addressId":"${VN_02}" "addressId":"${VN_01}", "services": ["inspection_advance"]
    "couponCode":"${coupon_01}" "addressId":"${VN_01}", "remark":"Đây là ghi chú cho người bán"
    "remark":"Đây là ghi chú cho người bán" "addressId":"${VN_01}", "couponCode":"${coupon_01}"
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Không thể cập nhật tỷ lệ cọc đơn trọn gói khác 100%

    • Given Có token của tài khoản "pamiuoi"
    • And Request có header là
      X-Tenantm26
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeaddressIdservicesgiácân nặngskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01111VN_01inspection_advance101skuId_01 - 10 - 1
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            "services": ["inspection_advance"],
            <contentJson>
        }
      ]
    • Then Trả về status code 400
    • And Response có body thỏa mãn giá trị như sau
       {
        "title": "retail_order_deposit_invalid",
        "detail": "deposit value of retail order must be 100"
      }

    Examples:

    contentJson
    "depositRateCode": "${rate70}"
    "depositRateCode": "${rate45}"
    "depositOnDemand": 50
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Nếu đơn nháp mua trọn gói có địa chỉ nhận là Việt Nam, có thể cập nhật dịch vụ cho đơn nháp

    • Given Có token của tài khoản "pamiuoi"
    • And Request có header là
      X-Tenantm26
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeaddressIddepositOnDemandservicesgiácân nặngskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01111VN_01100domestic_shipping101skuId_01 - 10 - 1
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            <content>
        }
      ]
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
            {
                "code": "${draft_01}",
                <content>
            }
        ]
      }

    Examples:

    content
    "services": ["domestic_shipping"]
    "services": ["inspection_advance"]
    "services": ["domestic_shipping", "inspection_advance"]
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330

    Nếu đơn nháp mua trọn gói có địa chỉ nhận là Trung Quốc, có thể cập nhật dịch vụ nội địa cho đơn nháp

    • Given Có token của tài khoản "pamiuoi"
    • And Request có header là
      X-Tenantm26
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeaddressIddepositOnDemandservicesgiácân nặngskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01111TQ_01100domestic_shipping101skuId_01 - 10 - 1
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            "services": ["domestic_shipping"]
        }
      ]
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
          "orderViews": [
              {
                  "code": "${draft_01}",
                  "services": ["domestic_shipping"]
              }
          ]
        }
  • Tags: @AUTOMATED, @TNK-10163, @TNK-11330, @TNK-13313

    Khi thay đổi địa chỉ nhận hàng của đơn nháp mua trọn gói, phí vận chuyển nội địa Việt Nam tạm tính được cập nhật tương ứng

    • Given Có token của tài khoản "pamiuoi"
    • And Hệ thống tồn tại bộ cấu hình phí VCLM "Cấu hình phí VCLM" đang được áp dụng với thông tin
      Khu vựcCân nặng (kg)Đơn giá (CNY)Phí niêm yết (Ngoài khoảng niêm yết sẽ tính phí theo mốc)
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTừ 0 - 33.75
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 3 - 54.65
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 5 - 106.35
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 10 - 1511.3
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 15 - 2013.9
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 20 - 2516.2
      Quận Hoàn Kiếm, Thành phố Hà Nội, Việt NamTrên 25 - 999999990.35
      Tỉnh Bắc Giang, Việt NamTừ 0 - 36.05
      Tỉnh Bắc Giang, Việt NamTrên 3 - 58.35
      Tỉnh Bắc Giang, Việt NamTrên 5 - 1012
      Tỉnh Bắc Giang, Việt NamTrên 10 - 1524.5
      Tỉnh Bắc Giang, Việt NamTrên 15 - 2032.5
      Tỉnh Bắc Giang, Việt NamTrên 20 - 2540.5
      Tỉnh Bắc Giang, Việt NamTrên 25 - 999999991.2
    • And Tài khoản "pamiuoi" đã có danh sách địa chỉ nhận hàng
      addressIdcountryprovincedistrictwarddefault
      VN_04Việt NamThành phố Hà NộiQuận Hoàn KiếmPhường Chương Dươngtrue
      VN_05Việt NamTỉnh Bắc GiangHuyện Lục NamXã Trường Giang
      VN_03Việt NamThành phố Hà NộiQuận Hà ĐôngPhường Văn Quán
    • And Request có header là
      X-Tenantm26
    • And Tài khoản "pamiuoi" đã có danh sách đơn nháp mua trọn gói thuộc marketplace "1688" với thông tin
      draftCodemerchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizeaddressIddepositOnDemandservicescân nặnggiáskus (sku - giá - cân nặng)
      draft_01merchant_01product_01skuId_01skusId_01<quantity>11<addressId_before>100domestic_shipping<weight>10skuId_01 - 10 - <weight>
    • When Gửi request "GET" đến "/M26/draft-orders/with-last-mile?orderCodes=${draft_01}"
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
          {
            "orderViews": [
              {
                  "vietnamDomesticShippingFee": <vietnamDomesticShippingFee_before>
              }
            ]
          }
    • When Gửi request "PATCH" đến "/M26/draft-orders/with-last-mile" với body
      [
        {
            "code": "${draft_01}",
            "services": ["domestic_shipping"],
            "addressId": "<addressId_after>"
        }
      ]
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
        {
          "orderViews": [
              {
                  "vietnamDomesticShippingFee": <vietnamDomesticShippingFee_after>
              }
          ]
        }

    Examples:

    quantity weight addressId_before vietnamDomesticShippingFee_before addressId_after vietnamDomesticShippingFee_after
    1 0 VN_04 null ${VN_05} null
    1 3 VN_04 3.75 ${VN_05} 6.05
    1 3.01 VN_04 4.65 ${VN_05} 8.35
    1 25.1 VN_04 16.55 ${VN_05} 41.7
    2 0 VN_04 null ${VN_05} null
    2 3 VN_04 6.35 ${VN_05} 12
    4 3.01 VN_04 11.3 ${VN_05} 24.5
    1 0 VN_04 null ${VN_03} null
    1 3 VN_04 3.75 ${VN_03} null
    1 3.01 VN_04 4.65 ${VN_03} null
    1 25.1 VN_04 16.55 ${VN_03} null
    2 0 VN_04 null ${VN_03} null
    2 3 VN_04 6.35 ${VN_03} null
    4 3.01 VN_04 11.3 ${VN_03} null
    1 0 VN_03 null ${VN_05} null
    1 3 VN_03 null ${VN_05} 6.05
    1 3.01 VN_03 null ${VN_05} 8.35
    1 25.1 VN_03 null ${VN_05} 41.7
    2 0 VN_03 null ${VN_05} null
    2 3 VN_03 null ${VN_05} 12
    4 3.01 VN_03 null ${VN_05} 24.5
  • Tags: @AUTOMATED, @TNK-11444

    Trong trường hợp đặt đơn nháp với số lượng mua thoả mãn chính sách giá của sản phẩm theo số lượng (minQuantity của productPricePolicy),

    thì giá của sản phẩm tính theo chính sách giá.

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)productPricePolicy
      merchant_01product_01sku01skusId_01<quantity><quantity>1<price>4sku01 - 11 - 3<pricePolicy>
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "<addressId>",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
          {
            "status": "DRAFT",
            "orderItems": [
              {
                  "itemId": "${product_01}",
                  "skuId": "${sku01}",
                  "sku": "${skusId_01}",
                  "quantity": <quantity>,
                  "price": <price>
              }
            ],
            "addressId": "<addressId>",
            "depositOnDemand": 100
          }
        ]
      }

    Examples:

    addressId quantity price pricePolicy
    ${TQ_01} 5 10 [{"salePrice": 10, "minQuantity": 5}, {"salePrice": 8, "minQuantity": 20}]
    ${VN_01} 10 10 [{"salePrice": 10, "minQuantity": 5}, {"salePrice": 8, "minQuantity": 20}]
    ${VN_01} 20 7 [{"salePrice": 9, "minQuantity": 10}, {"salePrice": 7, "minQuantity": 20}]
    ${VN_01} 19 9 [{"salePrice": 9, "minQuantity": 10}, {"salePrice": 7, "minQuantity": 20}]

    Tags: @TNK-13109

    Examples:

    addressId quantity price pricePolicy
    ${VN_01} 21 10 [{"salePrice": 10, "minQuantity": 20}]
  • Tags: @AUTOMATED, @TNK-11444

    Nếu đặt đơn nháp mua số lượng sản phẩm thấp hơn số lượng tối thiểu theo chính sách giá và sản phẩm được đánh dấu là mua theo giá riêng của sku,

    thì giá mua sẽ lấy theo giá riêng của sku

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngskus (sku - giá - cân nặng)productPricePolicy
      merchant_01product_01sku01skusId_01<quantity><quantity>1114sku01 - 11 - 3[{"salePrice": 10, "minQuantity": 5}, {"salePrice": 8, "minQuantity": 20}]
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "<addressId>",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
          {
            "orderItems": [
              {
                  "quantity": <quantity>,
                  "price": 11
              }
            ],
            "addressId": "<addressId>",
            "depositOnDemand": 100
          }
        ]
      }

    Examples:

    addressId quantity
    ${TQ_01} 4
    ${VN_01} 1
  • Tags: @AUTOMATED, @TNK-11444

    Nếu đặt đơn nháp với số lượng sản phẩm nhỏ hơn số lượng tối thiểu theo chính sách giá và sản phẩm không đánh dấu là mua theo giá riêng của sku,

    thì giá mua sẽ lấy theo giá chung của sản phẩm

    • Given Có token của tài khoản "pamiuoi"
    • And Giỏ hàng của tài khoản "pamiuoi" đã có sản phẩm mua trọn gói thuộc marketplace "1688" có thông tin
      merchantIdproductIdskuIdskusIdquantityorder_quantitybatchSizegiácân nặngproductPricePolicyfixPriceAllSku
      merchant_01product_01sku01skusId_01<quantity><quantity>1124[{"salePrice": 10, "minQuantity": 5}, {"salePrice": 8, "minQuantity": 20}]true
    • When Request có header là
      X-Tenantm26
    • And Gửi request "POST" đến "/M26/draft-orders/with-last-mile" với body
      {
        "skus": ["${skusId_01}"],
        "addressId": "<addressId>",
        "depositRateCode": "${rate100}"
      }
    • Then Trả về status code 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "orderViews": [
          {
            "orderItems": [
              {
                  "quantity": <quantity>,
                  "price": 12
              }
            ],
            "addressId": "<addressId>",
            "depositOnDemand": 100
          }
        ]
      }

    Examples:

    addressId quantity
    ${TQ_01} 4
    ${VN_01} 1