Update a custom relationship
PUT/pcm/custom_relationships/:customRelationshipSlug
Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the custom relationship is not updated.
Request
Path Parameters
A custom relationship slug.
- application/json
Body
required
data objectrequired
The unique identifier of the custom relationship.
Possible values: [custom-relationship
]
This represents the type of resource object being returned. Always custom-relationship
.
attributes objectrequired
The name of the custom relationship, such as Kitchen electrics
.
A description of the custom relationship.
A unique slug for the custom relationship. Must match the slug specified in the request path.
Responses
- 200
- 403
- 404
- 422
- 500
Successfully returns the updated custom relationship
- application/json
- Schema
- Example (from schema)
- updated-custom-relationship
Schema
data object
A unique identifier generated when a custom relationship is created.
Possible values: [custom-relationship
]
This represents the type of resource object being returned. Always hierarchy
.
attributes object
The name of the custom relationship, such as Kitchen electrics
.
A description of the custom relationship.
A unique slug for the custom relationship.
meta object
The owner of the resource.
timestamps object
The date and time the resource is created.
The date and time the resource is updated.
{
"data": {
"id": "string",
"type": "custom-relationship",
"attributes": {
"name": "string",
"description": "string",
"slug": "string"
},
"meta": {
"owner": "store",
"timestamps": {
"created_at": "2024-01-10T20:16:35.343Z",
"updated_at": "2024-01-10T20:16:35.343Z"
}
}
}
}
{
"data": {
"type": "custom-relationship",
"id": "f3297ee8-da90-45e9-ae56-a2654aebbdfe",
"attributes": {
"name": "Kitchen electrics",
"description": "Kitchen electric devices 2024",
"slug": "CRP_kitchen_individual_devices"
},
"meta": {
"owner": "store",
"timestamps": {
"created_at": "2024-01-10T20:16:35.343Z",
"updated_at": "2024-01-10T20:16:35.343Z"
}
}
}
}
Forbidden
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Forbidden",
"status": "403",
"detail": "entity owned by organization"
}
]
}
Bad Request. Not Found.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404"
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- failed-validation
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Failed Validation",
"status": "422",
"detail": "<XYZ> can not be empty"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors undefined[]required
The HTTP response code of the error.
A brief summary of the error.
Optional additional detail about the error.
Internal request ID.
Additional supporting meta data for the error.
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}