Skip to main content
PATCH
/
services
/
{id}
Update an existing Service
curl --request PATCH \
  --url https://commerce.driv.ly/api/services/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "destinationAddress": "<string>",
  "destinationContact": "<string>",
  "destinationConsumer": "<string>",
  "originAddress": "<string>",
  "originContact": "<string>",
  "originConsumer": "<string>",
  "provider": "<string>",
  "vehicle": "<string>",
  "customer": "<string>",
  "deal": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "provider": "<string>",
    "vehicle": "<string>",
    "customer": "<string>",
    "destinationAddress": "<string>",
    "destinationContact": "<string>",
    "destinationConsumer": "<string>",
    "originAddress": "<string>",
    "originContact": "<string>",
    "originConsumer": "<string>",
    "deal": "<string>"
  },
  "success": true
}

Path Parameters

id
string
required

Service is uniquely identified by id

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
id
string

Service is uniquely identified by id

destinationAddress

Service is to Destination Address

destinationContact

Service is to Destination Contact

destinationConsumer

Service is to Destination Consumer

originAddress

Service is from Origin Address

originContact

Service is from Origin Contact

originConsumer

Service is from Origin Consumer

provider

Service is from Service Provider

vehicle

Service is performed on Vehicle

customer

Service is sought by Customer

deal

Service is performed for Deal

Response

Service Updated

data
Service · object
Example:
{
"id": "ser_kj93kdl9s3d0",
"type": "Oil Change",
"price": 80,
"provider": {
"id": "ser_kj93kdl9s3d0",
"name": "Auto Shop",
"addresses": [
{
"street": "123 Main St",
"city": "San Francisco",
"state": "CA",
"zip": "94105"
}
]
},
"customer": {
"id": "cus_kj93kdl9s3d0",
"name": "John Doe",
"email": "[email protected]",
"addresses": [
{
"street": "456 Elm St",
"city": "San Francisco",
"state": "CA",
"zip": "94105"
}
],
"phoneNumbers": ["555-555-5555"]
},
"description": "Comprehensive oil change service."
}
success
boolean