API Reference

Last modified: June 24 2020 12:39. UTC

Introduction

The Dataships API uses the REST framework. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Please note that your access to API must be enabled by Dataships.

Request API Access

You can email us on hello@dataships.io to request API access.

Contact Support

Base Url:

https://api.dataships.io

Authentication

The Dataships API uses API keys to authenticate requests. You can view and manage your API keys in the Control Panel.

Your API keys carry many privileges, so be sure to keep them secure.

Authentication to the API is performed via bearer token. You will need to get the token before you make calls to protected resources. Additional token header is required with the data subject API. The token expires in 1 hour and thereafter, a new token will be required.

Some resources such as Policies are available to the public and can be accesed using PUBLIC_KEY, other protected resources require SECRET_KEY.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Data Controller API - Headers

-H 'Authorization: Bearer <SECRET_KEY>'

Data Subject API - Headers

-H 'Authorization: Bearer <SECRET_KEY>'
-H 'token: <ISSUED_TOKEN>'

How to get a token ?

You will need to get the token before making the Data Subject API calls by calling the token API.

Errors

Dataships uses conventional HTTP response codes to indicate the success or failure of an API request.

In general:

  • Codes in the 2xx range indicate success.
  • Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.).
  • Codes in the 5xx range indicate an error with Dataships' servers (these are rare).

Handling Errors

Our API libraries raise exceptions for many reasons, such as a failed update call, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.

HTTP status code summary

200 - OK Everything worked as expected.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid Secret key provided.
402 - Request Failed The parameters were valid but the request failed.
403 - Forbidden If authentication credentials were provided in the request, the server considers them insufficient to grant access.
404 - Not Found The requested resource doesn't exist.
409 - Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
422 - Unprocessable Entity The server understands the content type of the request entity, and the syntax of the request entity is correct but was unable to process the contained instructions.
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server Errors Something went wrong on Dataships' end (these are rare).

Versioning

(Current: v2)

When we make backwards-incompatible changes to the API, we release new versions. Read our API upgrades guide to see changelog across various products and to learn more about backwards compatibility.

All requests will use your account settings and will reflect changes in your current account. The changelog lists every available version. Note that events generated by API requests will always be structured according to your account API version.

You can visit your Control Panel to see your latest API version. As a precaution, use API versioning to test a new API version before committing to an upgrade.

Sample Request

curl -L -X GET "https://api.dataships.io/controller/detail" \
-H 'Authorization: Bearer <SECRET_KEY>'

Structure

The Dataships API is designed to be used in two parts; the Data Controller API and the Data Subject API. The Data Controller API defines the structures of your Data Access Gateway. You should think of this as you creating the ‘skeleton’ of your Access Gateway - this will define the types of data fields you wish to use and display. The Data Subject API are the specific commands you will need to use to return the specific and corresponding values to those data fields.

Taxonomy

Dataships uses consistent and specific terminology throughout the control panel & documentation. This is important to define the different stakeholders in the process.

Data Controller This is your business. The entity that signs up for a Dataships account is defined as the Data Controller.

Data Subjects These are the individuals that interact with your business. You might refer to these as your users or customers. We define them as data subjects.

Data Sources These are the third party tools where you (the Data Controller) hold data on your users or data subjects. e.g. Mailchimp, Salesforce etc.

Data Controller API

The Data Controller API defines the structures of your Data Access Gateway. You should think of this as you creating the ‘skeleton’ of your Access Gateway - this will define the types of data fields you wish to use and display.

Details

This is an object representing all the Data Controller details stored by Dataships. You can retrieve it to see properties on the Data Controller such as the company profile information.

DETAILS OBJECT


public_key

The public key of the Data Controller..

company_name

This parameter returns the company name used to sign up to the control panel. This can be changed in the control panel by the main account holder.

contact_details

The contact information which can be used by the users to contact the company for their details will be returned here. Contact information can be changed by the main account holder.

period

This parameter specifies the time for which you have the information of the user in the system. The main account holder can change this information in the control panel as well.

referrer

The URL in which the main account holder embeds the widget.

legal_basis

This parameter contains the legal basis in which the company stores customer’s personal information. These can also be changed in the control panel.

recipients

The main account holder could share the customer information with others. It contains the information about the people, the main account holder is sharing the data with. This parameter is also configurable and can be changed by the main account holder in control panel.

logo

A URL to the uploaded company logo.

lightcolor

Left gradient color of the widget.

darkcolor

Right gradient color of the widget.

List details

You can use this command to return the universe of parameters that can be held on a Data Controller without the specific details.

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/detail' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        "public_key",
        "company_name",
        "contact_details",
        "period",
        "referrer",
        "legal_basis",
        "recipients",
        "logo",
        "lightcolor",
        "darkcolor"
    ]
}

Get details

You can use this command to return the parameter associated with the Data Controller along with the corresponding value.

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/detail/get' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "public_key": "<API_KEY>",
        "company_name": "Your Company Name",
        "contact_details": "your@company.com",
        "period": "For as long as your customers consent",
        "referrer": "Webpage URL",
        "legal_basis": "Your company's description",
        "recipients": "The people you share customer information with",
        "logo": "Link to your company logo",
        "lightcolor": "ff0000",
        "darkcolor": "000000"
    }
}

Sources

Source objects allow you to see a variety of data sources supported by Dataships. They represent a system or application where information on a data subject is stored and can be either internal e.g. Dataships database or external e.g. Mailchimp or Stripe.

SOURCES OBJECT


id

This parameter returns the id of the integration. If you delete and add the same data source again, this id may change..

data_source_id

This parameter returns the id of the data source.

access

Array of supported permissions for the data source.

name

The default name of the data source.

integration_name

The display name given to the integration. This can be changed in the control panel.

display_name

The display name of the data source. Use this name as default if the integration name is null.

List all sources

This command will return the universe of data sources that Dataships currently supports. id and integration_name attributes will be absent from the source object.

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/source' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "data_source": [
            {
                "data_source_id": 1,
                "display_name": "Dataships",
                "name": "dataships",
                "access": [
                    "read",
                    "write",
                    "update",
                    "delete"
                ]
            },
            "..."
        ],
        "total_count": "10"
    }
}

Get sources

This command will return a list of the data sources that the Data Controller has already integrated in their account. The data_source_id attribute will be absent from the source object.

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/source/get' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": "69",
            "display_name": "Dataships",
            "name": "dataships",
            "access": [
                "read",
                "write",
                "update",
                "delete"
            ],
            "integration_name": null
        },
        "..."
    ]
}

Data-fields

Each data source has a subset of data fields. These data fields are the specific types of data that are held on a data subject within that data source. The data fields are usually the type of personal information you collect e.g. name, email address etc. and their values are that particular information of a data subject e.g. name=John, email_address=john@example.com .

DATA-FIELDS OBJECT


id

Unique identifier for the object.

name

Name of the data field.

field_name

Unique name of the data field.

display_name

Display name of the data field.

data_type

The type of data this field stores. E.g. Text, Url, DateInput, Dropdown or Numeric

is_default

Whether the data field has a default value. Default values cannot be updated.

purpose

Purpose of storing this data field.

field_description

Description of the data field.

field_header

The name of the Field header this field is a part of, null otherwise. E.g. Line 2 could be a part of the field header address.

sort_index

Position of the data field in the respective data source.

is_required

Whether the data field is mandatory.

List all data

Get a list of data fields for the specific data source id specified. purpose, sort_index and is_required attributes will be absent from the data field object.

MANDATORY PARAMETERS


data_source_id Path Variable

The id of the data source.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/field/:data_source_id' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": "13",
            "display_name": "Email",
            "name": "email",
            "field_name": "email",
            "data_type": "text",
            "is_default": "0",
            "field_description": "Contact Details",
            "field_header": null
        },
        "..."
    ]
}

Get data fields

This command will return a list of data fields for the integration id specified along with their corresponding values.

MANDATORY PARAMETERS


integration_id Path Variable

The id of the integration.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/field/get/:integration_id' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": "13",
            "name": null,
            "field_name": "email",
            "display_name": "Email",
            "data_type": "text",
            "is_default": "0",
            "purpose": null,
            "field_description": "Account Information",
            "field_header": null,
            "sort_index": null,
            "is_required": "1"
        },
        "..."
    ]
}

Get Field Options

This command will return a list of available options for a data field of the integration id specified. Use this API for data fields where type='DateInput'.

MANDATORY PARAMETERS


integration_id Path Variable

The id of the integration.


data_field_id Form-Data Parameter

The id of the data field you wish to retrieve its available options for.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/field/option/:integration_id' \
-H 'Authorization: Bearer <SECRET_KEY>'
-F 'data_field_id=<data_field_id>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": 343,
            "name": "",
            "value": null
        },
        {
            "id": 1,
            "name": "Male",
            "value": "1"
        },
        {
            "id": 2,
            "name": "Female",
            "value": "2"
        },
        {
            "id": 3,
            "name": "Prefer not to say",
            "value": "3"
        },
        "..."
    ]
}

