This is the sandbox API for ABS version 1.2.1
The API URL is https://ns-uat-abs.piano.io/
Endpoint: /access/create
All validation and lookups (user, resource) are done before any data is written. If the request is rejected with a 203, 400 or 401 code, nothing is created or updated.
If the user already has an active access to the resource, no new access is created (code 201). If the user's previous access to this resource has expired, a new access is created (code 200).
List of parameters:
| Parameter | Example | Comment |
|---|---|---|
| aegisUserId | 10015658 | Optional - if empty, a new user will be created. If provided, the user must exist and the email must match the user's email (case is ignored). |
| firstName | John | Optional if Company name is provided. |
| lastName | Smith | Optional if Company name is provided. |
| john.smith@aol.com | Mandatory parameter. Please do not forget to encode special symbols like '+'. | |
| absSubscriberNumber | 1234 | Mandatory parameter. |
| absSubscriptionNumber | 5678 | Mandatory parameter. |
| absOrderId | 13579 | Optional parameter. |
| dpaDirectMail | y | Optional. Corresponds to 'dpa_ns_direct_mail' Piano custom field. |
| dpaEmail | y | Optional. Corresponds to 'dpa_ns_email' Piano custom field. |
| dpaPhone | n | Optional. Corresponds to 'dpa_ns_telephone' Piano custom field. |
| dpaMobile | y | Optional. Corresponds to 'dpa_ns_sms' Piano custom field. |
| addressId | UATBB2UX9W53 | Optional - if empty, a new address will be created if necessary address data provided. Should be empty if aegisUserId is empty. |
| companyName | Smith and sons,inc. | Optional if both first_name and last_name are provided, otherwise mandatory. |
| address1 | Northern road, 6 | Optional parameter, but if provided - city, country code and postal code should be provided as well. |
| address2 | Central square, 12 | Optional. |
| addressCity | Chester city | Optional parameter, but if provided - address1, country code and postal code should be provided as well. |
| addressRegionCode | BL | Mandatory if country code provided and country has regions. Not applicable for UK. |
| addressCountryCode | SK | Optional parameter, but if provided - address1, city and postal code should be provided as well. List of country codes and region codes should be taken from https://api-eu.piano.io/api/v3/anon/country/list/country |
| postalCode | 123456 | Optional parameter, but if provided - address1, city and country code should be provided as well. |
| phone | +441324354657 | Optional. |
| accessResourceId | XAUT | Mandatory parameter. The resource must exist. |
| accessEndDate | 2026-11-25 | Mandatory parameter. ISO date without time (YYYY-MM-DD). Should be today or later. |
Response codes:
| Code | Reason |
|---|---|
| 200 | Successful entitlement creation. Response will contain 'aegisUserId', 'accessId' and 'addressId'. It is also returned when the user's previous access to the resource had expired and a new one was created. May contain 'warning' if the user profile or the address was not updated. |
| 201 | A user already had an active access to the resource, so no new access was created. Data will be updated and response will contain ids. May contain 'warning'. |
| 202 | Partial success - access was given but correct date was not set. Response will contain the new 'accessId'. May contain 'warning'. |
| 203 | Request data validation issue (for example: user or resource does not exist, user email does not match, country or region code is not valid). |
| 400 | Bad request. Please check query parameters (missing parameters, invalid date format, date in the past). |
| 401 | Incorrect authorisation, please check your API key. |
| 500 | Internal server error |
Endpoint: /access/extend
Changes the end date of an active access.
List of query parameters:
| Parameter | Example | Comment |
|---|---|---|
| aegisUserId | 10015658 | Mandatory parameter. |
| accessId | eYJjPtJHfFdm | Mandatory parameter. Should be an active access of the given user. |
| accessResourceId | XAUT | Mandatory parameter. |
| accessEndDate | 2026-11-25 | Mandatory parameter. ISO date without time (YYYY-MM-DD). Should be today or later. |
Response codes:
| Code | Reason |
|---|---|
| 200 | Successful entitlement update. Response will contain 'aegisUserId' and 'accessId' (a new 'accessId' if the access was replaced because the resource changed). |
| 202 | Partial success - the access was replaced because the resource changed, but the correct end date was not set. Response will contain the new 'accessId'. |
| 203 | Request data validation issue. For example: user, access or resource id is not valid, the access does not belong to the user, the date is in the past, or the access is no longer active (expired or revoked). In that case the response contains 'suggestedEndpoint' (/access/extend-or-create). |
| 400 | Bad request. Please check query parameters (missing parameters or invalid date format). |
| 401 | Incorrect authorisation, please check your API key. |
| 409 | Access update was reported successful by Piano but the new end date did not take effect. Please contact Piano team. |
| 424 | The access is tied to a subscription and cannot be extended through this API. To extend it, update the subscription's next bill date manually in the Piano Dashboard. |
| 500 | Internal server error |
Endpoint: /access/extend-or-create
Renews an expired or revoked access. A new access to the same resource is created with the requested end date, and the response contains the new 'accessId'. The old access is left as it is and its id is returned as 'previousAccessId'. Repeating the same request returns the same new access (no duplicate is created).
List of query parameters:
| Parameter | Example | Comment |
|---|---|---|
| aegisUserId | 10015658 | Mandatory parameter. |
| accessId | eYJjPtJHfFdm | Mandatory parameter. Should be an expired or revoked access of the given user. |
| accessResourceId | XAUT | Mandatory parameter. Should be the resource of the given access. |
| accessEndDate | 2026-11-25 | Mandatory parameter. ISO date without time (YYYY-MM-DD). Should be today or later. This is the end date of the new access. |
Response codes:
| Code | Reason |
|---|---|
| 200 | A new entitlement was created. Response will contain 'aegisUserId', 'accessId' (the new access) and 'previousAccessId' (the expired access). |
| 202 | Partial success - the new access was created but the correct end date was not set. Response will contain the new 'accessId' and 'previousAccessId'. |
| 203 | Request data validation issue. For example: user, access or resource id is not valid, the access does not belong to the user, accessResourceId does not match the resource of the access, the date is in the past, or the access is still active. For an active access the response contains 'suggestedEndpoint' (/access/extend). |
| 400 | Bad request. Please check query parameters (missing parameters or invalid date format). |
| 401 | Incorrect authorisation, please check your API key. |
| 424 | The access is still active and tied to a subscription. It cannot be extended through this API. To extend it, update the subscription's next bill date manually in the Piano Dashboard. |
| 500 | Internal server error |
Endpoint: /access/revoke
The access has to belong to the given user: an access id of another user is not revoked (203). Revoking an access that was already revoked also returns 203.
List of query parameters:
| Parameter | Example | Comment |
|---|---|---|
| aegisUserId | 10015658 | Mandatory parameter. |
| accessId | eYJjPtJHfFdm | Mandatory parameter. |
Response codes:
| Code | Reason |
|---|---|
| 200 | Successful access revokation. |
| 203 | Request data validation issue: the access id is not valid (unknown or already revoked) or does not belong to the user. |
| 400 | Bad request. Please check query parameters. |
| 401 | Incorrect authorisation, please check your API key. |
| 500 | Internal server error |
Endpoint: /user/update
List of query parameters:
| Parameter | Example | Comment |
|---|---|---|
| aegisUserId | 10015658 | Mandatory parameter. |
| firstName | John | Mandatory parameter. |
| lastName | Smith | Mandatory parameter. |
| john.smith@aol.com | Mandatory parameter. | |
| absSubscriberNumber | 1234 | Mandatory parameter. |
| absSubscriptionNumber | 5678 | Mandatory parameter. |
| absOrderId | 13579 | Optional parameter. |
| dpaDirectMail | y | Optional. Corresponds to 'dpa_ns_direct_mail' Piano custom field. |
| dpaEmail | y | Optional. Corresponds to 'dpa_ns_email' Piano custom field. |
| dpaPhone | n | Optional. Corresponds to 'dpa_ns_telephone' Piano custom field. |
| dpaMobile | y | Optional. Corresponds to 'dpa_ns_sms' Piano custom field. |
Response codes:
| Code | Reason |
|---|---|
| 200 | Successful user update. Response will contain 'aegisUserId'. |
| 203 | Request data validation issue (user id is not valid, email is not valid, or the email is already registered for another user). |
| 400 | Bad request. Please check query parameters. |
| 401 | Incorrect authorisation, please check your API key. |
| 500 | Internal server error |