Skip to main content

Get a custom relationship

GET 

/pcm/custom-relationships/:customRelationshipSlug

Gets a Custom Relationship.

To see a list of custom relationships a product is attached to, see Get all Custom Relationships attached to a Product.

To see a list of products that a product is related to, see Get all Related Products of a Products' attached Custom Relationship.

Request

Path Parameters

    customRelationshipSlug stringrequired

    A custom relationship slug.

Responses

Returns a custom relationship with the following attributes.

Schema
    data objectrequired
    id stringrequired

    A unique identifier generated when a custom relationship is created.

    type stringrequired

    Possible values: [custom-relationship]

    This represents the type of resource object being returned. Always custom-relationship.

    attributes objectrequired
    name stringrequired

    The name of the custom relationship to display to shoppers, such as Kitchen electrics.

    description string

    A description of the custom relationship.

    slug stringrequired

    Possible values: Value must match regular expression ^[A-Za-z0-9._-]+$

    A unique slug for the custom relationship. Must match the slug specified in the request path. A slug can contain A to Z, a to z, 0 to 9, hyphen, underscore, and period. Spaces or other special characters like ^, [], *, and $ are not allowed.

    sort_order integernullable

    The order in which the custom relationship should be displayed in relation to others. A lower value represents a higher priority in the display order. If set to NULL, the sort order will be removed.

    external_name stringnullable

    The shopper-facing name for the custom relationship. This value will be displayed to shoppers in the store-front, replacing the internal name if present. If set to NULL, the external name will be removed.

    external_description stringnullable

    The shopper-facing description for the custom relationship. This value will be shown to shoppers in the store-front, replacing the internal description if present. If set to NULL, the external description will be removed.

    bi_directional boolean

    Is this relationship one way or bi-directional true or false. Default is false

    meta objectrequired
    owner stringrequired

    The owner of the resource.

    timestamps objectrequired
    created_at date-timerequired

    The date and time the resource is created.

    updated_at date-timerequired

    The date and time the resource is updated.

Loading...