API Endpoints and Functions


Ping

Ping

GET https://api.sandbox.difitek.com/ping

Check the Difitek infrastructure health.



Response
healthy

Authenticate

Authenticate as Admin

GET https://api.sandbox.difitek.com/auth/admin/token?username={username}&password={password}

Authenticate as Admin.

Both username and password must be URL encoded.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id_token": "eyJraWQiOiJJWktYdEtkZjBTNm9PYVppSVAzd2x6RlNkS1BUOWxvZHRqZzRhWTBIUENZPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiJhZDBjOTkwZi1jYzhhLTRmOGYtYTY4NS04YWNhOWJkNWIwODEiLCJjdXN0b206bmV0d29ya19hZG1pbiI6IjEiLCJ3ZWJzaXRlIjoiTWpHdk9GZWhHUThyZjdxczUxM1QyOExPV2tndXhiWFQyYTBYRFZaZiIsImNvZ25pdG86Z3JvdXBzIjpbImM2YmFlZGVmLWRiZWQtNGRhOC05ODgwLWVkOWE1OGY4MTlkYiJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tXC9ldS13ZXN0LTFfbjRvY0I2dWVlIiwiY29nbml0bzp1c2VybmFtZSI6ImZjY2NkNDJmLWU3OTctNGY2OS04YzM5LWEyMjI3NmVlYTEwNSIsInByZWZlcnJlZF91c2VybmFtZSI6Imp1bjEydGVzdCIsImdpdmVuX25hbWUiOiJQYXVsIiwiYXVkIjoiMzFwbjQ5amJjaGlvZDRsYzNxMmxhbzBpZmsiLCJjdXN0b206c3VwZXJfYWRtaW4iOiIxIiwiZXZlbnRfaWQiOiI4NTAwZDFjZC05NDA5LTExZTgtODM0Yy00ZDg1YjA4NWNhMTQiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTUzMjk2MjkyNCwibmFtZSI6Imp1bjEydGVzdCIsImV4cCI6MTUzMjk2NjUyNCwiaWF0IjoxNTMyOTYyOTI0LCJlbWF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Q3CSh7xLvrYHiSoVQ",
        "apps": [
            {
                "network_id": "c6baedef-dbed-4da8-9880-ed9a58f819db",
                "network_name": "mynetwork",
                "domain": "https://mobileapp.mysite.com",
                "api_key": "94B7kegxQo5BPiDH5XZfb7iMMPf7AQr84lpGo37h"
            },
            {
                "network_id": "c6baedef-dbed-4da8-9880-ed9a58f819db",
                "network_name": "mynetwork",
                "domain": "https://www.mysite.com",
                "api_key": "l7VuiKrpm24KSxUyEhYmQ4HmSSE6c5tKJgLEetG3"
            }
        ]
    },
    "time": 3552,
    "request_id": "835d0d51-9409-11e8-8392-4775762b2787",
    "ts": "2018-07-30T15:02:04.985Z"
}

Refresh authentication as Admin

GET https://api.sandbox.difitek.com/auth/admin/refresh?username={username}&token={token}

Refresh an authentication token as Admin.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id_token": "eyJraWQiOiJJWktYdEtkZjBTNm9PYVppSVAzd2x6RlNkS1BUOWxvZHRqZzRhWTBIUENZPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiJhZDBjOTkwZi1jYzhhLTRmOGYtYTY4NS04YWNhOWJkNWIwODEiLCJjdXN0b206bmV0d29ya19hZG1pbiI6IjEiLCJ3ZWJzaXRlIjoiTWpHdk9GZWhHUThyZjdxczUxM1QyOExPV2tndXhiWFQyYTBYRFZaZiIsImNvZ25pdG86Z3JvdXBzIjpbImM2YmFlZGVmLWRiZWQtNGRhOC05ODgwLWVkOWE1OGY4MTlkYiJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tXC9ldS13ZXN0LTFfbjRvY0I2dWVlIiwiY29nbml0bzp1c2VybmFtZSI6ImZjY2NkNDJmLWU3OTctNGY2OS04YzM5LWEyMjI3NmVlYTEwNSIsInByZWZlcnJlZF91c2VybmFtZSI6Imp1bjEydGVzdCIsImdpdmVuX25hbWUiOiJQYXVsIiw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24IU4luTBzDZCz8agHwuI1G5bjR2jYbCtnLBaKKhSPGG0kYruQBvpoNk56i7m1Xu8ksBzjDh4v27qf7P9_zlaXTlk1yE33TdSy2qe9BvBF4CNKusmAGrXc_ca4EUKJT_6GTserilNnkmRWgmRRXsascbFode-FpSdpNTf2dZ4k9_u7dsLgNqeiNnGqXkfYLYBmnqiHBIgCDX7_74UpHYy1W7kOQYdvqEUBCLWDygAr9GQ_YcXiTtw5K9q-ogC_We4z6LOA_3HdofPDQM.s1fXfQ3CSh7xLvrYHiSoVQ"
    },
    "time": 830,
    "request_id": "03ffb249-940b-11e8-832f-eb30e81f9b03",
    "ts": "2018-07-30T15:12:47.574Z"
}

Authenticate as User

GET https://api.sandbox.difitek.com/auth/token?username={username}&password={password}

Authenticate as a User.

Both username and password must be URL encoded.

The response contains an 'id_token' which is in the format of a JSON Web Token (JWT), which is an open, industry standard RFC 7519 method for representing claims securely between two parties.

The token contains further information about the User to which you have immediate access from the token itself without needing to make any additional API calls. For example, the User's 'user_id' is the 'subject' ('sub') in the token data. Use any JWT decoder (e.g. https://www.npmjs.com/package/jwt-decode) in your application to retrieve data such as the following:

''' { "sub": "504571c2-edc6-41cb-ad65-3f461c7b0aba", "email_verified": true, "phone_number_verified": true, "auth_time": 1536247958, "phone_number": "+1234567890123", "exp": 1536251558, "iat": 1536247958, "email": "demo@domain.com" } '''

The response also contains a 'refresh_token' which can be used with the 'GET /auth/refresh' function to generate a new authentication token if the User's current token has expired.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id_token": "eyJraWQiOiJmQ1BudXF4THBtbkUwbXZiSUFJeHZxeFVGcmJEUUdtWURJeWVCcHZ3d0lFPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiI1MDQ1NzFjMi1lZGM2LTQxY2ItYWQ2NS0zZjQ2MWM3YjBhYmEiLCJ3ZWJzaXRlIjoibDdWdWlLcnBtMjRLU3hVeUVoWW1RNEhtU1NFNmM1dEtKZ0xFZXRHMyIsImNvZ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-uqD4RjDtVxjpNEAnDchtyc5bEBWG2XbNnDKu9PWk4EwolVVuB1Mtdd-szU0cpJCbIHM7GoKbSap3jjW1_Tj87FozuaCXVKFO417RfNQO7jtrHFTh4XjOPga3GOn-PnPAIsj162A8RoD8mbpNytqdshZxxbt3_pbtRMW-QiUw7qBG1jx00vAntNgZ_61EC51KcD2AAUXUq_sayJE6ycUrl7fLc28bVYHzWsvEVyGSr2OxMPSuHH9PxgF5IZ0GCakuPXTSX7T_RNQOibhLCUZGffHpUB01nk-ghrb09F8Dl79AhL5hPQaA7IqSRgTXirHntt8GD3gbTbGpvUtCNWF0sugiXc82SuG4Pn-Vlj-FY1jSbnsgIOtBWWQ2dmQ_8QGpMNwqpr1SXiYYiWPWLU4ouIkrbXJvrljCadOBra_RMCCQwn9RE2kEit_tDUX6oR6scyyL3Mnr8mYC_6LWICR8mTJzX9vqMS5LkxiNhNklBCLLe_ywh_xCd7IPglBrBJdzstrpj75EN6Y7xaoqLXlAdDD91PfRaHdyUTLGz7pWwECIePaLnWnd70ACxiN5je6E4ITS-zX4iYuqCielXC8diFKg.IYpFbBKxOKzUmWcvIlvcMA"
    },
    "time": 952,
    "request_id": "4924a777-940b-11e8-bde5-e18959d783a4",
    "ts": "2018-07-30T15:14:43.701Z"
}

