Blacklists

Blacklists allow you to prevent certain attributes such as IP and email addresses from being able to checkout using your storefront.

The Blacklist object

The blacklist object contains all the information about a blacklist.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the blacklist.

  • Name
    blacklist_type
    Type
    enum
    Description
    • email
    • ip_address
    • country_code
    • email_domain
  • Name
    blocked_data
    Type
    string
    Description

    Data that is blacklisted.

  • Name
    note
    Type
    string
    Description

    An optional internal note regarding this blacklisted item.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the blacklist was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the blacklist was last updated.


GET/v2/blacklists

List all blacklists

This endpoint allows you to retrieve a paginated list of all your blacklists. By default, a maximum of 20 blacklists are shown per page.

Optional attributes

  • Name
    page
    Type
    integer
    Description

    The page number. Defaults to 1

  • Name
    per_page
    Type
    integer
    Description

    Records per page. Defaults to 20.

Request

GET
/api/v2/blacklist
curl -G https://selly.io/api/v2/blacklist \
  -H "Authorization: Bearer {token}" \
  -d page=1

Response

[
  {
    "id": "XVqOSb8D",
    "blocked_data": "123.123.123.123",
    "blacklist_type": "ip_address",
    "note": "This is from example.com",
    "created_at": "2023-10-22T15:52:30.000+01:00",
    "updated_at": "2023-10-22T16:22:32.000+01:00",
  },
  {
    "id": "A058da7",
    // ...
  }
]

GET/v2/blacklist/:id

Retrieve a blacklist

This endpoint allows you to retrieve a blacklist by providing the blacklist id. Refer to the list at the top of this page to see which properties are included with blacklist objects.

Request

GET
/api/v2/blacklist/:id
curl https://selly.io/api/v2/blacklist/XVqOSb8D \
  -H "Authorization: Bearer {token}"

Response

{
  "id": "XVqOSb8D",
  "blocked_data": "123.123.123.123",
  "blacklist_type": "ip_address",
  "note": "This is from example.com",
  "created_at": "2023-10-22T15:52:30.000+01:00",
  "updated_at": "2023-10-22T16:22:32.000+01:00",
}

POST/v2/blacklists

Create a blacklist

This endpoint allows you to create a blacklisted item

Request

POST
/api/v2/blacklist
curl -X POST https://selly.io/api/v2/blacklist \
  -H "Authorization: Bearer {token}" \
  -d blocked_data="12.12.12.12" \
  -d blacklist_type="ip_address"

Response

{
  "id": "XVqOSb8D",
  "blocked_data": "12.12.12.12",
  "blacklist_type": "ip_address",
  "note": null,
  "created_at": "2023-10-22T15:52:30.000+01:00",
  "updated_at": "2023-10-22T17:10:32.000+01:00",
}

PUT/v2/blacklists/:id

Update a blacklist

This endpoint allows you to update a blacklisted item

Request

PUT
/api/v2/blacklist/:id
curl -X PUT https://selly.io/api/v2/blacklist/XVqOSb8D \
  -H "Authorization: Bearer {token}" \
  -d blocked_data="12.12.12.12"

Response

{
  "id": "XVqOSb8D",
  "blocked_data": "12.12.12.12",
  "blacklist_type": "ip_address",
  "note": "This is from example.com",
  "created_at": "2023-10-22T15:52:30.000+01:00",
  "updated_at": "2023-10-22T17:10:32.000+01:00",
}

DELETE/v2/blacklists/:id

Delete a blacklist

This endpoint allows you to delete a blacklisted item. Note: This will permanently delete the blacklist.

Request

DELETE
/api/v2/blacklist/:id
curl -X DELETE https://selly.io/api/v2/blacklist/XVqOSb8D \
  -H "Authorization: Bearer {token}" \