Referrals

Referrals Documentation

Referral [LIST]

Referral [LIST]

Request

Endpoint

GET /api/v2/contacts/c42be52a-aee0-4275-9f74-b0329bc2a9d6/referrals
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": [
    {
      "id": "13d98975-ca83-4b2b-9abd-f3523d8d6746",
      "type": "contact_referrals",
      "attributes": {
        "created_at": "2021-11-23T14:38:16Z",
        "updated_at": "2021-11-23T14:38:16Z",
        "updated_in_db_at": "2021-11-23T14:38:16Z"
      },
      "relationships": {
        "referred_by": {
          "data": {
            "id": "c42be52a-aee0-4275-9f74-b0329bc2a9d6",
            "type": "contacts"
          }
        },
        "referred_to": {
          "data": {
            "id": "1d581db1-c0f0-452d-9b76-093950c518db",
            "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/e91093bc-c8f8-4cfb-b95e-480c77a978bc/referrals
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "contact_referrals",
    "attributes": {
      "updated_in_db_at": "2021-11-23 14:38:16 UTC"
    },
    "relationships": {
      "referred_to": {
        "data": {
          "type": "contacts",
          "id": "c7a5379d-6766-4951-b975-d949c15a139c"
        }
      },
      "referred_by": {
        "data": {
          "type": "contacts",
          "id": "e91093bc-c8f8-4cfb-b95e-480c77a978bc"
        }
      }
    }
  }
}

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": "7c4ce4dd-54e8-4d11-a833-871ee3514745",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2021-11-23T14:38:17Z",
      "updated_at": "2021-11-23T14:38:17Z",
      "updated_in_db_at": "2021-11-23T14:38:17Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "e91093bc-c8f8-4cfb-b95e-480c77a978bc",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "c7a5379d-6766-4951-b975-d949c15a139c",
          "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/ff3853cd-6fa6-45dc-851d-100e9984494e/referrals/40e6df1a-d1cd-43ac-8f62-0f0636ec7ed3
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "40e6df1a-d1cd-43ac-8f62-0f0636ec7ed3",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2021-11-23T14:38:16Z",
      "updated_at": "2021-11-23T14:38:16Z",
      "updated_in_db_at": "2021-11-23T14:38:16Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "ff3853cd-6fa6-45dc-851d-100e9984494e",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "0f9204dc-b2de-4a99-a8da-7763dfa3130d",
          "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/a825480f-ee55-490b-9a68-3d75dff11504/referrals/4e10d0ce-0325-41e8-8afb-a8645b7047fe
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "contact_referrals",
    "attributes": {
      "updated_in_db_at": "2021-11-23 14:38:16 UTC"
    },
    "relationships": {
      "referred_to": {
        "data": {
          "type": "contacts",
          "id": "38c03246-18a4-4c67-bbfa-5f2c07998df3"
        }
      },
      "referred_by": {
        "data": {
          "type": "contacts",
          "id": "a825480f-ee55-490b-9a68-3d75dff11504"
        }
      }
    }
  }
}

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": "4e10d0ce-0325-41e8-8afb-a8645b7047fe",
    "type": "contact_referrals",
    "attributes": {
      "created_at": "2021-11-23T14:38:16Z",
      "updated_at": "2021-11-23T14:38:16Z",
      "updated_in_db_at": "2021-11-23T14:38:16Z"
    },
    "relationships": {
      "referred_by": {
        "data": {
          "id": "a825480f-ee55-490b-9a68-3d75dff11504",
          "type": "contacts"
        }
      },
      "referred_to": {
        "data": {
          "id": "38c03246-18a4-4c67-bbfa-5f2c07998df3",
          "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/8675375c-cf7b-42d1-91d8-07003a845573/referrals/377fcbac-34f8-4852-97e2-8b986eeadea0
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Last updated