PUT /api/legals/{LegalDocumentID}
Updates information about the platform legal agreement. You can use this operation to change or deactivate the existing legal agreement.
If you are not sure of the LegalDocumentID for the existing legal agreement, you can retrieve it using the GET /api/legals operation with this parameter: ?AgreementType=com.soa.atmosphere.legals.signup.
Note: To change the platform legal agreement, upload a new file and then assign it using this operation. The LegalDocumentID remains the same. To remove a platform legal agreement, use this operation to change the DocumentState property to com.soa.status.inactive.
Authorization Roles/Permissions: Must be logged in. Site Admin
This topic includes the following sections:
HTTP Method
PUT
URL
https://{hostname}/api/legals/{LegalDocumentID}
Sample Request
The examples below shows requests to update the platform legal agreement.
Sample Request URL
https://{hostname}/api/legals/ab54495f-3553-47bf-8a35-fa1fe98d2993.acmepaymentscorp
Sample request headers
Content-Type: application/json X-Csrf-Token_acmepaymentscorp: TokenID%3D8ed70a13-8469-11e8-b37a-b155e4eabeb8%2CexpirationTime%3D153...
Sample request body #1: Deactivates the legal agreement, so that users no longer have to accept it.
{ "Name" : "Platform User Agreement #2, Uploaded by API", "Description" : "Platform User Agreement #2", "AgreementType" : "com.soa.atmosphere.legals.signup", "ContentPath" : "/system/agreements/plat_agreement_uploadbyapi_02.txt", "Active" : true, "PrintContentPath" : "/system/agreements/plat_agreement_uploadbyapi_02.txt", "DocumentState" : "com.soa.status.inactive", "FileName" : "plat_agreement_uploadbyapi_02.txt" }
Sample request body #2: Reactivates the legal agreement
The difference is the DocumentState parameter value.
{ "Name" : "Platform User Agreement #2, Uploaded by API", "Description" : "Platform User Agreement #2", "AgreementType" : "com.soa.atmosphere.legals.signup", "ContentPath" : "/system/agreements/plat_agreement_uploadbyapi_02.txt", "Active" : true, "PrintContentPath" : "/system/agreements/plat_agreement_uploadbyapi_02.txt", "DocumentState" : "com.soa.status.active", "FileName" : "plat_agreement_uploadbyapi_02.txt" }
Request Headers
For general information on request header values, refer to HTTP Request Headers.
Header | Description |
---|---|
Accept | Any Accept header value that supports a response Content-Type of text/plain is valid; for example, */*. |
Content-Type |
Any of the following media types is valid for the Accept header: application/json, application/xml application/vnd.soa.v71+json, application/vnd.soa.v71+xml application/vnd.soa.v72+json, application/vnd.soa.v72+xml application/vnd.soa.v80+json, application/vnd.soa.v80+xml application/vnd.soa.v81+json, application/vnd.soa.v81+xml |
Cookie | AtmoAuthToken_{fedmemberid}={cookie value, which usually starts with TokenID}—The platform cookie. This is the Akana API Platform authorization token, and must be sent with every API request that requires login. For more information and an example, see Session cookies. |
X-Csrf-Token_{fedmemberID} | The CSRF prevention header; may or may not be required, depending on platform settings. See CSRF Prevention on the Platform. By default, the CSRF header is not required for GET operations and is required for all others, with a few exceptions relating to user login. |
Request Parameters
Parameter | Parm Type | Data Type | Required | Description |
---|---|---|---|---|
LegalDocumentID | Path | string | Required | The unique ID for the association of a specific legal document with a resource such as an API version, license, or the platform. |
AgreementDocument | Body | AgreementDocument | Required | Contains information about a platform legal agreement document. |
Response
If successful, this operation returns HTTP status code 200. There is no other response.
Sample Response
The sample response below shows successful completion of this operation.
Sample response headers
Status Code: 200 OK Date: Wed, 12 Dec 2018 22:48:47 GMT
Sample response body
None.
Response Headers
For general information on response header values, refer to HTTP Response Headers.
Header | Description |
---|---|
Content-Type | text/plain |
Response Body
Not applicable.
Error Codes/Messages
If the call is unsuccessful an error code/message is returned. One or more examples of possible errors for this operation are shown below.
Item | Value |
---|---|
401 | Unauthorized. For example, you would get this response if you didn't include the custom X-Csrf-Token_{fedmemberID} header in the request, when it was required by the platform settings; or if you included an invalid or expired value for this header. You would also get this response for any operation that requires login (almost all) if the login cookie was missing. |
406 | Not Acceptable. Returned if there is a problem with the request format. For example, you would get this if you specified an incorrect media type for the Accept header. |
500 | An error occurred processing the call. |
More information about Akana API Platform API error messages.