Unveel API (1.0.0)

Download OpenAPI specification:Download

Introduction

The Unveel API is a hypermedia-driven REST API. It embraces JSON for Linked Data (JSON-LD) and Hydra Core Vocabulary. Accepts JSON-encoded bodies and uses standard HTTP response codes, authentication, and verbs.

You can use API in sandbox and production mode. Each of the environments has separate credentials and URLs.

Authentication

Authentication to the API is performed via HTTP Basic Auth. Provide your client id as the basic auth username value and client_secret as a password. Your API keys carry many privileges, so be sure to keep them secure! Do not share your client_secret in publicly accessible areas such as GitHub, client-side code, and so forth. All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Errors

Unveel API uses HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided. Codes in the 5xx range indicate an error with servers. 404 code means that requested data is missing or the URL not exists. The difference is that missing data returns hydra description "Not Found" and invalid URL returns hydra description "URL Not Exists."

Pagination

Endpoints that return a collection of data contain more context information about the collection:

  • "hydra:totalItems" - number of items in the collection,
  • "hydra:view" - information about first, last, next, and previous page of pagination,
  • "hydra:search" - with information about filters that you might use in the endpoint. Currently, API doesn't support changing the limit of items returned by the endpoint.

Limits:

In response headers you can find three headers:

  • X-RateLimit-Remaining - number of available requests in the current minute
  • X-RateLimit-RetryAfter - this header contains information about when next request will be acceptable
  • X-RateLimit-Limit - maximum number of requests per minute

Webhooks

You can configure webhook endpoints via the API to be notified about events that happen in your client Unveel account or connected accounts.

Unveel uses webhooks to notify your application when an event happens in your client account. Data from your user's accounts are imported asynchronously, which makes webhooks very handy. Instead of making requests to check if something new was imported, we encourage you to use webhooks.

Key considerations

For each event occurrence, Unveel POSTs the webhook data to your endpoint in JSON format. Each webhook request includes a URL that you can use to fetch data from the API. Requests don't have data. The webhook endpoint needs to: Return a 200 status code. Any other code is considered a failure, and the webhook will be repeated. Return quickly. The endpoint has to return a response within 5 seconds. If it takes more time, it will be considered a failure and repeated.

Validation

Each webhook request consists X-Unveel-Signature header. You can use this header to validate the request. The header consists of keyed hash values using the HMAC method with the sha512 algorithm. Example: "echo -n "webhook request data" | openssl sha512 -hmac "key". The Unveel API doesn't provide a list of API address from where API will send requests.

Repeated requests

Each repeated request has headers: X-Unveel-Date - date of the first attempt of the delivery X-Unveel-Try - which attempt is it Each request is retried three times with a delay of 2 seconds.

Registering webhook endpoint

You can register a webhook endpoint by using the "/webhooks" endpoint. You have to provide the name, type, and URL of the webhook. For account-partially-synced webhook you can specify params property with object containing "days" property. Every time we will import data older than x days webhook will be triggered. Only https endpoints are accepted. Each endpoint is validated before it will be used. For validation, we send a GET request to the provided URL with the "challenge" parameter, and your endpoint should respond with 200 status code JSON encoded body that contains {"challenge": "value form challenge parameter"}.

Order of Webhooks

The Unveel doesn't ensure that webhooks will be sent in any order.

Types

There are several types of webhooks:

  • account-connected - triggered when authentication was finished successfully.
  • account-created - triggered when profile data from partner are imported.
  • account-updated - triggered when new data is imported for the account.
  • account-removed - triggered when the account was removed.
  • account-synced - triggered when scan is finished. This webhook has two additional optional properties payoutTimeLimit and workTimeLimit which can be used as filters in work and payout endpoints.
  • account-partially-synced - triggered when scan for work data reached particular point in time configured in params type ("days" key)
  • work-created - triggered every time new work data item was imported for the first time
  • work-updated - triggered every time single work data was updated
  • payout-created - triggered every time new payout data item was imported for the first time
  • payout-updated - triggered every time single payout data was updated
  • payment-account-changed - triggered when payment account was changed for the account
  • payment-account-change-failed - triggered when payment account change failed for the account. Payload has details about fail reason.
  • payment-account-verification-failed - triggered when payment account in partner platform is different than changed by Unveel API

Params of account-partially-synced webhook:

During the creation of webhooks with type account-partially-synced you need to define how many days should be a limit for this webhook. For example:

POST /webhooks
{
  "name": "account-partially-synced example",
  "type": "account-partially-synced",
  "url": "https://someurl.com",
  "params": {
    "days": 180
  }
}

Data imports

After a user successfully connects an account for a partner, we import account data and all historical work data. Account data usually are imported within seconds after connection, but importing work data may take several hours to finish. Work data is imported in order, which means that recently finished work is imported first. After the first initial import was finished, Unveel re-imports the account and the last two weeks of work data every four hours. Uber has a hard limit of 212 weeks of last work data that is imported.

Account statuses

An account might have different statuses:

  • connecting - means that a user started the authentication process, but it was not finished yet.
  • connected - means user finished authentication process and credentials are still valid.
  • authenticationError - means user credentials were revoked and requires users to reauthenticate in UnveelConnect.
  • error - means last import failed for an unknown reason, doesn't require user interaction and will be resolved by Unveel crew.

Work income types

A work income might have different types:

  • total - it's a total amount which was earned (including bonuses, tips etc.)
  • totalCharge - it's a total amount which was charged (total amount + fees)
  • tips - the amount of money which is a tip
  • fees - the amount of money which is a fee
  • bonus - the amount of money which is a bonus
  • cash - the amount of money earned by cash
  • incentive - used only for work type incentive to different from other income types. Incentive work type is not paid for a single activity, but rather a series of activities, for example, 5 rides per day.
  • guaranteed - the amount of money which is guaranteed if gig-worker works a defined number of hours or if arrives at work (specific for some platforms)

Time

All time-related data is returned in UTC-0 timezone. Work data for some partners might return user timezone, which may be used to recalculate time from a user perspective.

Unveel SDK

Overview

Unveel SDK is the javascript SDK that can be used to connect users accounts with Unveel and allow you to access their data via the Unveel API. Unveel SDK handles credential validation, multi-factor authentication, and error handling for each partner platform. Unveel SDK is utilizing iframe to show user Unveel Link page.

Unveel SDK methods:

start(options)

This method render Unveel Link page inside iframe and connect callbacks.

Required options:

  • htmlElement - HTML Element which will be used as parent to display Unveel Link
  • pluginKey - your Unveel SDK plugin key created for you during onboarding

Optional:

  • jwtToken - token which identifies your user. If user use Unveel SDK for the first time SDK will create user and call userCreated callback with his userId and token. More information
  • sandbox - boolean value. Set to true if you want to connect to sandbox environment.
  • partners - array of partners ids to show in the Unveel SDK. Passing one partner will disable the partners list and display only selected partner.
  • features - array of selected features to show in the Unveel SDK. Passing array of features will filter out partners which don't support desired features.
    • Supported values:
      • scan - Full scan partners
      • authentication - Authorization partners
      • change_bank_account - payment account details change feature
    • By default, only full scan partners are enabled with default value: ['scan'].
  • accountRequest - encrypted payment account details change request data. Data can be obtained from Unveel API to encrypt payment
  • hideClose - boolean flag to hide close button if you prefer to handle closing. By default, set to false.
  • language - language used by Unveel SDK, english is default choice.
    • Supported values:
      • en - English
      • pl - Polish
  • country - two-letter country code for default country set for user. By default, set to US.

destroy()

Method removes event listeners

Should be called when SDK is no longer used to detach event listeners and form.

Callbacks

List of callbacks to hook into flow:

  • close - called when the Unveel SDK component is closed.
  • accountConnected - called when user successfully authenticates with partner platform
  • accountCreated - called when user starts authentication process
  • accountRemoved - called when user removes partner account
  • userCreated - called when component was initialized without token and new user was created. Store token and user id in backend database to reuse it next time user will interact with the Unveel SDK.
  • tokenExpired - called when passed token is expired. You should use Unveel API to refresh token
  • onError - called when SDK displays error to a user, for more details check SDK Error codes referece

Example usage

How to use

HTML/VanillaJS

<head>
    <!-- ... -->
    <script src="https://sdk.unveel.io/sdk.js"></script>
    <!-- ... -->
</head>
<body>
<!-- ... -->
<div id="root">
    <div id="mount-element"></div>
</div>
<script>
    window.Unveel.start({
        htmlElement: document.getElementById('mount-element'),
        sandbox: true,
        pluginKey: 'plugin_key',
        hideClose: false,
        language: 'en',
        country: 'US',
        features: ['scan'],
        close: () => {
            window.Unveel.destroy();
        },
        accountConnected: (userId, accountId) => {
            /* Handle account connection */
        },
        accountCreated: (userId, accountId) => {
            /* Handle account creation */
        },
        accountRemoved: (userId, accountId) => {
            /* Handle account removal */
        },
        tokenExpired: (userId) => {
            /* Handle token expiration */
        },
        userCreated: (userId, jwtToken) => {
            /* Handle user creation */
        }
        onError: (error) => {
          /* Handle user error */
        }
    });
</script>
<!-- ... -->
</body>

React

Easiest way to use SDK with React is to add SDK script to page head section and run SDK from inside of React component.

<head>
    <!-- ... -->
    <script src="https://sdk.unveel.io/sdk.js"></script>
    <!-- ... -->
</head>
import React, { useRef, useEffect } from "react";

export const UnveelConnect = () => {
  const unveelFormElement = useRef(null);
  useEffect(() => {
    window.Unveel.start({
      htmlElement: unveelFormElement.current,
      sandbox: true,
      pluginKey: "plugin_key",
      hideClose: false,
      close: () => {
        window.Unveel.destroy();
      },
      accountConnected: (userId, accountId) => {
        /* Handle account connection */
      },
      accountCreated: (userId, accountId) => {
        /* Handle account creation */
      },
      accountRemoved: (userId, accountId) => {
        /* Handle account removal */
      },
      tokenExpired: (userId) => {
        /* Handle token expiration */
      },
      userCreated: (userId, jwtToken) => {
        /* Handle user creation */
      },
    });
    return () => {
      window.Unveel.destroy();
    };
  }, []);

  return <div id="unveel-sdk" ref={unveelFormElement} />;
};

React Native

Because SDK is using iframe element, it has to be run inside WebView. Below we are presenting example HTML code for WebView to use in React Native application.


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="https://sdk.unveel.io/sdk.js"></script>
    <title>Integration test</title>
    <style>
        body {
            margin: 0;
        }
        #root {
            width: 100%;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-content: center;
        }
        #sdk-mount-element {
            flex-grow: 1;
        }
        iframe {
            border: none;
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
<div id="root">
    <div id="sdk-mount-element"></div>
</div>
<script>
try {
    window.Unveel.start({
        // ... Rest of SDK parameters
        accountConnected: (userId, accountId) => {
          // Connecting to WebView events
          window.ReactNativeWebView.postMessage(JSON.stringify({
            message: 'accountConnected',
            data: {userId, accountId}
          }));
        },
        // ...
    });
} catch (e) {
  document.getElementById('error').innerHTML = e.message;
}
</script>
</body>
</html>

Initialize single integration

In this mode SDK will omit initial integration select list and redirect user to desired integration. This way user path can be shortened. To enable this mode pass single partner id in partners parameter.

    window.Unveel.start({
        // ... Rest of SDK parameters
        partners: ['uber'],
        // ...
    });

User Token

In the Unveel SDK users are identified by JWT Tokens. When the Unveel SDK component is initialized without JWT token, new user is created and userCreated callback is called. As a parameters, you will receive user id and JWT Token. You should store those values in your database, and pass token next time user interacts with the component. Tokens expire after 30 days of its creation.

Structure

Each token is in a form of JWT Token. Payload:

{
    "sub": "user id",
    "iss": "your client id",
    "exp": "timestamp when token will expire"
}

Each Token is signed with RS256 algorithm.

Verification

In your onboarding you were provided with public key that can be used to verify token. In order to do it you can use one of the libraries listed here

Expired tokens

When expired token is passed to the component or token expire while user interacts with component the tokenExpired callback is called, and you are responsible for refreshing it by making a call to refresh user token endpoint from backend of your application. You can refresh tokens every time users starts interacting with the Unveel SDK component.

Test Data

On sandbox you can use following test data:

  • username: test@unveel.io or +48555123456
  • password: password1
  • code: 1234
  • phone number: +48555123456
  • security question: What is your favourite color? blue

SDK Error codes

Errors in onError callback are objects containing key and message:

  • key - is a unique value used to determine error. It is optional value if key is missing this means that unknown error occurred.
  • message - Description of error

Example:

{
  "key": "apiErrors.authentication.credentialsRevoked",
  "message": "Your credentials were revoked please provide them again"
}

List of error codes:

  • apiErrors.authentication.generic - Unknown authentication error.
  • apiErrors.authentication.credentialsRevoked - Credentials of the user were revoked and need to be updated.
  • apiErrors.authentication.invalidCredentials - User used invalid credentials
  • apiErrors.authentication.passwordResetRequired - User need to reset password first
  • apiErrors.authentication.unsupportedMfaOption - User used unsupported MFA option
  • apiErrors.authentication.userAlreadyRegistered - User tried to create account which already exists
  • apiErrors.authentication.tooManyAttempts - User performed too many login attempts
  • apiErrors.authentication.incorrectSMSPasscode - User used invalid SMS code

Change Payment Account

Methods

By API

In order to change payment account by our API send a request to the endpoint providing all necessary details described in Account details section. The request is handled asynchronously, which means that actual change will happen after you receive a response. In the response, you will receive requestId which you can use to get the current status by passing it to the endpoint. There are 4 different statuses:

  • init - request was accepted by our system and it is waiting for processing
  • started - the process of changing payment account is in progress
  • succeed - the process was finished with success
  • failed - Unveel failed to change the payment account

You can also register a webhook payment-account-changed or payment-account-change-failed which will be sent to you when the process is finished.

By SDK

To change payment account by our SDK first you have to encrypt account details by using endpoint. All necessary details are described in Account details section. Encryption is required to never expose account details on the SDK. The next step is to pass the encrypted request as the accountRequest option in the SDK. After use will successfully authenticate for the partner, Unveel will change payment account details. If you want to be notified about the status of the process you can register webhooks payment-account-changed or payment-account-change-failed which will be sent to you when the process is finished.

Account details

Each country and partner requires different account details to be provided.

Uber UK

{
  "beneficiary": {
    "name": "Name of the beneficiary",
    "city": "City of the beneficiary",
    "address": "Other details about address including street and street number",
    "postCode": "Postal code",
    "dateOfBirth": "Date of birth of the beneficiary"
  },
  "bank": {
    "iban": "Account number in IBAN format",
    "swift": "Optional swift code of the bank"
  }
}

Account verification

After each scan, we are verifying if the account in the partner platform is equal to the account number changed by your request. You can register for payment-account-verification-failed webhook to be informed every time we detect the account number changed. If we fail to perform a scan, an account verification process will not be triggered and we won't be able to detect if the account number was not changed.

Account

Retrieves the collection of Account resources.

Retrieves the collection of Account resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

userId
string

List all accounts for the user

partner
string

List all accounts for the partner

Responses
200

Account collection

get/accounts
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Retrieves a Account resource.

Retrieves a Account resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

Account identifier

Responses
200

Account resource

404

Resource not found

get/accounts/{id}
Request samples
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "partner": "string",
  • "userId": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "status": "connecting",
  • "profile": {
    }
}

Removes the Account resource.

Removes the Account resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

Account identifier

Responses
204

Account resource deleted

404

Resource not found

delete/accounts/{id}
Request samples

Integration

Retrieves the collection of Integration resources.

Retrieves the collection of Integration resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

Responses
200

Integration collection

get/integrations
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Payment

Change data account details

SecurityHttpBasic
Request
path Parameters
userId
required
string

Id of the user

partner
required
string

Id of the partner

Request Body schema:

Payment data to encrypt

object (Beneficiary.jsonld)

Details about beneficairy of bank account

object (Bank.jsonld)

Details about bank

Responses
200

Object containing id of the request

422

Validation errors

post/payment/change/{userId}/{partner}
Request samples
{ }
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "requestId": "string"
}

Encrypt data for changing payment account details

SecurityHttpBasic
Request
Request Body schema:

Payment data to encrypt

object (Beneficiary.jsonld)

Details about beneficairy of bank account

object (Bank.jsonld)

Details about bank

Responses
200

Encrypted data

422

Validation errors

post/payment/encrypt
Request samples
{ }
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "data": "string"
}

ChangePaymentMethodRequest

Retrieves the collection of ChangePaymentMethodRequest resources.

Retrieves the collection of ChangePaymentMethodRequest resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

accountId
required
string
Responses
200

ChangePaymentMethodRequest collection

get/payments/change-data-requests
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Retrieves a ChangePaymentMethodRequest resource.

Retrieves a ChangePaymentMethodRequest resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

ChangePaymentMethodRequest identifier

Responses
200

ChangePaymentMethodRequest resource

404

Resource not found

get/payments/change-data-requests/{id}
Request samples
Response samples
{
  • "@id": "string",
  • "@type": "string",
  • "@context": "string",
  • "accountId": "string",
  • "beneficiaryName": "string",
  • "beneficiaryCity": "string",
  • "beneficiaryAddress": "string",
  • "beneficiaryPostCode": "string",
  • "beneficiaryDateOfBirth": "2019-08-24T14:15:22Z",
  • "bankIban": "string",
  • "bankSwift": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "finishedAt": "2019-08-24T14:15:22Z",
  • "status": "init"
}

PayoutData

Retrieves the collection of PayoutData resources.

Retrieves the collection of PayoutData resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

accountId
required
string
paidAt.gt
string

Date time in form YYYY-mm-dd HH:ii:ss

paidAt.gte
string

Date time in form YYYY-mm-dd HH:ii:ss

paidAt.lt
string

Date time in form YYYY-mm-dd HH:ii:ss

paidAt.lte
string

Date time in form YYYY-mm-dd HH:ii:ss

Responses
200

PayoutData collection

get/payouts
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Retrieves a PayoutData resource.

Retrieves a PayoutData resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

PayoutData identifier

Responses
200

PayoutData resource

404

Resource not found

get/payouts/{id}
Request samples
Response samples
{
  • "@id": "string",
  • "@type": "string",
  • "@context": "string",
  • "id": "string",
  • "hashedExternalId": "string",
  • "type": "salary",
  • "paidAt": "2019-08-24T14:15:22Z",
  • "grossPay": null,
  • "netPay": null,
  • "accountId": "string",
  • "currency": "string"
}

SDK Connect

Information about last scan for user/partner

SecurityHttpBasic
Request
path Parameters
userId
required
string

Id of the user

partner
required
string

Id of the partner

Responses
200

Information about last scan for user/partner

400

Invalid client or user

401

Unathorized

get/sdk-connect/{userId}/user/scan/{partner}/last
Request samples
Response samples
application/json
{
  • "date": "2022-02-13 04:03:00+00:00",
  • "nextPossibleManualRequestDate": "2022-02-13 04:03:00+00:00"
}

Run manual scan for user/partner

SecurityHttpBasic
Request
path Parameters
userId
required
string

Id of the user

partner
required
string

Id of the partner

Responses
204

Empty response

400

Invalid client or user

401

Unathorized

422

Cannot run scan manually

post/sdk-connect/{userId}/user/scan/{partner}/run
Request samples

Get setup scheduler for partner

SecurityHttpBasic
Request
path Parameters
userId
required
string

Id of the user

partner
required
string

Id of the partner

Responses
200

Information about setup scheduler for partner

400

Invalid client or user

401

Unathorized

get/sdk-connect/{userId}/user/scheduler/{partner}
Request samples
Response samples
application/json
{
  • "type": "manual",
  • "intervalType": "PT24H",
  • "startHour": 3,
  • "timezone": "Europe\\Warsaw",
  • "supportedIntervalTypes": "manual",
  • "schedulerConfigurationDisabled": false
}

Setup scheduler for partner

SecurityHttpBasic
Request
path Parameters
userId
required
string

Id of the user

partner
required
string

Id of the partner

Request Body schema: application/json
type
string

Type of scheduler: manual, interval

intervalType
string

Type of interval: PT24H, PT4H, PT2H

startHour
integer

Start hour (only if interval is PT24H -> daily)

timezone
string

Required only if interval is PT24H -> daily

supportedIntervalTypes
Array of strings

List of supported interval types

Responses
200

Status ok

400

Invalid client or user

401

Unathorized

post/sdk-connect/{userId}/user/scheduler/{partner}
Request samples
application/json
{ }

User

Creates a User resource.

Creates a User resource.

SecurityHttpBasic
Request
Request Body schema:

The new User resource

Responses
201

User resource created

400

Invalid input

422

Unprocessable entity

post/users
Request samples
{ }
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "jwtToken": "string"
}

Refresh user token

Refresh user JWT Token. See

SecurityHttpBasic
Request
path Parameters
id
required
string

User identifier

Responses
201

User resource created

400

Invalid input

404

Resource not found

422

Unprocessable entity

post/users/{id}/token
Request samples
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "jwtToken": "string"
}

Webhook

Retrieves the collection of Webhook resources.

Retrieves the collection of Webhook resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

Responses
200

Webhook collection

get/webhooks
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Creates a Webhook resource.

Creates a Webhook resource.

SecurityHttpBasic
Request
Request Body schema:

The new Webhook resource

name
string <= 50 characters
type
string <= 20 characters
Enum: "account-created" "account-updated" "account-removed" "account-connected" "account-synced" "work-created" "work-updated" "payout-created" "payout-updated" "account-partially-synced"
url
string

Only https url

params
Array of strings

Parameters for webhook, for example number of days for partially sync webhook

Responses
201

Webhook resource created

400

Invalid input

422

Unprocessable entity

post/webhooks
Request samples
{ }
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "type": "account-created",
  • "url": "string",
  • "params": { }
}

Retrieves a Webhook resource.

Retrieves a Webhook resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

Webhook identifier

Responses
200

Webhook resource

404

Resource not found

get/webhooks/{id}
Request samples
Response samples
{
  • "@context": "string",
  • "@id": "string",
  • "@type": "string",
  • "id": "string",
  • "name": "string",
  • "type": "account-created",
  • "url": "string",
  • "params": { }
}

Removes the Webhook resource.

Removes the Webhook resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

Webhook identifier

Responses
204

Webhook resource deleted

404

Resource not found

delete/webhooks/{id}
Request samples

WorkData

Retrieves the collection of WorkData resources.

Retrieves the collection of WorkData resources.

SecurityHttpBasic
Request
query Parameters
page
integer
Default: 1

The collection page number

accountId
required
string
startDate.gt
string

Date time in form YYYY-mm-dd HH:ii:ss

startDate.gte
string

Date time in form YYYY-mm-dd HH:ii:ss

startDate.lt
string

Date time in form YYYY-mm-dd HH:ii:ss

startDate.lte
string

Date time in form YYYY-mm-dd HH:ii:ss

endDate.gt
string

Date time in form YYYY-mm-dd HH:ii:ss

endDate.gte
string

Date time in form YYYY-mm-dd HH:ii:ss

endDate.lt
string

Date time in form YYYY-mm-dd HH:ii:ss

endDate.lte
string

Date time in form YYYY-mm-dd HH:ii:ss

workDate.gt
string

Date time in form YYYY-mm-dd HH:ii:ss

workDate.gte
string

Date time in form YYYY-mm-dd HH:ii:ss

workDate.lt
string

Date time in form YYYY-mm-dd HH:ii:ss

workDate.lte
string

Date time in form YYYY-mm-dd HH:ii:ss

Responses
200

WorkData collection

get/works
Request samples
Response samples
{
  • "hydra:member": [
    ],
  • "hydra:totalItems": 0,
  • "hydra:view": {
    },
  • "hydra:search": {
    }
}

Retrieves a WorkData resource.

Retrieves a WorkData resource.

SecurityHttpBasic
Request
path Parameters
id
required
string

WorkData identifier

Responses
200

WorkData resource

404

Resource not found

get/works/{id}
Request samples
Response samples
{
  • "@id": "string",
  • "@type": "string",
  • "@context": "string",
  • "id": "string",
  • "hashedExternalId": "string",
  • "status": "finished",
  • "type": "shift",
  • "numberOfTasks": 0,
  • "startDate": null,
  • "endDate": null,
  • "duration": null,
  • "accountId": "string",
  • "timezone": null,
  • "incomes": [
    ],
  • "locations": [
    ],
  • "ratings": [
    ],
  • "ride": {
    },
  • "instrument": {
    }
}