Skip to content
This repository was archived by the owner on Jan 25, 2019. It is now read-only.
This repository was archived by the owner on Jan 25, 2019. It is now read-only.

Including attributes into relationship object #181

@mareapp

Description

@mareapp

I am trying to implement save(POST) to my back-end, here is my request body:

  "data": {
    "type": "account",
    "relationships": {
      "account_type": {"data": {"type": "account_type", "id": "1"} },
      "user": {
        "data": {
          "type": "user",
          "attributes": {
            "email": "[email protected]",
            "firstname": "John",
            "lastname": "Doe",
            "company_name": "test company",
            "phone": "381 11 232 342",
            "address": " Venizelosova 43, 11000 Beograd, Serbia",
            "latitude": 44.8112,
            "longitude": "20.5342",
            "description": "some description",
            "website_url": "ar-ty.com",
            "password": "password123",
            "password_confirmation": "password123"
          },
          "relationships": { "role": { "data": {"type": "role", "id": "3"} } }
        }
      }
    }
  }
}

Does your lib support including attributes into relationship object, like in this json where relationship object has user with attributes. Please could you give me code example how to do this if possible?
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions