NAV
Shell HTTP JavaScript Ruby Python PHP Java Go

Dash Users API v3.0.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Search for customers, retrieve a particular customer and update a particular customer's permissions. Please note that authorization tokens are required to access the Dash Payment APIs. Learn how to generate Authorization tokens here.

Base URLs:

Customers

The Customers resource allows users to search for customers, retrieve a particular customer and update a particular customer's permissions. The endpoints available in this resource are GET/customers GET/customers/{identifier} and PUT/customers/{identifier}/permissions.

Learn more

Get Customers

Code samples

# You can also use wget
curl -X GET https://apisandbox.dashsolutions.com/users/customers \
  -H 'Accept: application/json'

GET https://apisandbox.dashsolutions.com/users/customers HTTP/1.1
Host: apisandbox.dashsolutions.com
Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('https://apisandbox.dashsolutions.com/users/customers',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://apisandbox.dashsolutions.com/users/customers',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://apisandbox.dashsolutions.com/users/customers', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://apisandbox.dashsolutions.com/users/customers', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://apisandbox.dashsolutions.com/users/customers");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://apisandbox.dashsolutions.com/users/customers", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers

Gets customers. This endpoint allows users to retrieve customer information.

Parameters

Name In Type Required Description
max query integer false Maximum number of customer records to return. Max limit is 50 per request.
token query string false A continuation token required for pagination
parentIdentifier query string false Parent customer to search within
name query string false Limit results to customers with names containing the given value by the user.
v1Identifier query string false Identifier of the customer in the v1 (Portal) system

Example responses

200 Response

{
  "continuationToken": "string",
  "results": [
    {
      "identifier": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Customer details containing the customer identifier customerResults
400 Bad Request Standard error response errors

Get Customer by ID

Code samples

# You can also use wget
curl -X GET https://apisandbox.dashsolutions.com/users/customers/{identifier} \
  -H 'Accept: application/json'

GET https://apisandbox.dashsolutions.com/users/customers/{identifier} HTTP/1.1
Host: apisandbox.dashsolutions.com
Accept: application/json


const headers = {
  'Accept':'application/json'
};

fetch('https://apisandbox.dashsolutions.com/users/customers/{identifier}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json'
}

result = RestClient.get 'https://apisandbox.dashsolutions.com/users/customers/{identifier}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://apisandbox.dashsolutions.com/users/customers/{identifier}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','https://apisandbox.dashsolutions.com/users/customers/{identifier}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://apisandbox.dashsolutions.com/users/customers/{identifier}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://apisandbox.dashsolutions.com/users/customers/{identifier}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /customers/{identifier}

Gets customers by an identifier. This endpoint allows users to retrieve customer information by an identifier.

Parameters

Name In Type Required Description
identifier path string true Unique identifier that identifies a customer

Example responses

200 Response

{
  "identifier": "string"
}

Responses

Status Meaning Description Schema
200 OK Retrieve customer result customer

Update Customer Permissions

Code samples

# You can also use wget
curl -X PUT https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

PUT https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions HTTP/1.1
Host: apisandbox.dashsolutions.com
Content-Type: application/json
Accept: application/json

const inputBody = '{
  "canSearchLoads": true,
  "canSearchSpends": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

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

result = RestClient.put 'https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions',
  params: {
  }, headers: headers

p JSON.parse(result)

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

r = requests.put('https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "https://apisandbox.dashsolutions.com/users/customers/{identifier}/permissions", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /customers/{identifier}/permissions

Updates customer permissions. This endpoint allows users to update customer permissions to search loads and spends.

Body parameter

{
  "canSearchLoads": true,
  "canSearchSpends": true
}

Parameters

Name In Type Required Description
identifier path string true Identifies a customer
body body customerPermissions true Customer permissions information

Example responses

200 Response

{
  "identifier": "string"
}

Responses

Status Meaning Description Schema
200 OK Retrieve customer result customer

Schemas

errors

[
  {
    "errorCode": "string",
    "errorMessage": "string",
    "fieldName": "string"
  }
]

Error

Properties

Name Type Required Restrictions Description
anonymous [error] false none Error

error

{
  "errorCode": "string",
  "errorMessage": "string",
  "fieldName": "string"
}

Properties

Name Type Required Restrictions Description
errorCode string false none Error code
errorMessage string false none Error message
fieldName string false none Field name that caused the error

customerResults

{
  "continuationToken": "string",
  "results": [
    {
      "identifier": "string"
    }
  ]
}

Properties

Name Type Required Restrictions Description
continuationToken string false none A continuation token required for pagination
results [customer] false none Customer details

customer

{
  "identifier": "string"
}

Properties

Name Type Required Restrictions Description
identifier string false none Dash customer identifier

customerPermissions

{
  "canSearchLoads": true,
  "canSearchSpends": true
}

Properties

Name Type Required Restrictions Description
canSearchLoads boolean false none Customer is allowed to search for load records
canSearchSpends boolean false none Customer is allowed to search for unload records