Skip to main content
This is a staging build of the docs

2024-01-10: Deprecation of `data` object returned when creating or updating records

· 2 min read
David Harries

On January 10, 2024, we will deprecate the data field that is currently returned in the response when creating or updating entities. Pushed data will also no longer be stored, so a refresh of data will be required for Codat to reflect any new or updated records.

You can see a before and after examples of responses below:

1
{
1
{
2
  "changes": [
2
  "changes": [
3
    {
3
    {
4
      "type": "Unknown",
4
      "type": "Unknown",
5
      "recordRef": {
5
      "recordRef": {
6
        "id": "string",
6
        "id": "string",
7
        "dataType": "string"
7
        "dataType": "string"
8
      },
8
      },
9
      "attachmentId": "string"
9
      "attachmentId": "string"
10
    }
10
    }
11
  ],
11
  ],
12
-
  "data": { 
13
-
    // object created or updated 
14
-
    ...
15
-
  },
16
  "dataType": "string",
12
  "dataType": "string",
17
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
13
  "companyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
18
  "pushOperationKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
14
  "pushOperationKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
19
  "dataConnectionKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
15
  "dataConnectionKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
20
  "requestedOnUtc": "2023-06-26T07:48:36.066Z",
16
  "requestedOnUtc": "2023-06-26T07:48:36.066Z",
21
  "completedOnUtc": "2023-06-26T07:48:36.066Z",
17
  "completedOnUtc": "2023-06-26T07:48:36.066Z",
22
  "timeoutInMinutes": 0,
18
  "timeoutInMinutes": 0,
23
  "status": "string",
19
  "status": "string",
24
  "errorMessage": "string",
20
  "errorMessage": "string",
25
  "validation": {
21
  "validation": {
26
    "errors": [
22
    "errors": [
27
      {
23
      {
28
        "itemId": "string",
24
        "itemId": "string",
29
        "message": "string",
25
        "message": "string",
30
        "validatorName": "string"
26
        "validatorName": "string"
31
      }
27
      }
32
    ],
28
    ],
33
    "warnings": [
29
    "warnings": [
34
      {
30
      {
35
        "itemId": "string",
31
        "itemId": "string",
36
        "message": "string",
32
        "message": "string",
37
        "validatorName": "string"
33
        "validatorName": "string"
38
      }
34
      }
39
    ]
35
    ]
40
  },
36
  },
41
  "statusCode": 0
37
  "statusCode": 0
42
}
38
}

Action required​

If you currently make use of any properties in the data object of the push operation response, you will need to use the changes.recordRef object instead.

  1. Use changes.recordRef to retrieve the record datatype and id.
  2. Initiate a sync for the given data type or wait until the next scheduled sync.
  3. After the sync is complete, make a GET call to the relevant endpoint to retrieve the full record if needed.

Expected impact if no action is taken​

As of January 10, 2024, you will no longer be able to use the data object on the push operation responses.

You will not be able to use the returned id to pull data you have pushed until a subsequent sync is completed for the given data type.