# Error codes

This page lists and describes the errors that may occur when making a request to the API.

# -32760 to -32000: Predefined JSON-RPC 2 errors

Code Message Description
-32700 Parse error Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-32600 Invalid Request The JSON sent is not a valid Request object.
-32601 Method not found The method does not exist or is not available.
-32602 Invalid params Invalid method parameter(s). When data is included, it can array of objects with the properties message (readable text) and pointer (a JSON Pointer to the property where the parameter validation failed). data can also be a string defining the error.
-32603 Internal error Internal JSON-RPC error.
-32099 to -32000 Server errors. See below.

# -32000 to -32099

Code Message Description
-32000 Internal error An internal server error.

# 1000 to 1999: Context errors

Code Message Description
1001 Webshop missing The context parameter webshop is missing. See Context parameters.
1002 Invalid webshop The shop is invalid.
1003 Invalid language The language is invalid.
1004 Bad auth token The autentication token is invalid.
1005 Bad session token The session token is invalid.
1006 Forbidden The request is forbidden. This may be because you don't have the required permissions.
1007 Secure connection required The connection must be secure to answer the request.
1008 Session missing Certain methods require a session to answer any requests.
Code Message Description
2001 Not buyable When an article cannot be added to cart. The data is a localized message explaining why, as a string. See Order.addArticle.
2010 Payment failed When the payment provider says that the payment has failed. The data is a message from the provider as a string.
2011 Payment not configured When trying to perform checkout without matching planned payments.
2012 Payment unavailable The order cannot be paid (needs payment but no payment method is available to the customer).
2013 Insufficient purchase amount The shop accepts orders only above a certain purchase amount.
2020 Delivery not configured When trying to perform checkout without having configured delivery.
2021 Delivery unavailable The order cannot be delivered (needs delivery but no delivery method is available).
2030 Discount code already specified The data is the discount code as a string.
2031 Invalid discount code When trying to add an invalid discount or gift-certificate code. The data is the discount code as a string.
2032 No further discount When adding a discount code that won't give any further discount. The data is the discount code as a string.
2040 Address lookup unavailable Address lookup was requested but was denied, either because no payment method has been selected or because the currently selected payment method does not support address lookup.
2050 Invalid gift certificate When trying to add an invalid gift certificate.
2051 Uncombinable with selected payment method When trying to add a gift certificate that cannot be combined with the selected payment method.
2052 Gift certificate currency error When trying to add a gift certificate with a currency not valid for order.
2060 Payment cancellation failed On failure to cancel a payment that should support cancellation.
2061 Payment refunding failed On failure to refund a payment that should support refunding.
2062 Payment can not be cancelled When payment is in a state that does not allow cancellation.
2063 Payment can not be refunded When payment is in a state that does not allow refunding.
2070 Attaching file to an order item failed On failure to add an article with a file attachment to the cart.
2090 Order is locked When order is in a state where adding or removing items is not allowed.
Code Message Description
3001 Login failed See Customer.login.
3002 Bad reset code See Customer.requestPasswordReset.
3003 Bad signup code See Customer.signup.
3004 Invalid password When trying to set a password that is invalid, e.g. because it is too short or too long.
3005 Customer already exists When trying to add a customer that already exists in the shop. See Customer.
3006 Confirmation failed See Customer.confirmSignup.

# 9000 to 9999: Common get, set and validate errors for all API classes

Code Message Description
9001 Validation error The parameters contents failed JSON-Schema validation. The data is an array of objects with the properies message (readable text) and pointer (a JSON Pointer to the property where the validation failed).
9002 Normalization error A value could not be normalized, e.g. converted from a string to a number literal.
9003 Object not found. The object with the specified UID either does not exist or the user lacks permission to see it.
9004 Invalid query The query is malformed. The error always shows the location in the query as a JSON pointer.
9005 External server error The API has made a request to an external server which have failed.

# Transport errors

There might be transport errors (HTTP error codes) when initiating a JSON-RPC call. This is often related to upgrade failure or access issues.

Code Message Description
400 Bad upgrade Websocket upgrade failed.
401 Bad auth token The auth token has expired or is faulty.
405 Method not allowed Using an unsupported HTTP method.