API Errors

WePlann uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with WePlann's servers (these are rare).

Encoding Parameters
HTTP Status ACCEPT
200 OK Successful request.
400 Bad Request Returned if requested resource does not exist or request is invalid.
401 Unauthorized Missing or invalid Basic Auth header or missing or invalid ApiKey.
404 Not Found Returned if requested item does not exist.
404 Not Found Returned if requested item does not exist.

In some instances an array of errors will be returned indicating the reason the request failed.

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=utf-8
{
	"id" : "0a71259e-d1c5-4760-8bfb-47bfaf68b1ef",
	"totalUsd" : null,
	"isValid" : false,
	"errors" : [
		{
			"code" : "InvalidTicketCode",
			"message" : "Invalid Ticket Code ticket"
		}
	]
}