Refresh authentication as User

GET https://api.sandbox.difitek.com/auth/refresh?username={username}&token={token}

Refresh an authentication token as a User.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id_token": "eyJraWQiOiJJWktYdEtkZjBTNm9PYVppSVAzd2x6RlNkS1BUOWxvZHRqZzRhWTBIUENZPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiJhZDBjOTkwZi1jYzhhLTRmOGYtYTY4NS04YWNhOWJkNWIwODEiLCJjdXN0b206bmV0d29ya19hZG1pbiI6IjEiLCJ3ZWJzaXRlIjoiTWpHdk9GZWhHUThyZjdxczUxM1QyOExPV2tndXhiWFQyYTBYRFZaZiIsImNvZ25pdG86Z3JvdXBzIjpbImM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YEENooa6r7MMO3kbu_CAYsWoPhDaaQwGi6fV8cGgcLtTDrJ8gkJbZ5oAhJYdEWTmXRyz_JndGB04VKKZCZlqUA7CGMoGOWBWBbmE7MEMqO1DL-eNHo85peprPnaXKrOF2cZ2A3Aqc-fqFq7gtivjVFws9YEORRPxFF5mQiykXf-7Kg8C50nf4lCNLeToptKZC3dAP8ZpB7uA6WCgVUK9gDhTCa-qbaQ8pQz1fhm95x_ch62YMHL6VJn95U04eetpro1ff9lXSWOlzEaRP-8tudccIOQe_5qvqfG_0XQk_OHUmmBfKI35jKBwRk-yTs_tnr9Ez24IU4luTBzDZCz8agGwuI1G5bjR2jYbCtnLBaKKhSPGG0kYruQBvpoNk56i7m1Xu8ksBzjDh4v27qf7P9_zlaXTlk1yE33TdSy2qe9BvBF4CNKusmAGrXc_ca4EUKJT_6GTserilNnkmRWgmRRXsascbFode-FpSdpNTf2dZ4k9_u7dsLgNqeiNnGqXkfYLYBmnqiHBIgCDX7_74UpHYy1W7kOQYdvqEUBCLWDygAr9GQ_YcXiTtw5K9q-ogC_We4z6A_3HdofPDQM.s1fXfQ3CSh7xLvrYHiSoVQ"
    },
    "time": 830,
    "request_id": "03ffb249-940b-11e8-832f-eb30e81f9b03",
    "ts": "2018-07-30T15:12:47.574Z"
}

Users

Approve a User

PUT https://api.sandbox.difitek.com/users/{user_id}/approve

Set the User's is_approved attribute to true.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "2c5369d2-935f-4c3c-b2da-7f7664fc3f71"
    },
    "time": 4204,
    "request_id": "ea4d5186-3d9f-11e8-90f4-6170c5b7e764",
    "ts": "2018-07-30T15:14:44.701Z"
}

Webhook
DIFITEK_USER_APPROVED

Update a User

PATCH https://api.sandbox.difitek.com/users/{user_id}

Update a User's information.



Parameter Required Type Format Description
user_id Path String

The User's unique identifier

additional_name Body String

An additional name for the User, such as a middle name

additional_type Body String

An additional type or category for the User, such as 'Investor'

affiliate_code Body String

A code that can be given out by the User to track that User's affiliate activity

biography Body Long Text

The User's biography

birth_country Body ISO 3166-1 alpha-2 Country Code

The User's country of birth, e.g. 'US'

birth_date Body Y-m-d Date

The User's date of birth, e.g. '1970-12-25'

birth_place Body String

The User's place of birth, e.g. 'San Francisco'

custom Body { Attribute Name : Attribute Value }

An array of custom User fields. Use an existing custom attribute name to replace the existing value. Use a new custom attribute name to add a new custom field

driving_license_number Body String

The User's full driving license number

external_reference_id Body String

An external reference identifier.

family_name Body String

The User's family name.

gender Body String

The gender of the User. Typically stored as 'M' or 'F'.

given_name Body String

The User's given name

honorific_prefix Body String

An honorific prefix preceding the User's name such as Dr/Mrs/Mr.

honorific_suffix Body String

An honorific suffix following the User's name such as M.D./PhD/MSCSW.

image Body String

A URL of a publicly-accessible profile image of the User

is_vip Body Boolean (1 or 0)

Flag to show whether the User has been given 'VIP' status

job_title Body String

The job title of the User, e.g. 'CEO'.

location Body String

The User's location, e.g. 'San Francisco'.

nationality Body ISO 3166-1 alpha-2 Country Code

The User's nationality

passport_country Body ISO 3166-1 alpha-2 Country Code

The country that issued the User's passport

passport_expiry Body Y-m-d Date

The expiry date of the User's passport in 'Y-m-d' format e.g. 2020-12-21

passport_number Body String

The User's full 30-character passport number, e.g. 9876543213GBR7310065M080310806.

phone_1 Body String

The User's primary phone number, typically a mobile number.

phone_2 Body String

The User's secondary phone number, typically a landline number.

referral_code Body String

A code that can be entered by the User to connect them to another User acting as an affiliate.

sector Body String

The User's industry or sector.

tagline Body String

A short tagline about the User.

tax_id Body String

The Tax or Fiscal identifier of the User, e.g. the TIN in the US.

time_zone Body String

The User's timezone. Format: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

website Body String

The URL of a reference website that is linked to the User


Sample Request Body
{
	"additional_type" : "New Type",
	"custom": {
		"my_new_custom_field":"my_new_custom_value"
	}
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "2c5369d2-935f-4c3c-b2da-7f7664fc3f71"
    },
    "time": 10143,
    "request_id": "6fbd60f3-3d75-11e8-8691-f58aeb39bf6d",
    "ts": "2018-07-30T15:14:43.701Z"
}

Webhook
DIFITEK_USER_UPDATED

Create a new User

POST https://api.sandbox.difitek.com/users

Create a new User. The parameters username, email and password are required.



Parameter Required Type Format Description
email Body String

The User's email. This will be used to verify the User's account before they are able to log in.

password Body String

The User's password. This will be used to log in.

username Body String

The User's username. This will be used to log in.

additional_name Body String

An additional name for the User, such as a middle name

additional_type Body String

An additional type or category for the User, such as 'Investor'

affiliate_code Body String

A code that can be given out by the User to track that User's affiliate activity

biography Body Long Text

The User's biography

birth_country Body ISO 3166-1 alpha-2 Country Code

The User's country of birth, e.g. 'US'

birth_date Body Y-m-d Date

The User's date of birth, e.g. '1970-12-25'

birth_place Body String

The User's place of birth, e.g. 'San Francisco'

custom Body { Attribute Name : Attribute Value }

An array of custom User fields. Use an existing custom attribute name to replace the existing value. Use a new custom attribute name to add a new custom field

driving_license_number Body String

The User's full driving license number

external_reference_id Body String

An external reference identifier.

family_name Body String

The User's family name.

gender Body String

The gender of the User. Typically stored as 'M' or 'F'.

given_name Body String

The User's given name

honorific_prefix Body String

An honorific prefix preceding the User's name such as Dr/Mrs/Mr.

honorific_suffix Body String

An honorific suffix following the User's name such as M.D./PhD/MSCSW.

image Body String

A URL of a publicly-accessible profile image of the User

is_vip Body Boolean (1 or 0)

