-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Description
When I attempt to update a CustomerClientLink via the CustomerClientLinkService helper, the API returns a request_error: OPERATION_REQUIRED. It appears that my mutate payload never gets wrapped with a valid create, update, or remove operation. Am I doing something wrong here?
const customer = this.getCustomer(this.managerAccountId)
const customerClientLink: resources.ICustomerClientLink = {
resource_name: ResourceNames.customerClientLink(
this.managerAccountId,
clientCustomerId,
this.managerAccountId
),
client_customer: clientCustomerId,
status: enums.ManagerLinkStatus.PENDING,
}
try {
const result: services.MutateCustomerClientLinkResponse =
await customer.customerClientLinks.create([customerClientLink])
console.log(result)
} catch (err) {
console.log(err)
}
Produces the following error:
{
"errors": [
{
"error_code": {
"request_error": "OPERATION_REQUIRED"
},
"message": "Mutate operations must have 'create', 'update', or 'remove' specified.",
"location": {
"field_path_elements": [
{
"field_name": "operation"
}
]
}
}
],
"request_id": "ZFsHdIA2oGXjtqflUhd5vw"
}
Jelmerovereem
Metadata
Metadata
Assignees
Labels
No labels