Service Type API
Update service type
Update a service type identified by serviceTypeId.
Usage notes:
itemreplaces the whole service type: send every field, including the ones you are not changing. Optional fields you leave out (serviceTypeCode,serviceTypeGroupId,defaultTaxIds) are cleared.- Renaming a service type also updates clear references to the old name in revenue agreements: the same updates ARMS makes without asking when you rename one there. Ambiguous references are left unchanged.
- An unknown
serviceTypeIdreturns 400. - A missing permission returns 401.
PUT
/
rms
/
service_types
/
update
Update service type
curl --request PUT \
--url https://api-lg.arms.cedarai.com/rms/service_types/update \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"serviceTypeId": "0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11",
"item": {
"serviceTypeName": "Track Lease - Monthly",
"serviceTypeCode": "LEASE",
"contextType": "CYCLE"
}
}
'import requests
url = "https://api-lg.arms.cedarai.com/rms/service_types/update"
payload = {
"serviceTypeId": "0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11",
"item": {
"serviceTypeName": "Track Lease - Monthly",
"serviceTypeCode": "LEASE",
"contextType": "CYCLE"
}
}
headers = {
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
serviceTypeId: '0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11',
item: {
serviceTypeName: 'Track Lease - Monthly',
serviceTypeCode: 'LEASE',
contextType: 'CYCLE'
}
})
};
fetch('https://api-lg.arms.cedarai.com/rms/service_types/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg.arms.cedarai.com/rms/service_types/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'serviceTypeId' => '0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11',
'item' => [
'serviceTypeName' => 'Track Lease - Monthly',
'serviceTypeCode' => 'LEASE',
'contextType' => 'CYCLE'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg.arms.cedarai.com/rms/service_types/update"
payload := strings.NewReader("{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-lg.arms.cedarai.com/rms/service_types/update")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg.arms.cedarai.com/rms/service_types/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"item": {
"serviceTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carrierId": 123,
"serviceTypeName": "<string>",
"serviceTypeCode": "<string>",
"contextType": "INCIDENTAL",
"serviceTypeGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceTypeGroupName": "<string>",
"defaultTaxIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contract": {
"effect": "mergeWithItem",
"resourceType": "ServiceType"
}
}{
"message": "<string>"
}Authorizations
Your ARMS API key
Email of a user assigned to the appropriate user group
Query Parameters
Carrier identifier; required for all endpoints
Body
application/json
ID of the service type to update.
The complete service type. It replaces every field: optional fields you leave out are cleared.
Show child attributes
Show child attributes
Carrier identifier. Defaults to the carrierId query parameter; if you send it, use the same value.
Was this page helpful?
⌘I
Update service type
curl --request PUT \
--url https://api-lg.arms.cedarai.com/rms/service_types/update \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"serviceTypeId": "0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11",
"item": {
"serviceTypeName": "Track Lease - Monthly",
"serviceTypeCode": "LEASE",
"contextType": "CYCLE"
}
}
'import requests
url = "https://api-lg.arms.cedarai.com/rms/service_types/update"
payload = {
"serviceTypeId": "0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11",
"item": {
"serviceTypeName": "Track Lease - Monthly",
"serviceTypeCode": "LEASE",
"contextType": "CYCLE"
}
}
headers = {
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
serviceTypeId: '0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11',
item: {
serviceTypeName: 'Track Lease - Monthly',
serviceTypeCode: 'LEASE',
contextType: 'CYCLE'
}
})
};
fetch('https://api-lg.arms.cedarai.com/rms/service_types/update', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-lg.arms.cedarai.com/rms/service_types/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'serviceTypeId' => '0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11',
'item' => [
'serviceTypeName' => 'Track Lease - Monthly',
'serviceTypeCode' => 'LEASE',
'contextType' => 'CYCLE'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-lg.arms.cedarai.com/rms/service_types/update"
payload := strings.NewReader("{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-lg.arms.cedarai.com/rms/service_types/update")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-lg.arms.cedarai.com/rms/service_types/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"serviceTypeId\": \"0b6f7d3e-3c55-4a3e-9d0e-6f1f4f0c2a11\",\n \"item\": {\n \"serviceTypeName\": \"Track Lease - Monthly\",\n \"serviceTypeCode\": \"LEASE\",\n \"contextType\": \"CYCLE\"\n }\n}"
response = http.request(request)
puts response.read_body{
"item": {
"serviceTypeId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"carrierId": 123,
"serviceTypeName": "<string>",
"serviceTypeCode": "<string>",
"contextType": "INCIDENTAL",
"serviceTypeGroupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"serviceTypeGroupName": "<string>",
"defaultTaxIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"createdAt": "2023-11-07T05:31:56Z",
"createdById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deletedAt": "2023-11-07T05:31:56Z",
"deletedById": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"contract": {
"effect": "mergeWithItem",
"resourceType": "ServiceType"
}
}{
"message": "<string>"
}