Flag to show whether the User has been given 'VIP' status

job_title Body String

The job title of the User, e.g. 'CEO'.

location Body String

The User's location, e.g. 'San Francisco'.

nationality Body ISO 3166-1 alpha-2 Country Code

The User's nationality

passport_country Body ISO 3166-1 alpha-2 Country Code

The country that issued the User's passport

passport_expiry Body Y-m-d Date

The expiry date of the User's passport in 'Y-m-d' format e.g. 2020-12-21

passport_number Body String

The User's full 30-character passport number, e.g. 9876543213GBR7310065M080310806.

phone_1 Body String

The User's primary phone number, typically a mobile number.

phone_2 Body String

The User's secondary phone number, typically a landline number.

referral_code Body String

A code that can be entered by the User to connect them to another User acting as an affiliate.

sector Body String

The User's industry or sector.

tagline Body String

A short tagline about the User.

tax_id Body String

The Tax or Fiscal identifier of the User, e.g. the TIN in the US.

time_zone Body String

The User's timezone. Format: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

website Body String

The URL of a reference website that is linked to the User


Sample Request Body
{
	"username" : "myusername", 
        "email" : "myname@demo.com",
	"password": "Password123!",
	"given_name" : "Demo",
	"family_name" : "User",
	"custom": {
		"my_custom_field":"my_custom_value"
	}
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "2c5369d2-935f-4c3c-b2da-7f7664fc3f71"
    },
    "time": 4204,
    "request_id": "ea4d5186-3d9f-11e8-90f4-6170c5b7e764",
    "ts": "2018-07-30T15:25:49.974Z"
}

Webhook
DIFITEK_USER_CREATED

User has Completed Registration

PUT https://api.sandbox.difitek.com/users/{user_id}/registrationcomplete

Set the User's 'registration_complete' attribute to true.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 1853,
    "request_id": "a4798ac5-940b-11e8-9848-45543ae30a16",
    "ts": "2018-07-30T15:17:17.831Z"
}

Webhook
DIFITEK_USER_REGISTRATION_COMPLETED

Unblock a User

PUT https://api.sandbox.difitek.com/users/{user_id}/unblock

Set the User's 'is_blocked' attribute to false. This allows the User to authenticate again with the API.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 1705,
    "request_id": "cc56ed1d-940b-11e8-84dd-ab3ae88a8214",
    "ts": "2018-07-30T15:18:24.565Z"
}

Webhook
DIFITEK_USER_UNBLOCKED

View a User

GET https://api.sandbox.difitek.com/users/{user_id}

Retrieve a User by its 'id'. This function will also return any Organization, Offering, Investment, Capitalization or Document objects owned by this User.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id": "b278625c-33e9-41eb-89f3-166965d088c5",
        "username": "9886358c-eac0-4b99-b865-446a80c2d068",
        "confirmed": true,
        "created_at": 1527841791000,
        "email": "e773013a-8664-45fa-b1b2-fd817b1c16e4@demo.com",
        "family_name": "User",
        "given_name": "Demo",
        "is_approved": false,
        "is_blocked": false,
        "is_vip": false,
        "registration_complete": false,
        "terms_accepted": false,
        "updated_at": 1528191201000,
        "custom": {
            "my_custom_field": "my_custom_value",
            "author_id": "2842a398-6d39-4189-adca-5965f387854e"
        },
        "documents": [
            {
                "id": "f66211e0-e6ca-45b6-90aa-a871c9d68cc2",
                "author_id": "2842a398-6d39-4189-adca-5965f387854e",
                "file_name": "EJGKUD6HR6ZG63P",
                "file_alias": "TPB9PABKJ5W2QDE",
                "file_type": "txt",
                "file_description": "Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
                "tag": "CE7TU",
                "life_cycle_stage": 0,
                "group_id": null,
                "url": "https://anywhere.org/anything.pdf",
                "created_at": 1528189604000,
                "updated_at": 1528189604000
            }
        ],
        "investments": [
            {
                "id": "01601244-dd0a-499b-9ec5-429db9ab4848",
                "offering_id": "3fcba626-7617-4398-acca-933302677ff9",
                "is_loanbook": false,
                "org_id": "467ba2cb-dce6-4d18-a7fa-d6eb9b4e4c67",
                "org_name": "New Organization",
                "funding_goal": "1000.0000",
                "life_cycle_stage": 0,
                "investment_amount": "10.0000",
                "created_at": 1528109634000,
                "updated_at": 1528109634000
            },
            {
                "id": "41893b8a-ebaa-4e08-a97c-86b279d51a49",
                "offering_id": "3fcba626-7617-4398-acca-933302677ff9",
                "is_loanbook": false,
                "org_id": "467ba2cb-dce6-4d18-a7fa-d6eb9b4e4c67",
                "org_name": "New Organization",
                "funding_goal": "1000.0000",
                "life_cycle_stage": 0,
                "investment_amount": "10.0000",
                "created_at": 1528189780000,
                "updated_at": 1528189780000
            }
        ]
    },
    "time": 2602,
    "request_id": "15d81370-6b2e-11e8-ba08-d9d7c71dad15",
    "ts": "2018-07-30T15:16:04.030Z"
}

View a List of Users

GET https://api.sandbox.difitek.com/users

Retrieve a list of Users up to a maximum of 12. Use the export functions to retrieve data on more than 12 Users.

This function will return a count of Documents, Organizations, Offerings and Investments owned by each User. Implement GET /users/{user_id} to see the data of each owned object.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "list": [
            {
                "id": "1cdee3bd-d7d4-4acd-b124-384a74f80efd",
                "username": "democ6baedef-dbed-4da8-9880-ed9a58f819db",
                "confirmed": true,
                "created_at": 1528468867000,
                "email": "20180608@demo.com",
                "family_name": "User",
                "given_name": "Demo",
                "is_approved": false,
                "is_blocked": false,
                "is_vip": false,
                "last_login_at": 1528468932000,
                "registration_complete": false,
                "terms_accepted": false,
                "updated_at": 1528468932000,
                "custom": {
                    "my_custom_field": "my_custom_value",
                    "author_id": "2842a398-6d39-4189-adca-5965f387854e"
                },
                "documents": 0,
                "organizations": 0,
                "offerings": 0,
                "investments": 0
            }
        ],
        "offset": 0
    },
    "time": 2568,
    "request_id": "88694d66-6b2e-11e8-beb1-45e92f448e9a",
    "ts": "2018-07-30T15:16:41.651Z"
}

Block a User

PUT https://api.sandbox.difitek.com/users/{user_id}/block

Set the User's 'is_blocked' attribute to true. This prevents the User from authenticating with the API.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 3545,
    "request_id": "c027ba04-940b-11e8-9b31-23dc8b4eb27c",
    "ts": "2018-07-30T15:18:05.963Z"
}

Webhook
DIFITEK_USER_BLOCKED

Revert a User's Acceptance of Terms

PUT https://api.sandbox.difitek.com/users/{user_id}/revertacceptterms

Set the User's 'terms_of_service_accepted' attribute to false.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 1655,
    "request_id": "b052d643-940b-11e8-9b31-23dc8b4eb27c",
    "ts": "2018-07-30T15:17:37.512Z"
}

Webhook
DIFITEK_USER_REVERT_ACCEPTED_TERMS

Add a User Document

POST https://api.sandbox.difitek.com/users/{user_id}/documents

Add a new Document record for the User. The parameters file_name, life_cycle_stage, and url are required.



Parameter Required Type Format Description
file_name Body String

The document's file name, e.g., current-year-financials.pdf

life_cycle_stage Body Integer

The current Lifecycle Stage of the Document. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Archived.

url Body String

The URL at which the Document is stored.

file_alias Body String

The publicly visible alias of the document, e.g., 'Current Year Financials'.

