Create a new template

POST Request
Endpoint URL https://wallet.boostcommerce.com.au/api/v2/pass-template
Purpose
Create a new template

Required input parameters

  • HTTP Authorization Header that contains your API key

Returned values

A response object.

The input JSON must conform to this JSON Schema.

Example input:

{
    "name": "My template",
    "description": "An example template",
    "organizationName": "Passcreator",
    "type": "storeCard",
    "transitType": "PKTransitTypeAir",
    "googlePayActive": false,
    "huaweiWalletActive": false,
    "passTypeId": "pass.com.pass2wallet.tutorial",
    "passTypeIdExpiration": "2021-09-17 14:02",
    "expiration": {
        "expirationDate": "2021-04-08 14:54",
        "expirationDateDifferentForEachPass": true,
        "limitExpirationDateOfPassWithTemplate": false,
        "fallbackToTemplateExpirationDateIfEmpty": true,
        "validityInDays": null
    },
    "relevantDate": "2021-04-08 14:54",
    "relevantDateDifferentForEachPass": false,
    "logoText": "",
    "fields": {
        "headerFields": [],
        "primaryFields": [],
        "secondaryFields": [
            {
                "type": "text",
                "label": "Level",
                "value": "I bims",
                "changeMessage": "Level updated: %@",
                "useAutoId": false,
                "ignoresTimezone": false,
                "isRelative": false,
                "dateStyle": "PKDateStyleShort",
                "timeStyle": "PKDateStyleShort",
                "numberStyle": "PKNumberStyleDecimal",
                "currencyCode": "EUR",
                "alignment": "PKTextAlignmentNatural",
                "voidedLabel": "",
                "voidedValue": ""
            }
        ],
        "auxiliaryFields": [],
        "backFields": [
            {
                "type": "text",
                "label": "",
                "value": "hello@passcreator.com",
                "changeMessage": "Changed to %@",
                "useAutoId": false,
                "ignoresTimezone": false,
                "isRelative": false,
                "dateStyle": "",
                "timeStyle": "",
                "numberStyle": "",
                "currencyCode": "",
                "alignment": "",
                "voidedLabel": "",
                "voidedValue": ""
            }
        ]
    },
    "nfcEnabled": false,
    "barcode": {
        "format": "PKBarcodeFormatQR",
        "value": "123456789",
        "valueDifferentForEachPass": false,
        "useAutoIdForValue": false,
        "prefix": "",
        "alternativeText": "",
        "alternativeTextDifferentForEachPass": false,
        "useAutoIdForAlternativeText": false
    },
    "links": [
        {
            "label": "Contact",
            "value": "tel:004989123456789"
        },
        {
            "label": "Website",
            "value": "https://www.passcreator.com"
        }
    ],
    "images": {
        "logo": "https://app.passcreator.com/image/logo.png",
        "logoDifferentForEachPass": false,
        "logoHidden": false,
        "background": "https://app.passcreator.com/image/background.png",
        "backgroundHidden": false,
        "backgroundDifferentForEachPass": true,
        "thumbnail": null,
        "thumbnailHidden": true,
        "thumbnailDifferentForEachPass": false,
        "icon": "https://app.passcreator.com/image/icon.png",
        "googlePayLogo": "https://app.passcreator.com/image/gpay.png"
    },
    "colors": {
        "labelColor": "#FFFFFF",
        "labelColorDifferentForEachPass": false,
        "foregroundColor": "#FFFFFF",
        "foregroundColorDifferentForEachPass": false,
        "backgroundColor": "#CE4400",
        "backgroundColorDifferentForEachPass": false,
        "voidedBackgroundColor": "#FFFFFF"
    },
    "additionalProperties": [
        {
            "id": "5cb1a40ac68f80.15012600",
            "name": "Email",
            "type": "email",
            "required": false,
            "hidden": true
        },
        {
            "id": "5e2721b93da442.17595709",
            "name": "Phone number",
            "type": "text"
        },
        {
            "id": "5e552028e62805.33020425",
            "name": "INTERNALMARKER",
            "type": "text",
            "required": true
        },
        {
            "id": "5e5e0adfc1b6e4.84503451",
            "name": "Name",
            "type": "text"
        },
        {
            "id": "5f7216b0297200.36897838",
            "name": "label",
            "type": "text"
        },
        {
            "id": "5f7216b02972e2.34068785",
            "name": "salutation",
            "type": "select",
            "required": false,
            "hidden": false,
            "options": [
                "Mrs",
                "Mr"
            ]
        }
    ],
    "maximumNumberOfPasses": 0,
    "linkedApps": {
        "iOS": {
            "associatedStoreIdentifiers": "123456",
            "appLaunchUrl": "myapp://myparameter"
        },
        "android": {
            "associatedStoreIdentifier": "de.my.app.identifier",
            "name": "My app"
        }
    },
    "customDataOverview": "",
    "hidePrintVersion": false,
    "hideSendEmailButton": false,
    "limitToOneActivePerPass": false,
    "sharingProhibited": false,
    "includeSocialOnDownloadPage": false,
    "redirectToPassOnAndroid": false,
    "excludeFromDataRetention": false,
    "genericProperties": [],
    "locationsDisabled": false,
    "locations": [
        {
            "latitude": "53.2729641",
            "longitude": "9.181269799999999",
            "relevantText": "My store"
        },
        {
            "latitude": "53.2391921",
            "longitude": "10.4605743",
            "relevantText": "Burger Store"
        }
    ],
    "beaconsDisabled": false,
    "beacons": [
        {
            "name": "Test",
            "proximityUUID": "868D3225-5F1A-4CAC-8CCA-372D41B9C8C5",
            "relevantText": "Test message from beacon",
            "major": "789",
            "minor": "123"
        }
    ]
}

Response:

{
    "success": true,
    "description": "Template was created successfully!",
    "errors": [],
    "data": {
        "identifier": "e0a8751a-6c14-427d-b932-23ba52e8e649"
    },
    "statusCode": 201
}