These guides provide examples for many tasks that a developer will need to be familiar with during implementation.



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.

CodeStatus NameDescription
5000GENERIC_OKGeneric OK (HTTP 200: standard response for successful requests)
5001GENERIC_UNAVAILABLEGeneric Service Unavailable (HTTP 503: the server is currently unavailable.)
5002GENERIC_NOT_FOUNDGeneric Not Found (HTTP 404: the requested resource could not be found.)
5003GENERIC_BAD_REQUESTGeneric Bad Request (HTTP 400: the server cannot process the request due to a client error, such as incorrect syntax.)
5004GENERIC_NOT_AUTHORIZEDGeneric token not authorized to make call (HTTP 403: the request was valid, but the the user might not have the necessary permissions.)
5005GENERIC_NOT_ALLOWEDGeneric 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.)
5006GENERIC_SERVER_ERRORGeneric 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:

CodeError NameDescription
5010MISSING_QUERY_PARAMQuery parameter missing
5011MISSING_REQUEST_DATARequest data is missing
5012ID_MISMATCHID in URI does not match ID in data
5013INVALID_IDID is not valid
5014INVALID_QUERY_PARAMQuery parameter(s) not valid
5015INVALID_REQUEST_DATARequest field is not valid
5016UNSUPPORTED_QUERY_PARAMQuery parameter is not supported
5017NO_VALID_QUERY_PARAMSNo valid query parameters were supplied
5018CANNOT_MODIFY_FIELDField cannot be modified
5019FIELD_NOT_APPLICABLEField is not applicable
5020ONE_QUERY_PARAM_ALLOWEDOnly one query param may be given
5021VALIDATION_FAILEDSchema validation failed
5022MALFORMED_JSONJSON in request is not valid JSON
5023INVALID_COMMA_SEPARATEDInvalid comma separated query param
5024INVALID_SORT_BYInvalid sortBy parameter
5025NOT_IN_A_CAPTURE_STATENot 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.

CodeError NameDescription
403ForbiddenYou have not been granted permission to access the requested method or object.
403Not AuthorizedThe API key associated with your request was not recognized or the signature was incorrect.
403Account InactiveThe API key you are using to access the Mashery API has not been approved or has been disabled.
403Account Over Queries Per Second LimitThe API key you are using has attempted to access the api too many times in one second.
403Account Over Rate LimitThe API key you are using has attempted to access the api too many times in the rate limiting period.
403Rate Limit ExceededThe service you have requested is over-capacity.
400ERR_INVALID_APIKEYThe specified apikey is not valid.
400ERR_INVALID_DATE_RANGE_EXCEEDS_7_DAY_MAXThe specified date range is longer than the maximum allowed of 7 days.
400ERR_INVALID_END_DATEThe specified end_date is not valid.
400ERR_INVALID_ERRORCODE_LIMITThe specified errorcode_limit is not valid.
400ERR_INVALID_FORMATThe specified format is not valid.
400ERR_INVALID_LIMITThe specified limit is not valid.
400ERR_INVALID_METHOD_LIMIT The specified method_limit is not valid.
400ERR_INVALID_SERVICE_DEV_KEYThe specified service_dev_key is not valid.
400ERR_INVALID_SERVICE_KEY The specified service_key is not valid.
400ERR_INVALID_SIGThe specified sig is not valid.
400ERR_INVALID_SITE_ID The specified site_id is not valid.
400ERR_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.

CodeError NameDescription
5101ALREADY_RECTIFIEDPayment already rectified
5102CARD_MISMATCHCard Number does not match issuer
5103INVALID_CARD_NUMBERCard Number is invalid
5104ACCOUNT_CONFIGURATION_ERRORPayment Account is not properly configured
5104EXPIRED_CARD_NUMBERCard Number is expired
5015INVALID_MANUFACTURERCard is not associated with Manufacturer
5106MISSING_PAYMENT_INFORMATIONMissing Some Payment Information
5107FAILURE_TO_RECTIFYFailure to rectify

Order – Shipment – Action API

These responses may be encountered when using Order and Shipment actions, such as transitioning fulfillment states.

CodeError NameDescription
5201TRANSITION_NOT_SUPPORTEDShipment state transition not supported
5202ACTION_NOT_ALLOWEDAction not allowed

Create Order / Checkout API

These responses may be encountered when creating orders through checkout and Create Order 2.

CodeError NameDescription
5301ORDER_ALREADY_QUEUEDCannot queue an order that has already been queued
5302EXTERNAL_ORDER_ID_EXISTSOrder with externalOrderID given already exists
5303PREAUTH_NOT_ENABLEDPREAUTH must be enabled (Catalog config)
5304NOT_VALID_FOR_PREAUTHField missing or not valid for PREAUTH order
5305LOCATION_NOT_VALIDLocation must be valid and have pickup enabled
5306INVALID_SUM_PAYMENTSThe sum of payments must be greater than or equal to order total
5307AUTH_TOKEN_INVALIDAuth token was not available in the response log
5308ORDER_ID_EXISTSOrder with orderID given already exists
5309INCORRECT_BILLING_ADDRToken was created with a different billing address
5310EXTERNAL_ORDER_ID_INVALIDProvided external order id is not valid
5311INVALID_NO_OP_TYPENo op type being sent in doesn’t match catalog configuration
5312AUTH_AMOUNT_REQUIREDAuth Amount must be sent in
5313PAYMENT_TOKEN_INVALIDPayment method token does not match the payment method in the response log
5314EXTERNAL_FRAUD_CONFIGURATIONExternal fraud is attempting to be used without being turned on.
5315INVALID_TRANSFERTransfer orders created with items or quantities not in the parent order
5316RESOURCE_ALREADY_EXISTSResource already exists
5317RESOURCE_DOES_NOT_EXISTResource already exists
5318RESOURCE_VALUE_ALREADY_EXISTResource value already exists

Customer API

This response may be encountered when using the Customer API and associated actions.

CodeError NameDescription
5501INVALID_PASSWORDPassword is not valid