REST API HTTP response status codes - CustomerID
Status codes in class 2xx indicate the successful request. Status codes in class 4xx indicate the error in request made by the client and the request should not be repeated without changes. Status codes in class 5xx indicate the server side error and the same request may be successful if issued later. If the client does not understand the specific status code, it must be treated as status code x00 in the same class.
HTTP Response Status 200 (OK)
→ Operation was successful.
HTTP Response Status 201 (Created)
→ Resource created successfully. Used instead of 200 in successful create-operations.
HTTP Response Status 400 (Bad Request)
→ The request was invalid.
HTTP Response Status 401 (Not Authorized)
→ Invalid credentials (callers username and/or password).
HTTP Response Status 403 (Forbidden)
→ The request is understood, but is refused. Operation is not allowed regardless of successful authentication.
HTTP Response Status 404 (Not Found)
→ Requested resource is not found. Requested URI is not valid or the requested resource does not exist.
HTTP Response Status 409 (Conflict)
→ Request could not be processed because of conflict in the request and the state of the system. For example you could try to create a user that is already in the system.
HTTP Response Status 500 (Internal Server Error)
→ Server failed to process the request. Request may result in success if repeated later.