Manage terms and conditions

Introduction

You must add terms and conditions ("T&C's") to your organization profile before you publish a rate plan. The T&C's reside outside of the organization profile. In your organization profile, you specify the location (public URL) of the T&C's.

After you publish a rate plan, the current version of the T&C's is displayed in the developer portal. Developers can purchase a plan only after they have accepted the current T&C's.

Managing terms and conditions using the UI

Manage terms and conditions using the UI, as described in the following sections.

Adding terms and conditions using the UI

  1. Access the Organization Profile page, as described in Exploring the Organization Profile page.
  2. Click Edit.
  3. In the Terms and conditions section of the Organization Profile page, click Add terms and conditions.

    The New terms and conditions dialog is displayed

  4. Enter the following information:
    Field Description
    Effective Date

    Date that the terms and conditions are in effect. The default is the current date. You must enter the current or a future date.

    Version

    Version of the terms and conditions. The version number allows you to keep track of different versions of the terms and conditions.

    URL

    URL of the terms and conditions.

  5. Click Create.

    The new T&Cs are added to the Terms and conditions section of the Organization Profile page.

  6. Repeat steps 3 through 5 to add additional terms and conditions.
  7. Click Save to save the organization profile changes.

Editing terms and conditions using the UI

You cannot edit the Terms and conditions directly. Instead, you must delete the terms and conditions that you want to edit and then add a new terms and conditions entry.

Deleting terms and conditions using the UI

  1. Access the Organization Profile page, as described in Exploring the Organization Profile page.
  2. Click Edit on the Organization Profile page.
  3. In the list of T&C's, position your cursor over the T&C's you want to delete.
  4. Click .

Manging terms and conditions using the API

Manage terms and conditions using the API, as described in the following sections.

Adding terms and conditions using an API

Add T&C's by issuing a POST request to /mint/organizations/{org_name}/tncs. When you add the T&C's, you can optionally specify:

  • URL
  • Accompanying text (such as a description)
  • Date when the T&C's are in effect
  • Version number

See Terms and conditions configuration properties for additional information abut these options.

For example:

curl -X POST   "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/tncs" \
  -H "Content-Type: application/json" \
  -d \
  '{
     "url":"www.testoperator/termsandconditions",
     "tncText":"Sample text for the T&C",
     "version":"1.1",
     "startDate":"2018-09-24”
  }' \
  -u email:password

The following provides an example of the response:

{
   "id" : "6803d70a-18cc-40c8-b250-675c5e8a75c ",
   "organization" : {     
     …
   },
   "startDate" : "2018-09-24 00:00:00",
   "tncText" : "Sample text for the T&C",
   "url" : "www.testoperator/termsandconditions",
   "version" : "1.1"
 }

Viewing terms and conditions using the API

View specific T&C's or all T&C's for an organization.

View specific T&Cs by issuing a GET request to /mint/organizations/{org_name}/tncs/{tncs_id}, where {tncs_id} is the identification of the specific T&C's (the ID is returned in the response when you create the T&C's). For example:

curl -X GET "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/tncs/6803d70a-18cc-40c8-b250-675c5e8a75c" \
  -H "Accept: application/json"  \
  -u email:password

View all the T&C's for the organization by issuing a GET request to /mint/organizations/{org_name}/tncs. For example:

curl -X GET "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/tncs" \
  -H "Accept: application/json" \
  -u email:password

The following provides an example of the response:

{

"tnc" : [
  {
    "id" : "77193339-8d79-44a8-8af2-3593f16c158e",
    "organization" :
    {
      ...
    },
   "startDate" : "2018-07-01 00:00:00",
   "tncText" : "Big operator text for the T&C",
   "url" : "www.bigoperator/termsandconditions",
   "version" : "1.0"
  },
  {
    "id" : "6803d70a-18cc-40c8-b250-675c5e8a75c3",
    "organization" : {
    ...
  },
    "startDate" : "2018-09-24 00:00:00",
    "tncText" : "Sample text for the T&C",
    "url" : "www.testoperator/termsandconditions",
    "version" : "1.1"
  }
  ]
   "totalRecords" : 2
}

Viewing terms and conditions accepted by a developer using the API

View the T&C's accepted by a specific developer by issuing a GET request to /mint/organizations/{org_name}/developers/{dev_id}/developer-tncs, where {dev_id} is the identification of the developer. For example:

curl -X GET "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/developers/dev2@myorg.com/developer-tncs" \
  -H "Accept:application/json"  \
  -u email:password

The following provides an example of the response:

{
  "developerTnc": [
  {
    "action": "ACCEPTED",
    "auditDate": "2018-08-29 07:24:45",
    "id": "dev2@myorg.com",
    "tnc": {
      ...
      "id": "26abc14c-c628-4c38-8840-a343c8ee9437",
      ...
    }
  }],
  "totalRecords": 1
}

Editing terms and conditions using the API

Edit T&C's by issuing a PUT request to /mint/organizations/{org_named}/tncs/{tncs_id}, where {tncs_id} is the identification of the T&C's. When you make the update, you need to specify in the request body the updated settings and the identification of the T&Cs. For example, the following request edits the version number for the T&C's (the updated property is highlighted in the example):

curl -X PUT "https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/tncs/cfbb03b3-b707-495b-9b8a-ff67d71065a9" \
  -H "Content-Type: application/json" \
  -d {
    "id":"6803d70a-18cc-40c8-b250-675c5e8a75c",
    "version":"1.2"
  }' \
  -u email:password

The following provides an example of the response:

{
   "id" : "cfbb03b3-b707-495b-9b8a-ff67d71065a9",
   "organization" : {
       "address" : [ {
       "address1" : "Test address",
       "city" : "Test City",
       "country" : "US",
       "id" : "test-address",
       "isPrimary" : true,
       "state" : "CA",
       "zip" : "54321"
     } ],
     …"
   },
   "startDate" : "2018-09-24 00:00:00",
   "tncText" : "Sample text for the T&C",
   "url" : "www.testoperator/termsandconditions",
   "version" : "1.2"
 }

Deleting terms and conditions using the API

Delete T&C's by issuing a DELETE request to /mint/organizations/{org_name}/tncs/{tncs_id}, where {tncs_id} is the identification of the T&C's. For example:

curl -X DELETE "https://api.enterprise.apigee.com/v1/mint/organizations/myorg/tncs/6803d70a-18cc-40c8-b250-675c5e8a75c" \
  -H "Accept: application/json"  \
  -u email:password

Terms and conditions configuration properties for the API

The following table summarizes the configuration properties that can be set using the API for terms and conditions.

Name Description Default Required?
url

URL of the T&C's.

N/A No
tncText

Text (such as a brief description) for the T&C's.

N/A No
version

Version of the T&C's. The version number allows you to keep track of different versions of the T&C's.

N/A No
startDate

Date that the T&C's are in effect.

N/A No
organization

Organization for the T&C's.

N/A No

Next steps

Learn how to add supported currencies to those initially set up for your organization in Manage supported currencies.