file_description Body String

The publicly visible description of the document, e.g. 'Our company's most recent financial statement'.

file_type Body String

The document's mime-type, e.g., application/pdf

tag Body String

A tag or category for the Document. Use tags to categorize Documents to display on your platform's front-end, e.g. 'Financials'.


Sample Request Body
{
	"file_name":"EJGKUD6HR6ZG63P",
	"file_alias":"TPB9PABKJ5W2QDE",
	"file_type":"txt",
	"file_description":"Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
	"tag":"CE7TU",
	"url":"https://anywhere.org/anything.pdf",
	"life_cycle_stage" : 0
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "document_id": "8441f584-446d-475c-b529-0825732bb412"
    },
    "time": 10143,
    "request_id": "6fbd60f3-3d75-11e8-8691-f58aeb39bf6d",
    "ts": "2018-07-30T15:25:49.974Z"
}

Webhook
DIFITEK_DOCUMENT_CREATED

Revert Approving a User

PUT https://api.sandbox.difitek.com/users/{user_id}/revertapprove

Set the User's 'is_approved' attribute to false.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 10386,
    "request_id": "d97c8ec5-940b-11e8-8abb-d5e460a8651d",
    "ts": "2018-07-30T15:18:55.303Z"
}

Webhook
DIFITEK_USER_REVERT_APPROVED

Revert User Registration Completed

PUT https://api.sandbox.difitek.com/users/{user_id}/revertregistrationcomplete

Set the User's 'registration_complete' attribute to false.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
    },
    "time": 1813,
    "request_id": "e9f3304a-940b-11e8-972b-a330ec8f30f3",
    "ts": "2018-07-30T15:19:14.352Z"
}

Webhook
DIFITEK_USER_REVERT_REGISTRATION_COMPLETED

Organizations

Remove a User as a member of the Organization

DELETE https://api.sandbox.difitek.com/organizations/{organization_id}/members

Remove a User as a member of the Organization. The user_id parameter is required.



Parameter Required Type Format Description
organization_id Path String

The unique identifier of the Organization

user_id Body String

The unique identifier of the User


Sample Request Body
{
	"user_id":"bba6999d-3742-40ad-9bd2-e97cea4f8f18"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "org_member_deleted": {
            "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
            "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
        }
    },
    "time": 11500,
    "request_id": "ec0188d7-9409-11e8-8abb-d5e460a8651d",
    "ts": "2018-07-30T15:05:08.495Z"
}

Webhook
DIFITEK_ORGANIZATION_MEMBER_DELETED

Create a new Document for the Organization

POST https://api.sandbox.difitek.com/organizations/{organization_id}/documents

Create a new Document for the Organization. The parameters file_name, life_cycle_stage, and url are required.



Parameter Required Type Format Description
file_name Body String

The document's file name, e.g., current-year-financials.pdf

life_cycle_stage Body Integer

The current Lifecycle Stage of the Document. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Archived.

url Body String

The URL at which the Document is stored.

file_alias Body String

The publicly visible alias of the document, e.g., 'Current Year Financials'.

file_description Body String

The publicly visible description of the document, e.g. 'Our company's most recent financial statement'.

file_type Body String

The document's mime-type, e.g., application/pdf

tag Body String

A tag or category for the Document. Use tags to categorize Documents to display on your platform's front-end, e.g. 'Financials'.


Sample Request Body
{
	"file_name":"EJGKUD6HR6ZG63P",
	"file_alias":"TPB9PABKJ5W2QDE",
	"file_type":"txt",
	"file_description":"Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
	"tag":"CE7TU",
	"url":"https://anywhere.org/anything.pdf"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "document_id": "3b66acf6-01b3-4a97-ae7d-9997c44761c6"
    },
    "time": 12097,
    "request_id": "19250cbd-3e59-11e8-8c83-5b03199640ce",
    "ts": "2018-07-30T15:45:49.934Z"
}

Webhook
DIFITEK_DOCUMENT_CREATED

Create a new Offering for the Organization

POST https://api.sandbox.difitek.com/organizations/{organization_id}/offerings

Create a new Offering for the Organization. The funding_goal and name parameters are required.



Parameter Required Type Format Description
organization_id Path String

The unique identifier of the Organization

funding_goal Body Decimal

The funding goal for this Offering

name Body String

The name of the Offering

additional_type Body String

An additional type or category for the Offering

close_date Body Timestamp Date

The closing date after which Investments are no longer allowed for this Offering

credit_score Body String

The current credit score for this Offering

currency Body Currency Code

The Offering's currency

custom Body { Attribute Name : Attribute Value }

An array of custom Offering fields. Use an existing custom attribute name to replace the existing value. Use a new custom attribute name to add a new custom field

equity_offered Body Decimal

The amount of equity offered as a percentage

external_commitments Body Decimal

Funding received outside the platform that should be counted towards this Offering's total

interest_rate Body Decimal

The interest rate offered

is_secondary_offering Body Boolean (1 or 0)

Flag to show whether the Offering is a secondary market Offering

life_cycle_stage Body Integer

The current Lifecycle Stage of the Offering. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Restricted, 5 = Published, 6 = Published to All, 7 = Closing, 8 = Settled, 9 = Canceled.

max_commitment Body Decimal

The maximum total amount that a User can invest in this Offering

max_overfunding_amount Body Decimal

The maximum amount raised by a Offering up to which Users can submit new Investments

min_commitment Body Decimal

The minimum amount that a User can invest in this Offering

offering_description Body String

A long-form description of the Offering

open_date Body Timestamp Date

The starting date after which new Investments are permitted for this Offering

term Body Integer

The loan term of the Offering

valuation Body Decimal

The current valuation of the Offering


Sample Request Body
{
	"funding_goal" : "1000000",
	"name" : "Series A"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "offering_id": "3b66acf6-01b3-4a97-ae7d-9997c44761c6"
    },
    "time": 12097,
    "request_id": "19250cbd-3e59-11e8-8c83-5b03199640ce",
    "ts": "2018-07-30T15:28:58.521Z"
}

Webhook
DIFITEK_OFFERING_CREATED

Add a User as a member of the Organization

POST https://api.sandbox.difitek.com/organizations/{organization_id}/members

Add a User as a member of the Organization. The user_id parameter is required.



Parameter Required Type Format Description
organization_id Path String

The unique identifier of the Organization

user_id Body String

The unique identifier of the User


Sample Request Body
{
	"user_id":"bba6999d-3742-40ad-9bd2-e97cea4f8f18"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "org_member_joined": {
            "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
            "user_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba"
        }
    },
    "time": 2680,
    "request_id": "db8ce34c-9409-11e8-938c-a13f8c078636",
    "ts": "2018-07-30T15:04:32.066Z"
}

Webhook
DIFITEK_ORGANIZATION_MEMBER_JOINED

Create a new Organization

POST https://api.sandbox.difitek.com/organizations

Create a new Organization. The 'display_name' parameter is required.



Parameter Required Type Format Description
display_name Body String

The display name of the Organization

additional_type Body String

An additional type or category for the Organization

brief_description Body String

A brief description of the Organization

credit_score Body String

The Organization's current credit score

company_number Body String

The company registration number for the Organization

custom Body { Key Value : Attribute Value }

A set of custom fields and values for the Organization.

detail_description Body String

A long-form, detailed description of the Organization

email Body String

An email address for the Organization

facebook Body String

The Organization's Facebook account page

founding_date Body Y-m-d Date

Date on which the Organization was founded

founding_location Body String

Location at which the Organization was founded

legal_name Body String

Full legal name of the Organization

life_cycle_stage Body Integer

The current Lifecycle Stage of the Organization. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Restricted, 5 = Published, 6 = Archived, 7 = Canceled.

linkedin Body String

The Organization's LinkedIn account page

location Body String

The Organization's location

