Get pending shares
/accounts/pending_shares
Target audience: Developers
Get pending shares¶
Introduction¶
This endpoint returns pending shares for the account.
What is a pending share?¶
If another user has shared his or hers subscription with the user it will be in a 'pending' state until accepted by the user a.k.a. the receiver. The response from the pending_shares request can be used to accept the pending shares.
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/accounts/pending_shares |
Production | https://backend.worldoftulo.com/external/api/v1/accounts/pending_shares |
Requirements¶
Identity | Scope |
---|---|
No | /external/account/r |
Parameters¶
Name | Required | Type | Description |
---|---|---|---|
id | Required | String | The id of the account to get information about. Size range: ..24 Allowed values: "/^[a-f\d]{24}$/i" |
Curl Example¶
curl --request GET \
--url https://payway-api.stage.adeprimo.se/external/api/v1/accounts/pending_shares \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer <token>' \
--data '{
"id": "585a4768edce2c5e6f000001"
}'
Response¶
Field | Description |
---|---|
package_sharing_id | id of affected share, use this to accept a share using accept_share |
shared_product_id | id of affected package connected to the share. |
sharer_account_id | id of account that shared the package of his or hers subscription. |
Example response¶
HTTP 200 OK
{
"items": [
{
"package_sharing_id": "5c6d3fc009c04ce00d3750d2",
"shared_product_id": "5c6d3fc009c04ce00d3750be",
"sharer_account_id": "5c6d3fc009c04ce00d3750d0"
}
]
}
Errors¶
Example error response¶
HTTP 404 Not Found¶
Name | Type | Description |
---|---|---|
not_found | Object | The account could not be found |
HTTP 500 Internal Server Error¶
Name | Type | Description |
---|---|---|
internal_server_error | Object | Something unexpected happened server side |