In this topic:

Billing account custom fields

With billing account custom fields, you can pass additional information about the customer or billing account. Once you have added the needed account custom fields in Gotransverse user interface 1.0, you can retrieve available custom fields and related references with the Gotransverse Billing API.

To use the Custom Fields functionality, you have to populate existing billing account custom fields with custom field values. You can also edit and delete values that you have added.

Retrieving the configured custom fields and related references

To retrieve existing custom fields, use the following endpoints:

GET https://example.gotransverse.com/billing/2/billing-account-custom-fields
GET https://example.gotransverse.com/billing/2/billing-account-custom-fields/{id}

To retrieve existing list values for a billing account custom field with the specified ID, use the following endpoint:

GET GET https://example.gotransverse.com/billing/2/billing-account-custom-fields/
{custom_field_id}/references

Working with billing account custom field values

Billing API provides a way to retrieve the available custom field values and add new ones to the existing custom fields. When needed, you can also edit and delete desired custom field values.

Retrieving billing account custom field values

Use the following endpoints to retrieve product custom field values:

GET https://example.gotransverse.com/billing/2/billing-accounts/{id}/custom-field-values
GET https://example.gotransverse.com/billing/2/billing-accounts/
{billing_account_id}/custom-field-values/{id}


Creating a new billing account custom field value

Use the following endpoints to retrieve billing account custom field values:

POST https://example.gotransverse.com/billing/2/billing-accounts/{billing_account_id}/
custom-field-values

Request

{
  "custom_field_value_type": "billing-account",
  "value": "value #2",
  "custom_field": {	
      "id": "2328",
	  "name": "sample custom field #2",
	  "custom_field_type": "billing-account"
   }
}

Response

{
  "custom_field_value_type": "billing-account",
  "id": "171304",
  "value": "value #2",
  "custom_field": {
      "custom_field_type": "billing-account",
	  "id": "2328",
	  "name": "sample custom field #2"
  }
}

Editing and deleting billing account custom field values

Use the following endpoint to edit the existing custom field value. In the request body, specify the desired custom field value and its type:

PUT https://example.gotransverse.com/billing/2/products/{product_id}/custom-field-values/{id}

Request

{
  "custom_field_value_type": "billing-account",
  "value": "updated value #2"
}

Response

{
  "custom_field_value_type": "billing-account",
  "id": "171304",
  "value": "updated value #2",
  "custom_field": {
      "custom_field_type": "billing-account",
	  "id": "2328",
	  "name": "sample custom field #2"
  }
}

Use the following endpoint to delete the desired custom field value:

DELETE https://example.gotransverse.com/billing/2/billing-accounts/{billing_account_id}/
custom-field-values/{id}

Note: You cannot delete a custom field value that is in use.

Top