Salesly API
API Reference

Update an order

PUT
/orders/{reference}

Authorization

x-api-key<token>

Your tenant API key

In: header

Request Body

application/jsonRequired
date_limitstring
Format: "date"
stateinteger
opportunity_idinteger
commentsstring
extra_fieldsobject
productsarray<object>

Path Parameters

reference
Required
string
curl -X PUT "https://rest.salesly.app/api/v1/developers/orders/string" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "date_limit": "2019-08-24",
    "state": 0,
    "opportunity_id": 0,
    "comments": "string",
    "extra_fields": {},
    "products": [
      {
        "reference": "string",
        "rate_sku": "string",
        "cost": 0,
        "price": 0,
        "discount": 100,
        "quantity": 0,
        "comment": "string",
        "description": "string"
      }
    ]
  }'

Order updated

{
  "data": {
    "id": 0,
    "reference": "string",
    "enterprise_id": 0,
    "user_id": 0,
    "opportunity_id": 0,
    "date_limit": "2019-08-24",
    "comments": "string",
    "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"
        }
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}