Referrals

Referrals Documentation

Referral [LIST]

Referral [LIST]

Request

Endpoint

GET /api/v2/contacts/7d344416-3e95-4472-aefd-2449aec24f33/referrals
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": [
    {
      "id": "faad45f6-0984-4ea2-973d-dd1037c8ce37",
      "type": "contact_referrals",
      "attributes": {
        "created_at": "2022-01-12T17:18:48Z",
        "updated_at": "2022-01-12T17:18:48Z",
        "updated_in_db_at": "2022-01-12T17:18:48Z"
      },
      "relationships": {
        "referred_by": {
          "data": {
            "id": "7d344416-3e95-4472-aefd-2449aec24f33",
            "type": "contacts"
          }
        },
        "referred_to": {
          "data": {
            "id": "cb86e8f3-af85-45d3-8f1c-a204facfde49",
            "type": "contacts"
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total_count": 1,
      "total_pages": 1
    },
    "sort": null,
    "filter": {
    }
  }
}

Fields

data

Type [Referral]

Description An array of Referrals

Referral [POST]

Referral [POST]

Request

Endpoint

POST /api/v2/contacts/a0038425-c83d-4ecb-8fd3-f04f8fcddc02/referrals
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "contact_referrals",
    "attributes": {
      "updated_in_db_at": "2022-01-12 17:18:47 UTC"
    },
    "relationships": {
      "referred_to": {
        "data": {
          "type": "contacts",
          "id": "318ee710-1f53-40c3-994c-169ecfc79a5d"
        }
      },
      "referred_by": {
        "data": {
          "type": "contacts",
          "id": "a0038425-c83d-4ecb-8fd3-f04f8fcddc02"
        }
      }
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Relationships

referred_by.data

Type Contact

Description contact referring another contact

Required No

referred_to.data

Type Contact

Description contact being referred

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
201 Created

Body

{
  "data": {
    "id": "fa18ce85-a94c-4ec2-8689-bfb87e03907d",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2022-01-12T17:18:47Z",
      "updated_at": "2022-01-12T17:18:47Z",
      "updated_in_db_at": "2022-01-12T17:18:47Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "a0038425-c83d-4ecb-8fd3-f04f8fcddc02",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "318ee710-1f53-40c3-994c-169ecfc79a5d",
          "type": "contacts"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

referred_by.data

Type Contact

Description contact referring another contact

referred_to.data

Type Contact

Description contact being referred

Referral [GET]

Referral [GET]

Request

Endpoint

GET /api/v2/contacts/5a337ad0-c98d-4bba-891a-d686e38400bf/referrals/5cdfac25-a600-4e9e-9da9-44fd1ac6baa9
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "5cdfac25-a600-4e9e-9da9-44fd1ac6baa9",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2022-01-12T17:18:48Z",
      "updated_at": "2022-01-12T17:18:48Z",
      "updated_in_db_at": "2022-01-12T17:18:48Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "5a337ad0-c98d-4bba-891a-d686e38400bf",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "af119244-2c0a-4e28-b25c-2fb28362fccb",
          "type": "contacts"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

referred_by.data

Type Contact

Description contact referring another contact

referred_to.data

Type Contact

Description contact being referred

Referral [PUT]

Referral [PUT]

Request

Endpoint

PUT /api/v2/contacts/5cb5f988-a94f-4aed-a791-3180a74808ea/referrals/45cf7d1b-2076-4ba5-b72c-ede864498e0d
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "contact_referrals",
    "attributes": {
      "updated_in_db_at": "2022-01-12 17:18:48 UTC"
    },
    "relationships": {
      "referred_to": {
        "data": {
          "type": "contacts",
          "id": "4a599c72-8681-4377-b1ae-81e9a57ce055"
        }
      },
      "referred_by": {
        "data": {
          "type": "contacts",
          "id": "5cb5f988-a94f-4aed-a791-3180a74808ea"
        }
      }
    }
  }
}

Parameters

Attributes

created_at

Type date

Description The timestamp of when this resource was created

Required No

overwrite

Type boolean

Description Only used for updating a record where you want to ignore the server's ' 'updated_in_db_at value and force overwrite the values for the record. ' 'Must be true to work.

Required No

updated_at

Type date

Description The timestamp of when this resource was last updated

Required No

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Required No

Relationships

referred_by.data

Type Contact

Description contact referring another contact

Required No

referred_to.data

Type Contact

Description contact being referred

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "45cf7d1b-2076-4ba5-b72c-ede864498e0d",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2022-01-12T17:18:48Z",
      "updated_at": "2022-01-12T17:18:48Z",
      "updated_in_db_at": "2022-01-12T17:18:48Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "5cb5f988-a94f-4aed-a791-3180a74808ea",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "4a599c72-8681-4377-b1ae-81e9a57ce055",
          "type": "contacts"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

Relationships

referred_by.data

Type Contact

Description contact referring another contact

referred_to.data

Type Contact

Description contact being referred

Referral [DELETE]

Referral [DELETE]

Request

Endpoint

DELETE /api/v2/contacts/296721b0-ef7b-4a37-95a7-78a7fbb1d086/referrals/05bdcf95-1e26-42a2-a292-b8debd01bd2d
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Last updated