UpdateActivity

Function to update the activity

PUT https://rest.crmango.com/api/UpdateActivity

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

26 Sent in the request body
activity_id integer

Activity id
Reference: GetAllActivities

owner integer

Company owner
Reference: GetAllUsers

is_company boolean

Company or individual

title varchar

Company name

company_id_number integer

Company id number

vat_number varchar

Company vat number

vat varchar

Company vat

firstname varchar

Firstname

lastname varchar

Lastname

birth_number varchar

Birth number

address varchar

Address

city varchar

City

postcode integer

Postcode

district varchar

District

region varchar

Region

state integer

State id
Reference: GetAllStates

latitude float

Latitude

longitude float

Longitude

disabled boolean

Is company disabled?

user integer

User id
Reference: GetAllUsers

next_activity timestamp

Date of next activity

status_id integer

Status id

typk_id integer

Contact type id

aktivnep_id varchar

Active items id

own_cols[id_own_col] integer

Own col input id
Reference: GetContactOwnCols

own_cols[data] varchar

Input data

Response

2 HTTP 200

Function to update the activity

code integer

Return code

message varchar

Info message

Example request

curl --request PUT \
  --url 'https://rest.crmango.com/api/UpdateActivity' \
  --header 'Authorization: Bearer auth_token' \
  --header 'Content-Type: application/json' \
  --data '{
    "activity_id": 9119,
    "data": {
      "note": "This is my note",
      "timefrom": 1658822864,
      "timeto": 1658821864,
      "userid": 7,
      "company_id": 3468,
      "orderid": 0,
      "person_id": 0,
      "to_report": 1,
      "my_company": 0,
      "order_code": "",
      "software_id": 0,
      "source_direction": "",
      "company_name": "CRmango",
      "unassigned": "",
      "next_activity": 1688822306,
      "own_cols": [
        {
          "id_input": 3,
          "data_type": "text",
          "data": "This is example text"
        },
        {
          "id_input": 4,
          "data_type": "textarea",
          "data": "Long text example"
        },
        {
          "id_input": 5,
          "data_type": "number",
          "data": "32323"
        },
        {
          "id_input": 6,
          "data_type": "date",
          "data": "1658822421"
        },
        {
          "id_input": 7,
          "data_type": "time",
          "data": "08:24:00"
        },
        {
          "id_input": 8,
          "data_type": "datetime-local",
          "data": "2022-07-01 23:59:23"
        },
        {
          "id_input": 9,
          "data_type": "listbox",
          "data": "Second"
        },
        {
          "id_input": 10,
          "data_type": "multiselect",
          "data": "First;Third;Fifth"
        },
        {
          "id_input": 11,
          "data_type": "checkbox",
          "data": "1"
        },
        {
          "id_input": 12,
          "data_type": "color",
          "data": "#4287f5"
        }
      ]
    }
  }'
{
    "code": 200,
    "message": "Activity has been updated"
}