---
agentTools:
  projectIndex: https://worldbox-api.readme.io/llms.txt
---

# Debugging

Writing an application on Worldbox is easy as pie. But here are a few tips we've found helpful.  You cannot check the API directly from your browser since authentication is needed. For debugging we strongly recommend to use a REST client like [Postman](http://www.getpostman.com/).

**Check the Response Body**
The REST API will return a Worldbox REST Exception JSON block which contains the HTML error code, Worldbox-specific error code, error message, and a link to the Error Code Reference.

[block:code]
{
  "codes": [
    {
      "code": "{\n    \"code\": 1010,\n    \"type\": \"Bad request\",\n    \"message\": \"Validation Failed\",\n    \"details\": [\n        \"The query parameter q is mandatory for a search request.\",\n        \"The query parameter should have a min.length of three characters \",\n        \"You must provide a ISO - 3361 countrycode for a search request.\"\n    ],\n    \"more info \": \"https://worldbox-api.readme.io/docs/debugging\"\n}",
      "language": "json"
    }
  ]
}
[/block]

All Worldbox-specific errors are listed in the Error Code Reference below.

**Error and Warning Dictionary**

[block:parameters]
{
  "data": {
    "h-0": "Code",
    "h-1": "Message",
    "h-2": "Type",
    "0-0": "1000",
    "1-0": "1001",
    "1-1": "There is no company record with this WIN-number in the worldbox database. Most probably the WIN-number is wrong or the company has been deleted.",
    "0-1": "To access the API resources, you must specify the apikey and apisecret in the request header. see Authentication",
    "2-1": "Allowed languages for reports and legal documents are English (EN) , Italian (IT) and German (DE).",
    "0-2": "Authentication Failure",
    "2-0": "1002",
    "3-0": "1003",
    "4-0": "1004",
    "3-1": "Allowed currencies for reports and legal documents are USD, GBP, EUR, CHF.",
    "4-1": "The WIN number in the resource is mandatory to retrieve the reports or legal documents.",
    "5-0": "1005",
    "5-1": "The binary of your report seems to be corrupted please contact worlddbox and included your order information.",
    "5-2": "System Failure",
    "4-2": "Bad Request",
    "1-2": "Not Found",
    "2-2": "Bad Request",
    "3-2": "Bad Request",
    "6-0": "1006",
    "6-1": "Your request is not a valid JSON data representation.",
    "7-0": "1007",
    "6-2": "Bad Request",
    "7-1": "The price of the product could not be elicited. Please contact the Worldbox administration.",
    "7-2": "System Failure",
    "8-0": "1008",
    "8-1": "An error occured while processing your order. Please contact the Worldbox administration and include your order details.",
    "8-2": "System Failure",
    "9-0": "1009",
    "9-1": "Your date parameters must be constructed according to the following pattern: \"YYYYMMDD\"",
    "9-2": "Bad Request",
    "10-0": "1010",
    "10-1": "The company search got invalids parameter for searchstring Q and/or the countrycode. The searchstring Q must be at least 3 characters and countrycode should be a valid ISO-3361 countrycode",
    "10-2": "Bad Request",
    "11-0": "1011",
    "11-1": "Please enter a \"Worldbox Identification Number\" (WIN) to retrieve company information.",
    "11-2": "Bad Request",
    "12-0": "1012",
    "12-1": "The company request got invalid parameters. Please check if all mandatory parameters are included in the request.",
    "12-2": "Bad Request",
    "13-0": "1013",
    "13-1": "To obtain information about an order, you must specify an existing order number.",
    "13-2": "Bad Request",
    "14-0": "1014",
    "14-1": "To obtain information about an ordered item, you must specify an existing item number.",
    "14-2": "Bad Request",
    "15-0": "1015",
    "15-1": "The validation of your order failed. Make sure that  your productcode is valid and  correspond to an existing product. Provided all mandatory parameters --> Commit Order.",
    "15-2": "Bad Request",
    "16-0": "1016",
    "16-1": "You must provide a type for the requested product. Valid types are \"online\" or \"offline\"",
    "16-2": "Bad Request",
    "17-0": "1017",
    "17-1": "Your provided type is not valid. Valid types are \"online\" or \"offline\"",
    "17-2": "Bad Request",
    "18-1": "This is not a valid resource. Available products are <reports> or <legaldocuments>",
    "18-2": "Bad Request",
    "18-0": "1018",
    "19-0": "1019",
    "19-1": "This product is not avilable for this company",
    "19-2": "Bad Request",
    "20-0": "1020",
    "20-2": "Bad Request",
    "20-1": "The committed JSON data structure in POST or UPDATE method is wrong. Please check the documentation for the correct data structure",
    "21-0": "1023",
    "21-1": "The subscription could not be found. Either the provided item number is wrong or the subscription was deleted",
    "21-2": "Resource Error",
    "22-0": "1024",
    "22-1": "The company with WIN number is not included in your subscription with the corresponding product code",
    "22-2": "Bad Request",
    "23-0": "1025",
    "23-1": "Your  subscription has expired.  Please renew the subscription with a new order.",
    "23-2": "Bad Request"
  },
  "cols": 3,
  "rows": 24
}
[/block]

[block:api-header]
{
  "type": "basic",
  "title": "Allowed Companies on the Test Server"
}
[/block]

The access to the Worldbox index for company data is restricted on the testserver. Only reports for the following companies will be produced on the test server:

Online reports: AT0000050699 / BE0000039875 / CH0000435037 / NL0000077679 / DE0000140227 / GR0000026463 / IE0000034327 / PL0000034509 / PT0000030144 / ES0000046468
Offline reports: CH0000435037 / IE0000036365 / PT0000027184 / AT0000049528