Create a terminal application beta
Create a new terminal application.
To access this endpoint using an access token
you'll need to specify the /terminal-applications.write scope.
POST
/terminal-applications
curl -X POST "https://api.moov.io/terminal-applications" \
-H "Authorization: Bearer {token}" \
--data-raw '{
"platform": "ios",
"appBundleID": "com.example.app",
"packageName": "com.example.app",
"sha256Digest": "1234567890",
"versionCode": "1.0.0"
}'\
mc, _ := moov.NewClient()
mc.CreateTerminalApplication(ctx, moov.TerminalApplicationRequest{
Platform: "android",
PackageName: "com.example.app",
Sha256Digest: "AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD",
VersionCode: "20332277",
})
using Moov.Sdk;
using Moov.Sdk.Models.Components;
var sdk = new MoovClient(xMoovVersion: "<value>");
var res = await sdk.TerminalApplications.CreateAsync(body: new CreateTerminalApplication() {
Platform = TerminalApplicationPlatform.Android,
PackageName = "com.example.app",
Sha256Digest = "AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD",
VersionCode = "20332277",
});
// handle responsepackage hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.TerminalApplicationError;
import io.moov.sdk.models.operations.CreateTerminalApplicationResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws GenericError, TerminalApplicationError, Exception {
Moov sdk = Moov.builder()
.xMoovVersion("v2024.01.00")
.security(Security.builder()
.username("")
.password("")
.build())
.build();
CreateTerminalApplication req = CreateTerminalApplication.builder()
.platform(TerminalApplicationPlatform.ANDROID)
.packageName("com.example.app")
.sha256Digest("AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD")
.versionCode("20332277")
.build();
CreateTerminalApplicationResponse res = sdk.terminalApplications().create()
.request(req)
.call();
if (res.terminalApplication().isPresent()) {
// handle response
}
}
}require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
x_moov_version: 'v2024.01.00',
)
res = s.terminal_applications.create(create_terminal_application: Models::Components::CreateTerminalApplication.new(
platform: Models::Components::TerminalApplicationPlatform::ANDROID,
package_name: 'com.example.app',
sha256_digest: 'AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD',
version_code: '20332277',
))
unless res.terminal_application.nil?
# handle response
endimport { Moov } from "@moovio/sdk";
const moov = new Moov({
xMoovVersion: "v2024.01.00",
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.terminalApplications.create({
platform: "android",
packageName: "com.example.app",
sha256Digest: "AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD",
versionCode: "20332277",
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
$sdk = MoovPhp\Moov::builder()
->setXMoovVersion('v2024.01.00')
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$createTerminalApplication = new Components\CreateTerminalApplication(
platform: Components\TerminalApplicationPlatform::Android,
packageName: 'com.example.app',
sha256Digest: 'AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD',
versionCode: '20332277',
);
$response = $sdk->terminalApplications->create(
createTerminalApplication: $createTerminalApplication
);
if ($response->terminalApplication !== null) {
// handle response
}from moovio_sdk import Moov
from moovio_sdk.models import components
with Moov(
x_moov_version="v2024.01.00",
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.terminal_applications.create(platform=components.TerminalApplicationPlatform.ANDROID, package_name="com.example.app", sha256_digest="AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD", version_code="20332277")
# Handle response
print(res)The request completed successfully.
{
"packageName": "com.example.app",
"platform": "android",
"sha256Digest": "AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD:EE:FF:AA:BB:CC:DD",
"status": "pending",
"terminalApplicationID": "12345678-1234-1234-1234-123456789012",
"versionCode": "20332277"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
"platform": "string",
"appBundleID": "string",
"packageName": "string",
"sha256Digest": "string",
"versionCode": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
X-Moov-Version
string
Specify an API version.
API versioning follows the format vYYYY.QQ.BB, where
YYYYis the yearQQis the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)BBis the build number, starting at.01, for subsequent builds in the same quarter.- For example,
v2024.01.00is the initial release of the first quarter of 2024.
- For example,
The latest version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
When no version is specified, the API defaults to v2024.01.00.
Body
application/json
platform
string<enum>
required
Platform of the terminal application.
Possible values:
undefined,
ios,
android
appBundleID
string
The app bundle identifier of the terminal application. Required if platform is
ios.
packageName
string
The app package name of the terminal application. Required if platform is
android.
sha256Digest
string
The SHA-256 digest of the signing key for the application. Required if platform is
android.
versionCode
string
The version code of the Android application. Required if platform is
android.
Response
platform
string<enum>
required
Platform of the terminal application.
Possible values:
undefined,
ios,
android
status
string<enum>
required
Status of the terminal application.
Possible values:
undefined,
pending,
enabled,
disabled
terminalApplicationID
string
required
ID of the terminal application.
appBundleID
string
The app bundle identifier of the terminal application. Will be returned if platform is
ios.
packageName
string
Pattern
The app package name of the terminal application. Will be returned if platform is
android.
sha256Digest
string
A cryptographic hash of the signing key for the application. Will be returned if platform is
android.
versionCode
string
The app version code of the terminal application. Will be returned if platform is
android.