In this topic:

Service custom fields

With service custom fields, you can capture additional information about the product that has been sold. Once you have created a Service and One-Time custom field in the original Gotransverse user interface 1.0, you can retrieve available custom field values and related references with the Gotransverse Billing API.

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

Note: Before adding a custom field value, you have to associate this service custom field value with the desired product.

Retrieving the configured custom fields and related references

To retrieve existing custom fields, use the following endpoints:

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

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

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

Working with service custom field values

The Gotransverse Billing API provides a way to retrieve the available custom field values and add new ones to the existing custom fields. You can also edit and delete desired custom field values.

Retrieving order custom field values

Use the following endpoints to retrieve service custom field values:

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

Creating a new service custom field value

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

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

Request

{
  "custom_field_value_type": "service",
  "value": "service custom field value #2",
  "custom_field": {
      "id": "2336",
	  "name": "service custom field #1",
	  "custom_field_type": "service"
   }
}

Response

{
  "custom_field_value_type": "service",
  "id": "171496",
  "value": "service custom field value #2",
  "custom_field": {
       "custom_field_type": "service",
	   "id": "2336",
	   "name": "service custom field #1"
	}
}

Editing and deleting order 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/services/{service_id}/custom-field-values/{id}

Request

{
  "custom_field_value_type": "service",
  "value": "updated service custom field value #2"
}

Response

{
  "custom_field_value_type": "service",
  "id": "171496",
  "value": "updated service custom field value #2",
  "custom_field": {
       "custom_field_type": "service",
	   "id": "2336",
	   "name": "service custom field #1"
	}
}

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

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

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

Top