Verify URL name
const url = 'https://api.wink.travel/api/managing-entity-url-name-check';const options = { method: 'POST', headers: { 'Wink-Version': '2.0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"name":"My unique name","identifier":"3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.wink.travel/api/managing-entity-url-name-check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Wink-Version: 2.0' \ --data '{ "name": "My unique name", "identifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51" }'Check whether a URL slug (url-name) is available before assigning it to a managing entity. Pass an identifier to exclude the entity that already owns the slug.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ”Request Body required
Section titled “Request Body required ”URL slug to check for availability, optionally excluding the entity that currently owns it
object
The name we want to check uniqueness for
Example
My unique nameAn optional accompanying identifier so it doesn’t check itself on an update
Example
3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51Example
{ "name": "My unique name", "identifier": "3c6b1a5d-8e2f-4a0b-9c7d-6e4f0a8b2c51"}Responses
Section titled “ Responses ”Result indicating whether the URL slug is unique.
Result indicating whether a value is unique within the platform
object
True if the checked value is unique; false if it already exists
Example
{ "unique": true}Bad Request — missing or invalid request parameter or body
object
object
Example
Unauthorized — authentication is required or the session has expired
object
object
Example
Forbidden — authenticated but lacking the required permission or scope
object
object
Example
Not Found — the requested resource does not exist
object
object
Example
Method Not Allowed — the HTTP verb is not supported on this endpoint
object
object
Example
Unsupported Media Type — use application/json
object
object
Example
Internal Server Error — an unexpected failure occurred on the server
object
object
Example
Service Unavailable — a downstream dependency is unreachable