Terms API
This page describes the Hive Axyl Server APIs for 'Terms' that the app server calls directly. They include APIs that retrieve the terms to show in the app and APIs that retrieve, save, and delete consent for each terms item.
Call sequence
Build the terms consent screen in the following order.
- Call Get consent status. If
canProceedistrueandreconsentRequiredisfalse, proceed with the service without displaying the terms. Otherwise, continue from step 2. - Use Get terms to receive
termId,version,language, and theitemIdanditemRevisionIdof each item, and display the terms. - Send the values received in step 2 and a new
Idempotency-Keyto Save consent. - If Save consent responds with
409andterms_outdated, retrieve the terms again and then save with a newIdempotency-Key. When retrying because of a network error, use the sameIdempotency-Keyand the same request body.
Before calling the API
The following applies to all Terms APIs.
- Caller:
app server - Base URL:
https://core-api.hiveaxyl.com - Authentication:
Not required
The Terms API does not use the Authorization header. Instead, include the X-App-Id header in every request. The companyCode, serviceCode, and subjectKey in the path are identifiers that specify the target; they are not values that prove the caller's identity. Check on the app server whether the user has permission to send the request.
Add the Content-Type: application/json header when you send a JSON request body.
The Terms API retrieves only terms deployed in the Hive Console. Before calling it, register the terms in Terms > Terms Registration and deploy them in Terms > Terms Deployment.
Common request values
| Value | Location | Description |
|---|---|---|
X-App-Id | header | The App ID registered in the Hive Console. Check it in Project Settings > App ID. For details, see App ID. The part before the first . is the company code; if this company does not match the companyCode in the path, the API responds with 400 and service_not_found. |
companyCode | path | Company code. It is the same value as the part before the first . of the App ID. It starts with an English letter or a digit, uses only English letters, digits, _, and -, and is up to 50 characters long. It is case-sensitive. |
serviceCode | path | Service code entered in Terms > Terms Registration in the Hive Console. It starts with an uppercase English letter, uses only uppercase English letters, digits, and _, and is 2 to 30 characters long. |
subjectKey | path | Identifier that distinguishes the consent subject. For details, see Consent subject. |
Consent subject
The consent subject is the entity that consents to the terms and is identified by subjectKey. Before login, use the Device Key as subjectKey; after login, use the Player ID.
- The Device Key and the Player ID are different consent subjects. The Hive Axyl server records consent and history separately for each value and does not move or merge them between values. Consent saved with a Device Key cannot be retrieved with a Player ID.
- The length is 1 to 128 characters. If the value has leading or trailing whitespace, consists only of whitespace, or contains control characters, the API responds with
400andinvalid_parameter. /and;cannot be used. If the value contains;, the API responds with400andinvalid_parameter, whether or not it is encoded. If it contains/, the API responds with400even if it is encoded, and in this case the response body is not in the error body format.
Terms country and language
The Hive Axyl server determines the terms country from the IP address that the request comes from, and you cannot specify it directly in the request. When you call from the app server, the country is determined from the app server's IP address, so it may differ from the user's country.
- If there are country-specific terms for that country, those terms are selected; otherwise, the default terms are selected. If neither exists, the API responds with
400andterms_not_found. - If the country cannot be determined, the request is treated as having no country specified, and the default terms are selected.
The language is selected in the following order.
- If the
langquery parameter is present, only its value is used. If that language is not registered in the terms, the API responds in the default language of the terms. - If the
langquery parameter is absent, the languages in theAccept-Languageheader are used in order of priority. - If no language matches, the API responds in the default language of the terms.
When you call from the app server, specify the user's language with the lang query parameter.
A lang language code starts with 2 to 8 English letters, which can be followed by - and 1 to 8 English letters or digits. The total length is up to 16 characters. For example, specify ko, ko-KR, or zh-Hans. _ cannot be used. If you send a value in an invalid format, such as ko_KR, the API responds with 400 and invalid_parameter.
Language codes are compared case-insensitively. If there is no exact match, the same language that differs only in region is selected. For example, if you request ko-KR, ko is selected.
However, Simplified Chinese and Traditional Chinese are treated as different languages. zh-Hans and zh-CN are Simplified Chinese, and zh-Hant and zh-TW are Traditional Chinese. For example, if only Simplified Chinese zh-Hans is registered in the terms, a request for Traditional Chinese zh-TW is answered in the default language of the terms, not in zh-Hans.
Success responses
Success responses use application/json, and the response body consists of data and meta. Only List consent history, which returns a list page by page, puts page information in meta.page; for the other APIs, meta is null. IDs are strings made up of digits, and dates and times are in ISO 8601 format in UTC.
For APIs other than Get terms, the Cache-Control of the response includes private and no-store. Do not cache consent status or consent history; retrieve them each time you need them.
Get terms
GET /terms/v1/{companyCode}/services/{serviceCode}/terms
Retrieves the current terms that match the country and language of the request. The order of data.items is the order in which to display the items on the screen. To change the language, call again with lang set to one of the values in availableLanguages in the response.
A new deployment version is created each time the terms are deployed. A new item revision is created only for items whose body or settings changed in that deployment, so the itemRevisionId of an unchanged item stays the same even when the deployment version goes up.
With the default includeBody=true, the body of all items is returned at once. Because the response becomes large when the body is long or there are many items, call with includeBody=false for a screen that first shows only the titles and consent checkboxes. Then, when the user selects the detail view of an item, retrieve only that item's body with Get the terms content of an item.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
lang | query | string | false | Language code. Maximum 16 characters. Example: ko. For the format and selection rules, see Terms country and language. |
includeBody | query | boolean | false | If false, body is returned as null for all items. The default is true. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | List of preferred languages. Used to select the language when lang is not specified. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
To receive only the titles and consent types without the item body, call as follows.
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
| Field | Type | Description |
|---|---|---|
data.termId | string | Terms ID. Send it as is when saving consent. |
data.serviceCode | string | Service code. |
data.termNo | integer(int32) | Terms number. |
data.version | integer(int32) | Deployment version number. Send it as is when saving consent. |
data.matchedCountry | string | Country code of the selected terms. DEFAULT if the default terms were selected. |
data.language | string | Language actually returned. Send it as is when saving consent. |
data.availableLanguages | array[string] | List of languages that can be selected for these terms. |
data.effectiveAt | string(date-time) | Effective time of this deployment version. |
data.nextChangeAt | string(date-time) or null | Effective time of the next scheduled deployment set for the terms of the same service code. null if there is no scheduled deployment. |
data.pageUrl | string or null | URL of the page that shows the entire terms on one screen. Open it in a browser or web view. |
data.versionPageUrl | string or null | URL of the terms page for this deployment version and language. Use it to check the terms as they were at the time of consent. null if not available. |
data.items | array | List of terms items. Contains 1 to 10 items in display order. |
items
Fields of each item in the items array.
| Field | Type | Description |
|---|---|---|
itemId | string | Terms item ID. Send it as is when saving consent. |
itemRevisionId | string | Item revision ID. Send it as is when saving consent. |
revision | integer(int32) | Item revision number. |
consentEpoch | integer(int32) | Re-consent reference value. The value increases when a changed item is deployed with re-consent requested. |
consentType | string | Consent type. REQUIRED is required consent, OPTIONAL is optional consent, and NOTICE is a notice that does not require consent. |
detailView | boolean | Whether the detail view is used. If false, the item has no body, so display only the title. |
title | string | Item title. Maximum 200 characters. |
body | string or null | Body in HTML format. null if includeBody=false or detailView is false. |
publishedAt | string(date-time) or null | Time the item revision first took effect. Always null in this API. |
Response example
{
"data": {
"termId": "1024",
"serviceCode": "SAMPLE",
"termNo": 1,
"version": 3,
"matchedCountry": "KR",
"language": "ko",
"availableLanguages": ["ko", "en"],
"effectiveAt": "2026-10-22T00:00:00Z",
"nextChangeAt": null,
"pageUrl": "https://terms.hiveaxyl.com/terms/v1/1234/SAMPLE/1?lang=ko",
"versionPageUrl": "https://axyl-fn.qpyou.cn/axyl/terms/live/pages/1234/SAMPLE/1/v3-AbCdEfGhIjKlMnOpQrSt_w/ko.html",
"items": [
{
"itemId": "5001",
"itemRevisionId": "9003",
"revision": 2,
"consentEpoch": 2,
"consentType": "REQUIRED",
"detailView": true,
"title": "서비스 이용약관",
"body": "<p>...</p>",
"publishedAt": null
},
{
"itemId": "5003",
"itemRevisionId": "9001",
"revision": 1,
"consentEpoch": 1,
"consentType": "OPTIONAL",
"detailView": false,
"title": "마케팅 정보 수신 동의",
"body": null,
"publishedAt": null
}
]
},
"meta": null
}
API behavior
On a successful retrieval, the API always returns 200 and the response body, regardless of conditional request headers. The Cache-Control of the response is private, max-age=N, where N is at most 60 seconds. If there is a scheduled deployment, N does not exceed the time remaining until its effective time.
To show the entire terms on one screen, open pageUrl in a browser or web view.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Terms retrieved | Cache-Control, Vary | data contains the current terms. |
400 | application/ | Request error, or the service or terms do not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
List previous terms of an item
GET /terms/v1/{companyCode}/services/{serviceCode}/terms/{termId}/items/{itemId}/revisions
Retrieves the list of previous terms of a terms item, newest first. One entry is returned for each item revision that has taken effect. Use it to build the list on a screen that shows previous terms. If no item revision has taken effect, an empty array is returned.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
termId | path | string | true | termId from the Get terms response. |
itemId | path | string | true | itemId from the Get terms response. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | Client language setting. This API does not use it to select a language. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
| Field | Type | Description |
|---|---|---|
data | array | List of previous terms. Starts with the newest item revision. An empty array if no item revision has taken effect. |
data
Fields of each item revision in the data array.
| Field | Type | Description |
|---|---|---|
itemRevisionId | string | Item revision ID. Used in the path of Get the terms content of an item. |
revision | integer(int32) | Item revision number. |
publishedAt | string(date-time) | Time the item revision first took effect. |
Response example
API behavior
You can retrieve only items of the terms shown in the request country. If termId does not identify the terms of that country, the API responds with 400 and terms_not_found. If there are no country-specific terms, the check is made against the default terms.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Previous terms list retrieved | - | data contains the list of previous terms. |
400 | application/ | Request error, or the service, terms, or item does not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
API-specific error codes
| Code | Condition | Action |
|---|---|---|
item_revision_not_found | itemId does not belong to the terms of termId. | Check that you used termId and itemId from the Get terms response as is. |
Get the terms content of an item
GET /terms/v1/{companyCode}/services/{serviceCode}/terms/{termId}/items/{itemId}/revisions/{itemRevisionId}
Retrieves the title and body of a single terms item. You can retrieve both the current item revision and previous item revisions. Use it in the following two cases.
- If you called Get terms with
includeBody=false: when the user selects the detail view of an item, retrieve only that item's body. PuttermId,itemId, anditemRevisionIdfrom the Get terms response in the path, and putlanguageinlang. - When you show previous terms: put the
itemRevisionIdselected from the List previous terms of an item response in the path.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
termId | path | string | true | termId from the Get terms response. |
itemId | path | string | true | itemId from the Get terms response. |
itemRevisionId | path | string | true | itemRevisionId from the Get terms response or the List previous terms of an item response. |
lang | query | string | false | Language code. Maximum 16 characters. Example: ko. For the format and selection rules, see Terms country and language. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | List of preferred languages. Used to select the language when lang is not specified. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
The fields of data are the same as items of Get terms. In this API, data.publishedAt contains the time the item revision first took effect.
Response example
{
"type": "/errors/terms/item-revision-not-found",
"title": "Bad Request",
"status": 400,
"detail": "The item revision is not published.",
"instance": "/terms/v1/{company-code}/services/{service-code}/terms/1024/items/5001/revisions/9999",
"code": "item_revision_not_found",
"errors": [],
"outcome": null
}
API behavior
body cannot be received in parts; the entire body is returned at once. For an item whose detailView is false, body is null.
You can retrieve only items of the terms shown in the request country. If termId does not identify the terms of that country, the API responds with 400 and terms_not_found. If there are no country-specific terms, the check is made against the default terms.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Terms item content retrieved | - | data contains the title and body of the item. |
400 | application/ | Request error, or the service, terms, item, or item revision does not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
API-specific error codes
| Code | Condition | Action |
|---|---|---|
item_revision_not_found | itemId does not belong to the terms of termId, or the item revision has not yet taken effect or does not exist. | Check that you used the values from the Get terms or List previous terms of an item response as is. |
Get consent status
GET /terms/v1/{companyCode}/services/{serviceCode}/subjects/{subjectKey}/consents
Retrieves whether the consent subject has consented to each item of the current terms. Use canProceed and reconsentRequired in the response to determine whether to display the terms.
- If
canProceedistrueandreconsentRequiredisfalse, proceed with the service without displaying the terms. - Otherwise, display the terms received with Get terms. If the subject has never consented,
consentRequiredistrue; if the subject has already consented but the terms have changed and consent must be obtained again,reconsentRequiredistrue.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
subjectKey | path | string | true | Consent subject identifier. Maximum 128 characters. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | Client language setting. This API does not use it to select a language. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
| Field | Type | Description |
|---|---|---|
data.termId | string | ID of the current terms. |
data.version | integer(int32) | Deployment version number of the current terms. |
data.canProceed | boolean | true if all required items have been consented to. |
data.consentRequired | boolean | true if there is a required item with no consent record. |
data.reconsentRequired | boolean | true if there is an item that requires re-consent. Optional items also count. |
data.items | array | List of consent statuses by item. |
items
Fields of each item in the items array.
| Field | Type | Description |
|---|---|---|
itemId | string | Terms item ID. |
itemRevisionId | string | Item revision ID of the current terms. |
consentType | string | Consent type. One of REQUIRED, OPTIONAL, and NOTICE. |
status | string | Consent status. CONSENTED means consented, RECONSENT_REQUIRED means re-consent required, NOT_CONSENTED means no consent record, DECLINED means optional consent declined or withdrawn, and NOT_APPLICABLE means a notice item. |
consentedVersion | integer(int32) or null | Deployment version last consented to or declined. null if none. |
consentedAt | string(date-time) or null | Time of the last consent or decline. null if none. |
Response example
{
"data": {
"termId": "1024",
"version": 3,
"canProceed": false,
"consentRequired": true,
"reconsentRequired": false,
"items": [
{
"itemId": "5001",
"itemRevisionId": "9003",
"consentType": "REQUIRED",
"status": "NOT_CONSENTED",
"consentedVersion": null,
"consentedAt": null
},
{
"itemId": "5003",
"itemRevisionId": "9001",
"consentType": "OPTIONAL",
"status": "NOT_CONSENTED",
"consentedVersion": null,
"consentedAt": null
}
]
},
"meta": null
}
{
"data": {
"termId": "1024",
"version": 3,
"canProceed": false,
"consentRequired": false,
"reconsentRequired": true,
"items": [
{
"itemId": "5001",
"itemRevisionId": "9003",
"consentType": "REQUIRED",
"status": "RECONSENT_REQUIRED",
"consentedVersion": 1,
"consentedAt": "2026-09-01T03:00:00Z"
},
{
"itemId": "5003",
"itemRevisionId": "9001",
"consentType": "OPTIONAL",
"status": "CONSENTED",
"consentedVersion": 1,
"consentedAt": "2026-09-01T03:00:00Z"
}
]
},
"meta": null
}
{
"type": "/errors/terms/service-not-found",
"title": "Bad Request",
"status": 400,
"detail": "The service code does not exist for the company.",
"instance": "/terms/v1/{company-code}/services/{service-code}/subjects/%7BsubjectKey%7D/consents",
"code": "service_not_found",
"errors": [],
"outcome": null
}
API behavior
If only optional items require re-consent, both canProceed and reconsentRequired can be true. In this case as well, display the terms and obtain re-consent.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Consent status retrieved | - | data contains the consent status. |
400 | application/ | Request error, or the service or terms do not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
Save consent
POST /terms/v1/{companyCode}/services/{serviceCode}/subjects/{subjectKey}/consents
Saves consent, re-consent, and withdrawal of optional consent. Include termId, version, language, and each item's itemId and itemRevisionId from the Get terms response as is, and use agreed to indicate whether each item is consented to.
The first consent must include all required items whose consentType is REQUIRED. After that, you only need to send the items whose consent changes. Required items cannot be declined.
Idempotency-Key is a retry key that prevents the same request from being saved more than once. If you send the request again with the same key and the same request body, the original 201 response is returned as is. Use a new key for new consent.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
subjectKey | path | string | true | Consent subject identifier. Maximum 128 characters. |
Idempotency-Key | header | string | true | Retry key. 8 to 64 characters made up of English letters, digits, _, and -. A UUID is recommended. A value that contains only whitespace is treated as missing, and the response is missing_field. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | Client language setting. This API does not use it to select a language. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
| body | body | ConsentSaveRequest | true | Request body for saving consent. |
ConsentSaveRequest request body
| Field | Type | Required | Description |
|---|---|---|---|
termId | string | true | termId from the Get terms response. |
version | integer(int32) | true | version from the Get terms response. 1 or greater. |
language | string | true | language from the Get terms response. 2 to 16 characters. |
channel | string or null | false | Consent channel. A value defined by the app, up to 32 characters. It is recorded as is in the consent history. Example: APP, WEB |
items | array | true | List of items to consent to. 1 to 10 items. The same itemId cannot be included more than once. |
items
Fields of each item in the items array.
| Field | Type | Required | Description |
|---|---|---|---|
itemId | string | true | itemId from the Get terms response. |
itemRevisionId | string | true | itemRevisionId from the Get terms response. |
agreed | boolean | true | true means consent, and false means decline or withdrawal. false cannot be sent for required items. |
Request example
This request consents to a required item and declines an optional item.
curl -X POST 'https://core-api.hiveaxyl.com/terms/v1/{company-code}/services/{service-code}/subjects/{subject-key}/consents' \
-H 'X-App-Id: {app-id}' \
-H 'Idempotency-Key: {idempotency-key}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"termId": "1024",
"version": 3,
"language": "ko",
"channel": "APP",
"items": [
{
"itemId": "5001",
"itemRevisionId": "9003",
"agreed": true
},
{
"itemId": "5003",
"itemRevisionId": "9001",
"agreed": false
}
]
}'
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
data contains the consent status after saving. The fields are the same as the data object of Get consent status.
API-specific additional error object
The outcome of a terms_outdated error response contains information about the current terms.
| Field | Type | Description |
|---|---|---|
outcome.termId | string | ID of the current terms. |
outcome.version | integer(int32) | Deployment version number of the current terms. |
Response example
{
"data": {
"termId": "1024",
"version": 3,
"canProceed": true,
"consentRequired": false,
"reconsentRequired": false,
"items": [
{
"itemId": "5001",
"itemRevisionId": "9003",
"consentType": "REQUIRED",
"status": "CONSENTED",
"consentedVersion": 3,
"consentedAt": "2026-10-22T03:00:00Z"
},
{
"itemId": "5003",
"itemRevisionId": "9001",
"consentType": "OPTIONAL",
"status": "DECLINED",
"consentedVersion": 3,
"consentedAt": "2026-10-22T03:00:00Z"
}
]
},
"meta": null
}
{
"type": "/errors/terms/terms-outdated",
"title": "Conflict",
"status": 409,
"detail": "The term changed after it was retrieved.",
"instance": "/terms/v1/{company-code}/services/{service-code}/subjects/%7BsubjectKey%7D/consents",
"code": "terms_outdated",
"errors": [],
"outcome": {
"termId": "1024",
"version": 4
}
}
{
"type": "/errors/terms/required-consent-declined",
"title": "Unprocessable Content",
"status": 422,
"detail": "A required item cannot be declined.",
"instance": "/terms/v1/{company-code}/services/{service-code}/subjects/%7BsubjectKey%7D/consents",
"code": "required_consent_declined",
"errors": [
{
"field": "items[0].agreed",
"message": "invalid value"
}
],
"outcome": null
}
API behavior
If the terms changed after you retrieved them, or if termId, version, itemId, or itemRevisionId in the request body differs from the current terms, the API responds with 409 and terms_outdated. In this case, retrieve the terms again and then save with a new Idempotency-Key. You can check the termId and version of the current terms in outcome.
Use Idempotency-Key as follows.
- When retrying because of a network error or a
503response, use the same key and the same request body. If the request has already been saved, the original201response is returned as is. - If you send a key that has already been used with a different consent subject or a different request body, the API responds with
409andidempotency_key_reused. - After you call Delete consent, the keys previously used by that consent subject cannot be used again. When you save consent again after the deletion, use a new key.
Set language to the language value from the Get terms response as is. If you send a language that is not registered in the terms, the API responds with 400 and invalid_parameter.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
201 | application/ | Consent saved | Location | data contains the consent status after saving. Location contains the Get consent status path. |
400 | application/ | Request error, or the service or terms do not exist | - | - |
409 | application/ | Terms changed or retry key reused | - | If terms_outdated, retrieve the terms again; if idempotency_key_reused, send the request with a new key. |
422 | application/ | Required item declined or missing | - | Check that you sent all required items as consented. |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | Wait for the number of seconds in Retry-After, and then call again with the same Idempotency-Key. |
API-specific error codes
| Code | Condition | Action |
|---|---|---|
bad_request | The request body cannot be read. | Check that the request body is valid JSON and that the field types are correct. |
terms_outdated | The terms changed after you retrieved them, or a value in the request body differs from the current terms. | Retrieve the terms again and then save with a new Idempotency-Key. |
idempotency_key_reused | The Idempotency-Key was used for a different request or before consent was deleted. | Send the request with a new Idempotency-Key. |
required_consent_declined | agreed was sent as false for a required item. | For required items, send only true. You can check the position of the item in errors. |
required_consent_missing | A required item is missing from the first consent. | Include all required items in the request. |
Delete consent
DELETE /terms/v1/{companyCode}/services/{serviceCode}/subjects/{subjectKey}/consents
Deletes the current consent of the consent subject. Call it when the user deletes their account. Because the API responds with 200 even when there is no consent to delete, you can call it repeatedly.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
subjectKey | path | string | true | Consent subject identifier. Maximum 128 characters. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | Client language setting. This API does not use it to select a language. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
Because no data is returned, data and meta are both null.
Response example
{
"type": "/errors/common/missing-field",
"title": "Missing Field",
"status": 400,
"detail": "Required field is missing.",
"instance": "/terms/v1/{company-code}/services/{service-code}/subjects/%7BsubjectKey%7D/consents",
"code": "missing_field",
"errors": [
{
"field": "X-App-Id",
"message": "required"
}
]
}
API behavior
Only the current consent is deleted; the consent history is not deleted. The deletion appears in List consent history as a history entry whose action is ERASE.
After the deletion, none of the Idempotency-Key values that the consent subject used for Save consent can be used again. When you save consent again after the deletion, use a new Idempotency-Key.
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Consent deleted | - | data and meta are null. |
400 | application/ | Request error, or the service does not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
List consent history
GET /terms/v1/{companyCode}/services/{serviceCode}/subjects/{subjectKey}/consents/history
Retrieves the consent history of the consent subject, newest first. Consent, re-consent, decline, withdrawal, and deletion are each recorded as one entry per item. If there is no history or the page is out of range, an empty array is returned.
Request parameters
| Name | Location | Type | Required | Description |
|---|---|---|---|---|
companyCode | path | string | true | Company code. If the code is not registered, the response is service_not_found. |
serviceCode | path | string | true | Service code entered in Terms > Terms Registration. |
subjectKey | path | string | true | Consent subject identifier. Maximum 128 characters. |
page | query | integer(int32) | false | Page number to retrieve. Starts at 1. The default is 1. |
size | query | integer(int32) | false | Number of history entries per page. Specify a value from 1 to 100. The default is 20. |
X-App-Id | header | string | true | The App ID registered in the Hive Console. If the header is not sent, the response is missing_field; if the value is empty, the response is missing_app_id. |
Accept-Language | header | string | false | Client language setting. This API does not use it to select a language. |
X-Platform | header | string | false | Client platform information. |
X-SDK-Version | header | string | false | Client SDK version information. |
X-OS-Version | header | string | false | Client operating system version information. |
User-Agent | header | string | false | User-Agent information of the client application. |
traceparent | header | string | false | W3C Trace Context header for distributed tracing. |
Request example
Response
For the common data and meta, the error body, and the product common error codes, see Terms responses and errors. This section describes the objects this API actually returns and the handling specific to this API.
Success response data object
| Field | Type | Description |
|---|---|---|
data | array | List of consent history entries. Starts with the newest entry. An empty array if there is no history. |
data
Fields of each consent history entry in the data array.
| Field | Type | Description |
|---|---|---|
id | string | History ID. |
action | string | History type. AGREE is consent, RECONSENT is re-consent, DECLINE is declining optional consent, WITHDRAW is withdrawal of optional consent, and ERASE is a record of deleting the current consent. |
termId | string | Terms ID. |
version | integer(int32) | Deployment version number. |
itemId | string | Terms item ID. |
itemRevisionId | string | Item revision ID. |
agreed | boolean | Whether consent was given. |
country | string or null | Country code at the time of consent. null if no country was specified. |
language | string | Language at the time of consent. |
channel | string or null | channel sent when consent was saved. |
versionPageUrl | string or null | URL of the terms page for this history entry. null if not available. |
createdAt | string(date-time) | Time the history entry was recorded. |
Success response meta object
| Field | Type | Description |
|---|---|---|
meta.page.number | integer(int32) | Current page number. Starts at 1. |
meta.page.size | integer(int32) | Page size. |
meta.page.totalElements | integer(int64) | Total number of history entries. |
meta.page.totalPages | integer(int32) | Total number of pages. 0 if there is no history. |
Response example
{
"data": [
{
"id": "7002",
"action": "DECLINE",
"termId": "1024",
"version": 3,
"itemId": "5003",
"itemRevisionId": "9001",
"agreed": false,
"country": "KR",
"language": "ko",
"channel": "APP",
"versionPageUrl": "https://axyl-fn.qpyou.cn/axyl/terms/live/pages/1234/SAMPLE/1/v3-AbCdEfGhIjKlMnOpQrSt_w/ko.html",
"createdAt": "2026-10-22T03:00:00Z"
},
{
"id": "7001",
"action": "AGREE",
"termId": "1024",
"version": 3,
"itemId": "5001",
"itemRevisionId": "9003",
"agreed": true,
"country": "KR",
"language": "ko",
"channel": "APP",
"versionPageUrl": "https://axyl-fn.qpyou.cn/axyl/terms/live/pages/1234/SAMPLE/1/v3-AbCdEfGhIjKlMnOpQrSt_w/ko.html",
"createdAt": "2026-10-22T03:00:00Z"
}
],
"meta": {
"page": {
"number": 1,
"size": 20,
"totalElements": 2,
"totalPages": 1
}
}
}
{
"type": "/errors/common/invalid-parameter",
"title": "Invalid Parameter",
"status": 400,
"detail": "Invalid request parameters.",
"instance": "/terms/v1/{company-code}/services/{service-code}/subjects/%7BsubjectKey%7D/consents/history",
"code": "invalid_parameter",
"errors": [
{
"field": "size",
"message": "out of range"
}
]
}
Response status
| Status | Content type | Meaning | Response headers | Response body or action |
|---|---|---|---|---|
200 | application/ | Consent history retrieved | - | data contains the history list, and meta.page contains the page information. |
400 | application/ | Request error, or the service does not exist | - | - |
500 | application/ | Server error | - | - |
503 | application/ | Temporarily unable to process the request | Retry-After | - |
Terms responses and errors
The following applies to all Terms APIs. For the response body structure and the error check order common to all Hive Axyl Server APIs, see Hive Axyl Server API error handling.
Response status
200,201: Request succeeded.201is returned only by Save consent.400: Request error or terms product error. The cause is identified bycode.409,422: Terms product error. Returned only by Save consent.500: Server error. The response body has nooutcome.503: Temporarily unable to process the request. Wait for the number of seconds in theRetry-Afterheader, and then send the same request again. The response body has nooutcome.
Even when the service, terms, item, or item revision does not exist, the API responds with 400, not 404, and code identifies which target does not exist. Every response has an X-Trace-Id header that contains the trace ID of the request. Include this value when you make an inquiry.
Error body
For definitions of the common fields type, title, status, detail, instance, and code, see Hive Axyl Server API error handling. The error body of the Terms API additionally follows the rules below.
- The error body of a common error whose
typestarts with/errors/common/has nooutcome. If there is a problem with a request value,errorscontains one entry for the field where the error occurred. - The error body of a terms product error whose
typestarts with/errors/terms/always includeserrorsandoutcome.errorsis an empty array if there are no entries, andoutcomeisnullif there is no additional information. - In
instance, thesubjectKeysegment is returned as%7BsubjectKey%7Dinstead of the original value.
In each item of errors, message is one of the following five values.
message value in the errors array | Meaning |
|---|---|
required | A required value is missing. |
invalid length | The length or count is outside the allowed range. |
out of range | The number is outside the allowed range. |
invalid format | The format is invalid. |
invalid value | The value is not allowed. |
Terms common error codes
In addition to the common error codes, the Terms API also returns the following common codes. type starts with /errors/common/.
internal_error: Internal server errorservice_unavailable: Service temporarily unavailable
If you receive service_unavailable, wait for the number of seconds in the Retry-After header, and then send the same request again.
Terms product error codes
Multiple Terms APIs return the following codes. For error codes that differ by API, see the error code description of each API.
| Code | Condition | Action |
|---|---|---|
service_not_found | The company code is not registered, the service code was not entered in Terms > Terms Registration, or the company of X-App-Id differs from the companyCode in the path. | Check that companyCode, serviceCode, and X-App-Id belong to the same company. |
terms_not_found | Neither country-specific terms for the request country nor default terms exist, or the termId in the path does not identify the terms shown in the request country. | Check that the terms have been deployed in Terms > Terms Deployment in the Hive Console. |