Centro de Ayuda de Dardo
Referencia

Cuentas

Datos de la cuenta y su configuración.

GET/api/v2/companies

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Query Parameters

page?integer

Page number

Range1 <= value
Default1
itemsPerPage?integer

Items per page

Range1 <= value <= 1000
Default30
query?string

Search by company name, email or phone (case-insensitive partial match). Numeric values also match by company id.

Length2 <= length <= 100

Response Body

application/json

curl -X GET "https://example.com/api/v2/companies"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "meta": {    "totalItems": 0,    "itemsPerPage": 0,    "currentPage": 0  },  "data": [    {      "status": 0,      "tariffStatus": "free",      "id": 0,      "userId": "string",      "tariffId": 0,      "name": "string",      "email": "string",      "phone": "string",      "note": "string",      "apiKey": "string",      "expiresAt": "2019-08-24T14:15:22Z",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "extra": {        "fullAddress": "string",        "street": "string",        "city": "string",        "state": "string",        "stateCode": "string",        "country": "string",        "countryCode": "string",        "postalCode": "string",        "timezone": "string",        "website": "string"      }    }  ]}
POST/api/v2/companies

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v2/companies" \  -H "Content-Type: application/json" \  -d '{    "tariffId": 0,    "tariffPeriod": "trial",    "name": "string",    "userName": "string",    "userSurname": "string",    "email": "string",    "phone": "string",    "password": "string",    "country": "string"  }'
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "status": 0,    "tariffStatus": "free",    "id": 0,    "userId": "string",    "tariffId": 0,    "name": "string",    "email": "string",    "phone": "string",    "note": "string",    "apiKey": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "extra": {      "fullAddress": "string",      "street": "string",      "city": "string",      "state": "string",      "stateCode": "string",      "country": "string",      "countryCode": "string",      "postalCode": "string",      "timezone": "string",      "website": "string"    }  }}
GET/api/v2/companies/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X GET "https://example.com/api/v2/companies/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "status": 0,    "tariffStatus": "free",    "id": 0,    "userId": "string",    "tariffId": 0,    "name": "string",    "email": "string",    "phone": "string",    "note": "string",    "apiKey": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "extra": {      "fullAddress": "string",      "street": "string",      "city": "string",      "state": "string",      "stateCode": "string",      "country": "string",      "countryCode": "string",      "postalCode": "string",      "timezone": "string",      "website": "string"    }  }}
PATCH/api/v2/companies/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X PATCH "https://example.com/api/v2/companies/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "status": 0,    "tariffStatus": "free",    "id": 0,    "userId": "string",    "tariffId": 0,    "name": "string",    "email": "string",    "phone": "string",    "note": "string",    "apiKey": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "updatedAt": "2019-08-24T14:15:22Z",    "extra": {      "fullAddress": "string",      "street": "string",      "city": "string",      "state": "string",      "stateCode": "string",      "country": "string",      "countryCode": "string",      "postalCode": "string",      "timezone": "string",      "website": "string"    }  }}
DELETE/api/v2/companies/{id}

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Response Body

application/json

curl -X DELETE "https://example.com/api/v2/companies/string"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "id": 0  }}
GET/api/v2/companies/{id}/sso-link

Authorization

ApiKeyAuth
X-API-Key<token>

In: header

Path Parameters

id*string

Query Parameters

expiresIn?integer

How long the link stays usable, in seconds. Omit it and the link lives one hour, carries no refresh token and leaves nothing behind. Provide it and a refresh token is issued, so the link stays clickable for that period - but the session lasts exactly as long as the link and no longer. Values below 86400 barely extend anything, because the refresh token then expires at almost the same moment as the access token. Note that logging out of the account invalidates the link, even before it expires.

Range3600 <= value <= 2592000
path?string

Relative dashboard path the recipient lands on, for example /managers. Must start with a single slash and carry no query string or fragment. It is not validated against dashboard routes, may be gated by the sub-account permissions, and renaming a route breaks links already sent.

Match^(?!.*//)(?!.*(?:^|/)\.\.(?:/|$))/(?:[A-Za-z0-9\-._~/]|%[0-9A-Fa-f]{2})*$
Lengthlength <= 255
Default"/"

Response Body

application/json

curl -X GET "https://example.com/api/v2/companies/string/sso-link?expiresIn=2592000&path=%2Fmanagers"
{  "responseId": "ed662de2-39c1-4e7d-a6bf-6980511adfaf",  "createdAt": "2019-08-24T14:15:22Z",  "code": 0,  "data": {    "link": "string"  }}