2017-02-13 7 views
1

magento 2 나머지 api를 사용하여 주문을 작성하려고합니다. 배송 주소가 주문 세부 정보를 추가하지 않습니다. 배송지 주소가 불완전한 형식이므로 주문이 완료되지 않았습니다.Magento 2 배송 주소를 추가하지 않는 주문을 만들려면 나머지 API

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

Method : PUT 

이것은 JSON 요청이다

{ "엔티티"{ "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_discount_amount": 0, "base_subtotal": 33, "base_subtotal_incl_tax": 33 " 1, "base_to_order_rate": 1, "discount_tax_compensation_amount": 0, "base_discount_tax_compensation_amount": 0, "shipping_discount_tax_compensation_amount": 0, "customer_is_guest": 0, "customer_dob": "1 월 18,"base_to_global_rate " 012, "고객 ID": 1, "고객 _ 그룹 ID": 1, "고객 _ 이름": 4, "customer_lastname": "CP", "customer_firstname": "sharvesh", "customer_gender": "customer_email": 고객 번호 : 1987 " "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": "Flat Rate - 고정", "shipping_discount_amount": 0, "shipping_incl_tax": 5, "상태": "보류 중", "상태" 1, "소계": 33, "subtotal_incl_tax": 33, "total_due": 38, "to"store_currency_code " 1, "tax_amount": 0, "weight": 1, "items": [{ "base_original_price": 33, "base_price": 33, "base_price_incl_tax": 33, "base_row_total": 1, "total_qty_ordount" : 33, "base_row_total_incl_tax": 33, "name": "Endeavor Daytrip 배낭", "original_price": 33, "price": 33, "price_incl_tax": 33, "product_id": 11, "product_type" 1, "row_total": 33, "row_total_incl_tax": 33, "sku": "24-WB06", "store_id": 1, "weight": 1}], "billing_address": { "address_type": "결제", "도시": "Chennai", "회사": "Netmeds", "country_id": "IN", "customer_address_id": 4, "email": "[email protected].com" "firstname": "Sharvesh", "성": "C", "우편 번호": "600117", "지역": "Tamilnadu", "거리": [ "6A, 4th street, Keelkattalai] ","payment_ ": 38,"base_amount_ordered ": 38,"base_shipping_amount ": 5,"method ":"checkmo ","shipping_amount ": 5},"status_histories ": ["9840626148 " ], "extension_attributes": { "shipping_assignments": [{ " ""도시 ":"Chennai ","회사 ":"Netmeds ","country_id ":"IN ","customer_address_id ": 4,"email " : "[email protected]", "firstname": "Sharvesh", "lastname": "C", "postcode": "600117", "region": "Tamilnadu", "street": [ "6A, 5, "shipping_amount": 5, "shipping_incl_tax": "flat_flatrate", "total": "" : 5, "extension_attributes": []}, "items": [{ "base_original_price": 33, "base_price": 33, "base_price_incl_tax": 33, "base_row_total": 33, "name": "Endeavor Daytrip 012, "product_id": 11, "product_type": "simple", "qty_ordered": 1, "row_total": 33, "row_total_incl_tax" ","sku ":"24-WB06 ","store_id ": 1,"weight ": 1}],"extension_attributes ": []}],"applied_taxes ": [],"item_applied_taxes ": [] , "converting_from_quote": true}}}

아무 것도 없거나 아무것도 추가해야하는지 알려주십시오.

답변

0

모델 방식 (http://devdocs.magento.com/swagger/) 당신은 몇 가지 매개 변수를 그리워 할 따라,이로 시작하려고합니다 :

"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": {} 
    },