PATCH
/
v1
/
short-urls
/
{id}
Update short URL
curl --request PATCH \
  --url https://api.oneofnone.io/v1/short-urls/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "metadata": {},
  "registration_settings": {}
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "url": "<string>",
  "collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "token_id": 123,
  "title": "<string>",
  "qr_code": "<string>",
  "destination_url": "<string>",
  "registration_settings": {
    "triggerButton": {
      "active": true,
      "unregisteredLabel": "<string>",
      "registeredLabel": "<string>",
      "className": "<string>"
    },
    "auth": {
      "title": "<string>",
      "message": "<string>",
      "image": "<string>"
    },
    "form": {
      "title": "<string>",
      "message": "<string>",
      "fields": {
        "firstName": true,
        "lastName": true,
        "postalCode": true,
        "phoneNumber": true
      },
      "consents": [
        {
          "id": "<string>",
          "title": "<string>",
          "required": true,
          "label": "<string>"
        }
      ]
    },
    "success": {
      "title": "<string>",
      "message": "<string>",
      "image": "<string>",
      "button": {
        "label": "<string>",
        "url": "<string>",
        "className": "<string>"
      },
      "discountCode": "<string>"
    }
  },
  "metadata": {},
  "collection": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "slug": "<string>",
    "image": {
      "alt": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "file_type": "<string>",
      "id": 123,
      "poster_url": "<string>",
      "size": 123,
      "tags": [
        "<string>"
      ],
      "thumbnail_url": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "url": "<string>"
    }
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

The API key required for accessing protected routes. It should be included in the request headers as x-api-key.

Path Parameters

id
string
required

The URL identifier of the short URL to update.

Body

application/json
metadata
object

Additional metadata to store with the short URL.

registration_settings
object

Configuration settings for product registration.

Response

Successfully updated short URL.

A short URL that provides quick access to products or collections, with optional registration functionality and QR code support.

id
string<uuid>

The unique identifier for the short URL.

url
string<uri> | null

The actual short URL that redirects to the destination.

collection_id
string<uuid> | null

The unique identifier of the collection this short URL is associated with.

token_id
integer | null

The unique token identifier for the specific product this short URL points to.

title
string | null

The title or name of the short URL for identification purposes.

qr_code
string | null

The QR code data or identifier associated with this short URL.

destination_url
string<uri> | null

The final destination URL that users are redirected to when accessing the short URL.

registration_settings
object

Configuration settings for the product registration system including UI screens, form fields, and user flow. Configuration settings for product registration if this short URL supports registration functionality.

metadata
object | null

Additional metadata and custom fields associated with the short URL.

collection
object | null

Information about the collection this short URL is associated with (included when requested via query parameter).

created_at
string<date-time>

The timestamp when the short URL was created.

updated_at
string<date-time> | null

The timestamp when the short URL was last updated.