I am trying to create an `estimate` record through...
# ask-stanley-ai
l
I am trying to create an
estimate
record through the rest api. My example payload looks like this:
Copy code
{
  "entity": {
    "id": "6206743"
  },
  "item": {
    "items": [
      {
        "line": 1,
        "item": {
          "id": "348383"
        },
        "quantity": 10
      },
      {
        "line": 2,
        "item": {
          "id": "351979"
        },
        "quantity": 5
      }
    ]
  },
  "memo": "Quotevalidfor30days",
  "expirationDate": "2026-02-15",
  "custbody_sale_channel": 1,
  "shipMethod": 233250,
  "shippingAddress": {
    "addressee": "John Smith",
    "addr1": "123 Main St",
    "addr2": "Suite 100",
    "city": "Springfield",
    "state": "MO",
    "zip": "65801",
    "country": "US",
    "addrPhone": "<tel:314-999-9999|314-999-9999>"
  },
  "shipAddressList": null
}
If I remove the "shippingAddress" it creates without issue. However, with it included I get the error "Error while accessing a resource. Please enter value(s) for: Addressee, Phone, Address 1, City.". What is the proper address format for the rest API?
c
AI generated answer (using internal Slack threads):
Based on the conversations, it seems like the issue with the
estimate
record creation through the REST API is related to the format of the
addrPhone
field in the
shippingAddress
object. The field name should be
addrPhone
and not
addrphone
. Here is the corrected payload:
Copy code
json
{
  "entity": {
    "id": "6206743"
  },
  "item": {
    "items": [
      {
        "line": 1,
        "item": {
          "id": "348383"
        },
        "quantity": 10
      },
      {
        "line": 2,
        "item": {
          "id": "351979"
        },
        "quantity": 5
      }
    ]
  },
  "memo": "Quotevalidfor30days",
  "expirationDate": "2026-02-15",
  "custbody_sale_channel": 1,
  "shipMethod": 233250,
  "shippingAddress": {
    "addressee": "John Smith",
    "addr1": "123 Main St",
    "addr2": "Suite 100",
    "city": "Springfield",
    "state": "MO",
    "zip": "65801",
    "country": "US",
    "addrPhone": "<tel:314-999-9999|314-999-9999>"
  },
  "shipAddressList": null
}
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.891845763
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.878723264
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.848571777
Please provide your feedback on this answer.
Thank you for your feedback