logo Body String

A publicly-accessible URL holding the Organization's logo

phone Body String

A phone number for the Organization

sector Body String

The Organization's industry or sector

tax_id Body String

The Tax / Fiscal ID of the Organization

twitter Body String

The Organization's Twitter account page

website Body String

A URL of a reference webpage that represents the Organization

youtube Body String

The Organization's YouTube account page


Sample Request Body
{
    "display_name" : "New Organization"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "organization_id": "b16fd1ac-399d-43dd-b937-d575b706642b"
    },
    "time": 2496,
    "request_id": "1eb0a9bb-940d-11e8-8d5f-6994c469edbd",
    "ts": "2018-07-30T15:27:53.014Z"
}

Webhook
DIFITEK_ORGANIZATION_CREATED

Create a new Capitalization for the Organization

POST https://api.sandbox.difitek.com/organizations/{organization_id}/capitalizations

Create a new Capitalization for the Organization.



Parameter Required Type Format Description
organization_id Path Integer

The unique identifier of the Organization

capitalization_type Body Integer

The type of Capitalization: 0 = Equity, 1 = Preferred Equity or 2 = Debt

number_of_shares Body Decimal

The number of shares held

price_per_share Body Decimal

The current price per share of this Capitalization

owner_id Body Integer

The unique identifier of the User who currently owns this Capitalization

life_cycle_stage Body Integer

The Capitalization's lifecycle stage: 0 = Authorized, 1 = Issued, 2 = Offered, 3 = Treasury, 4 = Distributed

service_charge Body Decimal

A service charge associated with this Capitalization record


Sample Request Body
{
	"capitalization_type": 2,
	"price_per_share": "8.49",
	"service_charge": "9.00",
	"number_of_shares":142713,
	"owner_id":"bba6999d-3742-40ad-9bd2-e97cea4f8f18"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "capitalization_id": "5165654c-4c65-47f0-b840-1735fd268964"
    },
    "time": 2515,
    "request_id": "a47779d1-9409-11e8-844f-199c69872125",
    "ts": "2018-07-30T15:02:59.486Z"
}

Webhook
DIFITEK_CAPITALIZATION_CREATED

Update an Organization

PATCH https://api.sandbox.difitek.com/organizations/{organization_id}

Update an Organization's information.



Parameter Required Type Format Description
organization_id Path String

The unique identifier of the Organization

additional_type Body String

An additional type or category for the Organization

brief_description Body String

A brief description of the Organization

credit_score Body String

The Organization's current credit score

company_number Body String

The company registration number for the Organization

custom Body { Key Value : Attribute Value }

A set of custom fields and values for the Organization.

detail_description Body String

A long-form, detailed description of the Organization

display_name Body String

The display name of the Organization

email Body String

An email address for the Organization

facebook Body String

The Organization's Facebook account page

founding_date Body Y-m-d Date

Date on which the Organization was founded

founding_location Body String

Location at which the Organization was founded

legal_name Body String

Full legal name of the Organization

life_cycle_stage Body Integer

The current Lifecycle Stage of the Organization. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Restricted, 5 = Published, 6 = Archived, 7 = Canceled.

linkedin Body String

The Organization's LinkedIn account page

location Body String

The Organization's location

logo Body String

A publicly-accessible URL holding the Organization's logo

phone Body String

A phone number for the Organization

sector Body String

The Organization's industry or sector

tax_id Body String

The Tax / Fiscal ID of the Organization

twitter Body String

The Organization's Twitter account page

website Body String

A URL of a reference webpage that represents the Organization

youtube Body String

The Organization's YouTube account page


Sample Request Body
{
    "additional_type" : "New Type"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "organization_id": "b16fd1ac-399d-43dd-b937-d575b706642b"
    },
    "time": 122,
    "request_id": "3629932f-940d-11e8-89de-935dd96dfa99",
    "ts": "2018-07-30T15:28:30.020Z"
}

Webhook
DIFITEK_ORGANIZATION_UPDATED

Retrieve an Organization

GET https://api.sandbox.difitek.com/organizations/{organization_id}

Retrieve information about one Organization.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id": "0ae654e0-128f-4234-a400-867f08d20775",
        "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
        "display_name": "Sample Organization",
        "life_cycle_stage": 3,
        "created_at": 1531826322000,
        "updated_at": 1532095833000,
        "submitted_at": 1531837340000,
        "approved_at": 1531837350000,
        "members": [
            {
                "user_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "member_type": "admin"
            }
        ],
        "offerings": [
            {
                "id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
                "life_cycle_stage": 3,
                "name": "Series A",
                "funding_goal": "1000.0000",
                "additional_type": "New Type",
                "created_at": 1532540406000,
                "updated_at": 1532679769000
            }
        ],
        "capitalizations": [
            {
                "id": "35fdca05-39f7-4d06-8346-13ce6428cd23",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "owner_id": "229e222e-3b91-49b8-ae0e-375ccd4936da",
                "price_per_share": "8.0000",
                "life_cycle_stage": 1,
                "capitalization_type": 2,
                "service_charge": "9.0000",
                "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
                "offering_id": "4cb7f4f3-5a04-433f-a017-b44526dffcf2"
            },
            {
                "id": "5165654c-4c65-47f0-b840-1735fd268964",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "owner_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba",
                "price_per_share": "8.0000",
                "life_cycle_stage": 1,
                "capitalization_type": 2,
                "service_charge": "9.0000",
                "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
                "offering_id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184"
            }
        ]
    },
    "time": 262,
    "request_id": "6fc1419b-940a-11e8-8b26-f7bc6a118fc5",
    "ts": "2018-07-30T15:08:40.652Z"
}

Retrieve a list of Organizations

GET https://api.sandbox.difitek.com/organizations

Retrieve a list of up to 12 Organizations.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "list": [
            {
                "id": "0ae654e0-128f-4234-a400-867f08d20775",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "display_name": "Sample Organization",
                "life_cycle_stage": 3,
                "created_at": 1531826322000,
                "updated_at": 1532095833000,
                "submitted_at": 1531837340000,
                "approved_at": 1531837350000,
                "members": [
                    {
                        "user_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                        "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                        "member_type": "admin"
                    }
                ],
                "documents": 0,
                "offerings": 1,
                "capitalizations": 21
            }
        ],
        "offset": 0
    },
    "time": 239,
    "request_id": "48121adc-940a-11e8-8b26-f7bc6a118fc5",
    "ts": "2018-07-30T15:07:34.192Z"
}

Offerings

Create a new Offering Document

POST https://api.sandbox.difitek.com/offerings/{offering_id}/documents

Create a new Document for this Offering. The parameters file_name, life_cycle_stage, and url are required.



Parameter Required Type Format Description
file_name Body String

The document's file name, e.g., current-year-financials.pdf

life_cycle_stage Body Integer

The current Lifecycle Stage of the Document. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Archived.

url Body String

The URL at which the Document is stored.

file_alias Body String

The publicly visible alias of the document, e.g., 'Current Year Financials'.

file_description Body String

The publicly visible description of the document, e.g. 'Our company's most recent financial statement'.

file_type Body String

The document's mime-type, e.g., application/pdf

tag Body String

A tag or category for the Document. Use tags to categorize Documents to display on your platform's front-end, e.g. 'Financials'.


Sample Request Body
{
	"file_name":"current-year-financials.pdf",
	"file_alias":"Current Year Financials",
	"file_type":"application/json",
	"file_description":"Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
	"tag":"Financials",
	"url":"https://anywhere.org/anything.pdf"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "document_id": "42933ab2-555a-4c58-89c0-04f068bf4980"
    },
    "time": 2189,
    "request_id": "fdce441e-9409-11e8-a986-9fa91ffc3e03",
    "ts": "2018-07-30T15:05:29.047Z"
}

