Salesly API
API Reference

Get an opportunity

GET
/opportunities/{id}

Authorization

x-api-key<token>

Your tenant API key

In: header

Path Parameters

id
Required
integer
curl -X GET "https://rest.salesly.app/api/v1/developers/opportunities/0" \
  -H "x-api-key: <token>"

Opportunity details

{
  "data": {
    "id": 0,
    "name": "string",
    "enterprise_id": 0,
    "user_id": 0,
    "campaign_id": 0,
    "expected_sale_date": "2019-08-24T14:15:22Z",
    "close_date": "2019-08-24T14:15:22Z",
    "extra_fields": {},
    "states": [
      {
        "id": 0,
        "state": 0,
        "amount": 0.1,
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "products": [
      {
        "id": 0,
        "reference": "string",
        "name": "string",
        "pivot": {
          "cost": 0,
          "price": 0,
          "discount": 0,
          "quantity": 0,
          "comment": "string"
        }
      }
    ],
    "comments": [
      {
        "id": 0,
        "comment": "string",
        "user_id": 0,
        "created_at": "2019-08-24T14:15:22Z"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}