Naytev uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xxrange 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 Naytev's servers (these are rare).

Error Attributes

  • id -- Unique ID for each type of error.
  • message -- JSON object that holds information to the error. Often there is a description  field which contain a human readable description of the error.
  • data -- JSON object containing information relating to specific errors when it applies. IE, Validation errors what went wrong.
  • requestUuid -- Unique Request  ID meant for debugging and tracing of the request.

Error Types

  • ObjectNotFound -- Response Code: 404 -- The supplied ID couldn't be found or was not associated with your organization.
  • APIFormError -- Response Code: 400 -- The data supplied either wasn't properly encoded in JSON, failed to provide the application type header, or wasn't the proper data types of the form.
  • ValidationError -- Response Code: 400 --  The data supplied isn't valid. There will always be data  returned that will indicate what exactly didn't pass the validation.
  • PostAlreadyExecuted -- Response Code: 400 -- Once a post goes out to it's social network, the post will be locked. The post will not be able to be updated or deleted. 
  • PostSocialNetworkIncompatability -- Response Code: 400 - The post type is not proper for the desired social handle being posted to. For example, a TwitterLinkPost  cannot be posted to a Facebook Page. Please ensure that your post type and content matches the desired social handle being posted to.

Did this answer your question?