Entry Relationships
When you create a field that uses relationship
as a field_type
, you update your entry values using the Relationship endpoints.
Create Entry Relationship
POST
https://api.moltin.com/v2/flows/:flowSlug/entries/:entryId/relationships/:fieldSlug
Create an Entry relationship to one or more resources. If any relationships already exist, the one's made in the request will be added to them.
Path Parameters
Name | Type | Description |
---|---|---|
fieldSlug | string | The slug of the entry this field belongs to |
entryId | string | The ID of the entry this field belongs to |
flowSlug | string | The slug of the flow the entry belongs to |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token used to access the API. |
Request Body
Name | Type | Description |
---|---|---|
data.id | string | The ID of the related resource. |
data.type | string | Represents the resource type of the object |
data | object | Data to be stored |
Replace the relationships between an entry and a resource. Unlike a POST
to this endpoint, a PUT
overrides any existing relationships.
Update Entry Relationship(s)
PUT
https://api.moltin.com/v2/flows/:flowSlug/entries/:entryId/relationships/:fieldSlug
Replace the relationships between an entry and a resource. Unlike a POST
to this endpoint, a PUT
overrides any existing relationships
Path Parameters
Name | Type | Description |
---|---|---|
fieldSlug | string | The slug of the Flow the entry belongs to |
entryId | string | The ID of the entry this field belongs to |
flowSlug | string | The slug of the entry this field belongs to |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token used to access the API |
Request Body
Name | Type | Description |
---|---|---|
data.id | string | The ID of the related resource |
data.type | string | Represents the resource type of the object |
data | object | Data to be stored |
Removing a relationship between an entry and resource(s) deletes the relationships specified in the payload.
Delete Entry Relationships
DELETE
https://api.moltin.com/v2/flows/:flowSlug/entries/:entryId/relationships/:fieldSlug
Remove all relationships between an entry and resources
Path Parameters
Name | Type | Description |
---|---|---|
fieldSlug | string | The slug of the entry this field belongs to |
entryId | string | The ID of the entry this field belongs to |
flowSlug | string | The slug of the Flow the entry belongs to |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | The Bearer token to grant access to the API |
Last updated