API add Opportunity

 I am testing to be able to send Opportunities via API from our ERP system Quotes application.

My tests to use the API have been successful to GET and PUT.
I processed a GET to test updating so I had the JSON for an opportunity and a contact.
I modified a value in each and tested a PUT and the opportunity and contact in Insightly updated.
Now I did the same for adding starting with an opportunity.
The documentation indicates the description is required.
The OPPORTUNITY_ID indicates unique integer which would suggest to me that I either provide it or it might be auto generated...
I tried putting in a unique integer and tried a few alternate ones and I get the message that opportunity 169599917 does not exists.

I am certain that I am sending as a POST and tried the same in Postman and get the same error.

Why does this  not post and I must let my client know how slow these sites run before they make a large financial commitment.

{
    "OPPORTUNITY_ID": 24016581,
    "OPPORTUNITY_NAME":"Big Fancy 487 - Paula Oliver",
    "OPPORTUNITY_DETAILS":null,
    "PROBABILITY":35,
    "BID_CURRENCY":"USD",
    "BID_AMOUNT":7000,
    "BID_TYPE":"Fixed Bid",
    "BID_DURATION":null,
    "FORECAST_CLOSE_DATE":"2017-10-06 00:00:00",
    "ACTUAL_CLOSE_DATE":null,
    "CATEGORY_ID":null,
    "PIPELINE_ID":null,
    "STAGE_ID":null,
    "OPPORTUNITY_STATE":"Open",
    "IMAGE_URL":"",
    "RESPONSIBLE_USER_ID":1479764,
    "OWNER_USER_ID":1479764,
    "DATE_CREATED_UTC":"2017-11-04 19:23:56",
    "DATE_UPDATED_UTC":"2017-11-04 21:51:51",
    "VISIBLE_TO":"EVERYONE",
    "VISIBLE_TEAM_ID":null,
    "VISIBLE_USER_IDS":null
}

0

Comments

2 comments
  • Hey Glen,

    What version of the API are you running?

    I tried your request using a Postman POST on v2.2 and everything came back fine.

    You can supply a 0, or any number really, when doing a POST request for the ID. We auto generate it and replace it. The response you get from the API will have the proper ID that you can use for GET calls in the future.

    Let me know if you are still having problems.

    Best,

    Michael

    0
    Comment actions Permalink
  • I am using Curl to send. I was in discussion with Angas and he spotted that my content-type was malformed.... it read /jason.... silly typing did it.

    So now it works for the GET, PUT and POST using curl as I will be integrating with Global Shop Solutions - One ERP system.

    0
    Comment actions Permalink

Please sign in to leave a comment.