External Configuration Service

The external configuration service provides endpoints to get configurations stored in SCM.

Endpoints

Get Mobile App Configuration

GET externalconfiguration/getMobileAppConfig.json

Get the configuration for a given mobile application. This will include any images that need to be updated or deleted. This endpoint provides a means for an application to update its content without needing to download a new version of the application.

The following authentication methods are allowed for this endpoint:

JSON Parameters:
 
  • integrationId (String) – (required) The integration string for a caller.
  • version (String) – (required) The application version as returned by this endpoint.
  • merchantId (Integer) – (required) Paytronix-assigned merchant ID to perform the operation in.
  • appId (String) – (required) The unique application identifier as used in the Google Play Store, or Apple App Store
"result": "noUpdates"
JSON Parameters:
 
  • result (String) – (required) noUpdates - Indicates that the content of the app is up to date and no updates are needed.
  • version (String) – (required) The version that the application should store. In the case of noUpdates, the version should be the same as the submitted version.

Example:

{
  "result":"noUpdates",
  "version":"20171006154115"
}
"result": "withUpdates"
JSON Parameters:
 
  • result (String) – (required) withUpdates - Indicates that the content of the app needs to be updated.
  • deleteImages (List[String]) – (required) A list of image names that the application should delete.
  • downloadImages (Map[String]) – (required) A mapping of image names that need to be updated to urls where the individual images can be found.
  • version (String) – (required) The new version that the application should store.

Example:

{
  "result":"withUpdates",
  "deleteImages":["[email protected]","home5"],
  "downloadImages":{
    "[email protected]":"https://d21hbu9udbu63k.cloudfront.net/mobile/fetch-image/30/y5mjgC9v2raWoMkQ_1jJgZhMEinFx9Zl4fb7105Slp/com.paytronix.jplicks/20171006154115/home5%40hdpi",
    "[email protected]":"https://d21hbu9udbu63k.cloudfront.net/mobile/fetch-image/30/y5mjgC9v2raWoMkQ_1jJgZhMEinFx9Zl4fb7105Slp/com.paytronix.jplicks/20171006154115/FlexTab%402x"
  },
  "version":"20171006154115"
}
"result": "failure"
JSON Parameters:
 
  • result (String) – (required) failure
  • errorCode (String) – (required) The error code of the failure.
  • errorMessage (String) – (required) The human readable error message of the failure.

Error Codes

The following are the possible codes and messages that can be returned by the External Configuration Service.

There are other system-level errors which may be returned which are not documented here.

The caller of the endpoint can use the returned message to display to the end user or, if different wording is desired, can provide their own mapping of code to message.

Code Message
mobile_app_config.server_error Unable to retrieve configuration
mobile_app_config.unable_to_load_merchant_config Unable to locate merchant config for the given merchant id
mobile_app_config.invalid_integration Integration is not valid
mobile_app_config.invalid_app_id App id is not valid
mobile_app_config.unable_to_load_images Unable to locate or compare image versions
mobile_app_config.unable_to_locate_domain Unable to locate domain configuration service or merchant content domain