A
A
algrandeth2021-12-20 12:08:40
API
algrandeth, 2021-12-20 12:08:40

Why doesn't the data on the server change when passing the date to unix?

You need to change the date in custom_fields_values ​​of transactions.
I pass the following JSON object:

{
    "id": 56487018,
    "custom_fields_values": [
      {
        "field_id": 1961358,
        "values": [
          {
            "value": 1639991140
          }
        ]
      }
    ]
  },


There are no errors, 400 does not return. But the data doesn't change either. What could be the problem?
I pass long.
value = DateTimeOffset.Now.ToUnixTimeSeconds()

Field:
61c04928c473c312417970.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
algrandeth, 2021-12-20
@algrandeth

It was necessary to reformulate the request.
It was like this:
Field 1: Trade 1,
Field 1: Trade 2,
Field 1: Trade 3,
etc.
Needed:
Trade 1:
Field 1,
Field 2,
Field 3

var CustomFieldsToChange_withData = lead["_embedded"]["leads"].Select(a => new Lead 
                        {
                            id = (int)a["id"],
                            custom_fields_values = new[] { new custom_fields_values { field_id = 1961338, values = new[] { new ValueUrl { value = Uri } } },
                                                           new custom_fields_values { field_id = 1961340, values = new[] { new Value { value = result.Where(a1 => a1.CabinetURL == url).Select(z => z.ObjectCount).First() } } },
                                                           new custom_fields_values { field_id = 1961342, values = new[] { new Value { value = result.Where(a2 => a2.CabinetURL == url).Select(z => z.UserCount).First() } } },
                                                           new custom_fields_values { field_id = 1961344, values = new[] { new Value { value = result.Where(a3 => a3.CabinetURL == url).Select(z => z.UserActiveCount).First() } } },
                                                           new custom_fields_values { field_id = 1961346, values = new[] { new Value { value = result.Where(a4 => a4.CabinetURL == url).Select(z => z.DeviceCount).First() } } },
                                                           new custom_fields_values { field_id = 1961348, values = new[] { new Value { value = result.Where(a5 => a5.CabinetURL == url).Select(z => z.DeviceActiveCount).First() } } },
                                                           new custom_fields_values { field_id = 1961350, values = new[] { new Value { value = result.Where(a6 => a6.CabinetURL == url).Select(z => z.RegulatorCount).First() } } },
                                                           new custom_fields_values { field_id = 1961352, values = new[] { new Value { value = result.Where(a7 => a7.CabinetURL == url).Select(z => z.RegulatorActiveCount).First() } } },
                                                           new custom_fields_values { field_id = 1961354, values = new[] { new Value { value = result.Where(a8 => a8.CabinetURL == url).Select(z => z.TVCount).First() } } },
                                                           new custom_fields_values { field_id = 1961356, values = new[] { new Value { value = result.Where(a9 => a9.CabinetURL == url).Select(z => z.TVActiveCount).First() } } },
                                                           new custom_fields_values { field_id = 1961358, values = new[] { new ValueDateTime { value = DateTimeOffset.Now.ToUnixTimeSeconds() } } },
                                                           new custom_fields_values { field_id = 1961360, values = new[] { new Value { value = result.Where(a10 => a10.CabinetURL == url).Select(z => z.UserCount).First() } } },
                                                           new custom_fields_values { field_id = 1961362, values = new[] { new Value { value = result.Where(a11 => a11.CabinetURL == url).Select(z => z.UserActiveCount).First() } } },
                                                           new custom_fields_values { field_id = 1961364, values = new[] { new Value { value = result.Where(a12 => a12.CabinetURL == url).Select(z => z.UserMobileCount).First() } } } 
                        }}).ToList();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question