Hi Giurobrossi!
In your
POST/
PATCH request, the value of
relationships.visibleApps.data must be an
array because you can assign more than one app to the user. The full payload should look like this:
Code Block PATCH /v1/users/*** |
{ |
"data": { |
"type": "users", |
"id": "***", |
"relationships": { |
"visibleApps": { |
"data": [ |
{"type": "apps", "id": "..."}, |
{"type": "apps", "id": "..."} |
] |
} |
} |
} |
} |
Where
... is the ID of the app (the same ID you get back from the API when you do a
GET /v1/apps and that shows as the "Apple ID" in App Store Connect on the web).
Bear in mind this will
replace the set of visible apps for this user. In other words, the above request will grant the user
just those two apps, and
remove their access to any other apps. If you just want to add visible apps to the existing set for the user, use this instead:
Code Block POST /v1/users/***/relationships/visibleApps |
{ |
"data": [ |
{"type": "apps", "id": "..."}, |
{"type": "apps", "id": "..."} |
] |
} |