Webhook
DIFITEK_DOCUMENT_CREATED

Create a new Deal Room for the Offering

POST https://api.sandbox.difitek.com/offerings/{offering_id}/dealrooms

Create a new Deal Room for this Offering. The name parameter is required.



Parameter Required Type Format Description
offering_id Path String

The unique identifier of the Offering

name Body String

The name of the Deal Room


Sample Request Body
{
	"name":"Due Diligence Deal Room"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "dealroom_id": "c8e88c0f-8c44-4e77-9af6-d116847d5130"
    },
    "time": 12837,
    "request_id": "89472de3-9409-11e8-9369-75b35a5b6605",
    "ts": "2018-07-30T15:02:24.193Z"
}

Webhook
DIFITEK_DEALROOM_CREATED

Retrieve a list of Offerings

GET https://api.sandbox.difitek.com/offerings

Retrieve a list of up to 12 Offerings.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "list": [
            {
                "id": "3fcba626-7617-4398-acca-933302677ff9",
                "author_id": "2842a398-6d39-4189-adca-5965f387854e",
                "organization_id": "467ba2cb-dce6-4d18-a7fa-d6eb9b4e4c67",
                "life_cycle_stage": 0,
                "name": "New Name",
                "funding_goal": "1000.0000",
                "amount_raised": "12000.1200",
                "created_at": 1527781546000,
                "updated_at": 1529402357000,
                "documents": 1,
                "capitalizations": 0,
                "investors": 3,
                "investments": 3
            }
        ],
        "offset": 0
    },
    "time": 2733,
    "request_id": "90a97b52-940a-11e8-832f-eb30e81f9b03",
    "ts": "2018-07-30T15:09:35.974Z"
}

Retrieve an Offering

GET https://api.sandbox.difitek.com/offerings/{offering_id}

Retrieve information about an Offering.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184",
        "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
        "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
        "life_cycle_stage": 3,
        "name": "Series A",
        "funding_goal": "1000.0000",
        "additional_type": "New Type",
        "created_at": 1532540406000,
        "updated_at": 1532679769000,
        "documents": [
            {
                "id": "42933ab2-555a-4c58-89c0-04f068bf4980",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "file_alias": "TPB9PABKJ5W2QDE",
                "file_description": "Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
                "file_name": "EJGKUD6HR6ZG63P",
                "file_type": "txt",
                "life_cycle_stage": 0,
                "tag": "CE7TU",
                "url": "https://anywhere.org/anything.pdf",
                "created_at": 1532963129000,
                "updated_at": 1532963129000
            }
        ],
        "capitalizations": [
            {
                "id": "5165654c-4c65-47f0-b840-1735fd268964",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "owner_id": "504571c2-edc6-41cb-ad65-3f461c7b0aba",
                "price_per_share": "8.0000",
                "life_cycle_stage": 1,
                "capitalization_type": 2,
                "service_charge": "9.0000",
                "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
                "offering_id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184"
            }
        ],
        "investments": [
            {
                "id": "6092119d-f3c4-4626-bddf-a7c5c9655da6",
                "owner_id": "1daad532-a343-4e2e-802d-306e8c7bc240",
                "life_cycle_stage": 0,
                "currency": "EUR",
                "created_at": 1532600969000,
                "updated_at": 1532603613000
            }
        ],
        "deal_rooms": [
            {
                "id": "695618d9-79d5-4fad-b19d-85533863f97c",
                "name": "Closing Deal Rooms",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081"
            },
            {
                "id": "8d376d02-2916-4d92-be40-45b68257bdc6",
                "name": "Closing Deal Rooms",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081"
            },
            {
                "id": "c8e88c0f-8c44-4e77-9af6-d116847d5130",
                "name": "Closing Deal Rooms",
                "author_id": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081"
            }
        ]
    },
    "time": 2700,
    "request_id": "bb8cca27-940a-11e8-bb63-ab60bd7df366",
    "ts": "2018-07-30T15:10:47.895Z"
}

Create a new Investment

POST https://api.sandbox.difitek.com/offerings/{offering_id}/investments

Create a new Investment for this Offering. The owner_id and investment_amount parameters are required.



Parameter Required Type Format Description
offering_id Path String

The unique identifier of the Offering

investment_amount Body Decimal

The investment amount submitted by the User for this Offering.

owner_id Body String

The unique identifier of the User who is making the Investment

currency Body String

The Investment's currency

custom Body { Key Value : Attribute Value }

A set of custom fields and values for the Investment.

interest_rate Body Decimal

The interest rate requested in this Investment.

life_cycle_stage Body Integer

The lifecycle stage of the Investment. 0 = Open, 1 = Rejected, 2 = Approved, 3 = Withdrawn, 4 = Settled. Defaults to 0.

number_of_shares Body Decimal

The number of shares or loan parts requested in this Investment.

service_charge Body Decimal

The service charge for this Investment.

term Body Integer

The term requested for this Investment.


Sample Request Body
{
    "owner_id" : "bba6999d-3742-40ad-9bd2-e97cea4f8f18",
    "investment_amount" : "10000"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "investment_id": "81ff5364-3e5b-11e8-bb46-35acc7e30822"
    },
    "time": 2788,
    "request_id": "d6ef414d-3e5b-11e8-bf3c-0f7621047784",
    "ts": "2018-07-30T15:25:49.974Z"
}

Webhook
DIFITEK_INVESTMENT_CREATED

Update an Offering

PATCH https://api.sandbox.difitek.com/offerings/{offering_id}

Update an Offering.



Parameter Required Type Format Description
offering_id Path String

The unique identifier of the Offering

funding_goal Body Decimal

The funding goal for this Offering

name Body String

The name of the Offering

additional_type Body String

An additional type or category for the Offering

close_date Body Timestamp Date

The closing date after which Investments are no longer allowed for this Offering

credit_score Body String

The current credit score for this Offering

currency Body Currency Code

The Offering's currency

custom Body { Attribute Name : Attribute Value }

An array of custom Offering fields. Use an existing custom attribute name to replace the existing value. Use a new custom attribute name to add a new custom field

equity_offered Body Decimal

The amount of equity offered as a percentage

external_commitments Body Decimal

Funding received outside the platform that should be counted towards this Offering's total

interest_rate Body Decimal

The interest rate offered

is_secondary_offering Body Boolean (1 or 0)

Flag to show whether the Offering is a secondary market Offering

life_cycle_stage Body Integer

The current Lifecycle Stage of the Offering. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Restricted, 5 = Published, 6 = Published to All, 7 = Closing, 8 = Settled, 9 = Canceled.

max_commitment Body Decimal

The maximum total amount that a User can invest in this Offering

max_overfunding_amount Body Decimal

The maximum amount raised by a Offering up to which Users can submit new Investments

min_commitment Body Decimal

The minimum amount that a User can invest in this Offering

offering_description Body String

A long-form description of the Offering

open_date Body Timestamp Date

The starting date after which new Investments are permitted for this Offering

term Body Integer

The loan term of the Offering

valuation Body Decimal

The current valuation of the Offering


Sample Request Body
{
    "additional_type" : "New Type"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "offering_id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184"
    },
    "time": 228,
    "request_id": "47164e77-940d-11e8-bb63-ab60bd7df366",
    "ts": "2018-07-30T15:28:58.521Z"
}

Webhook
DIFITEK_OFFERING_UPDATED

Investments

Retrieve a list of Investments

GET https://api.sandbox.difitek.com/investments

