@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api POS Terminal Management API (deprecated)
@base https://postfmapi-test.adyen.com/postfmapi/terminal/v1
@version 1
@auth ApiKey X-API-Key in header | Bearer basic
@endpoints 5
@toc assignTerminals(1), findTerminal(1), getStoresUnderAccount(1), getTerminalDetails(1), getTerminalsUnderAccount(1)

@group assignTerminals
@endpoint POST /assignTerminals
@required {companyAccount: str, terminals: [str]}
@optional {merchantAccount: str, merchantInventory: bool, store: str}
@returns(200) {results: map}
@errors {400, 401, 403, 422, 500}

@endgroup

@group findTerminal
@endpoint POST /findTerminal
@required {terminal: str}
@returns(200) {companyAccount: str, merchantAccount: str, merchantInventory: bool, store: str, terminal: str}
@errors {400, 401, 403, 422, 500}

@endgroup

@group getStoresUnderAccount
@endpoint POST /getStoresUnderAccount
@required {companyAccount: str}
@optional {merchantAccount: str}
@returns(200) {stores: [map]}
@errors {400, 401, 403, 422, 500}

@endgroup

@group getTerminalDetails
@endpoint POST /getTerminalDetails
@required {terminal: str}
@returns(200) {bluetoothIp: str, bluetoothMac: str, companyAccount: str, country: str, deviceModel: str, dhcpEnabled: bool, displayLabel: str?, ethernetIp: str?, ethernetMac: str?, firmwareVersion: str, iccid: str?, lastActivityDateTime: str(date-time)?, lastTransactionDateTime: str(date-time)?, linkNegotiation: str?, merchantAccount: str, merchantInventory: bool, permanentTerminalId: str, serialNumber: str, simStatus: str?, store: str, storeDetails: map{address: map{city: str, countryCode: str, postalCode: str, stateOrProvince: str, streetAddress: str, streetAddress2: str}, description: str, inStoreTerminals: [str], merchantAccountCode: str, status: str, store: str}, terminal: str, terminalStatus: str, wifiIp: str, wifiMac: str}
@errors {400, 401, 403, 422, 500}

@endgroup

@group getTerminalsUnderAccount
@endpoint POST /getTerminalsUnderAccount
@required {companyAccount: str}
@optional {merchantAccount: str, store: str}
@returns(200) {companyAccount: str, inventoryTerminals: [str], merchantAccounts: [map]}
@errors {400, 401, 403, 422, 500}

@endgroup

@end
