Publishing errors
These errors happen when something goes wrong during the advert publishing.
1. Category with given ID doesn't exists
{
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Category with given ID doesn't exists"
}
}
Solution:
- provide valid category_id in the request
2. Fix the category
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "category_id",
"title": "Fix the category",
"detail": "Fix the category"
}
]
}
}
Solution:
- provide valid category_id in the request
- make sure that the category_id is a leaf category:
GET /api/partner/categories/1755
{
"data": {
"id": 1755,
"name": "Praca inżynieryjna, techniczna",
"parent_id": 1447,
"photos_limit": 0,
"is_leaf": true
}
}
3. Error while decoding JSON data: Syntax error
{
"data": {
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Error while decoding JSON data: Syntax error"
}
}
}
Solution:
- make sure that the payload you are sending does not contain any extra fields
- make sure that the field names are valid and do not contain any typos
4. Partner is not allowed to use external URL
{
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Partner is not allowed to use external URL"
}
}
Solution:
- your API account is not allowed to use external_url field
- this feature is available only for a Jobs category in PL
- reach out to us in order to enable this option
5. Invalid value: district_id
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "district_id",
"title": "Invalid value"
}
]
}
}
Solution:
- verify district_id provided in the request:
GET /api/partner/cities/{cityId}/districts
6. Your coordinates are too far from picked location
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "district/city_id",
"title": "Your coordinates are too far from picked location."
}
]
}
}
Solution:
- verify if latitude and longitude fields are valid for a given district/city_id:
GET /api/partner/locations/?latitude={lat}&longitude={lon}
7. This value is not valid: attributes
{
"error": {
"status": 400,
"code": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "attributes",
"title": "This value is not valid."
}
]
}
}
Solution:
- make sure that the attributes array contains code and value keys only:
"attributes": [
{
"code": "type",
"value": "fulltime"
},
{
"code": "contract",
"value": "contract"
},
{
"code": "manager",
"value": "0"
},
{
"code": "remote_recruitment",
"value": "0"
}
]
8. Invalid value: params.state
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "params.state",
"title": "Invalid value"
}
]
}
}
Solution:
- verify state value in the attributes array
9. Image error: Remote file not exists
{
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Image error: Remote file not exists"
}
}
Solution:
- verify all URLs provided in the images array
10. Image error: Image limit exceeded
{
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Image error: Image limit exceeded"
}
}
Solution:
- make sure that the request does not contain more images than it is allowed:
GET /api/partner/categories/1581
{
"data": {
"id": 1581,
"name": "Bluzki i koszulki",
"parent_id": 642,
"photos_limit": 8,
"is_leaf": true
}
}
11. Unsupported API version
HTTP code: 404 Not Found
{
"error": {
"type": "NotFoundException",
"message": "Unsupported API version"
}
}
Solution:
- make sure that the URL you are trying to call to is valid
12. Advert not found
{
"error": {
"status": 404,
"title": "Not Found",
"detail": "Advert not found"
}
}
Solution:
- make sure that the advert ID is valid
13. You are not the owner of this ad
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "ad",
"title": "You are not the owner of this ad"
}
]
}
}
Solution:
- you are not allowed to manage the ads created by other users
14. Too many capital letters
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "title",
"title": "Too many capital letters"
}
]
}
}
Solution:
- make sure that the title or description does not contain more than 50% text written in capital letters
15. Field is not valid. Emails and www addresses are not allowed
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "title",
"title": "Field is not valid. Emails and www addresses are not allowed"
}
]
}
}
Solution:
- make sure that the title or description does not contain any e-mail/www address
16. Field is not valid. Phone numbers are not allowed
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "title",
"title": "Field is not valid. Phone numbers are not allowed"
}
]
}
}
Solution:
- make sure that the title or description does not contain any phone number
17. Field contains to much punctuation
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "title",
"title": "Field contains to much punctuation"
}
]
}
}
Solution:
- following characters cannot be provided in the title and in the description three times in a row: ! ? . , - = + # % & @ * _ > < : ( ) |
18. Deactivate advert - ad has to be active
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "ad",
"title": "Ad has to be active"
}
]
}
}
Solution:
- make sure that the advert you want to deactivate is active
19. Delete advert - invalid status
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "ad",
"title": "Invalid status"
}
]
}
}
Solution:
- make sure that the advert you want to delete is not active
- deactivate the advert before deletion:
POST /api/partner/adverts/{advertId}/commands
{
"command": "deactivate",
"is_success": true // this flag indicates whether you have succeeded in selling the product or not
}
20. Cannot refresh advert
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "time",
"title": "You cannot refresh ad more often than once in 14 days"
}
]
}
}
Solution:
- depending on the country you cannot refresh advert more than once in a given period of time
- please wait until the refresh option will be available for the advert
21. City with given ID doesn't exists
{
"error": {
"status": 400,
"title": "Bad Request",
"detail": "City with given ID doesn't exists"
}
}
Solution:
- verify city_id provided in the request:
GET /api/partner/cities/{cityId}
{
"error": {
"status": 404,
"title": "Not Found",
"detail": "City not found"
}
}
22. Invalid phone format
{
"error": {
"status": 400,
"title": "Invalid request",
"detail": "Data validation error occurred",
"validation": [
{
"field": "phone",
"title": "Invalid phone format"
}
]
}
}
Solution:
- make sure that the phone provided in the request is valid
23. Missing required 'Version' header
{
"data": {
"error": {
"status": 400,
"title": "Bad Request",
"detail": "Missing required 'Version' header!"
}
}
}
Solution:
- add "Version": "2.0" header to your request