Introduction

You need to add terms and conditions ("T&C's") to your organization profile. Developers must accept the T&C's before they can purchase your rate plans. T&C's are mandatory. You must add T&C’s to the organization profile before you publish a rate plan.

The T&C's actually 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.

You can add multiple T&C's to reflect current and future versions of your terms and conditions.

Toolbox

You can add T&C’s using the management UI or monetization API. If you use the UI, you add the T&C’s in the Terms and Conditions section of the Organization Profile page.

If you use the API, you add the T&C’s by issuing a POST request to the /organizations/{org_name}/tncs resource.

After you add T&C’s, you can perform management operations on them such as update or delete. Management operations on individual T&C's are performed on the /organizations/{org_name}/tncs/{tncs_id} resource.

Adding T&C’s using the UI

  1. In the Terms and Conditions section of the Organization Profile page, click + Add Terms and Conditions.

    In response, you’ll see a Terms and Conditions window.

  2. Enter the following information in the Terms and Conditions window:
    Field Description
    Effective Date

    The date that the terms and conditions are in effect. The default is the current date. You may not enter a retrospective date.

    Version

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

    URL

    The URL of the terms and conditions.

  3. Click Save to save the terms and conditions. This closes the Terms and Conditions window and returns you to the Organization Profile page.

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

  4. Click + Add Terms and Conditions again to add another version of the T&Cs, as needed. Repeat steps 2 through 4 for each version that you add.

Updating T&C’s using the UI

  1. In the list of T&C's, navigate to the T&C's you want to update.
  2. Select the effective date. This opens the Terms and Conditions window.
  3. Click Edit. Make changes to the effective date, version, or URL fields, as needed.
  4. Click Save to save your updates and return to the Organization Profile page (or Discard to cancel).

Deleting T&C’s using the UI

  1. In the list of T&C's, navigate to the T&C's you want to delete.
  2. Click Delete.

Adding terms and conditions using an API

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

  • Point to its URL.
  • Specify accompanying text (such as a description).
  • Indicate a date when the T&C's are in effect.
  • Provide a version number.

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

For example:

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

The response should look like this (only part of the response is shown):

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

Retrieving terms and conditions using the API

You can retrieve specific T&C's or all T&C's for an organization. To retrieve specific T&Cs, issue a GET request to /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 -H "Accept: application/json" -X GET \
"https://api.enterprise.apigee.com/v1/mint/organizations/{org_name}/tncs/ 
6803d70a-18cc-40c8-b250-675c5e8a75c" \
-u {myname:mypass}

To retrieve all the T&C's for the organization, issue a GET request to /organizations/{org_name}/tncs. For example:

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

The response should look something like this (only part of the response is shown):

{

   "tnc" : [ {
     "id" : "77193339-8d79-44a8-8af2-3593f16c158e",
     "organization" : {       
       ...
     },
     "startDate" : "2013-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" : "2013-09-24 00:00:00",
     "tncText" : "Sample text for the T&C",
     "url" : "www.testoperator/termsandconditions",
     "version" : "1.1"
   } ],
   "totalRecords" : 2
}

Retrieving terms and conditions accepted by a developer using the API

You can retrieve the T&C's accepted by a specific developer. To do that, issue a GET request to /organizations/{org_name}/developers/{dev_id}/developer-tncs, where {dev_id} is the identification of the developer. For example:

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

The response should look something like this:

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

Updating terms and conditions using the API

To update T&C's, issue a PUT request to /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 updates the version number for the T&C's (the updated property is highlighted in the example):

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

The response should look something like this (only part of the response is shown and the updated property is highlighted):

{

   "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" : "2013-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

To delete T&C's, issue a DELETE request to /organizations/{org_name}/tncs/{tncs_id}, where {tncs_id} is the identification of the T&C's. For example:

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

Terms and conditions configuration settings

The following T&C's configuration options are exposed to the API:

Name Description Default Required?
url

The 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

The 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

The date that the T&C's are in effect.

N/A No
organization

The organization for the T&C's.

N/A No

Get help

For help, see Apigee Customer Support.

Next steps

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

Help or comments?

  • Something's not working: See Apigee Support
  • Something's wrong with the docs: Click Send Feedback in the lower right.
    (Incorrect? Unclear? Broken link? Typo?)