Api Magento 2 Rest для создания заказа без добавления адреса доставки

Я пытаюсь создать заказ, используя magento 2 rest api, но адрес доставки не добавляется к деталям заказа. Из-за отсутствия адреса доставки заказ находится в неполном формате

http://127.0.0.1/netmeds_mage/rest/V1/orders/create

Method : PUT

Это запрос json:

Скажите, не хватает ли чего-нибудь или мне нужно что-то добавить.

согласно модельной схеме (http://devdocs.magento.com/swagger/) вы пропустите некоторые параметры, я бы попробовал начать с этого:


person chandru_cp    schedule 13.02.2017    source источник


Ответы (1)


{"entity": {"base_currency_code": "INR", "base_discount_amount": 0, "base_grand_total": 38, "base_shipping_amount": 5, "base_shipping_incl_tax": 5, "base_shipping_tax_amount": 0, "base_shipping_dount_dount" «base_subtotal»: 33, «base_subtotal_incl_tax»: 33, «base_total_due»: 38, «base_to_global_rate»: 1, «base_to_order_rate»: 1, «Discount_tax_compensation_amount»: 0, «base_discount_compensation_amount»: 0, «base_discount_tax_dax_discount_tax_compensation», «customer_discount_tax_discount_tax_discount_support» «: 0,« customer_dob »:« 18 января 1987 г. »,« customer_email »:« [email protected] »,« customer_firstname »:« Sharvesh »,« customer_gender »: 1,« customer_group_id »: 1,« customer_id » : 4, «customer_lastname»: «CP», «customer_note_notify»: 1, «Discount_amount»: 0, «email_sent»: 1, «global_currency_code»: «INR», «grand_total»: 38, «order_currency_code»: «INR» , «remote_ip»: «127.0.0.1», «shipping_amount»: 5, «shipping_tax_amount»: 0, «shipping_description»: «Фиксированная ставка», «shipping_discount_amount»: 0, «shipping_incl_tax»: 5, «state»: "ожидающий", "статус": "ожидающий", "store_currency" _code ":" INR "," store_to_base_rate ": 0," store_to_order_rate ": 0," store_id ": 1," subtotal ": 33," subtotal_incl_tax ": 33," total_due ": 38," total_item_count ": 1," total_qty_ordered ": 1," tax_amount ": 0," weight ": 1," items ": [{" base_original_price ": 33,« base_price »: 33,« base_price_incl_tax »: 33,« base_row_total »: 33,« base_row_total_incl_tax ») : 33, «name»: «Рюкзак Endeavour Daytrip», «original_price»: 33, «price»: 33, «price_incl_tax»: 33, «product_id»: 11, «product_type»: «simple», «qty_ordered»: 1 , "row_total": 33, "row_total_incl_tax": 33, "sku": "24-WB06", "store_id": 1, "weight": 1}], "billing_address": {"address_type": "billing", "город": "Ченнаи", "компания": "Netmeds", "country_id": "IN", "customer_address_id": 4, "email": "[email protected]", "firstname": "Sharvesh", «фамилия»: «C», «почтовый индекс»: «600117», «регион»: «Тамилнад», «улица»: [«6A, 4-я улица, Килкатталай»], «телефон»: «9840626148»}, «оплата ": {" amount_ordered ": 38," base_amount_ordered ": 38," base_shipping_amount ": 5," method ":" checkmo "," shipping_amount ": 5}," status_histories ": []," extension_a " ttributes ": {" shipping_assignments ": [{" shipping ": {" address ": {" address_type ":" shipping "," city »:" Chennai "," company ":" Netmeds "," country_id ":" IN "," customer_address_id ": 4," email ":" [email protected] "," firstname ":" Sharvesh "," lastname ":" C "," postcode ":" 600117 "," region ":" Тамилнаду "," street ": [" 6A, 4th street, Keelkattalai "]," phone ":" 9840626148 "}," method ":" flatrate_flatrate "," total ": {" base_shipping_amount ": 5," base_shipping_incl_tax ": 5 , «shipping_amount»: 5, «shipping_incl_tax»: 5}, «extension_attributes»: []}, «items»: [{«base_original_price»: 33, «base_price»: 33, «base_price_incl_tax»: 33, «base_row_total»: 33, «name»: «Рюкзак Endeavour Daytrip», «original_price»: 33, «price»: 33, «price_incl_tax»: 33, «product_id»: 11, «product_type»: «simple», «qty_ordered»: 1, «row_total»: 33, «row_total_incl_tax»: 33, «sku»: «24-WB06», «store_id»: 1, «weight»: 1}], «extension_attributes»: []}], «apply_taxes»: [ ], "item_applied_taxes": [], "converting_from_quote": true}}}

"shipping": {
  "address": {
    "address_type": "string",
    "city": "string",
    "company": "string",
    "country_id": "string",
    "customer_address_id": 0,
    "customer_id": 0,
    "email": "string",
    "entity_id": 0,
    "fax": "string",
    "firstname": "string",
    "lastname": "string",
    "middlename": "string",
    "parent_id": 0,
    "postcode": "string",
    "prefix": "string",
    "region": "string",
    "region_code": "string",
    "region_id": 0,
    "street": [
      "string"
    ],
    "suffix": "string",
    "telephone": "string",
    "vat_id": "string",
    "vat_is_valid": 0,
    "vat_request_date": "string",
    "vat_request_id": "string",
    "vat_request_success": 0,
    "extension_attributes": {}
  },
person Tim Zwinkels    schedule 20.02.2017