Skip to end of metadata
Go to start of metadata

This documentation is no longer actively supported and may be out of date. Going forward, please visit and bookmark our new site (https://docs.phunware.com/) for up-to-date documentation.

HTTP Status Codes

Below is a detailed outline of the status codes and messages used in the API.

Status Code

Message

Description

200

Success

  • Used for general success.
  • Used when a POST operation results in the creation of a new resource (such that response should contain URI of newly created resource).

202

Accepted

  • Used to indicate that the message has been received, but processing may not yet be finished.

204

No Content

  • Used for success when there is no response body to return.

400

Bad Request

  • Used when one or more parameters are invalid.
  • Used when one or more required parameters are missing.
  • Used when the JSON payload is not valid JSON.

401

Unauthorized

  • Used when the operation fails authorization checks.

403

Forbidden

  • Used when the operation fails security checks (e.g. wrong app ID specified as input to retrieve specific data).

404

Not Found

  • Used when the requested resource does not exist (e.g. app ID).

406

Not Acceptable

  • Used when the content type passed in the request is not 'application/json'.

423

Locked

  • Used to indicate that the resources is locked, such as during a process that takes longer than typical http response times, like route reset operations.

500

Internal Server Error

  • Used when the (internal) server is down.

Error Payloads

Each failed response will include a JSON payload that includes the error code number and message:

400

The actual message for this "Bad Request" error will vary depending on whether the error was caused by bad data sent in the request, a validation error when validating the request data or any other generic request error.

{
    "error": 
	{
        "code": 400,
        "message": <error string>
    }
}

401

The actual message for this "Unauthorized" error will vary. The error string below will be one of the following:

  • "Missing X-Auth header."
  • "Auth header contains <num> parts; must be 3."
  • "The request time is too far in the future (<num> seconds)."
  • "The request time is too far in the past (<num> seconds)."
  • "Invalid access key."
  • "This access key has not been activated yet."
  • "Could not decrypt the request."
  • "Invalid signature."
{
    "error": 
	{
        "code": 401,
        "message": <error string>
    }
}

403

The actual message for this "Forbidden" error will vary.

{
    "error": 
	{
        "code": 403,
        "message": <error string>
    }
}

404

The actual message for this "Not Found" error will vary depending on what could not be found.

{
    "error": 
	{
        "code": 404,
        "message": <error string>
    }
}

406

The actual message for this "Not Acceptable" error will vary.

{
    "error": 
	{
        "code": 406,
        "message": <error string>
    }
}

423

{
    "data": 
	{
        "code": 423,
        "message": "Resource locked."
    }
} 

500

{
    "data": 
	{
        "code": 500,
        "message": An unknown error occurred.
    }
} 

ON THIS PAGE

  • No labels