Retrieve a list of up to 12 Investments.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "list": [
            {
                "id": "1c34cecb-0126-4e65-b93c-5eb01d9ab321",
                "owner_id": "e2940543-a9d4-4f3d-b8c3-750efc8fd820",
                "offering_id": "3fcba626-7617-4398-acca-933302677ff9",
                "organization_id": "467ba2cb-dce6-4d18-a7fa-d6eb9b4e4c67",
                "life_cycle_stage": 4,
                "investment_amount": "12000.1200",
                "currency": "USD",
                "interest_rate": "1.2300",
                "term": 12,
                "settled_at": 1529403379000,
                "number_of_shares": "2123.3400",
                "service_charge": "2123.3400",
                "created_at": 1527781577000,
                "updated_at": 1530613567000,
                "documents": 1
            }
        ],
        "count": 12,
        "offset": 0
    },
    "time": 1008,
    "request_id": "ea2272f6-940a-11e8-b402-9bd628a19550",
    "ts": "2018-07-30T15:12:04.360Z"
}

Update an Investment

PATCH https://api.sandbox.difitek.com/investments/{investment_id}

Update an Investment.



Parameter Required Type Format Description
investment_id Path String

The unique identifier of the Investment

currency Body String

The Investment's currency

custom Body { Key Value : Attribute Value }

A set of custom fields and values for the Investment.

interest_rate Body Decimal

The interest rate requested in this Investment.

life_cycle_stage Body Integer

The lifecycle stage of the Investment. 0 = Open, 1 = Rejected, 2 = Approved, 3 = Withdrawn, 4 = Settled. Defaults to 0.

investment_amount Body Decimal

The investment amount submitted by the User for this Offering.

number_of_shares Body Decimal

The number of shares or loan parts requested in this Investment.

service_charge Body Decimal

The service charge for this Investment.

term Body Integer

The term requested for this Investment.


Sample Request Body
{
    "investment_amount" : "11000"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "investment_id": "6092119d-f3c4-4626-bddf-a7c5c9655da6"
    },
    "time": 139,
    "request_id": "212d2283-940a-11e8-8d5f-6994c469edbd",
    "ts": "2018-07-30T15:06:26.338Z"
}

Webhook
DIFITEK_INVESTMENT_UPDATED

Retrieve an Investment

GET https://api.sandbox.difitek.com/investments/{investment_id}

Retrieve information about an Investment.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "id": "6092119d-f3c4-4626-bddf-a7c5c9655da6",
        "owner_id": "1daad532-a343-4e2e-802d-306e8c7bc240",
        "offering_id": "fbd5be5f-b5e9-4dc6-b695-d893d97fb184",
        "organization_id": "0ae654e0-128f-4234-a400-867f08d20775",
        "life_cycle_stage": 0,
        "currency": "EUR",
        "created_at": 1532600969000,
        "updated_at": 1532603613000
    },
    "time": 2418,
    "request_id": "da0e6469-940a-11e8-9660-9b283460fd30",
    "ts": "2018-07-30T15:11:38.794Z"
}

Create a new Investment Document

POST https://api.sandbox.difitek.com/investments/{investment_id}/documents

Create a new Document for this Investment. The parameters file_name, life_cycle_stage, and url are required.



Parameter Required Type Format Description
file_name Body String

The document's file name, e.g., current-year-financials.pdf

life_cycle_stage Body Integer

The current Lifecycle Stage of the Document. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Archived.

url Body String

The URL at which the Document is stored.

file_alias Body String

The publicly visible alias of the document, e.g., 'Current Year Financials'.

file_description Body String

The publicly visible description of the document, e.g. 'Our company's most recent financial statement'.

file_type Body String

The document's mime-type, e.g., application/pdf

tag Body String

A tag or category for the Document. Use tags to categorize Documents to display on your platform's front-end, e.g. 'Financials'.


Sample Request Body
{
	"file_name":"current-year-financials.pdf",
	"file_alias":"Current Year Financials",
	"file_type":"application/json",
	"file_description":"Pellentesque cras aliquam semper tincidunt adipiscing convallis libero, vulputate arcu ultricies metus himenaeos.",
	"tag":"Financials",
	"url":"https://anywhere.org/anything.pdf"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "document_id": "81ff5364-3e5b-11e8-bb46-35acc7e30822"
    },
    "time": 2788,
    "request_id": "d6ef414d-3e5b-11e8-bf3c-0f7621047784",
    "ts": "2018-07-30T15:25:49.974Z"
}

Webhook
DIFITEK_DOCUMENT_CREATED

Documents

Update a Document

PATCH https://api.sandbox.difitek.com/documents/{document_id}

Update a Document.



Parameter Required Type Format Description
document_id Path String

The unique identifier of the Document

file_name Body String

The document's file name, e.g., current-year-financials.pdf

life_cycle_stage Body Integer

The current Lifecycle Stage of the Document. 0 = Draft, 1 = Submitted, 2 = Rejected, 3 = Approved, 4 = Archived.

url Body String

The URL at which the Document is stored.

file_alias Body String

The publicly visible alias of the document, e.g., 'Current Year Financials'.

file_description Body String

The publicly visible description of the document, e.g. 'Our company's most recent financial statement'.

file_type Body String

The document's mime-type, e.g., application/pdf

tag Body String

A tag or category for the Document. Use tags to categorize Documents to display on your platform's front-end, e.g. 'Financials'.


Sample Request Body
{
    "tag" : "New Tag"
}

Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "document_id": "f5643483-a7d3-41dd-9d6b-1041a25d3e8e"
    },
    "time": 1464,
    "request_id": "1175ac00-940d-11e8-8644-4debe388d2e7",
    "ts": "2018-07-30T15:27:29.785Z"
}

Webhook
DIFITEK_DOCUMENT_UPDATED

Network

Show Network Stats

GET https://api.sandbox.difitek.com/network/stats

Retrieve some sample statistics about your Network activity.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "users": [
            {
                "year": 2018,
                "month": 5,
                "count": 1
            },
            {
                "year": 2018,
                "month": 6,
                "count": 10
            },
            {
                "year": 2018,
                "month": 7,
                "count": 39
            }
        ],
        "investments": [
            {
                "year": 2018,
                "month": 5,
                "count": 1,
                "settled": 12000.12,
                "approved": 0
            },
            {
                "year": 2018,
                "month": 6,
                "count": 2,
                "settled": 0,
                "approved": 0
            },
            {
                "year": 2018,
                "month": 7,
                "count": 25,
                "settled": 36000.36,
                "approved": 132001.32
            }
        ],
        "organizations": 31,
        "offerings": 39
    },
    "time": 624,
    "request_id": "5fafae3a-940b-11e8-b3d9-911c18cdcfc1",
    "ts": "2018-07-30T15:15:21.194Z"
}

Show Recent Active Users

GET https://api.sandbox.difitek.com/network/activeusers

Retrieve a list of the most recently active Users in your Network based on the last time each User successfully authenticated through the Difitek API.

Call GET /network/activeusers?action=count to retrieve only the number of recently active Users.



Response
{
    "status": 200,
    "outcome": "success",
    "data": [
        {
            "user_id": "1cdee3bd-d7d4-4acd-b124-384a74f80efd",
            "given_name": "Demo",
            "family_name": "User"
        }
    ],
    "time": 1104,
    "request_id": "68d93643-3d9f-11e8-be71-658f0b556745",
    "ts": "2018-07-30T15:14:50.851Z"
}

Show Network Events

GET https://api.sandbox.difitek.com/network/events

Retrieve a log of recent events in your network.



