Terminal Create & Update
Last updated: 2023-11-28
Workflow
Use this endpoint as the final step in the terminal update workflow:
- Call Get Terminal Packages (
GET /terminal/getPackages/{customerId}/{model}) to retrieve available packages - Note the
idvalues from the package list - Call this endpoint with the desired
packageIdsand the target terminalserialNumbers - Check
isUploadSuccessfulin the response for each serial number to confirm success
POST
/terminal/createUpdateCreates a terminal update with package content retrieved from the Get Packages API
Request Body
customerIdnumberrequiredCustomer ID. Can be found in the URL of the customer page: /OnBoarding/ModifyCustomer?id=%
packageIdsarray of stringsrequiredArray of package IDs to apply. Retrieve package IDs from the Get Terminal Packages endpoint.
serialNumbersarray of stringsrequiredArray of terminal serial numbers that require the update.
HTTP Status Code Summary
| Code | Description |
|---|---|
| 200 | Update configuration created successfully. Check isUploadSuccessful per serial number. |
| 400 | Bad request format or validation failed. |
| 401 | Unauthorized — missing or invalid authentication credentials. |
| 404 | No resources found for the provided data. |
| 422 | Unprocessable entity — the customerId, packageIds, or serialNumbers are invalid. |
Request
cURL
1curl -X 'POST' \
2 'https://demo-api.westpay.se/access/v2/terminal/createUpdate' \
3 -H 'accept: text/plain' \
4 -H 'Ocp-Apim-Subscription-Key: <merchant-subscription-key>' \
5 -H 'Authorization: Bearer <access-token>' \
6 -H 'Content-Type: application/json' \
7 -d '{
8 "customerId": 10796,
9 "packageIds": [437],
10 "serialNumbers": ["1043005005"]
11}'Response
Response
1{
2 "createConfigurationFileResults": [
3 {
4 "serialNumber": "<serial_number>",
5 "isUploadSuccessful": true,
6 "message": null
7 }
8 ]
9}