Status Codes When working with OMS, client developers may encounter a number of response codes. These include generic statuses that apply to all APIs as well as errors that originate from the Mashery management tool or errors that occur only when using particular APIs.
Generic Statuses These OK and error responses may be encountered when working with any aspect of OMS APIs. They have equivalent HTTP status codes.
Code Status Name Description 5000 GENERIC_OK Generic OK (HTTP 200: standard response for successful requests) 5001 GENERIC_UNAVAILABLE Generic Service Unavailable (HTTP 503: the server is currently unavailable.) 5002 GENERIC_NOT_FOUND Generic Not Found (HTTP 404: the requested resource could not be found.) 5003 GENERIC_BAD_REQUEST Generic Bad Request (HTTP 400: the server cannot process the request due to a client error, such as incorrect syntax.) 5004 GENERIC_NOT_AUTHORIZED Generic token not authorized to make call (HTTP 403: the request was valid, but the the user might not have the necessary permissions.) 5005 GENERIC_NOT_ALLOWED Generic Method Not Allowed (HTTP 405: a request method is not supported for the resource, such as a GET request on a form that requires POST.) 5006 GENERIC_SERVER_ERROR Generic Internal Server Error (HTTP 500: an unexpected condition was encountered and no more specific message is suitable.)
Expanded HTTP Errors In HTTP, statuses in the 400 range refer to various generic client errors as listed in the previous table. In OMS, the following additional codes are more detailed client errors:
Code Error Name Description 5010 MISSING_QUERY_PARAM Query parameter missing 5011 MISSING_REQUEST_DATA Request data is missing 5012 ID_MISMATCH ID in URI does not match ID in data 5013 INVALID_ID ID is not valid 5014 INVALID_QUERY_PARAM Query parameter(s) not valid 5015 INVALID_REQUEST_DATA Request field is not valid 5016 UNSUPPORTED_QUERY_PARAM Query parameter is not supported 5017 NO_VALID_QUERY_PARAMS No valid query parameters were supplied 5018 CANNOT_MODIFY_FIELD Field cannot be modified 5019 FIELD_NOT_APPLICABLE Field is not applicable 5020 ONE_QUERY_PARAM_ALLOWED Only one query param may be given 5021 VALIDATION_FAILED Schema validation failed 5022 MALFORMED_JSON JSON in request is not valid JSON 5023 INVALID_COMMA_SEPARATED Invalid comma separated query param 5024 INVALID_SORT_BY Invalid sortBy parameter 5025 NOT_IN_A_CAPTURE_STATE Not in an available capture state
Mashery HTTP 400 Errors Another set of client errors that may be encountered originate from the Mashery portal used to manage the OMS APIs for developers. These primarily refer to access control problems related to the user’s API keys and authentication that expand on the generic status codes. These are listed below for quick reference, but can also be found in the official Mashery documentation .
Code Error Name Description 403 Forbidden You have not been granted permission to access the requested method or object. 403 Not Authorized The API key associated with your request was not recognized or the signature was incorrect. 403 Account Inactive The API key you are using to access the Mashery API has not been approved or has been disabled. 403 Account Over Queries Per Second Limit The API key you are using has attempted to access the api too many times in one second. 403 Account Over Rate Limit The API key you are using has attempted to access the api too many times in the rate limiting period. 403 Rate Limit Exceeded The service you have requested is over-capacity. 400 ERR_INVALID_APIKEY The specified apikey is not valid. 400 ERR_INVALID_DATE_RANGE_EXCEEDS_7_DAY_MAX The specified date range is longer than the maximum allowed of 7 days. 400 ERR_INVALID_END_DATE The specified end_date is not valid. 400 ERR_INVALID_ERRORCODE_LIMIT The specified errorcode_limit is not valid. 400 ERR_INVALID_FORMAT The specified format is not valid. 400 ERR_INVALID_LIMIT The specified limit is not valid. 400 ERR_INVALID_METHOD_LIMIT The specified method_limit is not valid. 400 ERR_INVALID_SERVICE_DEV_KEY The specified service_dev_key is not valid. 400 ERR_INVALID_SERVICE_KEY The specified service_key is not valid. 400 ERR_INVALID_SIG The specified sig is not valid. 400 ERR_INVALID_SITE_ID The specified site_id is not valid. 400 ERR_INVALID_START_DATE The specified start_date is not valid.
API-Specific HTTP 400 Errors These client errors occur only for certain APIs, as listed below.
Payment API
These responses may be encountered when using the Payment API and associated actions.
Code Error Name Description 5101 ALREADY_RECTIFIED Payment already rectified 5102 CARD_MISMATCH Card Number does not match issuer 5103 INVALID_CARD_NUMBER Card Number is invalid 5104 ACCOUNT_CONFIGURATION_ERROR Payment Account is not properly configured 5104 EXPIRED_CARD_NUMBER Card Number is expired 5015 INVALID_MANUFACTURER Card is not associated with Manufacturer 5106 MISSING_PAYMENT_INFORMATION Missing Some Payment Information 5107 FAILURE_TO_RECTIFY Failure to rectify
Order – Shipment – Action API
These responses may be encountered when using Order and Shipment actions, such as transitioning fulfillment states.
Code Error Name Description 5201 TRANSITION_NOT_SUPPORTED Shipment state transition not supported 5202 ACTION_NOT_ALLOWED Action not allowed
Create Order / Checkout API
These responses may be encountered when creating orders through checkout and Create Order 2.
Code Error Name Description 5301 ORDER_ALREADY_QUEUED Cannot queue an order that has already been queued 5302 EXTERNAL_ORDER_ID_EXISTS Order with externalOrderID given already exists 5303 PREAUTH_NOT_ENABLED PREAUTH must be enabled (Catalog config) 5304 NOT_VALID_FOR_PREAUTH Field missing or not valid for PREAUTH order 5305 LOCATION_NOT_VALID Location must be valid and have pickup enabled 5306 INVALID_SUM_PAYMENTS The sum of payments must be greater than or equal to order total 5307 AUTH_TOKEN_INVALID Auth token was not available in the response log 5308 ORDER_ID_EXISTS Order with orderID given already exists 5309 INCORRECT_BILLING_ADDR Token was created with a different billing address 5310 EXTERNAL_ORDER_ID_INVALID Provided external order id is not valid 5311 INVALID_NO_OP_TYPE No op type being sent in doesn’t match catalog configuration 5312 AUTH_AMOUNT_REQUIRED Auth Amount must be sent in 5313 PAYMENT_TOKEN_INVALID Payment method token does not match the payment method in the response log 5314 EXTERNAL_FRAUD_CONFIGURATION External fraud is attempting to be used without being turned on. 5315 INVALID_TRANSFER Transfer orders created with items or quantities not in the parent order 5316 RESOURCE_ALREADY_EXISTS Resource already exists 5317 RESOURCE_DOES_NOT_EXIST Resource already exists 5318 RESOURCE_VALUE_ALREADY_EXIST Resource value already exists
Customer API
This response may be encountered when using the Customer API and associated actions.
Code Error Name Description 5501 INVALID_PASSWORD Password is not valid