Response
{
    "status": 200,
    "outcome": "success",
    "data": [
        {
            "expiration_date": 1534173709,
            "msg": {
                "network_id": "c6baedef-dbed-4da8-9880-ed9a58f819db",
                "webhook": "https://yoursite.com/api/webhook",
                "uuid": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "request_id": "3e0d0878-940c-11e8-b0d8-ab984bc78246",
                "network_key": "l8VuiKrpm24KSxUyEhYmQ4HmSSE6c5tKJgLEetG3"
            },
            "event": "DIFITEK_DOCUMENT_EXPORT",
            "created_at": 1532964108852,
            "network_id": "c6baedef-dbed-4da8-9880-ed9a58f819db",
            "type": "NOTIFICATION"
        },
        {
            "expiration_date": 1534173698,
            "msg": {
                "network_id": "c6baedef-dbed-4da8-9880-ed9a58f819db",
                "webhook": "https://yoursite.com/api/webhook",
                "uuid": "ad0c990f-cc8a-4f8f-a685-8aca9bd5b081",
                "request_id": "0d1d91ca-940c-11e8-8c4a-e58207f86d9e",
                "network_key": "l8VuiKrpm24KSxUyEhYmQ4HmSSE6c5tKJgLEetG3"
            }
    ],
    "time": 309,
    "request_id": "4bddb760-940c-11e8-8a04-8f5c9334f04d",
    "ts": "2018-07-30T15:21:57.123Z"
}

Retrieve User count

GET https://api.sandbox.difitek.com/network/counts/users

Use this function to retrieve the count of Users in your network. This function can be useful when setting up pagination on a Back Office or front-end list page.

Apply filters to retrieve a filtered count by requesting for example:

GET /network/counts/users?filter[is_approved][operator]==&filter[is_approved][value]=1



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "total_count": 2,
        "offset": 0,
        "filter": {
            "filter[is_approved][operator]": "=",
            "filter[is_approved][value]": "1"
        }
    },
    "time": 83,
    "request_id": "50925b3e-94aa-11e8-8e30-4db55257ec14",
    "ts": "2018-07-31T10:13:05.275Z"
}

Retrieve Organization count

GET https://api.sandbox.difitek.com/network/counts/organizations

Use this function to retrieve the count of Organizations in your network. This function can be useful when setting up pagination on a Back Office or front-end list page.

Apply filters to retrieve a filtered count by requesting for example:

GET /network/counts/organizations?filter[display_name][operator]==&filter[display_name][value]=My%20Organization



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "total_count": 1,
        "offset": 0,
        "filter": {
            "filter[display_name][operator]": "=",
            "filter[display_name][value]": "3rd Organization"
        }
    },
    "time": 2328,
    "request_id": "6fe2dde3-94aa-11e8-b96c-49beb103fe32",
    "ts": "2018-07-31T10:14:00.057Z"
}

Retrieve Offering count

GET https://api.sandbox.difitek.com/network/counts/offerings

Use this function to retrieve the count of Offerings in your network. This function can be useful when setting up pagination on a Back Office or front-end list page.

Apply filters to retrieve a filtered count by requesting for example:

GET /network/counts/offerings?filter[funding_goal][operator]=between&filter[funding_goal][lower_value]=1000000&filter[funding_goal][upper_value]=2000000



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "total_count": 15,
        "offset": 0,
        "filter": {
            "filter[funding_goal][operator]": "between",
            "filter[funding_goal][upper_value]": "2000000",
            "filter[funding_goal][lower_value]": "1000000"
        }
    },
    "time": 2454,
    "request_id": "83cd6fe8-94aa-11e8-b88e-33279cd050ff",
    "ts": "2018-07-31T10:14:33.597Z"
}

Retrieve Investment count

GET https://api.sandbox.difitek.com/network/counts/investments

Use this function to retrieve the count of Investments in your network. This function can be useful when setting up pagination on a Back Office or front-end list page.

Apply filters to retrieve a filtered count by requesting for example:

GET /network/counts/investments?filter[investment_amount][operator]=>&filter[investment_amount][value]=1000&filter[currency][operator]==&filter[currency][value]=EUR



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "total_count": 14,
        "offset": 0,
        "filter": {
            "filter[investment_amount][operator]": ">",
            "filter[currency][operator]": "=",
            "filter[currency][value]": "EUR",
            "filter[investment_amount][value]": "1000"
        }
    },
    "time": 11360,
    "request_id": "a2d4b4ca-94aa-11e8-b88e-33279cd050ff",
    "ts": "2018-07-31T10:15:34.560Z"
}

Exports

Retrieve export data

GET https://api.sandbox.difitek.com/exports/{export_id}&page={page_number}

Export data compiled asynchronously and notified via webhook notification. Generate an 'export_id' parameter by calling one of the GET /exports/{object} routes and receiving the appropriate webhook notification.



Response
{
    "status": 200,
    "outcome": "success",
    "data": {
        "title": "get-users",
        "request_id": "9271bdd1-3d6c-11e8-9885-1145492f7b16",
        "upload_url": "https://s3-sandbox-responses.s3.eu-west-1.amazonaws.com/file.json?AWSAccessKeyId=...&Expires=1523461449&Signature=Fi1%2BV9rhFgxME7nkkUKEK1nRQvI%3D&response-content-type=application%2Foctet-stream"
    },
    "time": 2037,
    "request_id": "60394a85-3d9c-11e8-abf7-59a51f1ee18b"
}

Export all Users

GET https://api.sandbox.difitek.com/exports/users

Export all Users from your network. This function will deliver a webhook to your Network's registered webhook URL.

The webhook will contain an 'export_id' which can then be used in GET /exports/{export_id} to retrieve the URL at which you can retrieve the data.



Response
{
    "status": 200,
    "outcome": "success",
    "data": "OK",
    "time": 318,
    "request_id": "2680709d-940c-11e8-8a04-8f5c9334f04d",
    "ts": "2018-07-30T15:20:54.445Z"
}

Webhook
DIFITEK_USER_EXPORT

Export all Documents

GET https://api.sandbox.difitek.com/exports/documents

Export all Documents from your network. This function will deliver a webhook to your Network's registered webhook URL.

The webhook will contain an 'export_id' which can then be used in GET /exports/{export_id} to retrieve the URL at which you can retrieve the data.



Response
{
    "status": 200,
    "outcome": "success",
    "data": "OK",
    "time": 176,
    "request_id": "4129d993-940c-11e8-9a38-89b8364ed531",
    "ts": "2018-07-30T15:21:39.034Z"
}

Webhook
DIFITEK_DOCUMENT_EXPORT

Export all Organizations

GET https://api.sandbox.difitek.com/exports/organizations

Export all Organizations from your network. This function will deliver a webhook to your Network's registered webhook URL.

The webhook will contain an 'export_id' which can then be used in GET /exports/{export_id} to retrieve the URL at which you can retrieve the data.



Response
{
    "status": 200,
    "outcome": "success",
    "data": "OK",
    "time": 213,
    "request_id": "3273acc5-940c-11e8-8e30-4db55257ec14",
    "ts": "2018-07-30T15:21:14.389Z"
}

Webhook
DIFITEK_ORGANIZATION_EXPORT

Export all Offerings

GET https://api.sandbox.difitek.com/exports/offerings

Export all Offerings from your network. This function will deliver a webhook to your Network's registered webhook URL.

The webhook will contain an 'export_id' which can then be used in GET /exports/{export_id} to retrieve the URL at which you can retrieve the data.



Response
{
    "status": 200,
    "outcome": "success",
    "data": "OK",
    "time": 224,
    "request_id": "1057fbe5-940c-11e8-84d0-dfa9d3eeae85",
    "ts": "2018-07-30T15:20:17.176Z"
}

Webhook
DIFITEK_OFFERING_EXPORT

Export all Investments

GET https://api.sandbox.difitek.com/exports/investments

Export all Investments from your network. This function will deliver a webhook to your Network's registered webhook URL.

The webhook will contain an 'export_id' which can then be used in GET /exports/{export_id} to retrieve the URL at which you can retrieve the data.



Response
{
    "status": 200,
    "outcome": "success",
    "data": "OK",
    "time": 201,
    "request_id": "1babeb34-940c-11e8-af0c-31ea03894c79",
    "ts": "2018-07-30T15:20:36.158Z"
}

Webhook
DIFITEK_INVESTMENT_EXPORT