GET /user/services/{service_id}

Retrieve a specific service for the authenticated client.

Request

  • Base URL
    https://developers.whmcs.com/api/v2
  • Auth
    none declared

Path parameters

service_idinteger required
Example:789

Service ID

Response

Service information including related components such as addons

Example response

{
  "data": {
    "id": 789,
    "product": {
      "id": 123,
      "name": "Shared web hosting",
      "tagline": "Start with shared web hosting today!",
      "allow_multiple_quantities": {
        "type": {
          "code": 1,
          "display": "No"
        }
      },
      "order": 123,
      "group": {
        "id": 123,
        "name": "Shared web hosting",
        "icon": "fa-solid",
        "headline": "Headline",
        "tagline": "Tagline",
        "order": 123,
        "features": [
          {
            "id": 123,
            "name": "Shared web hosting",
            "order": 123
          }
        ]
      }
    },
    "server": {
      "id": 123,
      "name": "Shared web hosting",
      "groups": [
        {
          "id": 123,
          "name": "Shared web hosting"
        }
      ]
    },
    "domain": "example.com",
    "status": "pending",
    "quantity": 1,
    "registration_date": "2022-03-14",
    "billing": {
      "promotions": [
        {
          "code": "PROMOCODE",
          "type": "Fixed Amount",
          "value": 5,
          "number_of_recurring": 5
        }
      ],
      "cycle": "monthly",
      "price": {
        "first_payment": {
          "amount": {
            "value": "19.99",
            "code": "USD",
            "display_value": "$19.99 USD",
            "prefix": "$",
            "suffix": " USD"
          }
        },
        "recurring": {
          "amount": {
            "value": "19.99",
            "code": "USD",
            "display_value": "$19.99 USD",
            "prefix": "$",
            "suffix": " USD"
          }
        }
      },
      "payment_gateway": {
        "name": "banktransfer",
        "description": "Bank Transfer",
        "supports_headless_payment_session": true
      },
      "next_due_date": "2022-05-01"
    },
    "addons": [
      {
        "id": 456,
        "addon": {
          "id": 123,
          "name": "Shared web hosting"
        },
        "service": {
          "id": 123
        },
        "status": "Active",
        "registration_date": "2022-01-05",
        "billing": {
          "cycle": "monthly",
          "price": {
            "first_payment": {
              "amount": {
                "value": "19.99",
                "code": "USD",
                "display_value": "$19.99 USD",
                "prefix": "$",
                "suffix": " USD"
              }
            },
            "recurring": {
              "amount": {
                "value": "19.99",
                "code": "USD",
                "display_value": "$19.99 USD",
                "prefix": "$",
                "suffix": " USD"
              }
            }
          },
          "payment_gateway": {
            "name": "banktransfer",
            "description": "Bank Transfer",
            "supports_headless_payment_session": true
          },
          "next_due_date": "2022-05-01"
        },
        "renewal": {
          "id": 789,
          "type": "addon",
          "non_renewable_reason": "This service addon is not renewable because it has been cancelled.",
          "renewal_period": {
            "start": "2023-03-14",
            "end": "2024-04-14"
          },
          "price": {
            "value": "19.99",
            "code": "USD",
            "display_value": "$19.99 USD",
            "prefix": "$",
            "suffix": " USD"
          }
        }
      }
    ],
    "custom_fields": [
      {
        "id": 456,
        "custom_field": {
          "id": 123,
          "name": "Shared web hosting",
          "type": "text",
          "options": [
            "DL123456789"
          ]
        },
        "service": {
          "id": 123
        },
        "value": "DL123456789"
      }
    ],
    "config_options": [
      {
        "id": 456,
        "config_option": {
          "id": 12,
          "name": "Config Option Name",
          "type": "dropdown"
        },
        "service": {
          "id": 123
        },
        "option": {
          "name": "Config Option Name",
          "value": true
        },
        "billing": {
          "price": {
            "first_payment": {
              "amount": {
                "value": "19.99",
                "code": "USD",
                "display_value": "$19.99 USD",
                "prefix": "$",
                "suffix": " USD"
              }
            },
            "recurring": {
              "amount": {
                "value": "19.99",
                "code": "USD",
                "display_value": "$19.99 USD",
                "prefix": "$",
                "suffix": " USD"
              }
            }
          }
        }
      }
    ],
    "renewal": {
      "id": 789,
      "type": "service",
      "non_renewable_reason": "This service is not renewable because it has been cancelled.",
      "renewal_period": {
        "start": "2023-03-14",
        "end": "2024-04-14"
      },
      "price": {
        "value": "19.99",
        "code": "USD",
        "display_value": "$19.99 USD",
        "prefix": "$",
        "suffix": " USD"
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.