Digicust
Web AppPricingBlogContact
  • 👋Welcome to Dexter
  • Guides
    • 🔎Getting started
    • ⬆️Upload Cases
    • 📚Upload Master Data
    • 📚Bulk Edit Master Data
    • 🔧Configure Execution Strategies
    • 🧳Manage Projects
  • Working with Digicust
    • 1️⃣Onboarding Checklist
    • 2️⃣Checklist Recurring Client
    • 3️⃣Checklist Walk-in Clients
  • Features
    • 🔌Integrations
      • Riege Scope
      • BEO
      • FORMAT
      • DHF Zolaris
      • AEB
      • LDV
      • DBH
      • Dakosy
      • SFTP
      • Web Hooks
      • Asycuda
    • 🔎Tariff Classification
      • Auto-fix tariff numbers
      • Automatic classifications
      • Bulk material classifications
    • 🪄AI-Generated Goods Descriptions
    • ✨Rules & Templates
    • ⬆️Upload Scenarios
    • 📃Document Splitting
    • 🛠️Data Extraction
      • Emails
      • Invoices
      • Waybills
      • Packing Lists
      • Delivery Notes
      • Export Declarations
      • Temporary Storage Documents
      • ATR Certificates
      • EUR1
      • Weighing Certificates
      • Excel Files
    • 🪄Data Enrichment & Customs Coding
      • Freight Cost Distribution
      • Preference Check
      • Procedure Detection
      • Automatically Add Negative Codings
      • Document Type Codes
      • Special Unit Measures
      • Currency Conversion
      • Address Normalization
    • 📚Master Data
      • Material Data
      • Stakeholder Data
    • ✔️Data Validation
      • Stakeholder Validation
      • Consistency Check
    • 📧Custom Events
    • Splitting Customs Cases
  • Developer API
    • Getting Started
    • Uploading a Case
    • Fetching a Case
    • Tariff Classificaiton
    • Type Definitions
    • Full Upload API Documentation
    • Full Generic API Documentation
  • Use-Cases
    • Import
      • From Invoices, Emails, Master Data
      • From Export Declarations and Above
      • From Waybills, Turkish Export Declarations and Above
      • From Temporary Storage, Transit Declarations and Above
      • From Delivery Notes, Packing Lists and Above
      • From Preference Documents (A.TR, EUR.1, etc.) and Above
      • Create A.TR from Export Declaration
    • Export
      • From Invoices, Emails, Master Data
      • From Invoices, Packing Lists, Delivery Notes
    • Transit
      • From Invoices, Emails, Export Declarations
    • Intrastat
      • From Invoices
Powered by GitBook
On this page
  • Prerequisites
  • Authentication
  • Documentation

Was this helpful?

  1. Developer API

Getting Started

PreviousSplitting Customs CasesNextUploading a Case

Last updated 1 year ago

Was this helpful?

We allow our customers and partners to fully integrate with our services. The Digicust API is extensive, well-documented, and easy to get started with.

Prerequisites

  • You have an active customer account

  • You have a user account with email-password authentication

  • Your execution strategy is properly set up. An execution strategy defines how customs cases are being processed. You can manage your execution strategies in our web app.

If you do not fulfill the above prerequisites, please create a new account with

Authentication

You need an access token for all requests. Fetch your access token with the following code:

curl -X 'POST' \
  'https://api.digicust.com/generic/api/auth/authenticate' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "<YOUR USERNAME>",
  "password": "<YOUR PASSWORD>"
}'
const authenticate = async () => {
  const data = {
    username: '<YOUR USERNAME>',
    password: '<YOUR PASSWORD>',
  };
  try {
    const response = await fetch('https://api.digicust.com/generic/api/auth/authenticate', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(data),
    });

    const jsonData = await response.json();

    if (!response.ok) {
      throw new Error(jsonData.error || 'Something went wrong');
    }

    const accessToken = jsonData.access_token;
    console.log(accessToken);

    // Save accessToken in some variable, or use directly
    // ...
  } catch (err) {
    console.error('Error:', err);
  }
};
const axios = require('axios');

const authenticate = async () => {
  const data = {
    username: '<YOUR USERNAME>',
    password: '<YOUR PASSWORD>',
  };

  try {
    const response = await axios.post('https://api.digicust.com/generic/api/auth/authenticate', data, {
      headers: {
        'Content-Type': 'application/json',
      },
    });

    const accessToken = response.data.access_token;
    console.log(accessToken);

    // Save accessToken in some variable, or use directly
    // ...
  } catch (err) {
    console.error('Error:', err);
  }
};
Imports System.Net.Http
Imports System.Text
Imports System.Threading.Tasks
Imports Newtonsoft.Json

Public Async Function Authenticate() As Task
    Dim url As String = "https://api.digicust.com/generic/api/auth/authenticate"

    Dim client As HttpClient = New HttpClient()

    Dim user = New With {Key .username = "<YOUR USERNAME>", Key .password = "<YOUR PASSWORD>"}

    Dim json As String = JsonConvert.SerializeObject(user)

    Dim data As New StringContent(json, Encoding.UTF8, "application/json")

    Dim response As HttpResponseMessage = Await client.PostAsync(url, data)

    Dim result As String = Await response.Content.ReadAsStringAsync()

    Dim tokenResponse As Dictionary(Of String, String) = JsonConvert.DeserializeObject(Of Dictionary(Of String, String))(result)

    Dim accessToken As String = tokenResponse("access_token")

    Console.WriteLine(accessToken)

    ' Save accessToken in some variable, or use directly
    ' ...
End Function
import requests
import json


def authenticate():
    data = {
        'username': '<YOUR USERNAME>',
        'password': '<YOUR PASSWORD>',
    }

    headers = {
        'Content-Type': 'application/json',
    }

    try:
        response = requests.post(
            'https://api.digicust.com/generic/api/auth/authenticate', headers=headers, data=json.dumps(data))

        if response.status_code != 200:
            raise Exception(
                'Request failed with status {}'.format(response.status_code))

        response_data = response.json()
        access_token = response_data['access_token']

        print(access_token)

        # Save accessToken in some variable, or use directly
        # ...

    except Exception as e:
        print('Error:', e)


authenticate()

For more details:

Documentation

Find detailed documentation on available endpoints here:

Upload API

Generic API

Types

https://app.digicust.com/
https://api.digicust.com/generic/api-docs/#/Auth/post_api_auth_authenticate
https://api.digicust.com/upload/api-docs/
https://api.digicust.com/generic/api-docs/
https://types.api.digicust.com/