Error codes

Here are all Bayou's error codes

API Error Codes

bill_id_invalid

Developer makes a request for a bill with an id that doesn’t exist in their workspace

Related to the following API calls:

http code 404
{
	"error_type": “invalid_request”,
	"error_code": “bill_id_invalid”,
	”error_message”: “The bill_id you provided in the request does not exist.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#bill_id_invalid” 
}

customer_email_invalid

Developer creates or updates a customer with an invalid email format

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_email_invalid”,
	”error_message”: “The request you provided has the email field improperly formatted. An email must be a string, include an “@” and “.” symbol, and be no more than 320 characters”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_email_invalid” 
}

customer_first_name_invalid

Developer creates or updates a customer with an invalid format for the first name

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_first_name_invalid”,
	”error_message”: “The request you provided has the first_name field improperly formatted. The first_name field must be a string and no more than 30 characters”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_first_name_invalid” 
}

customer_id_invalid

Developer makes an API request with a customer_id that doesn’t exist in their workspace

Related to the following API calls:

http code 404
{
	"error_type": “invalid_request”,
	"error_code": “customer_id_invalid”,
	”error_message”: “The customer_id you provided in the request does not exist.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_id_invalid” 
}

customer_last_name_invalid

Developer creates or updates a customer with an invalid format for the last name

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_last_name_invalid”,
	”error_message”: “The request you provided has the last_name field improperly formatted. The last_name field must be a string and no more than 30 characters”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_last_name_invalid” 
}

customer_phone_number_invalid

Developer creates or updates a customer with an invalid format for the phone number

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_phone_number_invalid”,
	”error_message”: “The request you provided has the phone_number field improperly formatted. The phone_number field must be a string and no more than 30 characters”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_phone_number_invalid” 
}

customer_state_invalid

Developer creates or updates a customer with an invalid format for the state field

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_state_invalid”,
	”error_message”: “The request you provided has the state field improperly formatted. The state field must be a two letter abbreviation in a string format or null. The state codes can be found here: https://docs.bayou.energy/reference/post_customers”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_state_invalid” 
}

customer_zipcode_invalid

Developer creates or updates a customer with an invalid format for the zip code

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “customer_zipcode_invalid”,
	”error_message”: “The request you provided has the zipcode field improperly formatted. The zipcode field must be a string and no more than 30 characters”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#customer_zipcode_invalid” 
}

end_timestamp_invalid

Developer makes a request for intervals with an invalid format for the end timestamp

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “end_timestamp_invalid”,
	”error_message”: “The end timestamp is in an invalid format. An example of a valid format is 2022-11-01T00:00:00Z.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#end_timestamp_invalid” 
}

external_id_invalid

Developer submits API call with external ID that doesn’t exist in their workspace

Related to the following API calls:

http code 404
{
	"error_type": “invalid_request”,
	"error_code": “external_id_invalid”,
	”error_message”: “The external_id you provided in the request does not exist.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#external_id_invalid” 
}

external_id_not_unique

Developer submits API call with external ID that already exists

Related to the following API calls:

http code 409
{
	"error_type": “invalid_input”,
	"error_code": “external_id_not_unique”,
	”error_message”: “The external_id you provided in the request isn’t unique and belongs to <insert other record it belongs to>.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#external_id_not_unique” 
}

meter_id_invalid

Developer makes a request with a meter_id that doesn’t exist in their workspace

Related to the following API calls:

http code 404
{
	"error_type": “invalid_request”,
	"error_code": “meter_id_invalid”,
	”error_message”: “The meter_id you provided in the request either does not exist for this customer or has no intervals. This customer has the following meters with interval data: <meter_ids>”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#meter_id_invalid” 
}

no_file_provided

Developer uploads a bill but doesn’t include any file

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “no_file_provided”,
	”error_message”: “No file was provided in your request to post a bill.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#no_file_provided” 
}

request_path_invalid

Developer makes an API request (https://bayou.energy/api/<rest_of_request>) with a url that doesn’t match any of our existing routes

Related to the following API calls:

http code 404
{
	"error_type": “invalid_request”,
	"error_code": “request_path_invalid”,
	”error_message”: “The requested route cannot be found. Refer to Bayou’s documentation for available API requests.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#request_path_invalid” 
}

start_timestamp_invalid

Developer makes a request for intervals with an invalid format for the start timestamp

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “start_timestamp_invalid”,
	”error_message”: “The start timestamp is in an invalid format. An example of a valid format is 2022-11-01T00:00:00Z.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#start_timestamp_invalid” 
}

timestamps_out_of_order

Developer makes a request for intervals with an end timestamp that comes before the start timestamp

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “timestamps_out_of_order”,
	”error_message”: “The end timestamp chronologically comes before the start timestamp in your request.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#timestamps_out_of_order” 
}

unsupported_file_format

Developer uploads a bill but the file type isn’t supported

Related to the following API calls:

http code 415
{
	"error_type": “invalid_input”,
	"error_code": “unsupported_file_format”,
	”error_message”: “The file you provided is not in a format we support. PDF’s are the only format supported right now.”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#unsupported_file_format” 
}

utility_code_input_invalid

Developer creates or updates a customer with an invalid utility code

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “utility_code_input_invalid”,
	”error_message”: “The utility code you provided in the request is invalid. Did you mean <alternate_valid_utility_code>? A full list of utility codes can be found here: https://docs.bayou.energy/reference/utility-support”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#utility_code_input_invalid” 
}

utility_lacks_intervals

Developer makes a request for intervals with a utility that doesn’t have interval data

Related to the following API calls:

http code 400
{
	"error_type": “invalid_input”,
	"error_code": “utility_lacks_intervals”,
	”error_message”: “This customer’s utility doesn’t have interval data. View utility support here: https://docs.bayou.energy/reference/utility-support”,
	”docs_url”: “https://docs.bayou.energy/docs/error-codes#utility_lacks_intervals” 
}