Skip to main content
Solved

Override 'Contact' field in Groups


Forum|alt.badge.img+2
  • Varsity I
  • 283 replies

Hi,

I need to create Sales Order item with my values in Groups like Ship-to-Contact and Bill-to-Contact fields like ‘Email’, ‘Phone1’ via REST request

I tried many requests like this
 

Please, suggest how to configure Acumatica or request for having an ability to create Sales Order with group fields values that I mentioned above

https://sytech.acumatica.com/entity/AlphaEndpoint/20.200.001/salesorder?$filter=OrderNbr eq 'SO005133'

{

  "Currency": {

    "value": "USD"

  },

  "Details": [

    {

      "InventoryID": {

        "value": "03242505"

      },

      "rowNumber": {

        "value": "1"

      }

    }

  ],

  "CustomerID": {

    "value": "ABCHOLDING"

  },

  "ShipToOverride": {

    "value": true

  },

  "ShipToContact": {

    "Email": {

      "value": "8@abcholdings.com"

    },

    "Phone1": {

      "value": "444455556666"

    }

  },

  "ShipToAddress": {

    "OverrideAddress": {

      "value": true

    },

    "AddressLine1": {

      "value": "65 Broadway"

    },

    "City": {

      "value": "New York"

    },

    "Country": {

      "value": "US"

    },

    "State": {

      "value": "NY"

    },

    "PostalCode": {

      "value": "10006"

    }

  },

  "WarehouseID": {

    "value": "MAIN"

  },

  "OrderType": {

    "value": "SO"

  }

}

 

Best answer by jinin

Hi ​@Ivan 

Please refer to the JSON request.

