0

我无法通过 http://localhost:8181/cxs/profiles端点更新 Apache Unomi 中的同意状态。

但是,我可以在创建或更新配置文件时创建新的同意。

创建配置文件的请求负载如下:

curl -X POST \
  http://localhost:8181/cxs/profiles \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Basic a2FyYWY6a2FyYWY=' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 497' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: e61854e4f21d7dd7f978ad1a3b9ad7b8=a798094d250c6887bf5d0acdf641809a; context-profile-id=7ba87dc1-b39c-481c-8c9a-5238881992ce' \
  -H 'Host: localhost:8181' \
  -H 'Postman-Token: e3fc0ce5-2e88-480f-8310-7cf309563adb,a4c96158-804d-4b32-bd4e-2ed905b5cd5e' \
  -H 'User-Agent: PostmanRuntime/7.20.1' \
  -H 'cache-control: no-cache' \
  -d '{  
   "itemId":"2411426b-fdb5-428d-8f3f-753267bb2c62",
   "itemType":"profile",
   "consents":{  
     "postal/newsletter": {
            "scope": "postal",
            "typeIdentifier": "newsletter",
            "status": "GRANTED",
            "statusDate": "2019-07-28T04:46:38Z",
            "revokeDate": "2023-07-28T04:46:38Z"
        }
   },
   "properties":{  
      "country":"QA",
      "firstname":"Basheer",
      "leadAssignedTo":"XXXXXX",
      "gender":"M",
      "status":1
   }
}'

这将返回如下响应:

{
    "itemId": "2411426b-fdb5-428d-8f3f-753267bb2c62",
    "itemType": "profile",
    "version": null,
    "properties": {
        "country": "QA",
        "firstname": "Basheer",
        "leadAssignedTo": "XXXXXX",
        "gender": "M",
        "status": 1
    },
    "systemProperties": {},
    "segments": [
        "leads"
    ],
    "scores": {},
    "mergedWith": null,
    "consents": {
        "postal/newsletter": {
            "scope": "postal",
            "typeIdentifier": "newsletter",
            "status": "GRANTED",
            "statusDate": "2019-07-28T04:46:38Z",
            "revokeDate": "2023-07-28T04:46:38Z"
        }
    }
}

但是,如果我尝试使用相同的端点更新配置文件并同意:

curl -X POST \
  http://localhost:8181/cxs/profiles \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Basic a2FyYWY6a2FyYWY=' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 502' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: e61854e4f21d7dd7f978ad1a3b9ad7b8=a798094d250c6887bf5d0acdf641809a; context-profile-id=7ba87dc1-b39c-481c-8c9a-5238881992ce' \
  -H 'Host: localhost:8181' \
  -H 'Postman-Token: 72d712cf-1a53-44a9-aa77-139fb7418509,7054cbf2-e1cb-4bde-9f04-314beb0f4a9f' \
  -H 'User-Agent: PostmanRuntime/7.20.1' \
  -H 'cache-control: no-cache' \
  -d '{  
   "itemId":"2411426b-fdb5-428d-8f3f-753267bb2c62",
   "itemType":"profile",
   "consents":{  
     "postal/newsletter": {
            "scope": "postal",
            "typeIdentifier": "newsletter",
            "status": "REVOKED",
            "statusDate": "2019-07-28T04:46:38Z",
            "revokeDate": "2019-10-28T04:46:38Z"
        }
   },
   "properties":{  
      "country":"QA",
      "firstname":"Basheer12345",
      "leadAssignedTo":"XXXXXX",
      "gender":"M",
      "status":1
   }
}'

响应如下:

{
    "itemId": "2411426b-fdb5-428d-8f3f-753267bb2c62",
    "itemType": "profile",
    "version": 2,
    "properties": {
        "country": "QA",
        "firstname": "Basheer12345",
        "leadAssignedTo": "XXXXXX",
        "gender": "M",
        "status": 1
    },
    "systemProperties": {},
    "segments": [
        "leads"
    ],
    "scores": {},
    "mergedWith": null,
    "consents": {
        "postal/newsletter": {
            "scope": "postal",
            "typeIdentifier": "newsletter",
            "status": "GRANTED",
            "statusDate": "2019-07-28T04:46:38Z",
            "revokeDate": "2019-10-28T04:46:38Z"
        }
    }
}

这里firstname , revokeDate已经更新,但状态没有更新。我究竟做错了什么?

为什么状态没有更新?

4

1 回答 1

0

这是一个 UNOMI 错误。我们已经解决了这个问题,并期待它在新版本中得到解决。

UNOMI-261

于 2020-01-17T04:27:24.327 回答