0
   {
 "entity":{
  "base_currency_code":"AUD",
  "base_discount_amount":0,
  "base_grand_total":296.95,
  "base_shipping_amount":0.0,
  "base_shipping_incl_tax":5,
  "base_shipping_tax_amount":0,
  "base_shipping_discount_amount":0,
  "base_subtotal":33,
  "base_subtotal_incl_tax":33,
  "base_total_due":0,
  "base_total_paid":296.95,
  "base_to_global_rate":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_email":"[email protected]",
  "customer_firstname":"Working",
  "customer_group_id":1,
  "customer_id":4,
  "customer_lastname":"User",
  "customer_note_notify":1,
  "discount_amount":0,
  "email_sent":1,
  "global_currency_code":"AUD",
  "grand_total":296.95,
  "order_currency_code":"AUD",
  "shipping_amount":0.0,
  "shipping_tax_amount":0,
  "shipping_description":"For this item only:",
  "shipping_discount_amount":0,
  "shipping_incl_tax":5,
  "state":"pending",
  "status":"processing",
  "store_currency_code":"AUD",
  "store_to_base_rate":0,
  "store_to_order_rate":0,
  "store_id":1,
  "subtotal":33,
  "subtotal_incl_tax":33,
  "total_due":0,
  "total_paid":296.95,
  "total_item_count":1,
  "total_qty_ordered":1,
  "tax_amount":27.0,
  "weight":1,
  "items":[
     {
        "base_original_price":99.95,
        "base_price":99.95,
        "base_price_incl_tax":109.95,
        "base_row_total":99.95,
        "name":"S00002 - [ IP1WW16ESIUPR2GRA] NEC Aspire IP1WW-16ESIU-PR2 16 Port Digital Station Card 0891014",
        "original_price":99.95,
        "price":99.95,
        "price_incl_tax":109.95,
        "product_id":11,
        "product_type":"simple",
        "qty_ordered":1.0,
        "row_total":109.95,
        "row_total_incl_tax":109.95,
        "sku":"002",
        "store_id":1,
        "weight":1
     },
     {
        "base_original_price":170.0,
        "base_price":170.0,
        "base_price_incl_tax":187.0,
        "base_row_total":170.0,
        "name":"S00002 - [ IP2WWEXIFUA1GRA] NEC IP2WW-EXIFU-A1 Programming Interface Card ",
        "original_price":170.0,
        "price":170.0,
        "price_incl_tax":187.0,
        "product_id":11,
        "product_type":"simple",
        "qty_ordered":1.0,
        "row_total":187.0,
        "row_total_incl_tax":187.0,
        "sku":"002",
        "store_id":1,
        "weight":1
     },
     {
        "base_original_price":0.0,
        "base_price":0.0,
        "base_price_incl_tax":0.0,
        "base_row_total":0.0,
        "name":"S00002 - Free delivery charges",
        "original_price":0.0,
        "price":0.0,
        "price_incl_tax":0.0,
        "product_id":11,
        "product_type":"simple",
        "qty_ordered":1.0,
        "row_total":0.0,
        "row_total_incl_tax":0.0,
        "sku":"002",
        "store_id":1,
        "weight":1
     }
  ],
  "billing_address":{
     "address_type":"billing",
     "city":"Karachi",
     "company":false,
     "country_id":"PK",
     "customer_address_id":4,
     "email":"[email protected]",
     "firstname":"Working",
     "lastname":"User",
     "postcode":"74600",
     "region":"SIN3",
     "street":[
        "abc"
     ],
     "telephone":"333333"
  },
  "payment":{
     "amount_ordered":38,
     "amount_paid":38,
     "base_amount_ordered":38,
     "base_amount_paid":38,
     "base_shipping_amount":0.0,
     "method":"banktransfer",
     "shipping_amount":0.0
  },
  "status_histories":[
     {
        "comment":"new order",
        "status":"processing"
     }
  ],
  "extension_attributes":{
     "shipping_assignments":[
        {
           "shipping":{
              "address":{
                 "address_type":"shipping",
                 "city":"Karachi",
                 "company":false,
                 "country_id":"PK",
                 "customer_address_id":4,
                 "email":"[email protected]",
                 "firstname":"Working",
                 "lastname":"User",
                 "postcode":"74600",
                 "region":"SIN3",
                 "street":[
                    "Sample Street Address"
                 ],
                 "telephone":"332543403"
              },
              "method":"freeshipping_freeshipping",
              "total":{
                 "base_shipping_amount":0.0,
                 "base_shipping_incl_tax":0.0,
                 "shipping_amount":0.0,
                 "shipping_incl_tax":0.0
              },
              "extension_attributes":[
              ]
           },
           "items":[
           ],
           "extension_attributes":[
           ]
        }
     ],
     "applied_taxes":[
     ],
     "item_applied_taxes":[
     ],
     "converting_from_quote":false
  }

i am hitting this end point with above parameter /V1/orders/

{ "message": "The row couldn't be updated because a foreign key constraint failed. Verify the constraint and try again." }

1 Answer 1

0

check your order payload may be customer id issue or try developer mode then you can see error in details

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.