Skip to content

Withdraw several share links

POST
/v1/share-links/revoke
curl --request POST \
--url https://api.pixonaut.app/v1/share-links/revoke \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "ids": [ "shl_9a8b7c6d5e4f3a2b1c0d9e8f", "shl_1a2b3c4d5e6f7a8b9c0d1e2f" ] }'

Operation ID: shareLinks.revokeMany

With ids, withdraws up to 100 links and answers each revoked or not_found; a link the caller could not have handed out (to a connected store’s integration key, one its store did not hand out) is not_found, as DELETE /v1/share-links/{id} answers it. With createdByKeyId, withdraws every working link that api key or connected store handed out and answers how many, without revoking the key, which may hand out new ones. Each link withdrawn is audited as a single withdrawal is.

Media typeapplication/json
Any of:
object
ids
required

The links to withdraw, at most 100.

Array<string>
>= 1 items <= 100 items

Examples

Exampleexample

Example

{
"ids": [
"shl_9a8b7c6d5e4f3a2b1c0d9e8f",
"shl_1a2b3c4d5e6f7a8b9c0d1e2f"
]
}

What was withdrawn

Media typeapplication/json
Any of:
object
results
required

One entry per id asked for, in order, each once.

Array<object>
object
id
required
string
outcome
required

revoked: the link no longer works. not_found: no working link of that id the caller may manage — unknown, already withdrawn, or not theirs.

string

Examples

Exampleexample

Example

{
"results": [
{
"id": "shl_9a8b7c6d5e4f3a2b1c0d9e8f",
"outcome": "revoked"
},
{
"id": "shl_1a2b3c4d5e6f7a8b9c0d1e2f",
"outcome": "not_found"
}
]
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: invalid_input

Media typeapplication/json
object
error
required
string

Examples

Exampleinvalid_input

invalid_input

{
"error": "invalid_input"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: origin_forbidden, feature_disabled

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: payload_too_large

Media typeapplication/json
object
bytes
number
error
required
string
maxBytes

Always sent with payload_too_large.

number

Examples

Examplepayload_too_large

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 0
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors