Hi there,
I was just wondering if the following is expected behaviour or a potential bug in the /lists
endpoint.
Scenario 1. Using asdasd123123
POST https://a.klaviyo.com/api/lists/asdasd123123
Response: 404 application/vnd.api+json
{
"errors":
{
"id": "6b07a851-1343-4850-b8ad-73ac6d8ac87f",
"status": 404,
"code": "not_found",
"title": "Not found.",
"detail": "A group with id `asdasd123123` does not exist.",
"source": {
"pointer": "/data/"
}
}
]
}
Scenario 2. Using asdasd123123%40.
POST https://a.klaviyo.com/api/lists/asdasd123123@.
Response: 404 text/html
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Oops Error 404 - Klaviyo</title>
<!-- etc ... -->
Scenario 3. Using asdasd123123%40.c
POST https://a.klaviyo.com/api/lists/asdasd123123@.c
Response: 500 application/vnd.api+json
{
"errors": "
{
"id": "9ecf9268-f449-4c0e-838a-b429465160aa",
"status": 500,
"code": "error",
"title": "A server error occurred.",
"detail": "A server error occurred.",
"source": {
"pointer": "/data/"
}
}
]
}
As you can see the 3 invalid path parameters result in 3 different combinations of status and content type. In order to provide the best possible UX to customers using our Klaviyo integrations I would love to be able to reserve 500 Klaviyo errors for non user error - would you be able to advise further on this behaviour?
Alternatively would you be able to confirm the string pattern which IDs must have? I’ve noticed that valid IDs seem to be 6 alphanumeric characters. If that is the case would you be able to advise if we can safely assume this format to stay that way?
Thanks!
Ismael