Table-column

This object represents historical data of your data subject’s (e.g., the customer’s) details such as weight, height or medical data.

TABLE-COLUMN OBJECT


id

Unique identifier for the object.

name

The name given to this consent form item. This is what the data subject (e.g., the customer) sees on the Data Access Gateway.

column_name

The identifier given to the column. This cannot be changed.

sort_index

The order of this custom table header.

is_required

Whether a value is mandatory for this custom table item.

is_default

Whether the custom table header has a default value. Default values cannot be updated.

created_at

The timestamp of when you created this custom table item.

updated_at

The timestamp of when this custom table item was last updated.

Get table columns

Get a list of columns specified in the custom table for the main account holder.

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/table/column' \
-H 'Authorization: Bearer <SECRET_KEY>'

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": 11,
            "name": "Date",
            "column_name": "date",
            "sort_index": 1,
            "is_required": 0,
            "is_default": 1,
            "created_at": 1572880269,
            "updated_at": null
        },
        {
            "id": 12,
            "name": "Overdraft Allowance",
            "column_name": "c_4ce0b76",
            "sort_index": 2,
            "is_required": 0,
            "is_default": null,
            "created_at": 1572880276,
            "updated_at": null
        },
        "..."
    ]
}

Add column

Add a new column to the historical data you record on your data subject. A table must be created in the control panel before adding columns. You can only add one column in a single API call.

MANDATORY PARAMETERS


No parameters.


MANDATORY RAW BODY


[
    {
        "name": "Weight",
        "sort_index": 5
    }
]

name Mandatory

The name of the column.


sort_index Optional

An integer representing the order of this column.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X POST 'https://api.dataships.io/controller/table/column' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'Content-Type: application/json' \
--data-raw '[
    {
        "name": "Weight",
        "sort_index": 5
    }
]'

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "message": "Table column added successfully.",
        "object": [
            {
                "name": "Weight",
                "column_name": "c_f6d7475",
                "sort_index": 5,
                "is_required": 0,
                "created_at": 1584715223,
                "status": 0,
                "id": 32
            }
        ]
    }
}

Update column

Update an existing column of historical data you record on your data subject. You can update multiple columns through a single API call.

MANDATORY PARAMETERS


No parameters.


MANDATORY RAW BODY


[
    {
        "id": 32,
        "name": "Height",
        "sort_index": 4
    }
]

id Mandatory

Id of the column you wish to update.


name Optional

The new name of the column.


sort_index Optional

An integer representing the order of this column.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X PATCH 'https://api.dataships.io/controller/table/column' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'Content-Type: application/json' \
--data-raw '[
    {
        "id": 32,
        "name": "Height",
        "sort_index": 4
    }
]'

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "count": 1,
        "message": "Table updated successfully."
    }
}

Delete column

Update an existing column of historical data you record on your data subject (e.g., the customer).

MANDATORY PARAMETERS


id Path Variable

Id of the column you wish to update.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X DELETE 'https://api.dataships.io/controller/table/column/:id' \
-H 'Authorization: Bearer <SECRET_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "message": "Table column deleted successfully."
    }
}

Policies

This is an object representing all the Data Controller policies stored by Dataships. You can retrieve it to see the policies on the Data Controller such as the privacy policy or cookie policy.

POLICIES OBJECT


id

Unique identifier for the object.

name

The name of the object.

display_name

The display name given to the object.

value

The value (HTML) given to the object.

List policies

You can use this API to return a list of all policies for the main account holder.

MANDATORY PARAMETERS


X-Api-Key Header

Public key of the account holder.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/controller/policy' 
-H 'X-Api-Key: <PUBLIC_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": 1,
            "name": "privacy-policy",
            "display_name": "Privacy Policy"
        },
        "..."
    ]
}

Get policy contents

You can use this API to return the contents of a policy.

MANDATORY PARAMETERS


X-Api-Key Header

Public key of the account holder.


type Form-Data Parameter

The name of the policy (e.g., privacy-policy) you wish to get the contents of.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X POST 'https://api.dataships.io/controller/policy/content' 
-H 'X-Api-Key: <PUBLIC_KEY>' 
-F 'type=<TYPE>'  

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": 2,
            "name": "Privacy Notice - Overview"
        },
        "..."
    ]
}

Get policy content details

You can use this API to return the value (HTML content) of a privacy content.

MANDATORY PARAMETERS


X-Api-Key Header

Public key of the account holder.


id Path Variable

The id of the policy content you wish to retrieve the value for.


type Form-Data Parameter

The name of the policy (e.g., privacy-policy) you wish to get the contents of.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X POST 'https://api.dataships.io/controller/policy/content/:policy_content_id' 
-H 'X-Api-Key: <PUBLIC_KEY>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "id": 2,
        "name": "Privacy Notice - Overview",
        "value": "<p>COMPANY_NAME takes your privacy very seriously. This privacy notice describes how and why we, as data controller, obtain, store and process personal data. <\/p>"
    }
}

Data Subject API

The Data Subject API are the specific commands you will need to employ to populate the data fields with the corresponding values.

Token

Tokenization is the process Dataships use to collect sensitive or personally identifiable information (PII), directly from your data sources in a secure manner. A token representing this information is returned to your server to use. You should first obtain a token to perform any subsequent API call.
All tokens have an expiration time of 1 hour and the expiration timestamp is included in the response. Tokens can be used more than once but do keep in mind that if your token is expired, you should get a new token.

TOKEN OBJECT


token

A token to perform Subject API calls.

expires_at

A unix timestamp indicating the time until which the token is valid.

Get token

Get a new token to perform Data Subject API calls.

MANDATORY PARAMETERS


email Form-Data Parameter

The email address of the data subject (e.g., the customer) you wish to execute any Subject APIs call on.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X POST 'https://api.dataships.io/subject/token' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-F 'email=customer@somecompany.com' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "token": "<ISSUED_TOKEN>",
        "expires_at": 1584639402
    }
}

Data

Data objects allow you to perform updates that are associated with a data subject (e.g., the customer). The API allows you to get, update, add and delete your subject's data.

DATA OBJECT


id

The unique identifier for the object.

name

The default name given to the data field.

field_name

The unique name given to the data field.

display_name

The default name given to the data field.

data_type

The type of data this field stores. E.g. date, text, href.

is_default

Whether the data field has a default value. Default values cannot be updated.

purpose

Purpose of storing this data field.

field_description

Description of the data field.

field_header

The name of the field header this field is a part of, null otherwise. E.g. Line 2 could be a part of the field header address.

sort_index

Position of the data field in the respective data source.

is_required

Whether the data field is mandatory.

value

The respective data for this data field.

Get Data

Get the data associated with a data subject for a particular integration.

MANDATORY PARAMETERS


integration_id Path Variable

The id of the integration.



OPTIONAL PARAMETERS


data_source_name Query Parameter

The name of the data source .



Request


curl -X POST https://api.dataships.io/subject/data/:integration_id?data_source_name=<data_source_name> \ 
-H 'Authorization: Bearer <SECRET_KEY>' \ 
-H 'token:<ISSUED_TOKEN>' \
-F data_source_name="dataships"

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": "13",
            "name": null,
            "field_name": "email",
            "display_name": "Email",
            "data_type": "text",
            "is_default": "0",
            "purpose": null,
            "field_description": "Account Information",
            "field_header": null,
            "sort_index": null,
            "is_required": "1",
            "value": "john@example.com"
        },
        {
            "id": "21",
            "name": null,
            "field_name": "first_name",
            "display_name": "First Name",
            "data_type": "text",
            "is_default": "0",
            "purpose": null,
            "field_description": "Contact Details",
            "field_header": null,
            "sort_index": null,
            "is_required": "1",
            "value": "John"
        },
        {
            "id": "23",
            "name": null,
            "field_name": "last_name",
            "display_name": "Last Name",
            "data_type": "text",
            "is_default": "0",
            "purpose": null,
            "field_description": "Contact Details",
            "field_header": null,
            "sort_index": null,
            "is_required": "1",
            "value": "Doe"
        },
        "..."
    ]
}

Update data

Update the data associated with a data subject for a particular integration. If the data source allows update, the data will update automatically and can be verified by making a get data request. If the data source does not support update however, the request will create a modification request in the Control Panel.

MANDATORY PARAMETERS


integration_id Path Variable

The integration id for the data source.



MANDATORY RAW BODY


[
    {
        "id": 21,
        "old_value": "J",
        "value": "John"
    },
    {
        "id": 23,
        "old_value": "D",
        "value": "Doe"
    }
]

id Mandatory

The unique identifier of the field to be updated.


value Mandatory

The respective data for this data field.


old_value Mandatory

The data previously associated with this field. Pass this value to generate appropriate rectification history in the Audit Logs section of the Control Panel.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X PATCH 'https://api.dataships.io/subject/data/:integration_id' \
-H 'Authorization: Bearer <SECRET_KEY>' \ 
-H 'token:<ISSUED_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '[
    {
        "id": 21,
        "old_value": "J",
        "value": "John"
    },
    {
        "id": 23,
        "old_value": "D",
        "value": "Doe"
    }
]'

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "message": "Data updated successfully."
    }
}

Table-row

Table row objects allow you to perform updates on historical data / custom table rows that are associated with a data subject (e.g., the customer). The API allows you to get, add and delete a row from your subject's table..

TABLE-ROW OBJECT


id

Unique identifier for the row.

date

A unix timestamp indicating the time associated with the data.

other_columns

The value associated with each unique identifier for the column name.

...

Get table rows

Get the historical data / custom table rows that are associated with a data subject (e.g., the customer).

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


display_name Query Parameter

Set it to 1 if you want to reveal the column names as keys instead of unique identifiers.



Request

curl -X GET https://api.dataships.io/subject/table/get?display_name=1 \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'token:<ISSUED_TOKEN>'

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": "5",
            "Date": "1584037866",
            "Overdraft Allowance": "\u20ac1000"
        },
        {
            "id": "4",
            "Date": "1584037855",
            "Overdraft Allowance": "\u20ac5000"
        },
        "..."
    ]
}

Add table row

Add a new row in your custom table for the data subject (e.g., the customer). The table columns defined by the main account holder that does not get a value through this API will automatically get a value of null. We currently support adding 1 row at a time only. Batch inserts will be available in a future release.

MANDATORY PARAMETERS


No parameters.


MANDATORY RAW BODY


[
    {
        "c_4ce0b76": "AA",
        "c_f2eadc9": "BB",
        "c_f77bf08": "CC"
    }
]

date Optional

Passing date in JSON raw body is optional. The value for date must be a valid Unix timestamp. If left blank, the current timestamp will be added.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X POST 'https://api.dataships.io/subject/table/row' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'token:<ISSUED_TOKEN>' \
-H 'Content-Type: application/json' \
--data-raw '[
    {
        "c_4ce0b76": "AA",
        "c_f2eadc9": "BB",
        "c_f77bf08": "CC"
    }
]'

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "message": "Row added successfully.",
        "object": [
            {
                "id": "15",
                "date": "1585225111",
                "c_4ce0b76": "AA",
                "c_f2eadc9": "BB",
                "c_f77bf08": "CC"
            }
        ]
    }
}

Delete table row

Delete a row of subject’s data from your custom table.

MANDATORY PARAMETERS


id Path Variable

Id of the row you wish to delete.



OPTIONAL PARAMETERS


No parameters.


Request

curl -X DELETE 'https://api.dataships.io/subject/table/row/:id' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'token:<ISSUED_TOKEN>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": {
        "message": "Row deleted successfully."
    }
}

Document

The document object allows you to view, change and delete any document associated with a data subject (e.g., the customer).

DOCUMENT OBJECT


id

The unique identifier for the document object.

key

A unique key associated with the document object.

data

The data associated with the document. This includes name, description, effective and the file size in bytes.

created_at

The timestamp of when you uploaded this document.

updated_at

The timestamp of when this document was last updated.

List documents

Get a list of all documents associated with a data subject (e.g., the customer).

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/subject/document' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'token:<ISSUED_TOKEN>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": [
        {
            "id": 9,
            "key": "abcdefgh",
            "data": {
                "name": "Contract",
                "description": "Employee Contract 2019",
                "effective": "Yes",
                "file_size_bytes": 31709
            },
            "created_at": 1584622125,
            "updated_at": 1584622125
        }
    ]
}

Additional-actions

Erasure request

Make an erasure request on behalf of a data subject (e.g., the customer).

MANDATORY PARAMETERS


No parameters.


OPTIONAL PARAMETERS


No parameters.


Request

curl -X GET 'https://api.dataships.io/subject/erasure-request' \
-H 'Authorization: Bearer <SECRET_KEY>' \
-H 'token:<ISSUED_TOKEN>' 

Response Object

{
    "code": 200,
    "status": "success",
    "response": true
}