{
    "note": {
        "value": ""
    },
    "OrderType": {
        "value": "SO"
    },
    "CustomerID": {
        "value": "9636"
    },
    "Hold": {
        "value": true
    },
    "ExternalRef": {
        "value": "8768757"
    },
    "LocationID": {
        "value": "MAIN"
    },
    "Branch": {
        "value": "Wholesale"
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "CashAccount": {
        "value": "100200"
    },
    "CustomerOrder": {
        "value": "876764"
    },
    "Date": {
        "value": "2025-02-03"
    },
    "Description": {
        "value": "Test Order"
    },
    "BillToAddressOverride": {
        "value": true
    },
    "BillToAddress": {
        "AddressLine1": {
            "value": "Park Strret"
        },
        "AddressLine2": {
            "value": ""
        },
        "City": {
            "value": "chicago"
        },
        "State": {
            "value": "IL"
        },
        "PostalCode": {
            "value": "60606"
        },
        "Country": {
            "value": "US"
        }
    },
    "BillToContactOverride": {
        "value": true
    },
    "BillToContact": {
        "Attention": {
            "value": null
        },
        "BusinessName": {
            "value": "KG Admin"
        },
        "Email": {
            "value": "company001@mailinator.com"
        },
        "Phone1": {
            "value": "1234567890"
        }
    },
    "Details": [
        {
            "note": "",
            "InventoryID": {
                "value": "1507"
            },
            "OrderQty": {
                "value": "1.0000"
            },
            "MasterQty": {
                "value": "1.0000"
            },
            "ManualPrice": {
                "value": true
            },
            "UnitPrice": {
                "value": 400
            },
            "ManualDIscount": {
                "value": true
            },
            "DiscountAmount": {
                "value": 0
            },
            "TaxCategory": {
                "value": "Default"
            }
        }
    ],
    "RequestedOn": {
        "value": "2025-02-03T00:00:00+00:00"
    },
   "ShipToAddressOverride": {
        "value": true
    },
    "ShipToAddress": {
        "AddressLine1": {
            "value": "9223 W. HILLS GATE DRI"
        },
        "AddressLine2": {
            "value": ""
        },
        "City": {
            "value": "Star"
        },
        "State": {
            "value": "ID"
        },
        "PostalCode": {
            "value": "83669"
        },
        "Country": {
            "value": "US"
        }
    },
    "ShipToContactOverride": {
        "value": true
    },
    "ShipToContact": {
        "Attention": {
            "value": null
        },
        "BusinessName": {
            "value": "steven Mark"
        },
        "Email": {
            "value": "xxxx@gmail.com"
        },
        "Phone1": {
            "value": "8000217258"
        }
    },

    "ShipVia": {
        "value": "Local"
    },
    "Payments": [
        {
            "ApplicationDate": {
                "value": "2025-02-03"
            },
            "AppliedToOrder": {
                "value": "400.0000"
            },
            "CashAccount": {
                "value": "100200"
            },
            "PaymentAmount": {
                "value": "400.0000"
            },
            "PaymentMethod": {
                "value": "CHECK"
            },
            "PaymentRef": {
                "value": "000000776-12"
            },
            "DocType": {
                "value": "PMT"
            }
        }
    ]
}

 

View original
Did this topic help you find an answer to your question?

4 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 693 replies
  • Answer
  • March 13, 2025

Hi ​@Ivan 

Please refer to the JSON request.

{
    "note": {
        "value": ""
    },
    "OrderType": {
        "value": "SO"
    },
    "CustomerID": {
        "value": "9636"
    },
    "Hold": {
        "value": true
    },
    "ExternalRef": {
        "value": "8768757"
    },
    "LocationID": {
        "value": "MAIN"
    },
    "Branch": {
        "value": "Wholesale"
    },
    "PaymentMethod": {
        "value": "CHECK"
    },
    "CashAccount": {
        "value": "100200"
    },
    "CustomerOrder": {
        "value": "876764"
    },
    "Date": {
        "value": "2025-02-03"
    },
    "Description": {
        "value": "Test Order"
    },
    "BillToAddressOverride": {
        "value": true
    },
    "BillToAddress": {
        "AddressLine1": {
            "value": "Park Strret"
        },
        "AddressLine2": {
            "value": ""
        },
        "City": {
            "value": "chicago"
        },
        "State": {
            "value": "IL"
        },
        "PostalCode": {
            "value": "60606"
        },
        "Country": {
            "value": "US"
        }
    },
    "BillToContactOverride": {
        "value": true
    },
    "BillToContact": {
        "Attention": {
            "value": null
        },
        "BusinessName": {
            "value": "KG Admin"
        },
        "Email": {
            "value": "company001@mailinator.com"
        },
        "Phone1": {
            "value": "1234567890"
        }
    },
    "Details": [
        {
            "note": "",
            "InventoryID": {
                "value": "1507"
            },
            "OrderQty": {
                "value": "1.0000"
            },
            "MasterQty": {
                "value": "1.0000"
            },
            "ManualPrice": {
                "value": true
            },
            "UnitPrice": {
                "value": 400
            },
            "ManualDIscount": {
                "value": true
            },
            "DiscountAmount": {
                "value": 0
            },
            "TaxCategory": {
                "value": "Default"
            }
        }
    ],
    "RequestedOn": {
        "value": "2025-02-03T00:00:00+00:00"
    },
   "ShipToAddressOverride": {
        "value": true
    },
    "ShipToAddress": {
        "AddressLine1": {
            "value": "9223 W. HILLS GATE DRI"
        },
        "AddressLine2": {
            "value": ""
        },
        "City": {
            "value": "Star"
        },
        "State": {
            "value": "ID"
        },
        "PostalCode": {
            "value": "83669"
        },
        "Country": {
            "value": "US"
        }
    },
    "ShipToContactOverride": {
        "value": true
    },
    "ShipToContact": {
        "Attention": {
            "value": null
        },
        "BusinessName": {
            "value": "steven Mark"
        },
        "Email": {
            "value": "xxxx@gmail.com"
        },
        "Phone1": {
            "value": "8000217258"
        }
    },

    "ShipVia": {
        "value": "Local"
    },
    "Payments": [
        {
            "ApplicationDate": {
                "value": "2025-02-03"
            },
            "AppliedToOrder": {
                "value": "400.0000"
            },
            "CashAccount": {
                "value": "100200"
            },
            "PaymentAmount": {
                "value": "400.0000"
            },
            "PaymentMethod": {
                "value": "CHECK"
            },
            "PaymentRef": {
                "value": "000000776-12"
            },
            "DocType": {
                "value": "PMT"
            }
        }
    ]
}

 


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 13, 2025

Hi ​@jinin 

I receive 422 Unprocessable entity

Can you send request with minimum set of required fields ?


Forum|alt.badge.img+2
  • Author
  • Varsity I
  • 283 replies
  • March 13, 2025

It worked thank you


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • 693 replies
  • March 13, 2025

@Ivan 

Only the required fields and a few additional fields have been included. Please ensure that the customer name and InventoryID details are accurate.

{
    "OrderType": {
        "value": "SO"
    },
    "CustomerID": {
        "value": "9636"
    },
    "CustomerOrder": {
        "value": "876764"
    },
    "BillToAddressOverride": {
        "value": true
    },
    "BillToAddress": {
        "AddressLine1": {
            "value": "Park Strret"
        },
        "City": {
            "value": "chicago"
        },
        "State": {
            "value": "IL"
        },
        "PostalCode": {
            "value": "60606"
        }
    },
    "BillToContactOverride": {
        "value": true
    },
    "BillToContact": {
        "Email": {
            "value": "company001@mailinator.com"
        },
        "Phone1": {
            "value": "1234567890"
        }
    },
    "Details": [
        {
            "InventoryID": {
                "value": "1507"
            },
            "OrderQty": {
                "value": "1.0000"
            },
            "ManualPrice": {
                "value": true
            },
            "UnitPrice": {
                "value": 400
            }
        }
    ],
    "RequestedOn": {
        "value": "2025-02-03T00:00:00+00:00"
    },
    "ShipToAddressOverride": {
        "value": true
    },
    "ShipToAddress": {
        "AddressLine1": {
            "value": "9223 W. HILLS GATE DRI"
        },
        "City": {
            "value": "Star"
        },
        "State": {
            "value": "ID"
        },
        "PostalCode": {
            "value": "83669"
        }
    },
    "ShipToContactOverride": {
        "value": true
    },
    "ShipToContact": {
        "Email": {
            "value": "xxxx@gmail.com"
        },
        "Phone1": {
            "value": "8000217258"
        }
    }
}

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings