API for Freight Audit data

This API connection enables access to data, which is shown in standard Freight Audit BI cubes - Accrual, Invoice and Cost Cubes.

Basic points

  • Accrual, Invoice and Cost Cubes can be accessed;

  • Raw audited data, not enriched with additional logic, is in scope of the connection;

  • Data can be requested, using filters on any data column from the cube;

  • Received volumes of data will be divided into chunks, having a limit of 10 000 lanes per one chunk;

  • Data chunks can be downloaded either in CSV or in JSON format

  • Limit of data storage of requests per Client:

    • Files time to live on server: 48h 

    • Size of stored files per client: 8 GB 

    • Requests in process per client: 2 

    • Rate limiting for all clients: 100 requests per minute.

    If during data request no filters were given, then a predefined limit will be applied: only 2 years of data will be returned.

     

Authentication

OAuth 2.0 method is used for authentication:

  • We only support client_credentials flow

  • The token endpoint of the authorization server is available at the following URL:

    • Production: https://api.controlpay.com/v1/auth/oauth2/token

    • Test: https://api.dev.controlpay.com/v1/auth/oauth2/token

  • It accepts the client_id in the following form: username@companyId

  • After you've successfully requested an access token, it must be sent as Bearer token type with every request to the resource server:

    • Authorization: Bearer XXX

Flow

After identification via token, to request data, payload with indication what data to be returned is sent to API endpoint. Data can be requested, using filters on any data column from the cube.

After a payload request is sent, the request key is given to the requestor - this key serves as request identifier, and using this key status of request can be checked.

Once a request obtains status “ready to download”, data can be pulled or further processed on the Client's side. Received volumes of data will be divided into chunks, having a limit of 10 000 lanes per one chunk. Data chunks can be downloaded either in CSV or in JSON format.

FSI API connection flow.jpg